- added tag:editblocks capability

This commit is contained in:
luizlaydner
2007-08-11 03:42:26 +00:00
parent 98b5789d43
commit 938e7302e2
2 changed files with 6 additions and 3 deletions
+1 -1
View File
@@ -1524,7 +1524,7 @@ function print_tag_management_list($perpage='100') {
echo '<input type="button" onclick="checknone()" value="'.get_string('deselectall').'" /> ';
echo '<br/><br/>';
echo '<select id="menuformaction" name="action">
<option value="" selected="selected">With selected tags...</option>
<option value="" selected="selected">'. get_string('withselectedtags', 'tag') .'</option>
<option value="reset">'. get_string('resetflag', 'tag') .'</option>
<option value="delete">'. get_string('delete', 'tag') .'</option>
</select>';
+5 -2
View File
@@ -4,6 +4,7 @@ require_once($CFG->libdir.'/pagelib.php');
require_once('lib.php');
define('PAGE_TAG_INDEX', 'tag-index');
define('TAG_FORMAT', 'tag');
class page_tag extends page_base {
@@ -17,7 +18,7 @@ class page_tag extends page_base {
function user_allowed_editing() {
$systemcontext = get_context_instance(CONTEXT_SYSTEM);
return has_capability('moodle/tag:edit', $systemcontext);
return has_capability('moodle/tag:editblocks', $systemcontext);
}
@@ -58,7 +59,8 @@ class page_tag extends page_base {
}
function get_format_name() {
return 'tag';
return TAG_FORMAT;
}
//----------- printing funtions -----------
@@ -98,4 +100,5 @@ class page_tag extends page_base {
page_map_class(PAGE_TAG_INDEX, 'page_tag');
?>