From 94056d9dbee403ed13965b1a6d74cabd528f6868 Mon Sep 17 00:00:00 2001 From: nicolasconnault Date: Mon, 10 Aug 2009 06:26:50 +0000 Subject: [PATCH] MDL-19756 Renamed help_icon class to moodle_help_icon --- lib/deprecatedlib.php | 4 ++-- lib/outputcomponents.php | 18 +++++++++--------- lib/outputrenderers.php | 8 ++++---- lib/simpletest/testoutputlib.php | 2 +- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/lib/deprecatedlib.php b/lib/deprecatedlib.php index 811c786ca2..072e74da48 100644 --- a/lib/deprecatedlib.php +++ b/lib/deprecatedlib.php @@ -2809,7 +2809,7 @@ function helpbutton($page, $title, $module='moodle', $image=true, $linktext=fals throw new coding_exception('The $imagetext parameter has been deprecated. Please update your code and use $OUTPUT->help_icon() instead.'); } - $helpicon = new help_icon(); + $helpicon = new moodle_help_icon(); $helpicon->page = $page; $helpicon->text = $title; $helpicon->module = $module; @@ -3459,7 +3459,7 @@ function print_heading_with_help($text, $helppage, $module='moodle', $icon=false global $OUTPUT; - $helpicon = new help_icon(); + $helpicon = new moodle_help_icon(); $helpicon->page = $helppage; $helpicon->text = $text; $helpicon->module = $module; diff --git a/lib/outputcomponents.php b/lib/outputcomponents.php index 37e9931111..edd47e437d 100644 --- a/lib/outputcomponents.php +++ b/lib/outputcomponents.php @@ -307,7 +307,7 @@ class moodle_select extends moodle_html_component { */ public $form; /** - * @var help_icon $form An optional help_icon component + * @var moodle_help_icon $form An optional moodle_help_icon component */ public $helpicon; /** @@ -546,7 +546,7 @@ class moodle_select extends moodle_html_component { *
      * $select->set_help_icon($page, $text, $linktext);
      * // OR
-     * $helpicon = new help_icon();
+     * $helpicon = new moodle_help_icon();
      * $helpicon->page = $page;
      * $helpicon->text = $text;
      * $helpicon->linktext = $linktext;
@@ -556,16 +556,16 @@ class moodle_select extends moodle_html_component {
      * Use the second form when you need to add additional HTML attributes
      * to the label and/or JS actions.
      *
-     * @param mixed $page Either the keyword that defines a help page or a help_icon object
+     * @param mixed $page Either the keyword that defines a help page or a moodle_help_icon object
      * @param text  $text The text of the help icon
      * @param boolean $linktext Whether or not to show text next to the icon
      * @return void
      */
     public function set_help_icon($page, $text, $linktext=false) {
-        if ($page instanceof help_icon) {
+        if ($page instanceof moodle_help_icon) {
             $this->helpicon = $page;
         } else if (!empty($page)) {
-            $this->helpicon = new help_icon();
+            $this->helpicon = new moodle_help_icon();
             $this->helpicon->page = $page;
             $this->helpicon->text = $text;
             $this->helpicon->linktext = $linktext;
@@ -1340,7 +1340,7 @@ class html_link extends moodle_html_component {
  * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  * @since     Moodle 2.0
  */
-class help_icon extends moodle_html_component {
+class moodle_help_icon extends moodle_html_component {
     /**
      * @var html_link $link A html_link object that will hold the URL info
      */
@@ -1385,11 +1385,11 @@ class help_icon extends moodle_html_component {
         global $COURSE, $OUTPUT;
 
         if (empty($this->page)) {
-            throw new coding_exception('A help_icon object requires a $page parameter');
+            throw new coding_exception('A moodle_help_icon object requires a $page parameter');
         }
 
         if (empty($this->text)) {
-            throw new coding_exception('A help_icon object requires a $text parameter');
+            throw new coding_exception('A moodle_help_icon object requires a $text parameter');
         }
 
         $this->link->text = $this->text;
@@ -1450,7 +1450,7 @@ class help_icon extends moodle_html_component {
     }
 
     public static function make_scale_menu($courseid, $scale) {
-        $helpbutton = new help_icon();
+        $helpbutton = new moodle_help_icon();
         $strscales = get_string('scales');
         $helpbutton->image->alt = $scale->name;
         $helpbutton->link->url = new moodle_url('/course/scales.php', array('id' => $courseid, 'list' => true, 'scaleid' => $scale->id));
diff --git a/lib/outputrenderers.php b/lib/outputrenderers.php
index c12040bce6..a0615c2ad5 100644
--- a/lib/outputrenderers.php
+++ b/lib/outputrenderers.php
@@ -1263,7 +1263,7 @@ class moodle_core_renderer extends moodle_renderer_base {
     /*
      * Centered heading with attached help button (same title text)
      * and optional icon attached
-     * @param help_icon $helpicon A help_icon object
+     * @param moodle_help_icon $helpicon A moodle_help_icon object
      * @param mixed $image An image URL or a html_image object
      * @return string HTML fragment
      */
@@ -1279,7 +1279,7 @@ class moodle_core_renderer extends moodle_renderer_base {
     /**
      * Print a help icon.
      *
-     * @param help_icon $helpicon A help_icon object, subclass of html_link
+     * @param moodle_help_icon $helpicon A moodle_help_icon object, subclass of html_link
      *
      * @return string  HTML fragment
      */
@@ -1569,7 +1569,7 @@ class moodle_core_renderer extends moodle_renderer_base {
      * moodle_select::set_label($label) passing a html_label object
      *
      * To add a help icon, use moodle_select::set_help($page, $text, $linktext) or
-     * moodle_select::set_help($helpicon) passing a help_icon object
+     * moodle_select::set_help($helpicon) passing a moodle_help_icon object
      *
      * If you moodle_select::$rendertype to "radio", it will render radio buttons
      * instead of a