Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
|
Award criteria abstract definition. More...
Public Member Functions | |
__construct ($params) | |
The base constructor. More... | |
config_form_criteria ($data) | |
Add appropriate criteria elements. 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 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 the user has 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... | |
Award criteria abstract definition.
award_criteria::__construct | ( | $params | ) |
The base constructor.
array | $params |
Reimplemented in award_criteria_activity, and award_criteria_course.
|
static |
Factory method for creating criteria class object.
array | $params | associative arrays varname => value |
award_criteria |
award_criteria::config_form_criteria | ( | $data | ) |
Add appropriate criteria elements.
stdClass | $data | details of various criteria |
Reimplemented in award_criteria_course, and award_criteria_overall.
award_criteria::config_options | ( | & | $mform, |
$param | |||
) |
Add appropriate parameter elements to the criteria form.
Reimplemented in award_criteria_overall.
award_criteria::delete | ( | ) |
Delete this criterion.
Reimplemented in award_criteria_manual.
|
abstract |
Returns array with sql code and parameters returning all ids of users who meet this particular criterion.
array | list($join, $where, $params) |
Reimplemented in award_criteria_activity, award_criteria_badge, award_criteria_cohort, award_criteria_competency, award_criteria_course, award_criteria_courseset, award_criteria_manual, award_criteria_overall, and award_criteria_profile.
|
abstract |
Get criteria details for displaying to users.
string | $short | Print short version of criteria |
string |
Reimplemented in award_criteria_activity, award_criteria_badge, award_criteria_cohort, award_criteria_competency, award_criteria_course, award_criteria_courseset, award_criteria_manual, award_criteria_overall, and award_criteria_profile.
|
abstract |
Add appropriate criteria options to the form.
Reimplemented in award_criteria_activity, award_criteria_badge, award_criteria_cohort, award_criteria_competency, award_criteria_course, award_criteria_courseset, award_criteria_manual, award_criteria_overall, and award_criteria_profile.
award_criteria::get_params | ( | $cid | ) |
Return criteria parameters.
int | $critid | Criterion ID |
array |
Reimplemented in award_criteria_overall.
award_criteria::get_title | ( | ) |
Return criteria title.
string |
|
static |
Allow some specific criteria types to be disabled based on config.
boolean |
Reimplemented in award_criteria_competency.
award_criteria::mark_complete | ( | $userid | ) |
Mark this criteria as complete for a user.
int | $userid | User whose criteria is completed. |
|
abstract |
Review this criteria and decide if the user has 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 in award_criteria_activity, award_criteria_badge, award_criteria_cohort, award_criteria_competency, award_criteria_course, award_criteria_courseset, award_criteria_manual, award_criteria_overall, and award_criteria_profile.
award_criteria::save | ( | $params = array() | ) |
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.