From 938e7302e24bf16e3baf4ac8d247afe93e9db002 Mon Sep 17 00:00:00 2001
From: luizlaydner <luizlaydner>
Date: Sat, 11 Aug 2007 03:42:26 +0000
Subject: [PATCH] - added tag:editblocks capability

---
 tag/lib.php     | 2 +-
 tag/pagelib.php | 7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/tag/lib.php b/tag/lib.php
index c057113be9..7522f9ccc9 100644
--- a/tag/lib.php
+++ b/tag/lib.php
@@ -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>';
diff --git a/tag/pagelib.php b/tag/pagelib.php
index b1ac513759..81bb8dd991 100644
--- a/tag/pagelib.php
+++ b/tag/pagelib.php
@@ -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');
 
+
 ?>
-- 
2.39.5