]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-15310: making the tag:create permission effective in user profile
authorscyrma <scyrma>
Thu, 19 Jun 2008 06:07:20 +0000 (06:07 +0000)
committerscyrma <scyrma>
Thu, 19 Jun 2008 06:07:20 +0000 (06:07 +0000)
user/editlib.php

index 446c729fc1f1873d7b8b2e49fba5adae79421054..fd4d8bf74c82ca553ee4a2f1cda1630e445dfe1a 100644 (file)
@@ -221,7 +221,7 @@ function useredit_shared_definition(&$mform) {
 
     }
 
-    if( !empty($CFG->usetags)) {
+    if ( !empty($CFG->usetags) && has_capability('moodle/tag:create', get_context_instance(CONTEXT_SYSTEM)) ) {
         $mform->addElement('header', 'moodle_interests', get_string('interests'));
         $mform->addElement('textarea', 'interests', get_string('interestslist'), 'cols="45" rows="3"');
         $mform->setHelpButton('interests', array(false, get_string('helpinterestslist'),