Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

- added tag:editblocks capability

  • Loading branch information...
commit 938e7302e24bf16e3baf4ac8d247afe93e9db002 1 parent 98b5789
luizlaydner authored

Showing 2 changed files with 6 additions and 3 deletions. Show diff stats Hide diff stats

  1. +1 1  tag/lib.php
  2. +5 2 tag/pagelib.php
2  tag/lib.php
@@ -1524,7 +1524,7 @@ function print_tag_management_list($perpage='100') {
1524 1524 echo '<input type="button" onclick="checknone()" value="'.get_string('deselectall').'" /> ';
1525 1525 echo '<br/><br/>';
1526 1526 echo '<select id="menuformaction" name="action">
1527   - <option value="" selected="selected">With selected tags...</option>
  1527 + <option value="" selected="selected">'. get_string('withselectedtags', 'tag') .'</option>
1528 1528 <option value="reset">'. get_string('resetflag', 'tag') .'</option>
1529 1529 <option value="delete">'. get_string('delete', 'tag') .'</option>
1530 1530 </select>';
7 tag/pagelib.php
@@ -4,6 +4,7 @@
4 4 require_once('lib.php');
5 5
6 6 define('PAGE_TAG_INDEX', 'tag-index');
  7 +define('TAG_FORMAT', 'tag');
7 8
8 9 class page_tag extends page_base {
9 10
@@ -17,7 +18,7 @@ function get_type() {
17 18 function user_allowed_editing() {
18 19
19 20 $systemcontext = get_context_instance(CONTEXT_SYSTEM);
20   - return has_capability('moodle/tag:edit', $systemcontext);
  21 + return has_capability('moodle/tag:editblocks', $systemcontext);
21 22
22 23 }
23 24
@@ -58,7 +59,8 @@ function blocks_move_position(&$instance, $move) {
58 59 }
59 60
60 61 function get_format_name() {
61   - return 'tag';
  62 +
  63 + return TAG_FORMAT;
62 64 }
63 65
64 66 //----------- printing funtions -----------
@@ -98,4 +100,5 @@ function print_footer() {
98 100
99 101 page_map_class(PAGE_TAG_INDEX, 'page_tag');
100 102
  103 +
101 104 ?>

0 comments on commit 938e730

Please sign in to comment.
Something went wrong with that request. Please try again.