Result
class Result extends Entity
This is a class to provide access to the user's result data.
This data comes from the LTI launch from the LMS.
Traits
Properties
$launch | A reference to our containing launch | from Entity | |
protected | $TABLE_NAME | ||
protected | $PRIMARY_KEY | ||
$id | The integer primary key for this link in the 'lti_result' table. | ||
$grade | The current grade for the user | ||
$lastSendTransport | The transport used to send the most recent grade. |
Methods
Pull a keyed variable from the original LTI post data in the current session with default
Update a keyed variable from the original LTI post data in the current session with default
Pull a keyed variable from the original LTI post data in the current session with default
Pull out a custom variable from the LTIX session. Do not include the "custom_" prefix - this is automatic.
No description
Load the grade for a particular row and update our local copy
Send a grade and update our local copy
Send a grade and update our local copy
Send a grade applying the due date logic and only increasing grades
Get a JSON for a different user
Get a JSON key for a result for a different user
Set JSON for a different user
Set a JSON key for a result for a different user
Get a Note
Set the Note for this result
Details
in SessionTrait at line 17
session_get($key, $default = null)
Get a key from the session
in SessionTrait at line 24
session_put($key, $value)
Set a key in the session
in SessionTrait at line 31
session_forget($key)
Forget a key in the session
in SessionTrait at line 38
session_flush()
Flush the session
in SessionTrait at line 45
ltiRawPostArray()
Return the original $_POST array
in SessionTrait at line 53
ltiParameter($varname, $default = false)
Pull a keyed variable from the original LTI post data in the current session with default
in SessionTrait at line 61
ltiParameterUpdate($varname, $value)
Update a keyed variable from the original LTI post data in the current session with default
in SessionTrait at line 70
ltiRawParameter($varname, $default = false)
Pull a keyed variable from the original LTI post data in the current session with default
in SessionTrait at line 79
ltiCustomGet($varname, $default = false)
Pull out a custom variable from the LTIX session. Do not include the "custom_" prefix - this is automatic.
in JsonTrait at line 21
string
getJson()
Load the json field for this entity
in JsonTrait at line 43
getJsonKeyLegacy($key, $default = false)
in JsonTrait at line 61
getJsonKey($key, $default = false)
Get a JSON key for this entity
in JsonTrait at line 78
setJson($json)
Set the JSON entry for this entity
in JsonTrait at line 96
setJsonKey($key, $value)
Set/update a JSON key for this entity
in JsonTrait at line 114
setJsonKeys($values)
Set/update an array of JSON keys for this entity
at line 47
static
lookupResultBypass($user_id)
at line 90
static mixed
gradeGet($row = false, $debug_log = false)
Load the grade for a particular row and update our local copy
Call the right LTI service to retrieve the server's grade and update our local cached copy of the server_grade and the date retrieved. This routine pulls the key and secret from the LTIX session to avoid crossing cross tenant boundaries.
TODO: Add LTI 2.x support for the JSON style services to this
at line 153
static mixed
gradeSendStatic($grade, $row = false, $debug_log = false, $extra = false)
Send a grade and update our local copy
Call the right LTI service to send a new grade up to the server. update our local cached copy of the server_grade and the date retrieved. This routine pulls the key and secret from the LTIX session to avoid crossing cross tenant boundaries.
at line 373
mixed
gradeSend($grade, $row = false, $debug_log = false, $extra = false)
Send a grade and update our local copy
Call the right LTI service to send a new grade up to the server. update our local cached copy of the server_grade and the date retrieved. This routine pulls the key and secret from the LTIX session to avoid crossing cross tenant boundaries.
at line 413
gradeSendDueDate($gradetosend, $oldgrade = false, $dueDate = false)
Send a grade applying the due date logic and only increasing grades
Puts messages in the session for a redirect.
at line 453
The
getJsonForUser($user_id)
Get a JSON for a different user
at line 488
The
getJsonKeyForUser($key, $default = false, $user_id = false)
Get a JSON key for a result for a different user
at line 514
The
setJsonForUser($json_str, $user_id = false)
Set JSON for a different user
at line 544
The
setJsonKeyForUser($key, $value, $user_id = false)
Set a JSON key for a result for a different user
at line 562
The
getNote($user_id = false)
Get a Note
at line 603
The
setNote($note_str, $user_id = false)
Set the Note for this result