]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-19823 Upgraded calls to helpbutton, print_simple_box* and notify
authornicolasconnault <nicolasconnault>
Tue, 18 Aug 2009 05:19:13 +0000 (05:19 +0000)
committernicolasconnault <nicolasconnault>
Tue, 18 Aug 2009 05:19:13 +0000 (05:19 +0000)
tag/coursetags_edit.php
tag/coursetags_more.php
tag/coursetagslib.php
tag/edit.php
tag/manage.php

index 71e74d9e6887e0cfec06a6a43e487a51aef5287f..e3435d2a34a0f10f9231cf09cd2333f956b038c7 100644 (file)
@@ -115,7 +115,7 @@ print_header_simple($title, '', $nav, '', '', false);
 
         // Print the add and delete form
         $script = coursetag_get_jscript();
-        $addtagshelp = helpbutton('addtags', 'adding tags', $tagslang, TRUE, FALSE, '', TRUE);
+        $addtagshelp = $OUTPUT->help_icon(moodle_help_icon::make('addtags', 'adding tags', $tagslang));
         $edittagthisunit = get_string('edittagthisunit', $tagslang);
         $arrowtitle = get_string('arrowtitle', $tagslang);
         $sesskey = sesskey();
@@ -148,7 +148,7 @@ print_header_simple($title, '', $nav, '', '', false);
                     </div>
 EOT;
         if ($coursetabs) {
-            $deletetagshelp = helpbutton('deletetags', 'deleting tags', $tagslang, TRUE, FALSE, '', TRUE);
+            $deletetagshelp = $OUTPUT->help_icon(moodle_help_icon::make('deletetags', 'deleting tags', $tagslang));
             $editdeletemytag = get_string('editdeletemytag', $tagslang);
             $outstr .= <<<EOT1
                     <div class="coursetag_edit_row">
index 98ae06f2a618c64ad0ec3d6ff0eab0a6a23f1217..176951f579cb3ada13db6471c12b2cc707884f10 100644 (file)
@@ -177,7 +177,7 @@ if (strlen($tags) < 10000) { $fclass = 'coursetag_more_large'; }
 $outstr = '
     <div class="coursetag_more_title">
         <div style="padding-bottom:5px">'.$welcome.
-            helpbutton('usingtags', 'using tags', $tagslang, TRUE, FALSE, '', TRUE).'
+            $OUTPUT->help_icon(moodle_help_icon::make('usingtags', 'using tags', $tagslang)).'
         </div>
         <div class="coursetag_more_link">'.$link1.'</div>
         <div class="coursetag_more_link">'.$link2.'</div>
index ce8cf694b9aa33fcb6630379f78bf1a5c88fd86a..64066d93f61b4bffeb1f904065f62a4adfd20a13 100644 (file)
@@ -464,7 +464,7 @@ function coursetag_get_tagged_courses($tagid) {
  */
 function coursetag_delete_course_tags($courseid, $showfeedback=false) {
 
-    global $DB;
+    global $DB, $OUTPUT;
 
     if ($tags = $DB->get_records_select('tag_instance', "itemtype='course' AND itemid=:courseid", array('courseid'=>$courseid))) {
         foreach ($tags as $tag) {
@@ -478,7 +478,7 @@ function coursetag_delete_course_tags($courseid, $showfeedback=false) {
     }
 
     if ($showfeedback) {
-        notify(get_string('deletedcoursetags', 'tag'));
+        echo $OUTPUT->notification(get_string('deletedcoursetags', 'tag'));
     }
 }
 
index a39a017cff97a150242bf8534e4ea64854c3d2c2..6010df70cfccd4f59eb1bacbe5868ba834eb501a 100644 (file)
@@ -119,7 +119,7 @@ print_header_simple(get_string('tag', 'tag') . ' - '. $tagname, '', $navigation)
 echo $OUTPUT->heading($tagname, 2);
 
 if (!empty($errorstring)) {
-    notify($errorstring);
+    echo $OUTPUT->notification($errorstring);
 }
 
 $tagform->display();
index a6bdd1d001b0018eaa509ef7c593ef7f91a074e8..8508f1ef959160db181f1f49592f7cfae4c7506c 100644 (file)
@@ -137,10 +137,10 @@ switch($action) {
 echo '<br/>';
 
 if ($err_notice) {
-    notify($err_notice, 'red');
+    echo $OUTPUT->notification($err_notice, 'red');
 }
 if ($notice) {
-    notify($notice, 'green');
+    echo $OUTPUT->notification($notice, 'green');
 }
 
 // small form to add an official tag