mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
- added tag:editblocks capability
This commit is contained in:
parent
98b5789d43
commit
938e7302e2
@ -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>';
|
||||
|
@ -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');
|
||||
|
||||
|
||||
?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user