]> git.mjollnir.org Git - moodle.git/commitdiff
You can now use Richtext editor to edit section texts, plus the page is a
authormoodler <moodler>
Tue, 11 Mar 2003 05:43:39 +0000 (05:43 +0000)
committermoodler <moodler>
Tue, 11 Mar 2003 05:43:39 +0000 (05:43 +0000)
bit more consistent now

course/editsection.html
course/editsection.php

index 522d63e58a2137f2c8adce60c5d825a94c5df724..fdba5476a346b606f3e9793743f2f8393d66ebb3 100644 (file)
@@ -1,7 +1,24 @@
 <BLOCKQUOTE>
-<FORM name="form" method="post" action="editsection.php">
+<FORM name="theform" method="post" <?=$onsubmit ?> action="editsection.php">
+<TABLE BORDER=0 cellpadding=0 cellspacing=0>
+<TR>
+<TD align=top>
 <P><B><? print_string("summaryof", "", "$sectionname $form->section") ?></B></P>
-<TEXTAREA NAME=summary COLS=60 ROWS=4 WRAP=virtual><?=$form->summary ?></TEXTAREA>
+</TD>
+<TD align=top width=200>
+&nbsp;
+</TD>
+<TD align=top>
+<FONT SIZE=-1>
+     <? if ($usehtmleditor) { ?>
+        <? helpbutton("richtext", get_string("helprichtext"), "moodle", true, true) ?>
+     <? } else { ?>
+        <? helpbutton("text", get_string("helptext"), "moodle", true, true) ?>
+     <? } ?>
+</FONT>
+</TD>
+</TR></TABLE>
+<? print_textarea($usehtmleditor, 4, 60, 595, 200, "summary", $form->summary); ?>
 <P>
 <INPUT type="hidden" name=id value="<?=$form->id ?>">
 <INPUT type="submit" value="<? print_string("savechanges") ?>">
@@ -9,3 +26,8 @@
 </P>
 </FORM>
 </BLOCKQUOTE>
+<? 
+   if ($usehtmleditor) { 
+       print_richedit_javascript("theform", "summary", "no");
+   }
+?>
index 2ddca3cffd85c3de4ef2aff2869c459c472959d3..280b2e06416710bac02876b63a898c5a7dda3169 100644 (file)
         $form = $section;
     }
 
+    if ($usehtmleditor = can_use_richtext_editor()) {
+        $onsubmit = "onsubmit=\"copyrichtext(theform.summary);\"";
+    } else {
+        $onsubmit = "";
+    }
+
     $sectionname = get_string("name$course->format");
     $stredit = get_string("edit", "", " $sectionname $section->section");
 
-    print_header($stredit, $stredit, "", "form.summary");
+       print_header("$course->shortname: $stredit", "$course->fullname", 
+                 "<A HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</A> 
+                  -> $stredit", "form.summary");
 
     include("editsection.html");