This file contains the cohort membership badge award criteria type class
Author: | Eugene Venter <eugene@catalyst.net.nz> |
Copyright: | 2016 onwards Catalyst IT {@link https://www.catalyst.net.nz/} |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 263 lines (9 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
award_criteria_cohort:: (6 methods):
get_details()
get_options()
save()
review()
validate()
get_completed_criteria_sql()
Class: award_criteria_cohort - X-Ref
Badge award criteria -- award on cohort membershipget_details($short = '') X-Ref |
Get criteria details for displaying to users param: string $short Print short version of criteria return: string |
get_options(&$mform) X-Ref |
Add appropriate new criteria options to the form param: object $mform moodle form |
save($params = array() X-Ref |
Save criteria records param: array $params Values from the form or any other array. |
review($userid, $filtered = false) X-Ref |
Review this criteria and decide if it has been completed param: int $userid User whose criteria completion needs to be reviewed. param: bool $filtered An additional parameter indicating that user list return: bool Whether criteria is complete. |
validate() X-Ref |
Checks criteria for any major problems. return: array A list containing status and an error message (if any). |
get_completed_criteria_sql() X-Ref |
Returns array with sql code and parameters returning all ids of users who meet this particular criterion. return: array list($join, $where, $params) |