MCPcopy Create free account

hub / github.com/dannybd/courseroad / functions

Functions93 in github.com/dannybd/courseroad

↓ 25 callersFunctiondieJSON
* Set the header type to Javascript and JSON encode the result. */
functions.php:59
↓ 9 callersFunctionalertBadCSRF
()
js/cr.js:959
↓ 9 callersFunctionbadCSRF
(data)
js/cr.js:955
↓ 8 callersMethod_executeStatement
* Execute a given mysqli statement and return sucess & debug info * * Used for UPDATE/INSERT/DELETE statements, to make sure that they happened
CourseRoadDB.php:594
↓ 8 callersFunctionrequireCSRF
()
functions.php:30
↓ 8 callersFunctionrequirePostDataFields
()
functions.php:64
↓ 7 callersFunctionaddAllWires
(reloadNotify)
js/cr.js:594
↓ 7 callersFunctionaskBeforeLeaving
(startAsking)
js/cr.js:916
↓ 6 callersMethoddecrypt
* Decrypts content which was stored in the database * * The goal is to obfuscate some of the data in the database so it isn't * in plaintext
CourseRoadDB.php:129
↓ 6 callersFunctiongetHash
()
js/cr.js:963
↓ 6 callersFunctionparseBoolStr
($str)
output.php:157
↓ 5 callersFunctionredirectHash
($hash)
functions.php:47
↓ 5 callersFunctionsetNewHash
(hash)
js/cr.js:967
↓ 4 callersFunctiongetRequisiteElement
($str, $is_coreq)
output.php:260
↓ 4 callersFunctionhashOwner
($hash)
functions.php:442
↓ 4 callersFunctionproperYear
(classterm)
js/cr.js:659
↓ 4 callersFunctionunhighlightClasses
Helper functions
js/cr.js:844
↓ 3 callersFunctionapplyCallbackFn
* Allows for supplying a callback function to run when a class is found which * successfully acts as a requisite for the requirements. The arguments
js/cr.js:159
↓ 3 callersFunctionbuildCheckbox
(arr)
js/cr.js:760
↓ 3 callersFunctionclassFromJSON
Course-loading functions
js/cr.js:624
↓ 3 callersFunctionfetchClassData
(postData, classterm, oldclass)
js/cr.js:664
↓ 3 callersFunctiongetDefaultUserPrefs
()
functions.php:388
↓ 3 callersMethodgetUserPrefs
* Get a given user's preferences from the users table * * @param string $athena a string of the user's username * * @return array data of
CourseRoadDB.php:528
↓ 3 callersFunctionminclass
* Creates the storable string which holds our precious class data. * Used primarily in saved classes
js/cr.js:868
↓ 3 callersFunctionminmajors
(stringify)
js/cr.js:896
↓ 3 callersFunctionnoCacheLink
($uri)
functions.php:450
↓ 3 callersFunctionpullClass
* Create an array of info on a particular class of a particular year. */
functions.php:79
↓ 2 callersFunctioncheckRequisites
(arr, callback, callbackArgs, level)
js/cr.js:198
↓ 2 callersFunctiondeGIR
(str)
js/cr.js:852
↓ 2 callersFunctiondefaultOwnedHashName
($owner)
functions.php:446
↓ 2 callersFunctiondraggableChecklist
()
js/cr.js:821
↓ 2 callersMethodencrypt
* Encrypts content for storage in the database * * The goal is to obfuscate some of the data in the database so it isn't * in plaintext if th
CourseRoadDB.php:100
↓ 2 callersFunctiongetCSRFToken
()
functions.php:15
↓ 2 callersFunctiongetClasses
(classList, reloadNotify)
js/cr.js:712
↓ 2 callersFunctiongetCurrentAcademicYear
()
js/cr.js:943
↓ 2 callersFunctiongetMatchObject
* Builds match requirement object from requisites syntax. By default, you * expect something like "18.03", but you must also handle extra information
js/cr.js:139
↓ 2 callersFunctiongetMatchParams
* Builds match parameters object from requisites syntax. Handles when the match * param is a number and when it is an object. Returns a match params
js/cr.js:113
↓ 2 callersMethodgetSavedRoads
* Pulls a list of saved roads and their data of a given user * * @param string $athena a string of the user's username * * @return array a
CourseRoadDB.php:360
↓ 2 callersMethodhashExists
* Determines whether a hash maps to a road in the database * * Checks both the hash directly, and whether the hash is actually a user's * nam
CourseRoadDB.php:258
↓ 2 callersFunctionimportUserPrefs
($athena)
functions.php:414
↓ 2 callersMethodisHashSafe
* Checks whether a hash is safe to overwrite * * Make sure that the newly saved hash won't overwrite a prior road * with a different set of c
CourseRoadDB.php:287
↓ 2 callersFunctionmakeUserSettingsHTML
()
functions.php:422
↓ 2 callersFunctionpullCustom
* Create an array of info on a custom-created class. */
functions.php:286
↓ 2 callersFunctionredirectToAuth
()
js/cr.js:977
↓ 2 callersFunctionsetPageTitle
()
js/cr.js:973
↓ 2 callersFunctionswapClassYear
(oldclass, newyear)
js/cr.js:930
↓ 2 callersMethodupdateUserPrefs
* Update a given user's preferences * * @param string $athena a string of the user's username * @param array $userprefs an associative ar
CourseRoadDB.php:565
↓ 1 callersMethodaddUser
* Adds a user to the users table, with default values * * Use updateUserPrefs($athena, $userprefs) below to set other values * * @param st
CourseRoadDB.php:511
↓ 1 callersFunctionaddWires
(div, addwires)
js/cr.js:414
↓ 1 callersFunctionassertValidHash
($hash)
functions.php:39
↓ 1 callersFunctionbuildClassesArray
($hash)
functions.php:331
↓ 1 callersFunctionbuildMajor
(branch, level)
js/cr.js:758
↓ 1 callersMethodchangeRoadHash
* Changes a road's hash when a user renames one of their saved roads * * @param string $oldhash a string of the old road hash * @param string
CourseRoadDB.php:429
↓ 1 callersFunctioncheckCSRFToken
()
functions.php:23
↓ 1 callersFunctioncheckClasses
()
js/cr.js:515
↓ 1 callersMethodcopyRoad
* Copies a road's hash when a user saves with login * * When a user logs in, we need to duplicate their just-saved road into a * road saved u
CourseRoadDB.php:489
↓ 1 callersMethoddeleteRoad
* Deletes a user's saved road * * @param string $hash a string of the road hash * @param string $athena a string of the user's username
CourseRoadDB.php:466
↓ 1 callersFunctionfetchDataFromLDAP
($user)
functions.php:398
↓ 1 callersMethodgetAutocompleteResults
* Fetches the top autocompleted subject ids from a given query * * @param string $query a string which is part/all of a course id * * @ret
CourseRoadDB.php:154
↓ 1 callersFunctiongetBaseURL
()
functions.php:6
↓ 1 callersMethodgetBestClassInfo
* Fetches the class info for a course id as close to the desired year as * possible * * If no year is requested, we pull the class info from
CourseRoadDB.php:194
↓ 1 callersFunctiongetClass
()
js/cr.js:679
↓ 1 callersMethodgetClassDataFromRoad
* Pulls class and major data for a given road * * Also accounts for whether the hash is actually a user's username (and that * user has a pub
CourseRoadDB.php:337
↓ 1 callersFunctiongetCurrentAcademicYear
()
functions.php:384
↓ 1 callersFunctiongetCurrentSemesterID
()
js/cr.js:948
↓ 1 callersMethodgetDB
* Accessor for the private database link (for __DEV__ mode only) * * @return object the database link * @throws die trying to load the db obj
CourseRoadDB.php:80
↓ 1 callersMethodgetYearsClassOffered
* Pulls a list of years a class has been offered * * @param string $class a string of a course id * * @return array<int> the years that cl
CourseRoadDB.php:230
↓ 1 callersMethodhasPublicRoad
* Checks whether a given user has a public road set * * @param string $athena a string of the user's username * * @return bool whether the
CourseRoadDB.php:382
↓ 1 callersFunctionhideAutocomplete
()
js/cr.js:999
↓ 1 callersMethodinitialize
* Initializes the database link $_db with its variables * * Creates a new mysqli object and stores that database link for use in the * other
CourseRoadDB.php:61
↓ 1 callersFunctionmakeClassInfoHTML
* Generate the innerHTML for the info box to be used for when the class is * highlighted. */
functions.php:238
↓ 1 callersFunctionmakeYearRange
* Turn "2013" into "'12-'13" */
functions.php:230
↓ 1 callersFunctionmakeYearsOfferedHTML
* Generate the HTML of the dropdown which holds the list of offered years for * a given class. */
functions.php:270
↓ 1 callersFunctionnewCSRFToken
()
functions.php:11
↓ 1 callersFunctionparseRequisites
($str)
output.php:161
↓ 1 callersMethodsaveNewRoad
* Saves new road into database with given data * * Note that this method does NOT check if a hash is safe to overwrite before * running. *
CourseRoadDB.php:315
↓ 1 callersMethodsetPublicRoad
* Sets a hash as a public road for a given user * * Since only one road per user may be public, this also sets all of their * other roads to
CourseRoadDB.php:409
↓ 1 callersMethodsetRoadComment
* Sets a comment on a user's saved road * * @param string $oldhash a string of the road hash * @param string $comment a string of the road co
CourseRoadDB.php:448
↓ 1 callersFunctionupdateWires
()
js/cr.js:495
↓ 1 callersMethoduserExists
* Check whether a given user exists * * @param string $athena a string of the user's username * * @return bool whether user exists * @a
CourseRoadDB.php:549
FunctionKonami
(callback)
js/cr.js:1703
Method__construct
* Overwrite the constructor to prevent CourseRoadDB singletons */
CourseRoadDB.php:25
FunctioncheckMajor
()
js/cr.js:729
FunctioncheckOff
Major/minor functions
js/cr.js:721
FunctioncrSetup
()
js/cr.js:1005
FunctionexplainBadLoginHelp
()
js/cr.js:983
Functionexportfunc
()
js/cr.js:1365
FunctionfilterRangeMatches
()
js/cr.js:214
FunctioniterateClassMatches
()
js/cr.js:257
FunctioniterateRangeMatches
()
js/cr.js:227
FunctionnewWire
* Defines new wire's properties (black/grey, straight/curved) * partially based on the relative semesters and terms of the two * would-be connected
js/cr.js:382
FunctionrequisiteBranchMatchParams
()
js/cr.js:211
FunctionrunBeforeUnload
UI/Page-loading functions
js/cr.js:909