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]

(no description)

File Size: 234 lines (9 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

user_roles_editable:: (3 methods):
  __construct()
  export_for_template()
  update()


Class: user_roles_editable  - X-Ref

Class to display list of user roles.

__construct($course, $context, $user, $courseroles, $assignableroles, $profileroles, $userroles, $viewableroles = null)   X-Ref
Constructor.

param: \stdClass $course The current course
param: \context $context The course context
param: \stdClass $user The current user
param: \stdClass[] $courseroles The list of course roles.
param: \stdClass[] $assignableroles The list of assignable roles in this course.
param: \stdClass[] $profileroles The list of roles that should be visible in a users profile.
param: \stdClass[] $userroles The list of user roles.

export_for_template(\renderer_base $output)   X-Ref
Export this data so it can be used as the context for a mustache template.

param: \renderer_base $output
return: array

update($itemid, $newvalue)   X-Ref
Updates the value in database and returns itself, called from inplace_editable callback

param: int $itemid
param: mixed $newvalue
return: \self