fixed $usercontext creation needed for Role tab when viewing user data
This commit is contained in:
+1
-1
@@ -182,8 +182,8 @@
|
||||
|
||||
/// this needs permission checkings
|
||||
|
||||
$usercontext = get_context_instance(CONTEXT_USER, $user->id);
|
||||
if (!empty($showroles) && has_capability('moodle/role:assign',$usercontext)) { // this variable controls whether this roles is showed, or not, so only user/view page should set this flag
|
||||
$usercontext = get_context_instance(CONTEXT_USER, $user->id);
|
||||
$toprow[] = new tabobject('roles', $CFG->wwwroot.'/'.$CFG->admin.'/roles/assign.php?contextid='.$usercontext->id.'&userid='.$user->id.'&courseid='.$course->id
|
||||
,get_string('roles'));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user