From 9534a8cb393c9f894cbb00797ea51fd98bd61f06 Mon Sep 17 00:00:00 2001 From: dongsheng Date: Thu, 17 Apr 2008 06:41:00 +0000 Subject: [PATCH] MDL-9934, add assign roles icon to list of activity icon, see tracker --- course/lib.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/course/lib.php b/course/lib.php index 2688c31cbb..f40e9d969c 100644 --- a/course/lib.php +++ b/course/lib.php @@ -2353,6 +2353,7 @@ function make_editing_buttons($mod, $absolute=false, $moveselect=true, $indent=- } if (!isset($str)) { + $str->assign = get_string("assignroles", 'role'); $str->delete = get_string("delete"); $str->move = get_string("move"); $str->moveup = get_string("moveup"); @@ -2382,7 +2383,6 @@ function make_editing_buttons($mod, $absolute=false, $moveselect=true, $indent=- } else { $path = '.'; } - if (has_capability('moodle/course:activityvisibility', $modcontext)) { if ($mod->visible) { $hideshow = 'moveright.'" />'."\n"; } } - + if (has_capability('moodle/course:managegroups', $modcontext)){ + $context = get_context_instance(CONTEXT_MODULE, $mod->id); + $assign = ''.$str->assign.''; + } return ''."\n".$leftright.$move. ''."\n".$hideshow.$groupmode."\n".''; + ' alt="'.$str->delete.'" />'."\n".$hideshow.$groupmode."\n".$assign.''; } /** -- 2.39.5