Moodle PHP Documentation 4.1
Moodle 4.1.11 (Build: 20240610) (c8c84b4af18)
gradereport_user

Namespaces

namespace  gradereport_user\event
  
 
namespace  gradereport_user\external
  
 
namespace  gradereport_user\output
  
 
namespace  gradereport_user\privacy
  
 
namespace  gradereport_user\report
  
 

Classes

class  gradereport_user\external\user
 
class  gradereport_user\output\action_bar
 
class  gradereport_user\privacy\provider
 Privacy Subsystem for gradereport_user implementing null_provider. More...
 
class  gradereport_user\report\user
 
class  gradereport_user_renderer
 Custom renderer for the user grade report. More...
 

Functions

 grade_report_user_profilereport (object $course, object $user, bool $viewasuser=false)
 Profile report callback.
 
 grade_report_user_settings_definition (&$mform)
 
 gradereport_user_myprofile_navigation (tree $tree, stdClass $user, bool $iscurrentuser, ?stdClass $course)
 Add nodes to myprofile page.
 
 xmldb_gradereport_user_upgrade ($oldversion)
 

Variables

 $capabilities
 
 $functions
 
 $plugin = 2022111800
 
$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 = 2022112800
 

Detailed Description

Function Documentation

◆ grade_report_user_profilereport()

grade_report_user_profilereport ( object $course,
object $user,
bool $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 ( tree $tree,
stdClass $user,
bool $iscurrentuser,
?stdClass $course )

Add nodes to myprofile page.

Parameters
tree$treeTree object
stdClass$useruser object
bool$iscurrentuser
null | 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:
= [
'gradereport/user:view' => [
'riskbitmask' => RISK_PERSONAL,
'captype' => 'read',
'contextlevel' => CONTEXT_COURSE,
'archetypes' => [
'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:
= [
'gradereport_user_get_grades_table' => [
'classname' => 'gradereport_user\\external\\user',
'methodname' => 'get_grades_table',
'description' => 'Get the user/s report grades table for a course',
'type' => 'read',
'capabilities' => 'gradereport/user:view',
],
'gradereport_user_view_grade_report' => [
'classname' => 'gradereport_user\\external\\user',
'methodname' => 'view_grade_report',
'description' => 'Trigger the report view event',
'type' => 'write',
'capabilities' => 'gradereport/user:view',
],
'gradereport_user_get_grade_items' => [
'classname' => 'gradereport_user\\external\\user',
'methodname' => 'get_grade_items',
'description' => 'Returns the complete list of grade items for users in a course',
'type' => 'read',
'capabilities' => 'gradereport/user:view',
],
]
const MOODLE_OFFICIAL_MOBILE_SERVICE
Moodle mobile app service name.
Definition moodlelib.php:530