|
Moodle
2.2.1
http://www.collinsharper.com
|


Public Member Functions | |
| __construct (question_attempt $baseqa, $lastseq, $preferredbehaviour) | |
| get_full_qa () | |
| get_full_step_iterator () | |
| process_action ($submitteddata, $timestamp=null, $userid=null) | |
| start ($preferredbehaviour, $variant, $submitteddata=array(), $timestamp=null, $userid=null) | |
| set_database_id ($id) | |
| set_flagged ($flagged) | |
| set_slot ($slot) | |
| set_question_summary ($questionsummary) | |
| set_usage_id ($usageid) | |
Protected Member Functions | |
| add_step (question_attempt_step $step) | |
Protected Attributes | |
| $baseqa | |
This subclass of question_attempt pretends that only part of the step history exists. It is used for rendering the question in past states.
All methods that try to modify the question_attempt throw exceptions.
Definition at line 1229 of file questionattempt.php.
| __construct | ( | question_attempt $ | baseqa, |
| $ | lastseq, | ||
| $ | preferredbehaviour | ||
| ) |
Create a question_attempt_with_restricted_history
| question_attempt | $baseqa | The question_attempt to make a restricted version of. |
| int | $lastseq | the index of the last step to include. |
| string | $preferredbehaviour | the preferred behaviour. It is slightly annoyting that this needs to be passed, but unavoidable for now. |
Definition at line 1242 of file questionattempt.php.

| add_step | ( | question_attempt_step $ | step | ) | [protected] |
Add a step to this question attempt.
| question_attempt_step | $step | the new step. |
Reimplemented from question_attempt.
Definition at line 1277 of file questionattempt.php.
| get_full_qa | ( | ) |
This method exists so that question_attempt_with_restricted_history can override it. You should not normally need to call it.
Reimplemented from question_attempt.
Definition at line 1269 of file questionattempt.php.
The same as get_step_iterator(). However, for a question_attempt_with_restricted_history this returns the full list of steps, while get_step_iterator() returns only the limited history.
Reimplemented from question_attempt.
Definition at line 1273 of file questionattempt.php.
| process_action | ( | $ | submitteddata, |
| $ | timestamp = null, |
||
| $ | userid = null |
||
| ) |
Definition at line 1280 of file questionattempt.php.
| set_database_id | ( | $ | id | ) |
For internal use only. Set the id of the corresponding database row.
| int | $id | the id of row for this question_attempt, if it is stored in the database. |
Reimplemented from question_attempt.
Definition at line 1287 of file questionattempt.php.
| set_flagged | ( | $ | flagged | ) |
Set the flagged state of this question.
| bool | $flagged | the new state. |
Reimplemented from question_attempt.
Definition at line 1290 of file questionattempt.php.
| set_question_summary | ( | $ | questionsummary | ) |
Change the quetsion summary. Note, that this is almost never necessary. This method was only added to work around a limitation of the Opaque protocol, which only sends questionLine at the end of an attempt.
| $questionsummary | the new summary to set. |
Reimplemented from question_attempt.
Definition at line 1296 of file questionattempt.php.
| set_slot | ( | $ | slot | ) |
Set the number used to identify this question_attempt within the usage. For internal use only.
| int | $slot |
Reimplemented from question_attempt.
Definition at line 1293 of file questionattempt.php.
| set_usage_id | ( | $ | usageid | ) |
Set the id of the question_usage_by_activity we belong to. For internal use only.
| int|string | the new id. |
Reimplemented from question_attempt.
Definition at line 1299 of file questionattempt.php.
| start | ( | $ | preferredbehaviour, |
| $ | variant, | ||
| $ | submitteddata = array(), |
||
| $ | timestamp = null, |
||
| $ | userid = null |
||
| ) |
Definition at line 1283 of file questionattempt.php.
$baseqa [protected] |
Definition at line 1233 of file questionattempt.php.