Badge award criteria – award on cohort membership.
More...
|
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...
|
|
|
integer | $badgeid |
| ID of a badge this criterion belongs to.
|
|
int | $criteriatype = BADGE_CRITERIA_TYPE_COHORT |
|
string | $description |
| Criterion HTML/plain text description.
|
|
integer | $descriptionformat |
| Format of the criterion description.
|
|
integer | $id |
| ID of the criterion.
|
|
integer | $method |
| Aggregation method [BADGE_CRITERIA_AGGREGATION_ANY, BADGE_CRITERIA_AGGREGATION_ALL].
|
|
array | $optional_params = array() |
|
array | $params = array() |
| Any additional parameters.
|
|
string | $required_param = 'cohort' |
|
Badge award criteria – award on cohort membership.
@subpackage badges
- Copyright
- 2016 onwards Catalyst IT https://www.catalyst.net.nz/
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- Author
- Eugene Venter eugen.nosp@m.e@ca.nosp@m.talys.nosp@m.t.ne.nosp@m.t.nz
◆ build()
static award_criteria::build |
( |
|
$params | ) |
|
|
staticinherited |
Factory method for creating criteria class object.
- Parameters
-
array | $params | associative arrays varname => value |
- Return values
-
◆ config_form_criteria()
award_criteria::config_form_criteria |
( |
|
$data | ) |
|
|
inherited |
◆ get_completed_criteria_sql()
award_criteria_cohort::get_completed_criteria_sql |
( |
| ) |
|
Returns array with sql code and parameters returning all ids of users who meet this particular criterion.
- Return values
-
array | list($join, $where, $params) |
Reimplemented from award_criteria.
◆ get_details()
award_criteria_cohort::get_details |
( |
|
$short = '' | ) |
|
Get criteria details for displaying to users.
- Parameters
-
string | $short | Print short version of criteria |
- Return values
-
Reimplemented from award_criteria.
◆ get_options()
award_criteria_cohort::get_options |
( |
& |
$mform | ) |
|
Add appropriate new criteria options to the form.
- Parameters
-
Reimplemented from award_criteria.
◆ get_params()
award_criteria::get_params |
( |
|
$cid | ) |
|
|
inherited |
◆ get_title()
award_criteria::get_title |
( |
| ) |
|
|
inherited |
Return criteria title.
- Return values
-
◆ is_enabled()
static award_criteria::is_enabled |
( |
| ) |
|
|
staticinherited |
◆ mark_complete()
award_criteria::mark_complete |
( |
|
$userid | ) |
|
|
inherited |
Mark this criteria as complete for a user.
- Parameters
-
int | $userid | User whose criteria is completed. |
◆ review()
award_criteria_cohort::review |
( |
|
$userid, |
|
|
|
$filtered = false |
|
) |
| |
Review this criteria and decide if it has been completed.
- Parameters
-
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. |
- Return values
-
bool | Whether criteria is complete. |
Reimplemented from award_criteria.
◆ save()
award_criteria_cohort::save |
( |
|
$params = array() | ) |
|
Save criteria records.
- Parameters
-
array | $params | Values from the form or any other array. |
Reimplemented from award_criteria.
◆ validate()
award_criteria_cohort::validate |
( |
| ) |
|
Checks criteria for any major problems.
- Return values
-
array | A list containing status and an error message (if any). |
The documentation for this class was generated from the following file: