Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Differences Between: [Versions 310 and 311] [Versions 311 and 400] [Versions 311 and 401] [Versions 311 and 402] [Versions 311 and 403] [Versions 39 and 311]

Definition of the grade_overview_report class

Copyright: 2007 Nicolas Connault
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 491 lines (19 kb)
Included or required:0 times
Referenced: 1 time
Includes or requires: 0 files

Defines 1 class


Class: grade_report_overview  - X-Ref

Class providing an API for the overview report building and displaying.

__construct($userid, $gpr, $context)   X-Ref
Constructor. Sets local copies of user preferences and initialises grade_tree.

param: int $userid
param: object $gpr grade plugin return tracking object
param: string $context

setup_table()   X-Ref
Prepares the headers and attributes of the flexitable.


setup_courses_data($studentcoursesonly)   X-Ref
Set up the courses grades data for the report.

param: bool $studentcoursesonly Only show courses that the user is a student of.
return: array of course grades information

fill_table($activitylink = false, $studentcoursesonly = false)   X-Ref
Fill the table for displaying.

param: bool $activitylink If this report link to the activity report or the user report.
param: bool $studentcoursesonly Only show courses that the user is a student of.

print_table($return=false)   X-Ref
Prints or returns the HTML from the flexitable.

param: bool $return Whether or not to return the data instead of printing it directly.
return: string

print_teacher_table()   X-Ref
Print a table to show courses that the user is able to grade.


process_data($data)   X-Ref
Processes the data sent by the form (grades and feedbacks).

param: array $data
return: bool Success or Failure (array of errors).

process_action($target, $action)   X-Ref
No description

supports_mygrades()   X-Ref
This report supports being set as the 'grades' report.


check_access($systemcontext, $context, $personalcontext, $course, $userid)   X-Ref
Check if the user can access the report.

param: stdClass $systemcontext   system context
param: stdClass $context         course context
param: stdClass $personalcontext personal context
param: stdClass $course          course object
param: int $userid               userid
return: bool true if the user can access the report

viewed($context, $courseid, $userid)   X-Ref
Trigger the grade_report_viewed event

param: stdClass $context  course context
param: int $courseid      course id
param: int $userid        user id

grade_report_overview_settings_definition(&$mform)   X-Ref
No description

gradereport_overview_myprofile_navigation(core_user\output\myprofile\tree $tree, $user, $iscurrentuser, $course)   X-Ref
Add nodes to myprofile page.

param: \core_user\output\myprofile\tree $tree Tree object
param: stdClass $user user object
param: bool $iscurrentuser
param: stdClass $course Course object