]> git.mjollnir.org Git - moodle.git/commitdiff
Tweaks to use new javascript-printing function etc
authormoodler <moodler>
Sat, 12 Oct 2002 15:01:17 +0000 (15:01 +0000)
committermoodler <moodler>
Sat, 12 Oct 2002 15:01:17 +0000 (15:01 +0000)
mod/forum/post.html
mod/journal/edit.html
mod/journal/lib.php

index 765a41fef35505d12861399bc6cf6859022812ca..ef1d4efbe50f0413f8d9dac550722a49883ad37c 100644 (file)
 </table>
 </FORM>
 
-<? if ($usehtmleditor) { ?>
-    <SCRIPT language="JavaScript" event="onload" for="window">
-        document.richedit.options = "history=no;source=no";
-        document.richedit.docHtml = theform.message.innerText;
-    </SCRIPT>
-<? } ?>
+<? 
+   if ($usehtmleditor) { 
+       print_richedit_javascript("theform", "message", "no");
+   }
+?>
 
index 6b76d8ad5976414e02223137db7526514e4a356b..1284bd0a0231299dab7d645068a09bb710e0c661 100644 (file)
 </P>
 </FORM>
 
-<? if ($usehtmleditor) { ?>
-    <SCRIPT language="JavaScript" event="onload" for="window">
-        document.richedit.options = "history=no;source=no";
-        document.richedit.docHtml = theform.text.innerText;
-    </SCRIPT>
-<? } ?>
+<? 
+   if ($usehtmleditor) { 
+       print_richedit_javascript("theform", "text", "no");
+   }
+?>
 
index 2d55f519a0146fa7b78ee30a732c3aa60eaf85fc..be2ba5d1fa3f8964fc82241d5b9a195ffc703a67 100644 (file)
@@ -32,7 +32,7 @@ function journal_user_complete($course, $user, $mod, $journal) {
             echo "<P><FONT SIZE=1>".get_string("lastedited").": ".userdate($entry->modified)."</FONT></P>";
         }
         if ($entry->text) {
-            echo text_to_html($entry->text);
+            echo format_text($entry->text, $entry->format);
         }
         if ($entry->teacher) {
             journal_print_feedback($course, $entry);
@@ -190,7 +190,7 @@ function journal_print_user_entry($course, $user, $entry, $teachers, $ratings) {
 
     echo "\n<TR><TD WIDTH=100% BGCOLOR=\"$THEME->cellcontent\">";
     if ($entry) {
-        echo text_to_html($entry->text);
+        echo format_text($entry->text, $entry->format);
     } else {
         print_string("noentry", "journal");
     }