Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
|
Award criteria abstract definition. More...
Public Member Functions | |
__construct ($params) | |
The base constructor. | |
config_form_criteria ($data) | |
Add appropriate criteria elements. | |
config_options (&$mform, $param) | |
Add appropriate parameter elements to the criteria form. | |
delete () | |
Delete this criterion. | |
get_completed_criteria_sql () | |
Returns array with sql code and parameters returning all ids of users who meet this particular criterion. | |
get_details ($short='') | |
Get criteria details for displaying to users. | |
get_options (&$mform) | |
Add appropriate criteria options to the form. | |
get_params ($cid) | |
Return criteria parameters. | |
get_title () | |
Return criteria title. | |
make_clone ($newbadgeid) | |
Saves intial criteria records with required parameters set up. | |
mark_complete ($userid) | |
Mark this criteria as complete for a user. | |
review ($userid, $filtered=false) | |
Review this criteria and decide if the user has completed. | |
save ($params=array()) | |
Saves intial criteria records with required parameters set up. | |
Static Public Member Functions | |
static | build ($params) |
Factory method for creating criteria class object. | |
static | is_enabled () |
Allow some specific criteria types to be disabled based on config. | |
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.