|
Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
|
Badge award criteria – award on course completion. More...
Public Member Functions | |
| __construct ($record) | |
| The base constructor. More... | |
| config_form_criteria ($data) | |
| Add appropriate form elements to the criteria form. More... | |
| config_options (&$mform, $param) | |
| Add appropriate parameter elements to the criteria form. More... | |
| delete () | |
| Delete this criterion. More... | |
| get_completed_criteria_sql () | |
| Returns array with sql code and parameters returning all ids of users who meet this particular criterion. More... | |
| get_details ($short='') | |
| Get criteria details for displaying to users. More... | |
| get_options (&$mform) | |
| Add appropriate new criteria options to the form. More... | |
| get_params ($cid) | |
| Return criteria parameters. More... | |
| get_title () | |
| Return criteria title. More... | |
| make_clone ($newbadgeid) | |
| Saves intial criteria records with required parameters set up. | |
| mark_complete ($userid) | |
| Mark this criteria as complete for a user. More... | |
| review ($userid, $filtered=false) | |
| Review this criteria and decide if it has been completed. More... | |
| save ($params=array()) | |
| Saves intial criteria records with required parameters set up. More... | |
Static Public Member Functions | |
| static | build ($params) |
| Factory method for creating criteria class object. More... | |
| static | is_enabled () |
| Allow some specific criteria types to be disabled based on config. More... | |
Badge award criteria – award on course completion.
| award_criteria_course::__construct | ( | $params | ) |
|
staticinherited |
Factory method for creating criteria class object.
| array | $params | associative arrays varname => value |
| award_criteria |
| award_criteria_course::config_form_criteria | ( | $data | ) |
Add appropriate form elements to the criteria form.
| moodleform | $mform | Moodle forms object |
| stdClass | $data | details of various modules |
Reimplemented from award_criteria.
|
inherited |
Add appropriate parameter elements to the criteria form.
Reimplemented in award_criteria_overall.
|
inherited |
Delete this criterion.
Reimplemented in award_criteria_manual.
| award_criteria_course::get_completed_criteria_sql | ( | ) |
Returns array with sql code and parameters returning all ids of users who meet this particular criterion.
| array | list($join, $where, $params) |
Reimplemented from award_criteria.
| award_criteria_course::get_details | ( | $short = '' | ) |
Get criteria details for displaying to users.
| string |
Reimplemented from award_criteria.
| award_criteria_course::get_options | ( | & | $mform | ) |
Add appropriate new criteria options to the form.
Reimplemented from award_criteria.
|
inherited |
Return criteria parameters.
| int | $critid | Criterion ID |
| array |
Reimplemented in award_criteria_overall.
|
inherited |
Return criteria title.
| string |
|
staticinherited |
Allow some specific criteria types to be disabled based on config.
| boolean |
Reimplemented in award_criteria_competency.
|
inherited |
Mark this criteria as complete for a user.
| int | $userid | User whose criteria is completed. |
| award_criteria_course::review | ( | $userid, | |
$filtered = false |
|||
| ) |
Review this criteria and decide if it has been completed.
| int | $userid | User whose criteria completion needs to be reviewed. |
| bool | $filtered | An additional parameter indicating that user list has been reduced and some expensive checks can be skipped. |
| bool | Whether criteria is complete |
Reimplemented from award_criteria.
|
inherited |
Saves intial criteria records with required parameters set up.
| array | $params | Values from the form or any other array. |
Reimplemented in award_criteria_badge, award_criteria_cohort, award_criteria_competency, and award_criteria_overall.