|
|
cm_info | $cm |
| | The course module information object.
|
| |
|
array | $completionstate |
| | The current state of core completion.
|
| |
|
int | $userid |
| | The user's ID.
|
| |
◆ check_min_attempts()
| mod_quiz\completion\custom_completion::check_min_attempts |
( |
| ) |
|
|
protected |
Check minimum attempts requirement for completion.
- Return values
-
| bool | True if minimum attempts requirement is disabled or met. |
◆ check_passing_grade_or_all_attempts()
| mod_quiz\completion\custom_completion::check_passing_grade_or_all_attempts |
( |
| ) |
|
|
protected |
Check passing grade (or no attempts left) requirement for completion.
- Return values
-
| bool | True if the passing grade (or no attempts left) requirement is disabled or met. |
◆ get_available_custom_rules()
| core_completion\activity_custom_completion::get_available_custom_rules |
( |
| ) |
|
|
inherited |
◆ get_cm_completion_class()
| static core_completion\activity_custom_completion::get_cm_completion_class |
( |
string |
$modname | ) |
|
|
staticinherited |
Fetches the module's custom completion class implementation if it's available.
- Parameters
-
| string | $modname | The activity module name. Usually from cm_info::modname. |
- Return values
-
◆ get_custom_rule_description()
| core_completion\activity_custom_completion::get_custom_rule_description |
( |
string |
$rule | ) |
|
|
inherited |
Fetches the description for a given custom completion rule.
- Parameters
-
| string | $rule | The custom completion rule. |
- Return values
-
◆ get_custom_rule_descriptions()
| mod_quiz\completion\custom_completion::get_custom_rule_descriptions |
( |
| ) |
|
◆ get_defined_custom_rules()
| static mod_quiz\completion\custom_completion::get_defined_custom_rules |
( |
| ) |
|
|
static |
◆ get_overall_completion_state()
| core_completion\activity_custom_completion::get_overall_completion_state |
( |
| ) |
|
|
inherited |
Fetches the overall completion status of this activity instance for a user based on its available custom completion rules.
- Return values
-
| int | The completion state (e.g. COMPLETION_COMPLETE, COMPLETION_INCOMPLETE). |
◆ get_sort_order()
| mod_quiz\completion\custom_completion::get_sort_order |
( |
| ) |
|
◆ get_state()
| mod_quiz\completion\custom_completion::get_state |
( |
string |
$rule | ) |
|
◆ is_available()
| core_completion\activity_custom_completion::is_available |
( |
string |
$rule | ) |
|
|
inherited |
Checks whether the custom completion rule is being used by the activity module instance.
- Parameters
-
| string | $rule | The custom completion rule. |
- Return values
-
◆ is_defined()
| core_completion\activity_custom_completion::is_defined |
( |
string |
$rule | ) |
|
|
inherited |
Whether this module defines this custom rule.
- Parameters
-
| string | $rule | The custom completion rule. |
- Return values
-
◆ manual_completion_always_shown()
| core_completion\activity_custom_completion::manual_completion_always_shown |
( |
| ) |
|
|
inherited |
◆ validate_rule()
| core_completion\activity_custom_completion::validate_rule |
( |
string |
$rule | ) |
|
|
inherited |
Validates that the custom rule is defined by this plugin and is enabled for this activity instance.
- Parameters
-
| string | $rule | The custom completion rule. |
The documentation for this class was generated from the following file:
- mod/quiz/classes/completion/custom_completion.php