Skip to content

Commit

Permalink
- added tag:editblocks capability
Browse files Browse the repository at this point in the history
  • Loading branch information
luizlaydner committed Aug 11, 2007
1 parent 98b5789 commit 938e730
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tag/lib.php
Expand Up @@ -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>';
Expand Down
7 changes: 5 additions & 2 deletions tag/pagelib.php
Expand Up @@ -4,6 +4,7 @@
require_once('lib.php');

define('PAGE_TAG_INDEX', 'tag-index');
define('TAG_FORMAT', 'tag');

class page_tag extends page_base {

Expand All @@ -17,7 +18,7 @@ function get_type() {
function user_allowed_editing() {

$systemcontext = get_context_instance(CONTEXT_SYSTEM);
return has_capability('moodle/tag:edit', $systemcontext);
return has_capability('moodle/tag:editblocks', $systemcontext);

}

Expand Down Expand Up @@ -58,7 +59,8 @@ function blocks_move_position(&$instance, $move) {
}

function get_format_name() {
return 'tag';

return TAG_FORMAT;
}

//----------- printing funtions -----------
Expand Down Expand Up @@ -98,4 +100,5 @@ function print_footer() {

page_map_class(PAGE_TAG_INDEX, 'page_tag');


?>

0 comments on commit 938e730

Please sign in to comment.