Assessment Control service - celtic-project/LTI-PHP GitHub Wiki
The Assessment Control service forms part of the Proctoring Services specification. It allows the Proctoring Tool to send messages to the Assessment Platform during or after the assessment.
Service availability
The availability of the Assessment Control service can be checked using the hasAssessmentControlService()
method; for example:
if ($resourceLink->hasAssessmentControlService()) {
...
}
Assessment Control Action object
An Assessment Control Action object has the following properties:
action
- action to be taken (pause
,resume
,update
,terminate
orflag
)date
- date/time of incidentseverity
- severity of incidentextraTime
- extra time in minutes to be added to the assessmentcode
- reason for the request using a Tool-specific codemessage
- reason for the request as a human-readable string
The first three properties are required and used when creating the object, for example:
$action = AssessmentControlAction::ACTION_PAUSE;
$date = new DateTime();
$severity = 0.2;
$acAction = new AssessmentControlAction($action, $date, $severity);
$acAction->extraTime = 10;
$acAction->code = 'N52';
$acAction->message = 'Equipment failure outside candidate\'s control';
Send action to Assessment Control services
Using the AssessmentControlAction object from above and, from the incoming Start Proctoring message, the user's ID and the attempt number, an action can be sent to the Assessment Control service as follows:
$user = new User();
$user->ltiUserId = $userId;
$status = $resourceLink->doAssessmentControlAction($acAction, $user, $attemptNumber);
$ok = $status !== false;