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.
/grade/ -> renderer.php (source)

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

(no description)

File Size: 200 lines (9 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

core_grades_renderer:: (4 methods):
  render_action_bar()
  group_selector()
  initials_selector()
  user_heading()


Class: core_grades_renderer  - X-Ref

Renderer class for the grade pages.

render_action_bar(action_bar $actionbar)   X-Ref
Renders the action bar for a given page.

param: action_bar $actionbar
return: string The HTML output

group_selector(object $course, ?string $groupactionbaseurl = null)   X-Ref
Renders the group selector trigger element.

param: object $course The course object.
param: string|null $groupactionbaseurl The base URL for the group action.
return: string|null The raw HTML to render.

initials_selector(object $course,context $context,string $slug)   X-Ref
Build the data to render the initials bar filter within the gradebook.
Using this initials selector means you'll have to retain the use of the templates & JS to handle form submission.
If a simple redirect on each selection is desired the standard user_search() within the user renderer is what you are after.

param: object $course The course object.
param: context $context Our current context.
param: string $slug The slug for the report that called this function.
return: stdClass The data to output.

user_heading(stdClass $user, int $courseid, bool $showbuttons = true)   X-Ref
Creates and renders a custom user heading.

param: stdClass $user The user object.
param: int $courseid The course ID.
param: bool $showbuttons Whether to display buttons (message, add to contacts) within the heading.
return: string The raw HTML to render.