Search moodle.org's
Developer Documentation

See Release Notes

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

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

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: 504 lines (20 kb)
Included or required:0 times
Referenced: 2 times
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

regrade_all_courses_if_needed(bool $frontend = false)   X-Ref
Regrades all courses if needed.

If $frontend is true, this may show a progress bar and redirect back to the page (possibly
several times if multiple courses need it). Otherwise, it will not return until all the
courses have been updated.

param: bool $frontend True if we are running front-end code and can safely redirect back

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