Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
Files | Namespaces | Classes | Functions | Variables
gradereport_user

Files

file  access.php
 Defines capabilities for the user report.
 
file  externallib.php
 External grade report user API.
 
file  grade_report_viewed.php
 User report viewed event.
 
file  lib.php
 Definition of the grade_user_report class is defined.
 
file  provider.php
 Privacy Subsystem implementation for gradereport_user.
 
file  renderer.php
 Renderer for the grade user report.
 
file  services.php
 User grade report external functions and service definitions.
 
file  settings.php
 Defines site settings for the user gradebook report.
 
file  upgrade.php
 Gradereport user plugin upgrade code.
 
file  version.php
 Version details for the user gradebook report.
 

Namespaces

namespace  gradereport_user\event
  
 
namespace  gradereport_user\privacy
  
 

Classes

class  grade_report_user
 Class providing an API for the user report building and displaying. More...
 
class  gradereport_user\event\grade_report_viewed
 User report viewed event class. More...
 
class  gradereport_user\privacy\provider
 Privacy Subsystem for gradereport_user implementing null_provider. More...
 
class  gradereport_user_external
 
class  gradereport_user_renderer
 Custom renderer for the user grade report. More...
 

Functions

 grade_report_user_profilereport ($course, $user, $viewasuser=false)
 Profile report callback. More...
 
 grade_report_user_settings_definition (&$mform)
 
 gradereport_user_myprofile_navigation (core_user\output\myprofile\tree $tree, $user, $iscurrentuser, $course)
 Add nodes to myprofile page. More...
 
 xmldb_gradereport_user_upgrade ($oldversion)
 

Variables

 $capabilities
 
 $functions
 
 $plugin = 2020060900
 
$plugin component = 'gradereport_user'
 
const GRADE_REPORT_USER_HIDE_HIDDEN 0
 
const GRADE_REPORT_USER_HIDE_UNTIL 1
 
const GRADE_REPORT_USER_SHOW_HIDDEN 2
 
const GRADE_REPORT_USER_VIEW_SELF 1
 
const GRADE_REPORT_USER_VIEW_USER 2
 
$plugin version = 2020061500
 

Detailed Description

Function Documentation

◆ grade_report_user_profilereport()

grade_report_user_profilereport (   $course,
  $user,
  $viewasuser = false 
)

Profile report callback.

Parameters
object$courseThe course.
object$userThe user.
boolean$viewasuserTrue when we are viewing this as the targetted user sees it.

◆ gradereport_user_myprofile_navigation()

gradereport_user_myprofile_navigation ( core_user\output\myprofile\tree  $tree,
  $user,
  $iscurrentuser,
  $course 
)

Add nodes to myprofile page.

Parameters
core_user::output::myprofile::tree$treeTree object
stdClass$useruser object
bool$iscurrentuser
stdClass$courseCourse object

◆ xmldb_gradereport_user_upgrade()

xmldb_gradereport_user_upgrade (   $oldversion)
Parameters
int$oldversionthe version we are upgrading from
Return values
boolresult

Variable Documentation

◆ $capabilities

$capabilities
Initial value:
= array(
'gradereport/user:view' => array(
'riskbitmask' => RISK_PERSONAL,
'captype' => 'read',
'contextlevel' => CONTEXT_COURSE,
'archetypes' => array(
'student' => CAP_ALLOW,
'teacher' => CAP_ALLOW,
'editingteacher' => CAP_ALLOW,
'manager' => CAP_ALLOW
)
),
)
const CONTEXT_COURSE
Course context level - one instances for each course.
Definition: accesslib.php:128
const CAP_ALLOW
Allow permission, overrides CAP_PREVENT defined in parent contexts.
Definition: accesslib.php:115
const RISK_PERSONAL
Capability allows access to personal user information - see
Definition: accesslib.php:145

◆ $functions

$functions
Initial value:
= array(
'gradereport_user_get_grades_table' => array(
'classname' => 'gradereport_user_external',
'methodname' => 'get_grades_table',
'classpath' => 'grade/report/user/externallib.php',
'description' => 'Get the user/s report grades table for a course',
'type' => 'read',
'capabilities' => 'gradereport/user:view',
'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
),
'gradereport_user_view_grade_report' => array(
'classname' => 'gradereport_user_external',
'methodname' => 'view_grade_report',
'classpath' => 'grade/report/user/externallib.php',
'description' => 'Trigger the report view event',
'type' => 'write',
'capabilities' => 'gradereport/user:view',
'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
),
'gradereport_user_get_grade_items' => array(
'classname' => 'gradereport_user_external',
'methodname' => 'get_grade_items',
'classpath' => 'grade/report/user/externallib.php',
'description' => 'Returns the complete list of grade items for users in a course',
'type' => 'read',
'capabilities' => 'gradereport/user:view',
'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
)
)
const MOODLE_OFFICIAL_MOBILE_SERVICE
Moodle mobile app service name.
Definition: moodlelib.php:501