Moodle PHP Documentation 4.5
Moodle 4.5.5+ (Build: 20250711) (ce34e8ff087)
gradereport_history\output\tablelog Class Reference

Renderable class for gradehistory report. More...

Inheritance diagram for gradereport_history\output\tablelog:

Public Member Functions

 __construct ($uniqueid, context_course $context, $url, $filters=array(), $download='', $page=0, $perpage=100)
 Sets up the table_log parameters.
 
 col_excluded (\stdClass $history)
 Method to display column excluded.
 
 col_feedback (\stdClass $history)
 Method to display column feedback.
 
 col_finalgrade (\stdClass $history)
 Method to display the final grade.
 
 col_grader (\stdClass $history)
 Method to display column grader.
 
 col_itemname (\stdClass $history)
 Method to display column itemname.
 
 col_locked (\stdClass $history)
 Method to display column locked.
 
 col_overridden (\stdClass $history)
 Method to display column overridden.
 
 col_prevgrade (\stdClass $history)
 Method to display the previous grade.
 
 col_timemodified (\stdClass $history)
 Method to display column timemodifed.
 
 get_selected_users ()
 Returns a list of selected users.
 
 get_sql_sort ()
 Get the SQL fragment to sort by.
 
 query_db ($pagesize, $useinitialsbar=true)
 Query the reader.
 

Protected Member Functions

 define_table_columns ()
 Setup the headers for the html table.
 
 define_table_configs (\moodle_url $url)
 Define table configs.
 
 define_table_filters (\stdClass $filters)
 Define table filters.
 
 get_filters_sql_and_params ()
 Builds the sql and param list needed, based on the user selected filters.
 
 get_sql_and_params ($count=false)
 Builds the complete sql with all the joins to get the grade history data.
 

Protected Attributes

course_modinfo null $cms
 A list of cm instances in course.
 
context $context
 context of the page to be rendered.
 
int $courseid
 course id.
 
int $defaultdecimalpoints
 The default number of decimal points to use in this course when a grade item does not itself define the number of decimal points.
 
stdClass $filters
 A list of filters to be applied to the sql query.
 
array $gradeitems = array()
 A list of grade items present in the course.
 
stdClass[] $users = []
 List of users included in the report (if userids are specified as filters)
 

Detailed Description

Renderable class for gradehistory report.

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

Constructor & Destructor Documentation

◆ __construct()

gradereport_history\output\tablelog::__construct ( $uniqueid,
context_course $context,
$url,
$filters = array(),
$download = '',
$page = 0,
$perpage = 100 )

Sets up the table_log parameters.

Parameters
string$uniqueidunique id of table.
context_course$contextContext of the report.
moodle_url$urlurl of the page where this table would be displayed.
array$filtersoptions are: userids : limit to specific users (default: none) itemid : limit to specific grade item (default: all) grader : limit to specific graders (default: all) datefrom : start of date range datetill : end of date range revisedonly : only show revised grades (default: false) format : page | csv | excel (default: page)
string$downloadRepresents download format, pass '' no download at this time.
int$pageThe current page being displayed.
int$perpageNumber of rules to display per page.

Member Function Documentation

◆ col_excluded()

gradereport_history\output\tablelog::col_excluded ( \stdClass $history)

Method to display column excluded.

Parameters
stdClass$historyan entry of history record.
Return values
stringHTML to display

◆ col_feedback()

gradereport_history\output\tablelog::col_feedback ( \stdClass $history)

Method to display column feedback.

Parameters
stdClass$historyan entry of history record.
Return values
stringHTML to display

◆ col_finalgrade()

gradereport_history\output\tablelog::col_finalgrade ( \stdClass $history)

Method to display the final grade.

Parameters
stdClass$historyan entry of history record.
Return values
stringHTML to display

◆ col_grader()

gradereport_history\output\tablelog::col_grader ( \stdClass $history)

Method to display column grader.

Parameters
stdClass$historyan entry of history record.
Return values
stringHTML to display

◆ col_itemname()

gradereport_history\output\tablelog::col_itemname ( \stdClass $history)

Method to display column itemname.

Parameters
stdClass$historyan entry of history record.
Return values
stringHTML to display

◆ col_locked()

gradereport_history\output\tablelog::col_locked ( \stdClass $history)

Method to display column locked.

Parameters
stdClass$historyan entry of history record.
Return values
stringHTML to display

◆ col_overridden()

gradereport_history\output\tablelog::col_overridden ( \stdClass $history)

Method to display column overridden.

Parameters
stdClass$historyan entry of history record.
Return values
stringHTML to display

◆ col_prevgrade()

gradereport_history\output\tablelog::col_prevgrade ( \stdClass $history)

Method to display the previous grade.

Parameters
stdClass$historyan entry of history record.
Return values
stringHTML to display

◆ col_timemodified()

gradereport_history\output\tablelog::col_timemodified ( \stdClass $history)

Method to display column timemodifed.

Parameters
stdClass$historyan entry of history record.
Return values
stringHTML to display

◆ define_table_configs()

gradereport_history\output\tablelog::define_table_configs ( \moodle_url $url)
protected

Define table configs.

Parameters
moodle_url$urlurl of the page where this table would be displayed.

◆ define_table_filters()

gradereport_history\output\tablelog::define_table_filters ( \stdClass $filters)
protected

Define table filters.

Parameters
stdClass$filters

◆ get_filters_sql_and_params()

gradereport_history\output\tablelog::get_filters_sql_and_params ( )
protected

Builds the sql and param list needed, based on the user selected filters.

Return values
arraycontaining sql to use and an array of params.

◆ get_selected_users()

gradereport_history\output\tablelog::get_selected_users ( )

Returns a list of selected users.

Return values
stdClass[]List of user objects

◆ get_sql_and_params()

gradereport_history\output\tablelog::get_sql_and_params ( $count = false)
protected

Builds the complete sql with all the joins to get the grade history data.

Parameters
bool$countsetting this to true, returns an sql to get count only instead of the complete data records.
Return values
arraycontaining sql to use and an array of params.

◆ get_sql_sort()

gradereport_history\output\tablelog::get_sql_sort ( )

Get the SQL fragment to sort by.

This is overridden to sort by timemodified and ID by default. Many items happen at the same time and a second sorting by ID is valuable to distinguish the order in which the history happened.

Return values
stringSQL fragment.

◆ query_db()

gradereport_history\output\tablelog::query_db ( $pagesize,
$useinitialsbar = true )

Query the reader.

Store results in the object for use by build_table.

Parameters
int$pagesizesize of page for paginated displayed table.
bool$useinitialsbardo you want to use the initials bar.

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