MDL-14041 - Hide 'manage tags' when access is not permitted (merge)
This commit is contained in:
+3
-4
@@ -21,13 +21,12 @@ $navigation = build_navigation($navlinks);
|
||||
|
||||
$systemcontext = get_context_instance(CONTEXT_SYSTEM);
|
||||
$manage_link = ' ';
|
||||
if ( has_capability('moodle/tag:manage',$systemcontext) ) {
|
||||
$manage_link = "<a href=\"{$CFG->wwwroot}/tag/manage.php\">" . get_string('managetags', 'tag') . "</a>" ;
|
||||
}
|
||||
|
||||
print_header_simple(get_string('tags', 'tag'), '', $navigation);
|
||||
|
||||
echo '<div class="managelink"><a href="'. $CFG->wwwroot .'/tag/manage.php">'. get_string('managetags', 'tag') .'</a></div>' ;
|
||||
if ( has_capability('moodle/tag:manage',$systemcontext) ) {
|
||||
echo '<div class="managelink"><a href='. $CFG->wwwroot .'/tag/manage.php>' . get_string('managetags', 'tag') . '</a></div>' ;
|
||||
}
|
||||
|
||||
print_heading(get_string('searchtags', 'tag'), '', 2);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user