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


Public Member Functions | |
| description () | |
| is_preflight_check_required ($attemptid) | |
| add_preflight_check_form_fields (mod_quiz_preflight_check_form $quizform, MoodleQuickForm $mform, $attemptid) | |
| validate_preflight_check ($data, $files, $errors, $attemptid) | |
| notify_preflight_check_passed ($attemptid) | |
| current_attempt_finished () | |
Static Public Member Functions | |
| static | make (quiz $quizobj, $timenow, $canignoretimelimits) |
A rule implementing the password check.
| add_preflight_check_form_fields | ( | mod_quiz_preflight_check_form $ | quizform, |
| MoodleQuickForm $ | mform, | ||
| $ | attemptid | ||
| ) |
Add any field you want to pre-flight check form. You should only do something here if is_preflight_check_required() returned true.
| mod_quiz_preflight_check_form | $quizform | the form being built. |
| MoodleQuickForm | $mform | The wrapped MoodleQuickForm. |
| int | null | $attemptid | the id of the current attempt, if there is one, otherwise null. |
Reimplemented from quiz_access_rule_base.
Definition at line 57 of file rule.php.

This is called when the current attempt at the quiz is finished. This is used, for example by the password rule, to clear the flag in the session.
Reimplemented from quiz_access_rule_base.
| description | ( | ) |
Information, such as might be shown on the quiz view page, relating to this restriction. There is no obligation to return anything. If it is not appropriate to tell students about this rule, then just return ''.
Reimplemented from quiz_access_rule_base.
| is_preflight_check_required | ( | $ | attemptid | ) |
| int | null | $attemptid | the id of the current attempt, if there is one, otherwise null. |
Reimplemented from quiz_access_rule_base.
Return an appropriately configured instance of this rule, if it is applicable to the given quiz, otherwise return null.
| quiz | $quizobj | information about the quiz in question. |
| int | $timenow | the time that should be considered as 'now'. |
| bool | $canignoretimelimits | whether the current user is exempt from time limits by the mod/quiz:ignoretimelimits capability. |
Reimplemented from quiz_access_rule_base.
Definition at line 40 of file rule.php.

| notify_preflight_check_passed | ( | $ | attemptid | ) |
The pre-flight check has passed. This is a chance to record that fact in some way.
| int | null | $attemptid | the id of the current attempt, if there is one, otherwise null. |
Reimplemented from quiz_access_rule_base.
| validate_preflight_check | ( | $ | data, |
| $ | files, | ||
| $ | errors, | ||
| $ | attemptid | ||
| ) |
Validate the pre-flight check form submission. You should only do something here if is_preflight_check_required() returned true.
If the form validates, the user will be allowed to continue.
| array | $data | the submitted form data. |
| array | $files | any files in the submission. |
| array | $errors | the list of validation errors that is being built up. |
| int | null | $attemptid | the id of the current attempt, if there is one, otherwise null. |
Reimplemented from quiz_access_rule_base.