Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
|
Interface for things that want to be notified of signficant changes to a question_usage_by_activity. More...
Public Member Functions | |
notify_attempt_added (question_attempt $qa) | |
Called when a new question attempt is added to this usage. More... | |
notify_attempt_modified (question_attempt $qa) | |
Called when the fields of a question attempt in this usage are modified. More... | |
notify_attempt_moved (question_attempt $qa, $oldslot) | |
Called when a question_attempt has been moved to a new slot. More... | |
notify_metadata_added (question_attempt $qa, $name) | |
Called when a new metadata variable is set on a question attempt in this usage. More... | |
notify_metadata_modified (question_attempt $qa, $name) | |
Called when a metadata variable on a question attempt in this usage is updated. More... | |
notify_modified () | |
Called when a field of the question_usage_by_activity is changed. More... | |
notify_step_added (question_attempt_step $step, question_attempt $qa, $seq) | |
Called when a new step is added to a question attempt in this usage. More... | |
notify_step_deleted (question_attempt_step $step, question_attempt $qa) | |
Called when a new step is updated in a question attempt in this usage. More... | |
notify_step_modified (question_attempt_step $step, question_attempt $qa, $seq) | |
Called when a new step is updated in a question attempt in this usage. More... | |
Interface for things that want to be notified of signficant changes to a question_usage_by_activity.
A question behaviour controls the flow of actions a student can take as they work through a question, and later, as a teacher manually grades it.
question_usage_observer::notify_attempt_added | ( | question_attempt | $qa | ) |
Called when a new question attempt is added to this usage.
question_attempt | $qa | the newly added question attempt. |
Implemented in question_engine_unit_of_work, and question_usage_null_observer.
question_usage_observer::notify_attempt_modified | ( | question_attempt | $qa | ) |
Called when the fields of a question attempt in this usage are modified.
question_attempt | $qa | the newly added question attempt. |
Implemented in question_engine_unit_of_work, and question_usage_null_observer.
question_usage_observer::notify_attempt_moved | ( | question_attempt | $qa, |
$oldslot | |||
) |
Called when a question_attempt has been moved to a new slot.
question_attempt | $qa | The question attempt that was moved. |
int | $oldslot | The previous slot number of that attempt. |
Implemented in question_engine_unit_of_work, and question_usage_null_observer.
question_usage_observer::notify_metadata_added | ( | question_attempt | $qa, |
$name | |||
) |
Called when a new metadata variable is set on a question attempt in this usage.
question_attempt | $qa | the question attempt the metadata is being added to. |
int | $name | the name of the metadata variable added. |
Implemented in question_engine_unit_of_work, and question_usage_null_observer.
question_usage_observer::notify_metadata_modified | ( | question_attempt | $qa, |
$name | |||
) |
Called when a metadata variable on a question attempt in this usage is updated.
question_attempt | $qa | the question attempt where the metadata is being modified. |
int | $name | the name of the metadata variable modified. |
Implemented in question_engine_unit_of_work, and question_usage_null_observer.
question_usage_observer::notify_modified | ( | ) |
Called when a field of the question_usage_by_activity is changed.
Implemented in question_engine_unit_of_work, and question_usage_null_observer.
question_usage_observer::notify_step_added | ( | question_attempt_step | $step, |
question_attempt | $qa, | ||
$seq | |||
) |
Called when a new step is added to a question attempt in this usage.
question_attempt_step | $step | the new step. |
question_attempt | $qa | the usage it is being added to. |
int | $seq | the sequence number of the new step. |
Implemented in question_engine_unit_of_work, and question_usage_null_observer.
question_usage_observer::notify_step_deleted | ( | question_attempt_step | $step, |
question_attempt | $qa | ||
) |
Called when a new step is updated in a question attempt in this usage.
question_attempt_step | $step | the step to delete. |
question_attempt | $qa | the usage it is being added to. |
Implemented in question_engine_unit_of_work, and question_usage_null_observer.
question_usage_observer::notify_step_modified | ( | question_attempt_step | $step, |
question_attempt | $qa, | ||
$seq | |||
) |
Called when a new step is updated in a question attempt in this usage.
question_attempt_step | $step | the step that was updated. |
question_attempt | $qa | the usage it is being added to. |
int | $seq | the sequence number of the new step. |
Implemented in question_engine_unit_of_work, and question_usage_null_observer.