Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
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\get_access_information
 
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_get_report_link (context_course $context, int $courseid, array $element, grade_plugin_return $gpr, string $mode, ?stdClass $templatecontext)
 Returns link to user report for the current element.
 
 gradereport_user_myprofile_navigation (tree $tree, stdClass $user, bool $iscurrentuser, ?stdClass $course)
 Add nodes to myprofile page.
 
 xmldb_gradereport_user_upgrade ($oldversion)
 

Variables

 $capabilities
 
global gradereport_user\report::$CFG
 
 $functions
 
 $plugin = 2024041600
 
$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 = 2024042200
 

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_get_report_link()

gradereport_user_get_report_link ( context_course $context,
int $courseid,
array $element,
grade_plugin_return $gpr,
string $mode,
?stdClass $templatecontext )

Returns link to user report for the current element.

Parameters
context_course$contextCourse context
int$courseidCourse ID
array$elementAn array representing an element in the grade_tree
grade_plugin_return$gprA grade_plugin_return object
string$modeMode - gradeitem or user
?stdClass$templatecontextTemplate context
Return values
stdClass|null

◆ 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