Permalink
Browse files

Tweaks to use new javascript-printing function etc

  • Loading branch information...
1 parent 3df4969 commit 5a84640bd1a2953963809f844a788df1d2d5de86 moodler committed Oct 12, 2002
Showing with 12 additions and 14 deletions.
  1. +5 −6 mod/forum/post.html
  2. +5 −6 mod/journal/edit.html
  3. +2 −2 mod/journal/lib.php
View
@@ -58,10 +58,9 @@
</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");
+ }
+?>
View
@@ -21,10 +21,9 @@
</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");
+ }
+?>
View
@@ -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");
}

0 comments on commit 5a84640

Please sign in to comment.