Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

This file contains the courseset completion badge award criteria type class

Author: Yuliya Bozhko <yuliya.bozhko@totaralms.com>
Copyright: 2012 onwards Totara Learning Solutions Ltd {@link http://www.totaralms.com/}
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 278 lines (11 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 1 file
 badges/criteria/award_criteria_course.php

Defines 1 class

award_criteria_courseset:: (6 methods):
  get_details()
  get_courses()
  add_courses()
  get_options()
  review()
  get_completed_criteria_sql()


Class: award_criteria_courseset  - X-Ref

Badge award criteria -- award on courseset completion

get_details($short = '')   X-Ref
Get criteria details for displaying to users

return: string

get_courses(&$mform)   X-Ref
No description

add_courses($params = array()   X-Ref
No description

get_options(&$mform)   X-Ref
Add appropriate new criteria options to the form


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

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)