From 938e7302e24bf16e3baf4ac8d247afe93e9db002 Mon Sep 17 00:00:00 2001 From: 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 c057113be93..7522f9ccc93 100644 --- a/tag/lib.php +++ b/tag/lib.php @@ -1524,7 +1524,7 @@ function print_tag_management_list($perpage='100') { echo ' '; echo '

'; echo ''; diff --git a/tag/pagelib.php b/tag/pagelib.php index b1ac5137591..81bb8dd9912 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'); + ?>