MDL-16666 removing all use_html_editor() instances
authorskodak <skodak>
Wed, 24 Sep 2008 21:03:36 +0000 (21:03 +0000)
committerskodak <skodak>
Wed, 24 Sep 2008 21:03:36 +0000 (21:03 +0000)
calendar/event.php
message/discussion.php
message/send.php
mod/assignment/lib.php
mod/data/field/textarea/field.class.php
mod/data/templates.php
mod/lesson/action/addbranchtable.php
mod/lesson/action/addpage.php
mod/lesson/action/editpage.php
mod/wiki/ewiki/ewiki.php
user/messageselect.php

index 95ebc9b5e4985656f54b5572a298c3a179401495..b4d406e9e69275ee6489eafff475fe3b2c8a3fea 100644 (file)
 
             echo '<div class="header">'.get_string('editevent', 'calendar').'</div>';
             include('event_edit.html');
-            if ($usehtmleditor) {
-                use_html_editor("description");
-            }
         break;
 
         case 'new':
index 75b2d91dda51ddc2b8ef7d6ce78e5551682288a8..0f9f13015c8126c6e17d65e4f26c93cd642d3e2f 100644 (file)
     echo '<div>';
     if ($usehtmleditor) {
         print_textarea(true, 8, 34, 100, 100, 'message', $refreshedmessage);
-        use_html_editor('message', 'formatblock subscript superscript copy cut paste clean undo redo justifyleft justifycenter justifyright justifyfull lefttoright righttoleft insertorderedlist insertunorderedlist outdent indent inserthorizontalrule createanchor nolink inserttable');
         echo '<input type="hidden" name="format" value="'.FORMAT_HTML.'" />';
     } else {
         print_textarea(false, 8, 50, 0, 0, 'message', $refreshedmessage);
index 4a8d0eb49bc14e82b30d8ebec193669a2def068c..bb64513dc75423f11fb8d7d0a4fec9c13d0ca524 100644 (file)
@@ -84,7 +84,6 @@ if (has_capability('moodle/site:sendmessage', get_context_instance(CONTEXT_SYSTE
         print_textarea($usehtmleditor, 5, 34, 0, 0, 'message', '', 0, false, '', 'form-textarea-simple');
         echo '</div>';
         echo '<input class="message-send-button" type="submit" value="'.get_string('sendmessage', 'message').'" />';
-        //use_html_editor('message', 'formatblock subscript superscript copy cut paste clean undo redo justifyleft justifycenter justifyright justifyfull lefttoright righttoleft insertorderedlist insertunorderedlist outdent indent inserthorizontalrule createanchor nolink inserttable');
         echo '<input type="hidden" name="format" value="'.FORMAT_HTML.'" />';
     } else {
         print_textarea(false, 5, 34, 0, 0, 'message', '');
index 16758c22299e24dc7fff5ffde92ddf42d646da83..d971507e2d4d6d56dde4c35fba90b846fc9ff775 100644 (file)
@@ -988,10 +988,6 @@ class assignment_base {
 
         echo '</table>';
 
-        if (!$disabled and $this->usehtmleditor) {
-            use_html_editor();
-        }
-
         print_footer('none');
     }
 
index 0146103ad64fed0d1be1b2d6fdc4d7291c1fcf86..a2a11d6a7315ba2edcf36e784cdcfb8d7a5b86cc 100755 (executable)
@@ -91,9 +91,6 @@ class data_field_textarea extends data_field_base {
 
 
     function print_after_form() {
-        if (can_use_html_editor()) {
-            use_html_editor('field_' . $this->field->id, '', 'field_' . $this->field->id);
-        }
     }
 
 
index a05c9afd9e91dc836d91c62938ed1cc662607ca5..767ba3d56d5acc0d2eff36345bb8cf67441a9660 100755 (executable)
     print_simple_box_end();
     echo '</div>';
     echo '</form>';
-    if ($usehtmleditor) {
-        use_html_editor('template');
-        if ($mode == 'listtemplate'){
-            use_html_editor('listtemplateheader');
-            use_html_editor('listtemplatefooter');
-        } else if ($mode == 'rsstemplate'){
-            use_html_editor('rsstitletemplate');
-        }
-    }
 
 /// Finish the page
     print_footer($course);
index 29e914b69788cfcd8539ecba58aee1e8e25cc9d3..88e9e2026f21e9f1fea9e7619ddf72ffe1c189ac 100644 (file)
@@ -51,9 +51,6 @@
     echo "<tr><td><strong>";
     echo get_string("pagecontents", "lesson").":</strong><br />\n";
     print_textarea($usehtmleditor, 25,70, 0, 0, "contents");
-    if ($usehtmleditor) {
-        use_html_editor("contents");
-    }
     echo "</td></tr>\n";
     echo "<tr><td>\n";
     echo "<div class=\"boxaligncenter addform\"><input name=\"layout\" type=\"checkbox\" value=\"1\" checked=\"checked\" />";
@@ -65,7 +62,7 @@
     for ($i = 0; $i < $lesson->maxanswers; $i++) {
         $iplus1 = $i + 1;
         echo "<tr><td><strong>".get_string("description", "lesson")." $iplus1:</strong><br />\n";
-        print_textarea(false, 10, 70, 630, 300, "answer[$i]");  // made the default set to off also removed use_html_editor(); line from down below, which made all textareas turn into html editors
+        print_textarea(false, 10, 70, 630, 300, "answer[$i]");
         echo "</td></tr>\n";
         echo "<tr><td><strong>".get_string("jump", "lesson")." $iplus1:</strong> \n";
         if ($i) {
index 8b783808f4478b75e2ead1304adba508f1f5a978..c45f2927385f3ea7477f1bbabddf3c5e564e5c01 100644 (file)
@@ -78,9 +78,6 @@
     echo "<tr><td><b>";
     echo get_string("pagecontents", "lesson").":</b><br />\n";
     print_textarea($usehtmleditor, 25,70, 630, 400, "contents");
-    if ($usehtmleditor) {
-        use_html_editor("contents");
-    }
     echo "</td></tr>\n";
     switch ($qtype) {
         case LESSON_TRUEFALSE :
index 432bd6af697b6f5ea3cb7e6918a221be98b935d4..244d0983b7662d190202f44fb4b4b75d0a21e37b 100644 (file)
     echo "<tr><td><b>";
     echo get_string("pagecontents", "lesson").":</b><br />\n";
     print_textarea($usehtmleditor, 25, 70, 630, 400, "contents", $page->contents);
-    if ($usehtmleditor) {
-        use_html_editor("contents");
-    }
     echo "</td></tr>\n";
     $n = 0;
     switch ($page->qtype) {
                             helpbutton("useeditor", get_string("useeditor", "lesson"), "lesson");
                             echo "]<br />\n";
                             print_textarea($usehtmleditor, 20, 70, 630, 300, "answer[$n]", $answer->answer);
-                            use_html_editor("answer[$n]"); // switch on the editor
                         } else {
                             echo " [<label for=\"answereditor[$n]\">".get_string("useeditor", "lesson")."</label>: ".
                                 "<input type=\"checkbox\" id=\"answereditor[$n]\" name=\"answereditor[$n]\" value=\"1\" />";
                             helpbutton("useeditor", get_string("useeditor", "lesson"), "lesson");
                             echo "]<br />\n";
                             print_textarea($usehtmleditor, 20, 70, 630, 300, "answer[$n]", $answer->answer);
-                            use_html_editor("answer[$n]"); // switch on the editor
                         } else {
                             echo " [<label for=\"answereditor[$n]\">".get_string("useeditor", "lesson")."</label>: ".
                                 "<input type=\"checkbox\" id=\"answereditor[$n]\" name=\"answereditor[$n]\" value=\"1\" />";
                             helpbutton("useeditor", get_string("useeditor", "lesson"), "lesson");
                             echo "]<br />\n";
                             print_textarea($usehtmleditor, 20, 70, 630, 300, "answer[$n]", $answer->answer);
-                            use_html_editor("answer[$n]"); // switch on the editor
                         } else {
                             echo " [<label for=\"answereditor[$n]\">".get_string("useeditor", "lesson")."</label>: ".
                                 "<input type=\"checkbox\" id=\"answereditor[$n]\" name=\"answereditor[$n]\" value=\"1\" />";
                             helpbutton("useeditor", get_string("useeditor", "lesson"), "lesson");
                             echo "]<br />\n";
                             print_textarea($usehtmleditor, 20, 70, 630, 300, "response[$n]", $answer->response);
-                            use_html_editor("response[$n]"); // switch on the editor
                         } else {
                             echo " [<label for=\"responseeditor[$n]\">".get_string("useeditor", "lesson")."</label>: ".
                                 "<input type=\"checkbox\" id=\"responseeditor[$n]\" name=\"responseeditor[$n]\" value=\"1\" />";
                         helpbutton("useeditor", get_string("useeditor", "lesson"), "lesson");
                         echo "]<br />\n";
                         print_textarea($usehtmleditor, 20, 70, 630, 300, "answer[$n]", $answer->answer);
-                        use_html_editor("answer[$n]"); // switch on the editor
                     } else {
                         if ($page->qtype != LESSON_SHORTANSWER and $page->qtype != LESSON_NUMERICAL) {
                             echo " [<label for=\"answereditor[$n]\">".get_string("useeditor", "lesson")."</label>: ".
                         helpbutton("useeditor", get_string("useeditor", "lesson"), "lesson");
                         echo "]<br />\n";
                         print_textarea($usehtmleditor, 20, 70, 630, 300, "response[$n]", $answer->response);
-                        use_html_editor("response[$n]"); // switch on the editor
                     } else {
                         echo " [<label for=\"responseeditor[$n]\">".get_string("useeditor", "lesson")."</label>: ".
                             "<input type=\"checkbox\" id=\"responseeditor[$n]\" name=\"responseeditor[$n]\" value=\"1\" />";
                         helpbutton("useeditor", get_string("useeditor", "lesson"), "lesson");
                         echo "]<br />\n";
                         print_textarea($usehtmleditor, 20, 70, 630, 300, "answer[$n]", $answer->answer);
-                        use_html_editor("answer[$n]"); // switch on the editor
                     } else {
                         echo " [<label for=\"answereditor[$n]\">".get_string("useeditor", "lesson")."</label>: ".
                             "<input type=\"checkbox\" id=\"answereditor[$n]\" name=\"answereditor[$n]\" value=\"1\" />";
index 393757fe5e1c328196084bfb1abee2384ab49097..fb377f1e97e0b37e574635c89c5d274e348f3517 100644 (file)
@@ -1588,9 +1588,6 @@ function ewiki_page_edit_form(&$id, &$data, &$hidden_postdata) {
      print_textarea($usehtmleditor, $rows, $cols, 680, 400, "content", $oldtext);
      echo '</td></tr></table>';
 
-     if ($usehtmleditor) {
-        use_html_editor("content");
-     }
      $o .= ob_get_contents();     
      ob_end_clean();     
 
index c049e4713afa7423c7573fddc0e38bef5905ce9e..d37a84e0a3bf6c4378521b62fdacc48c2759aa4d 100644 (file)
     if (count($SESSION->emailto[$id])) {
         $usehtmleditor = can_use_html_editor();
         require("message.html");
-        if ($usehtmleditor) {
-            use_html_editor("messagebody");
-        }
     }
 
     print_footer();