]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-14741 - Make tinymce work with the front page description.
authorscyrma <scyrma>
Fri, 6 Jun 2008 01:49:07 +0000 (01:49 +0000)
committerscyrma <scyrma>
Fri, 6 Jun 2008 01:49:07 +0000 (01:49 +0000)
TODO: convert the front page description form so it uses formslib

course/editsection.html
course/editsection.php
lib/weblib.php

index 5a0b808507af227a9d4f8e96e7a642ddc2bfe14d..d8e07672fb6f53d84e51b1c295e7373927a5697a 100644 (file)
     
     </td>
     <td>
-      <?php print_textarea($usehtmleditor, 25, 60, 660, 200, "summary", $form->summary); ?>
+      <?php 
+        print_textarea($usehtmleditor, 25, 60, 660, 200, 'summary', $form->summary, 0, false, 'summary');
+        print($htmlEditorObject->activateEditor('summary', 'summary'));
+      ?>
+
     </td>
 </tr>
 </table>
index 96234511ade36263408b2ddc7b16e412628bc86b..9e0ccdee89c1b7547521a5599f38e0534b8b61a9 100644 (file)
     print_simple_box_start('center');
     include('editsection.html');
     print_simple_box_end();
-
-    if ($usehtmleditor) {
-        use_html_editor("summary");
-    }
     print_footer($course);
 
 ?>
index 616878b3562d537ccddab7a8b8c8dd122478acf5..8ed4d451cee1c5906cb62d4341e45de6eb630996 100644 (file)
@@ -4825,20 +4825,21 @@ function print_textarea($usehtmleditor, $rows, $cols, $width, $height, $name, $v
         }
 
         if ($usehtmleditor) {
-            if (!empty($courseid) and has_capability('moodle/course:managefiles', get_context_instance(CONTEXT_COURSE, $courseid))) {
-                $httpsrequired = empty($HTTPSPAGEREQUIRED) ? '' : '&amp;httpsrequired=1';
-                // needed for course file area browsing in image insert plugin
-                $str .= ($scriptcount < 1) ? '<script type="text/javascript" src="'.
-                        $CFG->httpswwwroot .'/lib/editor/htmlarea/htmlarea.php?id='.$courseid.$httpsrequired.'"></script>'."\n" : '';
-            } else {
-                $httpsrequired = empty($HTTPSPAGEREQUIRED) ? '' : '?httpsrequired=1';
-                $str .= ($scriptcount < 1) ? '<script type="text/javascript" src="'.
-                         $CFG->httpswwwroot .'/lib/editor/htmlarea/htmlarea.php'.$httpsrequired.'"></script>'."\n" : '';
 
-            }
-            $str .= ($scriptcount < 1) ? '<script type="text/javascript" src="'.
-                    $CFG->httpswwwroot .'/lib/editor/htmlarea/lang/en.php"></script>'."\n" : '';
-            $scriptcount++;
+//            if (!empty($courseid) and has_capability('moodle/course:managefiles', get_context_instance(CONTEXT_COURSE, $courseid))) {
+//                $httpsrequired = empty($HTTPSPAGEREQUIRED) ? '' : '&amp;httpsrequired=1';
+//                // needed for course file area browsing in image insert plugin
+//                $str .= ($scriptcount < 1) ? '<script type="text/javascript" src="'.
+//                        $CFG->httpswwwroot .'/lib/editor/htmlarea/htmlarea.php?id='.$courseid.$httpsrequired.'"></script>'."\n" : '';
+//            } else {
+//                $httpsrequired = empty($HTTPSPAGEREQUIRED) ? '' : '?httpsrequired=1';
+//                $str .= ($scriptcount < 1) ? '<script type="text/javascript" src="'.
+//                         $CFG->httpswwwroot .'/lib/editor/htmlarea/htmlarea.php'.$httpsrequired.'"></script>'."\n" : '';
+
+//            }
+//            $str .= ($scriptcount < 1) ? '<script type="text/javascript" src="'.
+//                    $CFG->httpswwwroot .'/lib/editor/htmlarea/lang/en.php"></script>'."\n" : '';
+//            $scriptcount++;
 
             if ($height) {    // Usually with legacy calls
                 if ($rows < $minrows) {