]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-16676 All references to the text.html and emoticons.html files need to be updated...
authortjhunt <tjhunt>
Thu, 25 Sep 2008 10:04:01 +0000 (10:04 +0000)
committertjhunt <tjhunt>
Thu, 25 Sep 2008 10:04:01 +0000 (10:04 +0000)
25 files changed:
admin/user/user_message_form.php
blog/edit_form.php
course/editcategory_form.php
lib/form/editorhelp.php
lib/form/htmleditor.php
lib/form/textarea.php
mod/assignment/mod_form.php
mod/assignment/type/online/assignment.class.php
mod/chat/mod_form.php
mod/choice/mod_form.php
mod/data/mod_form.php
mod/forum/mod_form.php
mod/forum/post_form.php
mod/glossary/comment_form.php
mod/glossary/edit_form.php
mod/glossary/mod_form.php
mod/hotpot/mod_form.php
mod/label/mod_form.php
mod/quiz/mod_form.php
mod/resource/type/html/resource.class.php
mod/resource/type/text/resource.class.php
mod/scorm/mod_form.php
mod/wiki/mod_form.php
question/type/edit_question_form.php
user/filters/text.php

index 59d00d565be691e5a8ae286ca874d01187576863..b806b3a4367cfc28bfd6c46ceac5b281eb51b63d 100644 (file)
@@ -11,7 +11,7 @@ class user_message_form extends moodleform {
 
         $mform->addElement('textarea', 'messagebody', get_string('messagebody'), array('rows'=>15, 'cols'=>60));
         $mform->addRule('messagebody', '', 'required', null, 'client');
-        $mform->setHelpButton('messagebody', array('writing', 'reading', 'questions', 'richtext'), false, 'editorhelpbutton');
+        $mform->setHelpButton('messagebody', array('writing', 'reading', 'questions', 'richtext2'), false, 'editorhelpbutton');
         $mform->addElement('format', 'format', get_string('format'));
 
         $this->add_action_buttons();
index 14fdd40bdd28dcaa8dbeb34224d38286113f2e24..71b2426e2420b40b57e87266159098253ef8e6b4 100644 (file)
@@ -20,7 +20,7 @@ class blog_edit_form extends moodleform {
         $mform->addElement('htmleditor', 'summary', get_string('entrybody', 'blog'), array('rows'=>25));
         $mform->setType('summary', PARAM_RAW);
         $mform->addRule('summary', get_string('emptybody', 'blog'), 'required', null, 'client');
-        $mform->setHelpButton('summary', array('writing', 'richtext'), false, 'editorhelpbutton');
+        $mform->setHelpButton('summary', array('writing', 'richtext2'), false, 'editorhelpbutton');
 
         $mform->addElement('format', 'format', get_string('format'));
 
index 37efa02b629629892a8b39c74928154a494863ad..73b54dbd7d9715c7ae56d5d7474a1f128cba487d 100644 (file)
@@ -23,7 +23,7 @@ class editcategory_form extends moodleform {
             $themes += get_list_of_themes();
             $mform->addElement('select', 'theme', get_string('forcetheme'), $themes);
         }
-        $mform->setHelpButton('description', array('writing', 'richtext'), false, 'editorhelpbutton');
+        $mform->setHelpButton('description', array('writing', 'richtext2'), false, 'editorhelpbutton');
         
         $mform->addElement('hidden', 'id', null);
         $mform->addElement('hidden', 'categoryadd', 0);
index a4cc3b71a1fde54d934edc360acb99bcf8ae73c6..b2b0df5347bab492eea43010c04ffafc151e7d25 100644 (file)
@@ -3,7 +3,7 @@ require_once('../../config.php');
 $topics = array();
 $titles = array();
 for ($i=1; ; $i++){
-    $button = optional_param("button$i", '', PARAM_ALPHAEXT);
+    $button = optional_param("button$i", '', PARAM_ALPHANUMEXT);
     if ($button){
         switch ($button){
             case 'reading' :
@@ -16,12 +16,27 @@ for ($i=1; ; $i++){
                 $topics[$i] = helplink('questions', get_string('helpquestions'));
                 break;
             case 'emoticons' :
+                debugging("You are referring to the old help file 'emoticons'. " .
+                        "This was renamed to 'emoticons2' becuase of MDL-13233. " .
+                        "Please update your code.", DEBUG_DEVELOPER);
+                // Fall through.
+            case 'emoticons2' :
                 $topics[$i] = helplink('emoticons2', get_string('helpemoticons'));
                 break;
             case 'richtext' :
+                debugging("You are referring to the old help file 'richtext'. " .
+                        "This was renamed to 'richtext2' becuase of MDL-13233. " .
+                        "Please update your code.", DEBUG_DEVELOPER);
+                // Fall through.
+            case 'richtext2' :
                 $topics[$i] = helplink('richtext2', get_string('helprichtext'));
                 break;
             case 'text' :
+                debugging("You are referring to the old help file 'text'. " .
+                        "This was renamed to 'text2' becuase of MDL-13233. " .
+                        "Please update your code.", DEBUG_DEVELOPER);
+                // Fall through.
+            case 'text2' :
                 $topics[$i] = helplink('text2', get_string('helptext'));
                 break;
             default :
index 0eea8397deaba4b63f48d447b394490a556bd7a8..23dfca6ffc44e4cb53c756c579834ba0e3181784 100644 (file)
@@ -49,11 +49,11 @@ class MoodleQuickForm_htmleditor extends MoodleQuickForm_textarea{
             if ('editorhelpbutton' == $function){
                 $key = array_search('richtext2', $helpbuttonargs);
                 if ($key !== FALSE){
-                    array_splice($helpbuttonargs, $key, 1, array('text', 'emoticons'));
+                    array_splice($helpbuttonargs, $key, 1, array('text2', 'emoticons2'));
                 }
             } elseif ('helpbutton' == $function && $helpbuttonargs[0] == 'richtext2' && ((!isset($helpbuttonargs[2])) || $helpbuttonargs[2] == 'moodle')){
                 //replace single 'richtext' help button with text and emoticon button when htmleditor off.
-                return $this->setHelpButton(array('text', 'emoticons'), 'editorhelpbutton');
+                return $this->setHelpButton(array('text2', 'emoticons2'), 'editorhelpbutton');
             }
         }
         return parent::setHelpButton($helpbuttonargs, $function);
index 06d3ed1a4be51e678c1660cd75dc799eb2cb2e1d..3db9843b6bd3c3a7e091af73639c2354711ef118 100644 (file)
@@ -29,23 +29,34 @@ class MoodleQuickForm_textarea extends HTML_QuickForm_textarea{
      */
     function setHelpButton($helpbuttonargs, $function='helpbutton'){
         global $SESSION;
-        if (!is_array($helpbuttonargs)){
-            $helpbuttonargs=array($helpbuttonargs);
-        }else{
-            $helpbuttonargs=$helpbuttonargs;
+        if (!is_array($helpbuttonargs)) {
+            $helpbuttonargs = array($helpbuttonargs);
+        } else {
+            $helpbuttonargs = $helpbuttonargs;
         }
+        print_object($helpbuttonargs); // DONOTCOMMIT
+        debugging("'$function'", DEBUG_DEVELOPER); // DONOTCOMMIT
         //we do this to to return html instead of printing it
         //without having to specify it in every call to make a button.
         if ('helpbutton' == $function){
-            $defaultargs=array('', '', 'moodle', true, false, '', true);
-            $helpbuttonargs=$helpbuttonargs + $defaultargs ;
-        } elseif ('editorhelpbutton' == $function){
-            if (in_array('emoticons', $helpbuttonargs)){
+                debugging("'tadpole'", DEBUG_DEVELOPER); // DONOTCOMMIT
+            $defaultargs = array('', '', 'moodle', true, false, '', true);
+            $helpbuttonargs = $helpbuttonargs + $defaultargs ;
+            if (in_array($helpbuttonargs[0], array('emoticons2', 'text2', 'richtext2'))) {
+                debugging("'frog'", DEBUG_DEVELOPER); // DONOTCOMMIT
+                $SESSION->inserttextform = $this->_formid;
+                $SESSION->inserttextfield = $this->getAttribute('name');
+            }
+        } else if ('editorhelpbutton' == $function) {
+                debugging("'eft'", DEBUG_DEVELOPER); // DONOTCOMMIT
+            $specialhelp = array_intersect($helpbuttonargs, array('emoticons2', 'text2', 'richtext2'));
+            if (!empty($specialhelp)) {
+                debugging("'newt'", DEBUG_DEVELOPER); // DONOTCOMMIT
                 $SESSION->inserttextform = $this->_formid;
                 $SESSION->inserttextfield = $this->getAttribute('name');
             }
         }
-        $this->_helpbutton=call_user_func_array($function, $helpbuttonargs);
+        $this->_helpbutton = call_user_func_array($function, $helpbuttonargs);
     }
     /**
      * get html for help button
index 7ea56acee067adde1d5604acdf9dcbf78660c334..3d84e3acb94cd153ae4a722674d4c6fb665cedaa 100644 (file)
@@ -41,7 +41,7 @@ class mod_assignment_mod_form extends moodleform_mod {
 
         $mform->addElement('htmleditor', 'description', get_string('description', 'assignment'));
         $mform->setType('description', PARAM_RAW);
-        $mform->setHelpButton('description', array('writing', 'questions', 'richtext'), false, 'editorhelpbutton');
+        $mform->setHelpButton('description', array('writing', 'questions', 'richtext2'), false, 'editorhelpbutton');
         $mform->addRule('description', get_string('required'), 'required', null, 'client');
 
         $mform->addElement('modgrade', 'grade', get_string('grade'));
index 5879abcef9275cb29938ea70fb34b0d52686ae2f..f4a3ca16cf27b9a5c86f1a271dfdaf64811fab86 100644 (file)
@@ -290,7 +290,7 @@ class mod_assignment_online_edit_form extends moodleform {
         // visible elements
         $mform->addElement('htmleditor', 'text', get_string('submission', 'assignment'), array('cols'=>60, 'rows'=>30));
         $mform->setType('text', PARAM_RAW); // to be cleaned before display
-        $mform->setHelpButton('text', array('reading', 'writing', 'richtext'), false, 'editorhelpbutton');
+        $mform->setHelpButton('text', array('reading', 'writing', 'richtext2'), false, 'editorhelpbutton');
         $mform->addRule('text', get_string('required'), 'required', null, 'client');
 
         $mform->addElement('format', 'format', get_string('format'));
index 9be14b64322e22c6f1968744fd3e2653ef50ee88..be54108786ec4dbc97597b7298e4a64ee84229d0 100644 (file)
@@ -20,7 +20,7 @@ class mod_chat_mod_form extends moodleform_mod {
 
         $mform->addElement('htmleditor', 'intro', get_string('chatintro', 'chat'));
         $mform->setType('intro', PARAM_RAW);
-        $mform->setHelpButton('intro', array('writing', 'questions', 'richtext'), false, 'editorhelpbutton');
+        $mform->setHelpButton('intro', array('writing', 'questions', 'richtext2'), false, 'editorhelpbutton');
         $mform->addRule('intro', get_string('required'), 'required', null, 'client');
 
         $mform->addElement('date_time_selector', 'chattime', get_string('chattime', 'chat'));
index ba475073a0eaa7e3d184d68d61dd8393b2d66e63..16dbc68e03274ecfd3509fec28d3d43856171c76 100644 (file)
@@ -22,7 +22,7 @@ class mod_choice_mod_form extends moodleform_mod {
         $mform->addElement('htmleditor', 'text', get_string('choicetext', 'choice'));
         $mform->setType('text', PARAM_RAW);
         $mform->addRule('text', null, 'required', null, 'client');
-        $mform->setHelpButton('text', array('writing', 'questions', 'richtext'), false, 'editorhelpbutton');
+        $mform->setHelpButton('text', array('writing', 'questions', 'richtext2'), false, 'editorhelpbutton');
 
         $mform->addElement('format', 'format', get_string('format'));
 
index d383eba0b532c634939e4b2e53de21670677a153..8c2017981491ad8f3000b36a78bcb6b518495918 100644 (file)
@@ -22,7 +22,7 @@ class mod_data_mod_form extends moodleform_mod {
         $mform->addElement('htmleditor', 'intro', get_string('intro', 'data'));
         $mform->setType('intro', PARAM_RAW);
         $mform->addRule('intro', null, 'required', null, 'client');
-        $mform->setHelpButton('intro', array('writing', 'questions', 'richtext'), false, 'editorhelpbutton');
+        $mform->setHelpButton('intro', array('writing', 'questions', 'richtext2'), false, 'editorhelpbutton');
 
         $mform->addElement('date_selector', 'timeavailablefrom', get_string('availablefromdate', 'data'), array('optional'=>true));
 
index 59cde393d059b5dfed224cd30f392f68a505bf05..cb8f21c9515dae084f8184873ee965ffdbb46167 100644 (file)
@@ -30,7 +30,7 @@ class mod_forum_mod_form extends moodleform_mod {
         $mform->addElement('htmleditor', 'intro', get_string('forumintro', 'forum'));
         $mform->setType('intro', PARAM_RAW);
         $mform->addRule('intro', get_string('required'), 'required', null, 'client');
-        $mform->setHelpButton('intro', array('writing', 'questions', 'richtext'), false, 'editorhelpbutton');
+        $mform->setHelpButton('intro', array('writing', 'questions', 'richtext2'), false, 'editorhelpbutton');
 
         $mform->addElement('format', 'format', get_string('format'));
 
index d6ee1d58d01f8253df1b435f2fd1497d1c815dd9..16af6384b24af3bcc9f307be7a02b52545ec9770 100644 (file)
@@ -26,7 +26,7 @@ class mod_forum_post_form extends moodleform {
         $mform->addElement('htmleditor', 'message', get_string('message', 'forum'), array('cols'=>50, 'rows'=>30, 'filearea'=>'forumpost'));
         $mform->setType('message', PARAM_RAW);
         $mform->addRule('message', get_string('required'), 'required', null, 'client');
-        $mform->setHelpButton('message', array('reading', 'writing', 'questions', 'richtext'), false, 'editorhelpbutton');
+        $mform->setHelpButton('message', array('reading', 'writing', 'questions', 'richtext2'), false, 'editorhelpbutton');
 
         $mform->addElement('format', 'format', get_string('format'));
 
index 67579010e8528c871585b0bc395f5deb15c92104..ceb21bfa689e55ff4db82a15d08c002417b33ac5 100644 (file)
@@ -10,7 +10,7 @@ class mod_glossary_comment_form extends moodleform {
         $mform->addElement('htmleditor', 'entrycomment',get_string('comment', 'glossary'));
         $mform->addRule('entrycomment', get_string('required'), 'required', null, 'client');
         $mform->setType('entrycomment', PARAM_RAW); // processed by trusttext or cleaned before the display
-        $mform->setHelpButton('entrycomment', array('writing', 'richtext'), false, 'editorhelpbutton');
+        $mform->setHelpButton('entrycomment', array('writing', 'richtext2'), false, 'editorhelpbutton');
 
         $mform->addElement('format', 'format', get_string('format'));
         $mform->setHelpButton('format', array('textformat', get_string('helpformatting')));
index 224f5f03e2d098ab33cd8aa394f1385e663f4323..cc9e00dc374cc2ae03202fe2f18c0a5aa833ff24 100644 (file)
@@ -20,7 +20,7 @@ class mod_glossary_entry_form extends moodleform {
         $mform->addElement('htmleditor', 'definition', get_string('definition', 'glossary'), array('rows'=>20));
         $mform->setType('definition', PARAM_RAW);
         $mform->addRule('definition', null, 'required', null, 'client');
-        $mform->setHelpButton('definition', array('writing', 'richtext'), false, 'editorhelpbutton');
+        $mform->setHelpButton('definition', array('writing', 'richtext2'), false, 'editorhelpbutton');
 
         $mform->addElement('format');
 
index 2f90d15b9889991b0a80112a45f11d0904ba3b3e..69a95502bad3bf50cb6951cd5d38c224f27918e8 100644 (file)
@@ -22,7 +22,7 @@ class mod_glossary_mod_form extends moodleform_mod {
         $mform->addElement('htmleditor', 'intro', get_string('description'));
         $mform->setType('intro', PARAM_RAW);
         $mform->addRule('intro', get_string('required'), 'required', null, 'client');
-        $mform->setHelpButton('intro', array('writing', 'questions', 'text'), false, 'editorhelpbutton');
+        $mform->setHelpButton('intro', array('writing', 'questions', 'text2'), false, 'editorhelpbutton');
 
         $mform->addElement('text', 'entbypage', get_string('entbypage', 'glossary'));
         $mform->setDefault('entbypage', 10);
index 9af7eb369992e3119d0ec86a454bdc780deefa54..7583d6680b2c14ff16cc71bd85a05bea1cda8b30 100644 (file)
@@ -122,7 +122,7 @@ class mod_hotpot_mod_form extends moodleform_mod {
             $mform->addElement('hidden', 'summarysource', HOTPOT_TEXTSOURCE_SPECIFIC);
             $mform->addElement('htmleditor', 'summary', get_string('summary'));
             $mform->setType('summary', PARAM_RAW);
-            $mform->setHelpButton('summary', array('writing', 'questions', 'richtext'), false, 'editorhelpbutton');
+            $mform->setHelpButton('summary', array('writing', 'questions', 'richtext2'), false, 'editorhelpbutton');
             $mform->setAdvanced('summary');
         }
         $mform->setType('summarysource', PARAM_INT);
index 12f4cc6b5648d48e6ae679b957f1a2e4b50d9827..a32cc1b7e9047b8355f577aa86db8a5596e7a18d 100644 (file)
@@ -10,7 +10,7 @@ class mod_label_mod_form extends moodleform_mod {
         $mform->addElement('htmleditor', 'content', get_string('labeltext', 'label'), array('size'=>'64'));
         $mform->setType('content', PARAM_RAW);
         $mform->addRule('content', get_string('required'), 'required', null, 'client');
-        $mform->setHelpButton('content', array('questions', 'richtext'), false, 'editorhelpbutton');
+        $mform->setHelpButton('content', array('questions', 'richtext2'), false, 'editorhelpbutton');
 
         $features = array('groups'=>false, 'groupings'=>false, 'groupmembersonly'=>true,
                           'outcomes'=>false, 'gradecat'=>false, 'idnumber'=>false);
index c7621932900d56b296c05ba00c2759325d06acd6..d380a0fa2cf214adea2300a149d8429691b9ae25 100644 (file)
@@ -25,7 +25,7 @@ class mod_quiz_mod_form extends moodleform_mod {
 
         $mform->addElement('htmleditor', 'intro', get_string("introduction", "quiz"));
         $mform->setType('intro', PARAM_RAW);
-        $mform->setHelpButton('intro', array('richtext', get_string('helprichtext')));
+        $mform->setHelpButton('intro', array('richtext2', get_string('helprichtext')));
 
 //-------------------------------------------------------------------------------
         $mform->addElement('header', 'timinghdr', get_string('timing', 'form'));
index be819dc064950cfdc92d89ff98d89144a5efbfaf..a97e13b76e321574bd129359d3e159a51451520a 100644 (file)
@@ -165,7 +165,7 @@ function setup_elements(&$mform) {
 
     $mform->addElement('htmleditor', 'alltext', get_string('fulltext', 'resource'), array('cols'=>85, 'rows'=>30));
     $mform->setType('alltext', PARAM_RAW);
-    $mform->setHelpButton('alltext', array('reading', 'writing', 'richtext'), false, 'editorhelpbutton');
+    $mform->setHelpButton('alltext', array('reading', 'writing', 'richtext2'), false, 'editorhelpbutton');
     $mform->addRule('alltext', get_string('required'), 'required', null, 'client');
 
     $mform->addElement('header', 'displaysettings', get_string('display', 'resource'));
index 9fed61d3965ba778c40fc8fdf51bf4012fcd568a..fd6fb20a5510a183255e5f8f2b87023310a36420 100644 (file)
@@ -167,7 +167,7 @@ function setup_elements(&$mform) {
 
     $mform->addElement('textarea', 'alltext', get_string('fulltext', 'resource'), array('cols'=>85, 'rows'=>30));
     $mform->setType('alltext', PARAM_RAW);
-    $mform->setHelpButton('alltext', array('reading', 'writing', 'richtext'), false, 'editorhelpbutton');
+    $mform->setHelpButton('alltext', array('reading', 'writing', 'richtext2'), false, 'editorhelpbutton');
     $mform->addRule('alltext', get_string('required'), 'required', null, 'client');
 
     $mform->addElement('format', 'reference', get_string('format'), null, false);
index 4d1453dc6aa2abc1929e4c0a7a367afe3d767b0e..48a45f04a05bd5abeae128abbfd420737448e1c5 100644 (file)
@@ -39,7 +39,7 @@ class mod_scorm_mod_form extends moodleform_mod {
         $mform->addElement('htmleditor', 'summary', get_string('summary'));
         $mform->setType('summary', PARAM_RAW);
         $mform->addRule('summary', get_string('required'), 'required', null, 'client');
-        $mform->setHelpButton('summary', array('writing', 'questions', 'richtext'), false, 'editorhelpbutton');
+        $mform->setHelpButton('summary', array('writing', 'questions', 'richtext2'), false, 'editorhelpbutton');
 
 // Scorm types
         $options = array(SCORM_TYPE_LOCAL => get_string('typelocal', 'scorm'));
index 80bebbebcfb4820442f9e4b2c6f8ef9f4fc19603..7f2b86f06ecec064b426093d8dba613b9f2efc00 100644 (file)
@@ -23,7 +23,7 @@ class mod_wiki_mod_form extends moodleform_mod {
 
         $mform->addElement('htmleditor', 'summary', get_string('summary'));
         $mform->setType('summary', PARAM_RAW);
-        $mform->setHelpButton('summary', array('writing', 'questions', 'richtext'), false, 'editorhelpbutton');
+        $mform->setHelpButton('summary', array('writing', 'questions', 'richtext2'), false, 'editorhelpbutton');
         $mform->addRule('summary', get_string('required'), 'required', null, 'client');
 
         if (!$wikihasentries){
index 29cdf7152411e33f464e5b2bdab17c4bd4d5a80d..b3467609c7be984760a9fb67ea29788823b35f48 100644 (file)
@@ -109,7 +109,7 @@ class question_edit_form extends moodleform {
         $mform->addElement('htmleditor', 'questiontext', get_string('questiontext', 'quiz'),
                 array('rows' => 15, 'course' => $this->coursefilesid));
         $mform->setType('questiontext', PARAM_RAW);
-        $mform->setHelpButton('questiontext', array(array('questiontext', get_string('questiontext', 'quiz'), 'quiz'), 'richtext'), false, 'editorhelpbutton');
+        $mform->setHelpButton('questiontext', array(array('questiontext', get_string('questiontext', 'quiz'), 'quiz'), 'richtext2'), false, 'editorhelpbutton');
         $mform->addElement('format', 'questiontextformat', get_string('format'));
 
         make_upload_directory($this->coursefilesid);    // Just in case
index 185d81346e1ebfaba98a390bf90a9e2321f6d5e1..329397d00081d32f3f12db689935f44dc10451c4 100644 (file)
@@ -42,7 +42,7 @@ class user_filter_text extends user_filter_type {
         $objs[] =& $mform->createElement('select', $this->_name.'_op', null, $this->getOperators());
         $objs[] =& $mform->createElement('text', $this->_name, null);
         $grp =& $mform->addElement('group', $this->_name.'_grp', $this->_label, $objs, '', false);
-        $grp->setHelpButton(array('text',$this->_label,'filters'));
+        $grp->setHelpButton(array('text2',$this->_label,'filters'));
         $mform->disabledIf($this->_name, $this->_name.'_op', 'eq', 5);
         if ($this->_advanced) {
             $mform->setAdvanced($this->_name.'_grp');