[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/grade/report/history/classes/output/ -> tablelog.php (summary)

Renderable class for gradehistory report.

Copyright: 2014 onwards Ankit Agarwal <ankit.agrr@gmail.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 502 lines (18 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

tablelog:: (17 methods):
  __construct()
  define_table_configs()
  define_table_columns()
  col_finalgrade()
  col_prevgrade()
  col_timemodified()
  col_itemname()
  col_grader()
  col_overridden()
  col_locked()
  col_excluded()
  col_feedback()
  get_filters_sql_and_params()
  get_sql_and_params()
  get_sql_sort()
  query_db()
  get_selected_users()


Class: tablelog  - X-Ref

Renderable class for gradehistory report.

__construct($uniqueid, \context_course $context, $url, $filters = array()   X-Ref
Sets up the table_log parameters.

param: string $uniqueid unique id of table.
param: \context_course $context Context of the report.
param: \moodle_url $url url of the page where this table would be displayed.
param: array $filters options are:
param: string $download Represents download format, pass '' no download at this time.
param: int $page The current page being displayed.
param: int $perpage Number of rules to display per page.

define_table_configs(\moodle_url $url)   X-Ref
Define table configs.

param: \moodle_url $url url of the page where this table would be displayed.

define_table_columns()   X-Ref
Setup the headers for the html table.


col_finalgrade(\stdClass $history)   X-Ref
Method to display the final grade.

param: \stdClass $history an entry of history record.
return: string HTML to display

col_prevgrade(\stdClass $history)   X-Ref
Method to display the previous grade.

param: \stdClass $history an entry of history record.
return: string HTML to display

col_timemodified(\stdClass $history)   X-Ref
Method to display column timemodifed.

param: \stdClass $history an entry of history record.
return: string HTML to display

col_itemname(\stdClass $history)   X-Ref
Method to display column itemname.

param: \stdClass $history an entry of history record.
return: string HTML to display

col_grader(\stdClass $history)   X-Ref
Method to display column grader.

param: \stdClass $history an entry of history record.
return: string HTML to display

col_overridden(\stdClass $history)   X-Ref
Method to display column overridden.

param: \stdClass $history an entry of history record.
return: string HTML to display

col_locked(\stdClass $history)   X-Ref
Method to display column locked.

param: \stdClass $history an entry of history record.
return: string HTML to display

col_excluded(\stdClass $history)   X-Ref
Method to display column excluded.

param: \stdClass $history an entry of history record.
return: string HTML to display

col_feedback(\stdClass $history)   X-Ref
Method to display column feedback.

param: \stdClass $history an entry of history record.
return: string HTML to display

get_filters_sql_and_params()   X-Ref
Builds the sql and param list needed, based on the user selected filters.

return: array containing sql to use and an array of params.

get_sql_and_params($count = false)   X-Ref
Builds the complete sql with all the joins to get the grade history data.

param: bool $count setting this to true, returns an sql to get count only instead of the complete data records.
return: array containing sql to use and an array of params.

get_sql_sort()   X-Ref
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: string SQL fragment.

query_db($pagesize, $useinitialsbar = true)   X-Ref
Query the reader. Store results in the object for use by build_table.

param: int $pagesize size of page for paginated displayed table.
param: bool $useinitialsbar do you want to use the initials bar.

get_selected_users()   X-Ref
Returns a list of selected users.

return: array returns an array in the format $userid => $userid



Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1