Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Differences Between: [Versions 310 and 402] [Versions 310 and 403] [Versions 39 and 310]

Contains class core_user\output\user_roles_editable

Copyright: 2017 Damyon Wiese
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 245 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