Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.

Differences Between: [Versions 401 and 402] [Versions 402 and 403]

Renderer for the grade single view report.

Copyright: 2022 Mihail Geshoski <mihail@moodle.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 164 lines (6 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

gradereport_singleview_renderer:: (3 methods):
  users_selector()
  grade_items_selector()
  report_navigation()


Class: gradereport_singleview_renderer  - X-Ref

Custom renderer for the single view report.

To get an instance of this use the following code:
$renderer = $PAGE->get_renderer('gradereport_singleview');

users_selector(object $course, ?int $userid = null, ?int $groupid = null)   X-Ref
Renders the user selector trigger element.

param: object $course The course object.
param: int|null $userid The user ID.
param: int|null $groupid The group ID.
return: string The raw HTML to render.

grade_items_selector(object $course, ?int $gradeitemid = null)   X-Ref
Renders the grade items selector trigger element.

param: object $course The course object.
param: int|null $gradeitemid The grade item ID.
return: string The raw HTML to render.

report_navigation(object $gpr, int $courseid, \context_course $context, singleview $report,?int $groupid, string $itemtype, int $itemid)   X-Ref
Creates and renders previous/next user/grade item navigation.

param: object $gpr grade plugin return tracking object
param: int $courseid The course ID.
param: \context_course $context Context of the report.
param: singleview $report The single view report class.
param: int|null $groupid Group ID
param: string $itemtype User or Grade item type
param: int $itemid Either User ID or Grade item ID
return: string The raw HTML to render.