From db4a3d8ffe80f68ab8f025c1819c28b513556e72 Mon Sep 17 00:00:00 2001 From: skodak Date: Wed, 24 Sep 2008 21:03:36 +0000 Subject: [PATCH] MDL-16666 removing all use_html_editor() instances --- calendar/event.php | 3 --- message/discussion.php | 1 - message/send.php | 1 - mod/assignment/lib.php | 4 ---- mod/data/field/textarea/field.class.php | 3 --- mod/data/templates.php | 9 --------- mod/lesson/action/addbranchtable.php | 5 +---- mod/lesson/action/addpage.php | 3 --- mod/lesson/action/editpage.php | 10 ---------- mod/wiki/ewiki/ewiki.php | 3 --- user/messageselect.php | 3 --- 11 files changed, 1 insertion(+), 44 deletions(-) diff --git a/calendar/event.php b/calendar/event.php index 95ebc9b5e4..b4d406e9e6 100644 --- a/calendar/event.php +++ b/calendar/event.php @@ -376,9 +376,6 @@ echo '
'.get_string('editevent', 'calendar').'
'; include('event_edit.html'); - if ($usehtmleditor) { - use_html_editor("description"); - } break; case 'new': diff --git a/message/discussion.php b/message/discussion.php index 75b2d91dda..0f9f13015c 100644 --- a/message/discussion.php +++ b/message/discussion.php @@ -170,7 +170,6 @@ echo '
'; 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 ''; } else { print_textarea(false, 8, 50, 0, 0, 'message', $refreshedmessage); diff --git a/message/send.php b/message/send.php index 4a8d0eb49b..bb64513dc7 100644 --- a/message/send.php +++ b/message/send.php @@ -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 '
'; echo ''; - //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 ''; } else { print_textarea(false, 5, 34, 0, 0, 'message', ''); diff --git a/mod/assignment/lib.php b/mod/assignment/lib.php index 16758c2229..d971507e2d 100644 --- a/mod/assignment/lib.php +++ b/mod/assignment/lib.php @@ -988,10 +988,6 @@ class assignment_base { echo ''; - if (!$disabled and $this->usehtmleditor) { - use_html_editor(); - } - print_footer('none'); } diff --git a/mod/data/field/textarea/field.class.php b/mod/data/field/textarea/field.class.php index 0146103ad6..a2a11d6a73 100755 --- a/mod/data/field/textarea/field.class.php +++ b/mod/data/field/textarea/field.class.php @@ -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); - } } diff --git a/mod/data/templates.php b/mod/data/templates.php index a05c9afd9e..767ba3d56d 100755 --- a/mod/data/templates.php +++ b/mod/data/templates.php @@ -307,15 +307,6 @@ print_simple_box_end(); echo ''; echo ''; - 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); diff --git a/mod/lesson/action/addbranchtable.php b/mod/lesson/action/addbranchtable.php index 29e914b697..88e9e2026f 100644 --- a/mod/lesson/action/addbranchtable.php +++ b/mod/lesson/action/addbranchtable.php @@ -51,9 +51,6 @@ echo ""; echo get_string("pagecontents", "lesson").":
\n"; print_textarea($usehtmleditor, 25,70, 0, 0, "contents"); - if ($usehtmleditor) { - use_html_editor("contents"); - } echo "\n"; echo "\n"; echo "
"; @@ -65,7 +62,7 @@ for ($i = 0; $i < $lesson->maxanswers; $i++) { $iplus1 = $i + 1; echo "".get_string("description", "lesson")." $iplus1:
\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 "\n"; echo "".get_string("jump", "lesson")." $iplus1: \n"; if ($i) { diff --git a/mod/lesson/action/addpage.php b/mod/lesson/action/addpage.php index 8b783808f4..c45f292738 100644 --- a/mod/lesson/action/addpage.php +++ b/mod/lesson/action/addpage.php @@ -78,9 +78,6 @@ echo ""; echo get_string("pagecontents", "lesson").":
\n"; print_textarea($usehtmleditor, 25,70, 630, 400, "contents"); - if ($usehtmleditor) { - use_html_editor("contents"); - } echo "\n"; switch ($qtype) { case LESSON_TRUEFALSE : diff --git a/mod/lesson/action/editpage.php b/mod/lesson/action/editpage.php index 432bd6af69..244d0983b7 100644 --- a/mod/lesson/action/editpage.php +++ b/mod/lesson/action/editpage.php @@ -115,9 +115,6 @@ echo ""; echo get_string("pagecontents", "lesson").":
\n"; print_textarea($usehtmleditor, 25, 70, 630, 400, "contents", $page->contents); - if ($usehtmleditor) { - use_html_editor("contents"); - } echo "\n"; $n = 0; switch ($page->qtype) { @@ -176,7 +173,6 @@ helpbutton("useeditor", get_string("useeditor", "lesson"), "lesson"); echo "]
\n"; print_textarea($usehtmleditor, 20, 70, 630, 300, "answer[$n]", $answer->answer); - use_html_editor("answer[$n]"); // switch on the editor } else { echo " [: ". ""; @@ -192,7 +188,6 @@ helpbutton("useeditor", get_string("useeditor", "lesson"), "lesson"); echo "]
\n"; print_textarea($usehtmleditor, 20, 70, 630, 300, "answer[$n]", $answer->answer); - use_html_editor("answer[$n]"); // switch on the editor } else { echo " [: ". ""; @@ -209,7 +204,6 @@ helpbutton("useeditor", get_string("useeditor", "lesson"), "lesson"); echo "]
\n"; print_textarea($usehtmleditor, 20, 70, 630, 300, "answer[$n]", $answer->answer); - use_html_editor("answer[$n]"); // switch on the editor } else { echo " [: ". ""; @@ -225,7 +219,6 @@ helpbutton("useeditor", get_string("useeditor", "lesson"), "lesson"); echo "]
\n"; print_textarea($usehtmleditor, 20, 70, 630, 300, "response[$n]", $answer->response); - use_html_editor("response[$n]"); // switch on the editor } else { echo " [: ". ""; @@ -247,7 +240,6 @@ helpbutton("useeditor", get_string("useeditor", "lesson"), "lesson"); echo "]
\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 " [: ". @@ -268,7 +260,6 @@ helpbutton("useeditor", get_string("useeditor", "lesson"), "lesson"); echo "]
\n"; print_textarea($usehtmleditor, 20, 70, 630, 300, "response[$n]", $answer->response); - use_html_editor("response[$n]"); // switch on the editor } else { echo " [: ". ""; @@ -286,7 +277,6 @@ helpbutton("useeditor", get_string("useeditor", "lesson"), "lesson"); echo "]
\n"; print_textarea($usehtmleditor, 20, 70, 630, 300, "answer[$n]", $answer->answer); - use_html_editor("answer[$n]"); // switch on the editor } else { echo " [: ". ""; diff --git a/mod/wiki/ewiki/ewiki.php b/mod/wiki/ewiki/ewiki.php index 393757fe5e..fb377f1e97 100644 --- a/mod/wiki/ewiki/ewiki.php +++ b/mod/wiki/ewiki/ewiki.php @@ -1588,9 +1588,6 @@ function ewiki_page_edit_form(&$id, &$data, &$hidden_postdata) { print_textarea($usehtmleditor, $rows, $cols, 680, 400, "content", $oldtext); echo ''; - if ($usehtmleditor) { - use_html_editor("content"); - } $o .= ob_get_contents(); ob_end_clean(); diff --git a/user/messageselect.php b/user/messageselect.php index c049e4713a..d37a84e0a3 100644 --- a/user/messageselect.php +++ b/user/messageselect.php @@ -132,9 +132,6 @@ if (count($SESSION->emailto[$id])) { $usehtmleditor = can_use_html_editor(); require("message.html"); - if ($usehtmleditor) { - use_html_editor("messagebody"); - } } print_footer(); -- 2.39.5