From e2a305ff132a65bdf5e8c88e0668e85fb1f6ac20 Mon Sep 17 00:00:00 2001 From: skodak Date: Sun, 22 Oct 2006 19:59:07 +0000 Subject: [PATCH] fixed $usercontext creation needed for Role tab when viewing user data; merged from MOODLE_17_STABLE --- user/tabs.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user/tabs.php b/user/tabs.php index b2c531bee8..3bce70ab0f 100644 --- a/user/tabs.php +++ b/user/tabs.php @@ -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')); -- 2.39.5