Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Static Public Member Functions | Static Protected Member Functions | List of all members
gradereport_history\helper Class Reference

Helper class for gradehistory report. More...

Static Public Member Functions

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

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. More...
 

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

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