Moodle PHP Documentation 4.3
Moodle 4.3.5 (Build: 20240610) (7dcfaa79f78)
gradereport_history\helper Class Reference

Helper class for gradehistory report. More...

Static Public Member Functions

static get_graders ($courseid)
 Get a list of graders.
 
static get_users ($context, $search='', $page=0, $perpage=25)
 Retrieve a list of users.
 
static get_users_count ($context, $search='')
 Get total number of users present for the given search criteria.
 
static init_js ($courseid, array $currentusers=null)
 Initialise the js to handle the user selection gradereport_history_user_button.
 

Static Protected Member Functions

static get_users_sql_and_params ($context, $search='', $count=false)
 Get sql and params to use to get list of users.
 

Detailed Description

Helper class for gradehistory report.

Since
Moodle 2.8
License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ get_graders()

static gradereport_history\helper::get_graders ( $courseid)
static

Get a list of graders.

Parameters
int$courseidId of course for which we need to fetch graders.
Return values
arraylist of graders.

◆ get_users()

static gradereport_history\helper::get_users ( $context,
$search = '',
$page = 0,
$perpage = 25 )
static

Retrieve a list of users.

We're interested in anyone that had a grade history in this course. This api returns a list of such users based on various criteria passed.

Parameters
context$contextContext of the page where the results would be shown.
string$searchthe text to search for (empty string = find all).
int$pagepage number, defaults to 0.
int$perpageNumber of entries to display per page, defaults to 0.
Return values
arraylist of users.

◆ get_users_count()

static gradereport_history\helper::get_users_count ( $context,
$search = '' )
static

Get total number of users present for the given search criteria.

Parameters
context$contextContext of the page where the results would be shown.
string$searchthe text to search for (empty string = find all).
Return values
intnumber of users found.

◆ get_users_sql_and_params()

static gradereport_history\helper::get_users_sql_and_params ( $context,
$search = '',
$count = false )
staticprotected

Get sql and params to use to get list of users.

Parameters
context$contextContext of the page where the results would be shown.
string$searchthe text to search for (empty string = find all).
bool$countsetting this to true, returns an sql to get count only instead of the complete data records.
Return values
arraysql and params list

◆ init_js()

static gradereport_history\helper::init_js ( $courseid,
array $currentusers = null )
static

Initialise the js to handle the user selection gradereport_history_user_button.

Parameters
int$courseidcourse id.
array$currentusersList of currently selected users.
Return values
output\user_buttonthe user select button.

The documentation for this class was generated from the following file: