]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-13404 - merge from 1.9
authorscyrma <scyrma>
Mon, 25 Feb 2008 03:32:59 +0000 (03:32 +0000)
committerscyrma <scyrma>
Mon, 25 Feb 2008 03:32:59 +0000 (03:32 +0000)
tag/locallib.php

index 98d2fdc466bb66cb7a4c4c363f82bcfa0673aef4..33dbb55cce161c919b6841b23f2b10a76f0c1186 100644 (file)
@@ -153,7 +153,8 @@ function tag_print_management_box($tag_object, $return=false) {
         }
 
         // only people with moodle/tag:edit capability may edit the tag description
-        if ( has_capability('moodle/tag:edit', $systemcontext) && tag_record_tagged_with(array('type'=>'user', 'id'=>$USER->id), $tag_object->name ) ) {
+        if ( has_capability('moodle/tag:edit', $systemcontext) && 
+                (tag_record_tagged_with(array('type'=>'user', 'id'=>$USER->id), $tag_object->name) || is_siteadmin($USER->id)) ) {
             $links[] = '<a href="'. $CFG->wwwroot .'/tag/edit.php?tag='. rawurlencode($tag_object->name) .'">'. get_string('edittag', 'tag') .'</a>';
         }