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


Public Member Functions | |
| prevent_new_attempt ($numprevattempts, $lastattempt) | |
| is_finished ($numprevattempts, $lastattempt) | |
Static Public Member Functions | |
| static | make (quiz $quizobj, $timenow, $canignoretimelimits) |
Protected Member Functions | |
| compute_next_start_time ($numprevattempts, $lastattempt) | |
A rule imposing the delay between attempts settings.
| compute_next_start_time | ( | $ | numprevattempts, |
| $ | lastattempt | ||
| ) | [protected] |
Compute the next time a student would be allowed to start an attempt, according to this rule.
| int | $numprevattempts | number of previous attempts. |
| object | $lastattempt | information about the previous attempt. |
Definition at line 76 of file rule.php.

| is_finished | ( | $ | numprevattempts, |
| $ | lastattempt | ||
| ) |
If this rule can determine that this user will never be allowed another attempt at this quiz, then return true. This is used so we can know whether to display a final grade on the view page. This will only be called if there is not a currently active attempt for this user.
| int | $numattempts | the number of previous attempts this user has made. |
| object | $lastattempt | information about the user's last completed attempt. |
Reimplemented from quiz_access_rule_base.
Definition at line 95 of file rule.php.

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.

| prevent_new_attempt | ( | $ | numprevattempts, |
| $ | lastattempt | ||
| ) |
Whether or not a user should be allowed to start a new attempt at this quiz now.
| int | $numattempts | the number of previous attempts this user has made. |
| object | $lastattempt | information about the user's last completed attempt. |
Reimplemented from quiz_access_rule_base.
Definition at line 48 of file rule.php.
