MDL-14041 - Hide 'manage tags' when access is not permitted (merge)

This commit is contained in:
scyrma
2008-03-25 02:00:03 +00:00
parent b1f97418bf
commit 5fc1ea543b
+3 -4
View File
@@ -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);