]> git.mjollnir.org Git - moodle.git/commitdiff
BRANCH MERGE
authormoodler <moodler>
Fri, 4 Jun 2004 06:17:30 +0000 (06:17 +0000)
committermoodler <moodler>
Fri, 4 Jun 2004 06:17:30 +0000 (06:17 +0000)
These are the changes from MOODLE_13_STABLE, merged into trunk

The tag MOODLE_13_MERGED on the MOODLE_13_STABLE branch now refers to this point

The biggest changes here are the fixes for HTML editor in all standard modules

49 files changed:
admin/admin.php
admin/creators.php
calendar/event.php
calendar/event_edit.html
calendar/event_new.html
course/edit.php
course/editsection.php
course/group.php
course/mod.php
lib/weblib.php
mod/assignment/mod.html
mod/assignment/version.php
mod/attendance/lib.php
mod/attendance/mod.html
mod/attendance/version.php
mod/chat/mod.html
mod/chat/version.php
mod/choice/mod.html
mod/choice/version.php
mod/dialogue/mod.html
mod/dialogue/version.php
mod/exercise/mod.html
mod/exercise/version.php
mod/forum/mod.html
mod/forum/post.php
mod/glossary/comment.php
mod/glossary/mod.html
mod/glossary/version.php
mod/journal/edit.php
mod/journal/mod.html
mod/journal/version.php
mod/label/mod.html
mod/label/version.php
mod/lesson/mod.html
mod/lesson/version.php
mod/quiz/mod.html
mod/quiz/report/fullstat/report.php
mod/quiz/version.php
mod/resource/details.php
mod/resource/mod.html
mod/resource/version.php
mod/scorm/mod.html
mod/scorm/version.php
mod/survey/mod.html
mod/survey/version.php
mod/workshop/mod.html
mod/workshop/version.php
rss/file.php
version.php

index dd2855d9e757daa3816722aeb9c875cef76011d9..cb0f3b554de3f641dc7883856579941f8ccfbfef 100644 (file)
             if ($primaryadmin->id == $admin->id){
                 print_spacer(10, 9, false);
             } else {
-                echo "<a href=\"{$_SERVER['PHP_SELF']}?remove=$admin->id\"
+                echo "<a href=\"admin.php?remove=$admin->id\"
                 title=\"$strremoveadmin\"><img src=\"../pix/t/right.gif\"
                 border=0></A>";
             }
         }
 
         foreach ($users as $user) {
-            echo "<p align=left><a href=\"{$_SERVER['PHP_SELF']}?add=$user->id\"".
+            echo "<p align=left><a href=\"admin.php?add=$user->id\"".
                    "title=\"$straddadmin\"><img src=\"../pix/t/left.gif\"".
                    "border=0></a>&nbsp;&nbsp;".fullname($user).", $user->email";
         }
     }
 
     if ($search or $usercount > MAX_USERS_PER_PAGE) {
-        echo "<form action={$_SERVER['PHP_SELF']} method=post>";
+        echo "<form action=admin.php method=post>";
         echo "<input type=text name=search size=20>";
         echo "<input type=submit value=\"$searchstring\">";
         echo "</form>";
index 3421acc3429b89b6ff6458ca15a4a1a457106fb1..5a5b03f6d74bb14bf47f5e39413e2fc2878dc008 100755 (executable)
@@ -95,7 +95,7 @@
         foreach ($creators as $creator) {
             $creatorarray[] = $creator->id;
             echo "<p align=right>".fullname($creator, true).", $creator->email &nbsp;&nbsp; ";
-                echo "<a href=\"{$_SERVER['PHP_SELF']}?remove=$creator->id\"
+                echo "<a href=\"creators.php?remove=$creator->id\"
                 title=\"$strremovecreator\"><img src=\"../pix/t/right.gif\"
                 border=0></a>";
             echo "</p>";
 
         foreach ($users as $user) {
             $fullname = fullname($user, TRUE);
-            echo "<p align=left><a href=\"{$_SERVER['PHP_SELF']}?add=$user->id\"".
+            echo "<p align=left><a href=\"creators.php?add=$user->id\"".
                    "title=\"$straddcreator\"><img src=\"../pix/t/left.gif\"".
                    "border=0></a>&nbsp;&nbsp;$fullname, $user->email";
         }
     }
 
     if ($search or $usercount > MAX_USERS_PER_PAGE) {
-        echo "<form action={$_SERVER['PHP_SELF']} method=post>";
+        echo "<form action=creators.php method=post>";
         echo "<input type=text name=search size=20>";
         echo "<input type=submit value=\"$searchstring\">";
         echo "</form>";
index eb4ba6db9f9c9db3a743535dc1c9f8ee2f3de2bd..008ac9cbe1af55d5096d15a16f8d68552ac5ebbd 100644 (file)
     print_header(get_string('calendar', 'calendar').': '.$title, $site->fullname, $nav.' -> '.$title,
                  $focus, '', true, '', '<p class="logininfo">'.user_login_string($site).'</p>');
 
+    echo calendar_overlib_html();
+
     echo '<table border="0" cellpadding="3" cellspacing="0" width="100%"><tr valign="top">';
     echo '<td valign="top" width="100%">';
 
             include('event_edit.html');
             print_side_block_end();
             if ($usehtmleditor) {
-                use_html_editor();
+                use_html_editor("description");
             }
         break;
 
             else {
                 include('event_new.html');
                 if ($usehtmleditor) {
-                    use_html_editor();
+                    use_html_editor("description");
                 }
             }
             print_side_block_end();
     echo '<td style="vertical-align: top; width: 180px;">';
 
     $defaultcourses = calendar_get_default_courses();
-    echo calendar_overlib_html();
     calendar_set_filters($courses, $groups, $users, $defaultcourses, $defaultcourses);
 
     print_side_block_start(get_string('monthlyview', 'calendar'));
index 8bd4464ccae2f7cee38fc2f62f7789b67d674116..4350060aecb5a439407398598f87d9f582a366f8 100644 (file)
@@ -19,7 +19,7 @@
     </td>
     <td>
       <?php
-          print_textarea($usehtmleditor, 10, 65, 630, 400, "description", $form->description);
+          print_textarea($usehtmleditor, 20, 65, 630, 300, "description", $form->description);
           if (isset($err['description'])) formerr($err['description']);
       ?>
     </td>
index 2f18dc06544b42e3207a010cbcd38c3873edcd01..ec22db8cebe07908b27b94ba0b5d2547f2624a61 100644 (file)
@@ -19,7 +19,7 @@
     </td>
     <td>
     <?php 
-        print_textarea($usehtmleditor, 10, 65, 630, 200, "description", $form->description);
+        print_textarea($usehtmleditor, 20, 65, 630, 300, "description", $form->description);
         if (isset($err['description'])) formerr($err['description']); 
     ?>
     </td>
index d4a1424db798c79f51ff53a7ab13ce2d13cc399e..b33445ad3c3baa23fd04320c5c678457c045428c 100644 (file)
     print_footer($course);
 
     if ($usehtmleditor) {
-        use_html_editor();
+        use_html_editor("summary");
     }
 
     exit;
index 274b3e15a346e8417ad391e71b0cb78d1c0dd2ab..16c5c744df942deeb16e79f5876bb566615654ce 100644 (file)
@@ -58,7 +58,7 @@
     print_simple_box_end();
 
     if ($usehtmleditor) { 
-        use_html_editor();
+        use_html_editor("summary");
     }
     print_footer($course);
 
index 0debfe12de5bfc157a25104e212887fcfc98967c..65c9141c7089bf944e7f1c8119039e1fb7fed3c6 100644 (file)
@@ -95,7 +95,7 @@
         include('group-edit.html');
 
         if ($usehtmleditor) {
-            use_html_editor();
+            use_html_editor("description");
         }
 
         print_footer();
index f161f0517f0e5d6ce1731a770161fbce033fe025..94d06c725754e62986bbeed4bc07d96580a0e2b3 100644 (file)
 
     if (file_exists($modform)) {
 
+        if ($usehtmleditor = can_use_html_editor()) {
+            $defaultformat = FORMAT_HTML;
+        } else {
+            $defaultformat = FORMAT_MOODLE;
+        }
+
         $icon = "<img align=absmiddle height=16 width=16 src=\"$CFG->modpixpath/$module->name/icon.gif\">&nbsp;";
 
         print_heading_with_help($pageheading, "mods", $module->name, $icon);
         include_once($modform);
         print_simple_box_end();
 
+        if ($usehtmleditor and empty($nohtmleditorneeded)) { 
+            use_html_editor();
+        }
+
     } else {
         notice("This module cannot be added to this course yet! (No file found at: $modform)", "$CFG->wwwroot/course/view.php?id=$course->id");
     }
index 27849216dc46587f66c4e540ddb6040eb1aac42d..0effc063f9638ce18d9554525222c39aa4c0d3c5 100644 (file)
@@ -1654,11 +1654,11 @@ function use_html_editor($name="") {
 
     echo "<script language=\"javascript\" type=\"text/javascript\" defer=\"1\">\n";
     if (empty($name)) {
-        echo "HTMLArea.replaceAll();";
+        echo "HTMLArea.replaceAll();\n";
     } else {
-        echo "HTMLArea.replace('$name')";
+        echo "HTMLArea.replace('$name');\n";
     }
-    echo "</script>";
+    echo "</script>\n";
 }
 
 
index b5ab9c85e32d0fd186b31f91888ff9cb35047d3c..c4c9d0e7faab1c0a13ca57d1dad80acd1ed9d8e9 100644 (file)
@@ -1,9 +1,4 @@
 <?php
-    if ($usehtmleditor = can_use_richtext_editor()) {
-        $defaultformat = FORMAT_HTML;
-    } else {
-        $defaultformat = FORMAT_MOODLE;
-    }
     if (empty($form->name)) {
         $form->name = "";
     }
     }
 ?>
 
-<form name="form" method="post" <?php echo $onsubmit ?> action="mod.php">
-<table cellpadding=5>
-<tr valign=top>
+<form name="form" method="post" action="mod.php">
+<table cellpadding="5">
+<tr valign="top">
     <td align=right><p><b><?php print_string("assignmentname", "assignment") ?>:</b></p></td>
     <td>
         <input type="text" name="name" size=60 value="<?php p($form->name) ?>">
     </td>
 </tr>
-<tr valign=top>
+<tr valign="top">
     <td align=right><p><b><?php print_string("description", "assignment") ?>:</b></p>
     <font size="1">
      <?php
     <?php
        print_textarea($usehtmleditor, 20, 60, 680, 400, "description", $form->description);
     
-       echo "<p align=right>";
-       helpbutton("textformat", get_string("formattexttype"));
-       print_string("formattexttype");
-       echo ":&nbsp;";
-       if (!$form->format) {
-           $form->format = $defaultformat;
+       if ($usehtmleditor) {
+           echo '<input type="hidden" name="format" value="'.FORMAT_HTML.'" />';
+       } else {
+           echo '<p align="right">';
+           helpbutton("textformat", get_string("formattexttype"));
+           print_string("formattexttype");
+           echo ':&nbsp;';
+           if (!$form->format) {
+               $form->format = $defaultformat;
+           }
+           choose_from_menu(format_text_menu(), "format", $form->format, ""); 
+           echo '</p>';
        }
-       choose_from_menu(format_text_menu(), "format", $form->format, ""); 
-       echo "</p>";
     ?>
     </td>
 </tr>
-<tr valign=top>
+<tr valign="top">
     <td align=right><p><b><?php print_string("assignmenttype", "assignment") ?>:</b></p></td>
     <td>
     <?php
-       require("$CFG->dirroot/mod/assignment/lib.php");
+       require_once("$CFG->dirroot/mod/assignment/lib.php");
        asort($ASSIGNMENT_TYPE);
        choose_from_menu($ASSIGNMENT_TYPE, "type", $form->type, "");
        helpbutton("assignmenttype", get_string("assignmenttype", "assignment"), "assignment");
 </table>
 <br />
 <center>
-<input type="hidden" name=course     value="<?php p($form->course) ?>">
-<input type="hidden" name=coursemodule  value="<?php p($form->coursemodule) ?>">
-<input type="hidden" name=section       value="<?php p($form->section) ?>">
-<input type="hidden" name=module     value="<?php p($form->module) ?>">
-<input type="hidden" name=modulename value="<?php p($form->modulename) ?>">
-<input type="hidden" name=instance   value="<?php p($form->instance) ?>">
-<input type="hidden" name=mode       value="<?php p($form->mode) ?>">
-<input type="submit" value="<?php print_string("savechanges") ?>">
-<input type="submit" name=cancel value="<?php print_string("cancel") ?>">
+<input type="hidden" name=course     value="<?php p($form->course) ?>" />
+<input type="hidden" name=coursemodule  value="<?php p($form->coursemodule) ?>" />
+<input type="hidden" name=section       value="<?php p($form->section) ?>" />
+<input type="hidden" name=module     value="<?php p($form->module) ?>" />
+<input type="hidden" name=modulename value="<?php p($form->modulename) ?>" />
+<input type="hidden" name=instance   value="<?php p($form->instance) ?>" />
+<input type="hidden" name=mode       value="<?php p($form->mode) ?>" />
+<input type="submit" value="<?php print_string("savechanges") ?>" />
+<input type="submit" name=cancel value="<?php print_string("cancel") ?>" />
 </center>
 </form>
-
-<?php 
-   if ($usehtmleditor) { 
-       print_richedit_javascript("form", "description", "yes");
-   }
-?>
-
index 4941aa98b52456e63d8c6aace19f3f52de963324..3fc0cdc0557a71978d65cfb45f7a646324acea79 100644 (file)
@@ -6,7 +6,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 $module->version  = 2004040100;
-$module->requires = 2004013101;  // Requires this Moodle version
+$module->requires = 2004052501;  // Requires this Moodle version
 $module->cron     = 60;
 
 ?>
index 276da0d09e75e57a789d13feb27fd43cd5f92d0a..f37b96264bca44fb22765fb142be648107f31433 100755 (executable)
@@ -40,10 +40,11 @@ function attendance_add_instance($attendance) {
        $attendance->day = make_timestamp($attendance->theyear, 
                           $attendance->themonth, $attendance->theday);
      }
+     $attendance->notes = $attendance->name;
      $attendance->name=userdate($attendance->day, get_string("strftimedate"));
-        if (isset($attendance->notes)) { 
-               $attendance->name = $attendance->name . " - " . $attendance->notes;
-        }
+        if ($attendance->notes) { 
+               $attendance->name = $attendance->name . " - " .  $attendance->notes;
+        }  
          $attendance->edited = 0;
 if ($attendance->dynsection) { 
        if ($mod->course) {
@@ -78,10 +79,10 @@ function attendance_update_instance($attendance) {
 
      $attendance->day = make_timestamp($attendance->theyear, 
                        $attendance->themonth, $attendance->theday); 
+     $attendance->notes = $attendance->name;
      $attendance->name=userdate($attendance->day, get_string("strftimedate"));
         if ($attendance->notes) { 
-               $attendance->name = $attendance->name . " - " . 
-                 $attendance->notes;
+               $attendance->name = $attendance->name . " - " .  $attendance->notes;
         }  
   if ($attendance->dynsection) { 
            //get info about the course
index 578c4e82819929004fd4781d60bca3a63b1092d6..75a5e9e5a2579f8ce6fe989d6487eef00dc60b19 100755 (executable)
@@ -4,6 +4,7 @@
 <!-- RJJ I'm using inline CSS styles for some stuff in this page because I want to centralize -->
 <!-- the logic and styles in a single directory -->
 <?php @include_once("$CFG->dirroot/mod/attendance/lib.php");
+      $nohtmleditorneeded = true;
     //require_once("lib.php")
 
 // error_reporting(E_ALL);
@@ -20,8 +21,6 @@ if (empty($form->id)) {
     ?>
 <FORM name="form" method="post" action="<?php echo $ME ?>">
 <CENTER>
-<INPUT type="submit" value="<?php  print_string("savechanges") ?>">
-<INPUT type="submit" name="cancel" value="<?php  print_string("cancel") ?>">
 <TABLE cellpadding=5>
 
 <!-- <?php  $options[0] = get_string("no"); $options[1] = get_string("yes"); ?> -->
@@ -30,9 +29,9 @@ if (empty($form->id)) {
 <!--     <TD align=left><?php  choose_from_menu($options, "roll", $form->roll, "") ?></td> -->
 <!-- </tr> -->
 <tr valign=top>
-    <td align=right><p><b><?php print_string("notes", "attendance") ?>:</b></p></td>
+    <td align=right><p><b><?php print_string("name") ?>:</b></p></td>
     <td colspan="3">
-        <input type="text" name="notes" size=60 value="<?php p($form->notes)?>">
+        <input type="text" name="name" size=60 value="<?php p($form->notes)?>">
     </td>
 </tr>
 
index 872742bd13eea9349dfcf5f92947a3ded4b09752..5013856bd9dfa8e1b8083e1055d292eea059b092 100644 (file)
@@ -6,7 +6,7 @@
 /////////////////////////////////////////////////////////////////////////////////
 
 $module->version  = 2004050301;  // The current module version (Date: YYYYMMDDXX)
-$module->requires = 2004013101;  // Requires this Moodle version
+$module->requires = 2004052501;  // Requires this Moodle version
 $module->cron     = 3600;        // Period for cron to check this module (secs)
 
 ?>
index 4024248db2d892af443a5ae78260581ced84313a..9c93912a87b428101b8b099a5caaced95f578eec 100644 (file)
@@ -12,7 +12,7 @@
         $form->studentlogs = 0;
     }
 ?>
-<form name="form" method="post" <?php echo $onsubmit ?> action="mod.php">
+<form name="form" method="post" action="mod.php">
 <table cellpadding=5>
 <tr>
 <tr valign=top>
@@ -35,7 +35,7 @@
     </font>
     </td>
     <td>
-        <textarea name="intro" rows=4 cols=50 wrap="virtual"><?php p($form->intro) ?></textarea>
+        <?php print_textarea($usehtmleditor, 20, 50, 680, 400, "intro", $form->intro); ?>
     </td>
 </tr>
 <tr valign=top>
index 56f054ea51b2da0083c592401e2a254eeaaa8ec6..a9366a5718c4b680b62e3a3cdf5a3b279602f531 100644 (file)
@@ -6,7 +6,7 @@
 /////////////////////////////////////////////////////////////////////////////////
 
 $module->version  = 2004043000;   // The (date) version of this module
-$module->requires = 2004013101;  // Requires this Moodle version
+$module->requires = 2004052501;  // Requires this Moodle version
 $module->cron     = 300;          // How often should cron check this module (seconds)?
 
 ?>
index 169ef37c89fd86f210fc1346761800636d1e398b..64c5c32cdcce627dfb4c2c641555400829ba34e9 100644 (file)
         $form->showunanswered = 0;
     }
 
-    if ($usehtmleditor = can_use_richtext_editor()) {
-        $defaultformat = FORMAT_HTML;
-        $onsubmit = "onsubmit=\"copyrichtext(document.form.text);\"";
-    } else {
-        $defaultformat = FORMAT_MOODLE;
-        $onsubmit = "";
-    }
-
 ?>
-<form name="form" method="post" <?php echo $onsubmit ?> action="mod.php">
+<form name="form" method="post" action="mod.php">
 
 <table cellpadding=5>
 
     <?php 
        print_textarea($usehtmleditor, 20, 60, 680, 400, "text", $form->text);
     
-       echo "<p align=right>";
-       helpbutton("textformat", get_string("formattexttype"));
-       print_string("formattexttype");
-       echo ":&nbsp;";
-       if (!$form->format) {
-           $form->format = $defaultformat;
+       if ($usehtmleditor) {
+           echo '<input type="hidden" name="format" value="'.FORMAT_HTML.'" />';
+       } else {
+           echo "<p align=right>";
+           helpbutton("textformat", get_string("formattexttype"));
+           print_string("formattexttype");
+           echo ":&nbsp;";
+           if (!$form->format) {
+               $form->format = $defaultformat;
+           }
+           choose_from_menu(format_text_menu(), "format", $form->format, ""); 
+           echo "</p>";
        }
-       choose_from_menu(format_text_menu(), "format", $form->format, ""); 
-       echo "</p>";
     ?>
     </td>
 </tr>
 <input type="submit" name=cancel value="<?php print_string("cancel") ?>">
 </center>
 </form>
-
-<?php
-   if ($usehtmleditor) { 
-       print_richedit_javascript("form", "text", "yes");
-   }
-?>
index 08aa622b2485e048cc89daab4d0491b2865c0262..f648d98bf9678513f6af44357a0115f3c2b58323 100644 (file)
@@ -6,7 +6,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 $module->version  = 2004021700;
-$module->requires = 2004013101;  // Requires this Moodle version
+$module->requires = 2004052501;  // Requires this Moodle version
 $module->cron     = 0;
 
 ?>
index 2f3831bd6f0f86ed23188128a0b5bdeb4df6b8a5..176e97610b16704144e8b871a89e195589ed14f4 100644 (file)
@@ -1,13 +1,4 @@
 <?php
-       // set the defaults...
-    if ($usehtmleditor = can_use_richtext_editor()) {
-        $defaultformat = FORMAT_HTML;
-        $onsubmit = "onsubmit=\"copyrichtext(document.form.description);\"";
-    } else {
-        $defaultformat = FORMAT_MOODLE;
-        $onsubmit = "";
-    }
-       // ...and fill the form if needed
     if (!isset($form->name)) {
         $form->name = "";
     }
@@ -29,7 +20,7 @@
 print_heading_with_help(get_string("furtherinformation", "dialogue"), "info", "dialogue"); 
 ?>
 
-<form name="form" method="post" <?php echo $onsubmit ?> action="mod.php">
+<form name="form" method="post" action="mod.php">
 <table cellpadding=5>
 <tr valign=top>
     <td align=right><p><b><?php print_string("dialoguename", "dialogue") ?>:</b></p></td>
@@ -50,7 +41,7 @@ print_heading_with_help(get_string("furtherinformation", "dialogue"), "info", "d
     
     </TD>
     <td>
-        <textarea name="intro" rows=15 cols=30 wrap="virtual"><?php p($form->intro) ?></textarea>
+        <?php print_textarea($usehtmleditor, 20, 50, 680, 400, "intro", $form->intro); ?>
     </td>
 </tr>
 <tr valign=top>
index 660a96ab37b5f1457f2eee677193c59c3ff63dca..330286cfe17936d0ff2f19dfc93196170fc6d309 100644 (file)
@@ -6,7 +6,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 $module->version  = 2004013101;
-$module->requires = 2004013101;  // Requires this Moodle version
+$module->requires = 2004052501;  // Requires this Moodle version
 $module->cron     = 60;
 
 ?>
index 999b74e7bdd7a8be2f5484333cd72da67eeca50c..c0b7f21a20e4849242c9a34c6f7ae4560bd696e4 100644 (file)
@@ -22,6 +22,8 @@
     if (empty($form->deadline)) {
         $form->deadline = "";
     }
+
+    $nohtmleditorneeded = true;
 ?>
 
 <form name="form" method="post" action="mod.php">
@@ -49,7 +51,7 @@
             $grades[$i] = $i;
         }
         choose_from_menu($grades, "grade", "$form->grade", "");
-       helpbutton("grade", get_string("maximumgrade", "exercise"), "exercise");
+        helpbutton("grade", get_string("maximumgrade", "exercise"), "exercise");
         ?>
     </td>
 </tr>
@@ -83,7 +85,7 @@
             $numbers[$i] = $i;
         }
         choose_from_menu($numbers, "nelements", "$form->nelements", "");
-       helpbutton("nelements", get_string("numberofassessmentelements", "exercise"), "exercise");
+        helpbutton("nelements", get_string("numberofassessmentelements", "exercise"), "exercise");
         ?>
     </td>
 </tr>
index 660a96ab37b5f1457f2eee677193c59c3ff63dca..330286cfe17936d0ff2f19dfc93196170fc6d309 100644 (file)
@@ -6,7 +6,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 $module->version  = 2004013101;
-$module->requires = 2004013101;  // Requires this Moodle version
+$module->requires = 2004052501;  // Requires this Moodle version
 $module->cron     = 60;
 
 ?>
index d6a02edc677beb65fc6cf37ac8b548c2817a5f13..e6384b1c196309e19a937c01d0d324f69dd84afa 100644 (file)
@@ -30,7 +30,7 @@
         $form->rssarticles = 0;
     }
 ?>
-<form name="form" method="post" <?php echo $onsubmit ?> action="mod.php">
+<form name="form" method="post" action="mod.php">
 <table cellpadding=5>
 <tr>
 <tr valign=top>
@@ -77,7 +77,7 @@
     </font>
     </td>
     <td>
-        <textarea name="intro" rows=4 cols=50 wrap="virtual"><?php p($form->intro) ?></textarea>
+        <?php print_textarea($usehtmleditor, 20, 50, 680, 400, "intro", $form->intro); ?>
     </td>
 </tr>
 
index b5dc779c88c63198e31fc9b0a6a6778778823ea0..1d767dabbe89ceb59b2c6c0077d417b89720d00f 100644 (file)
     print_simple_box_end();
 
     if ($usehtmleditor) {
-        use_html_editor();
+        use_html_editor("message");
     }
 
     print_footer($course);
index 9b36d84e14faaaed3cfd171785d79401fd410641..2c4e8dd9162ff183422de220943afa67fab83e2c 100644 (file)
             include("comment.html");
 
             if ($usehtmleditor) { 
-                use_html_editor();
+                use_html_editor("text");
             }
         }
     }
index b6e82c7949796a6366b2edf5429e8655ac9e885e..150a989c9f78d7da977747cd7d60ad4687a28706 100644 (file)
@@ -1,7 +1,5 @@
 <?PHP  // $Id$
 
-global $CFG;
-
 if (!isset($form->studentcanpost)) {
     $form->studentcanpost = $CFG->glossary_studentspost;
 }
@@ -74,7 +72,7 @@ if (!isset($form->showspecial)) {
      </font>
     </td>
     <td>
-        <textarea name="intro" rows=5 cols=50 wrap="virtual"><?php p($form->intro) ?></textarea>
+        <?php print_textarea($usehtmleditor, 20, 50, 680, 400, "intro", $form->intro); ?>
     </td>
 </tr>
 <TR valign=top>
index 44a1ac8702c1b483c6240a15dd21631c05c20403..0c6d8f9d4f46df8ed0a77be8f318bce7bbefac75 100644 (file)
@@ -6,7 +6,7 @@
 /////////////////////////////////////////////////////////////////////////////////
 
 $module->version  = 2004051400;  // The current module version (Date: YYYYMMDDXX)
-$module->requires = 2004050300;  // Requires this Moodle version
+$module->requires = 2004052501;  // Requires this Moodle version
 $module->cron     = 0;           // Period for cron to check this module (secs)
 
 $release = "0.5 development";   // User-friendly version number
index cec5fcd98dac08eadd10cb071bca93c93c8f04fe..b2310da6688caf1052c31d6c455e29693fd983cb 100644 (file)
@@ -90,7 +90,7 @@
        include("edit.html");
 
     if ($usehtmleditor) {
-        use_html_editor();
+        use_html_editor("text");
     }
 
     print_footer($course);
index 2c9e3f8071bace3ac8c728c7d7f154766b8579b2..48e1c61c2dd2d31825fece622d80d0d934328da0 100644 (file)
@@ -1,10 +1,4 @@
 <?php
-    if ($usehtmleditor = can_use_richtext_editor()) {
-        $defaultformat = FORMAT_HTML;
-    } else {
-        $defaultformat = FORMAT_MOODLE;
-    }
-
     if (!isset($form->name)) {
         $form->name = "";
     }
@@ -23,7 +17,7 @@
     }
 ?>
 
-<form name="form" method="post" <?php echo $onsubmit ?> action="mod.php">
+<form name="form" method="post" action="mod.php">
 <table cellpadding=5>
 <tr valign=top>
     <td align=right><p><b><?php print_string("journalname", "journal") ?>:</b></p></td>
     <?php
        print_textarea($usehtmleditor, 20, 60, 680, 400, "intro", $form->intro);
 
-       echo "<p align=right>";
-       helpbutton("textformat", get_string("formattexttype"));
-       print_string("formattexttype");
-       echo ":&nbsp;";
-       if (!$form->introformat) {
-           $form->introformat = $defaultformat;
+       if ($usehtmleditor) {
+           echo '<input type="hidden" name="format" value="'.FORMAT_HTML.'" />';
+       } else {
+           echo "<p align=right>";
+           helpbutton("textformat", get_string("formattexttype"));
+           print_string("formattexttype");
+           echo ":&nbsp;";
+           if (!$form->introformat) {
+               $form->introformat = $defaultformat;
+           }
+           choose_from_menu(format_text_menu(), "introformat", $form->introformat, "");
+           echo "</p>";
        }
-       choose_from_menu(format_text_menu(), "introformat", $form->introformat, "");
-       echo "</p>";
     ?>
     </td>
 </tr>
 <input type="submit" name=cancel value="<?php print_string("cancel") ?>">
 </form>
 </center>
-
-
-<?php 
-   if ($usehtmleditor) { 
-       print_richedit_javascript("form", "intro", "yes");
-   }
-?>
-
index b36114e59756c3286f794b4980708524fbe705ed..f4d4408bac57f6c0bdc6d52421fe4db965bad778 100644 (file)
@@ -6,7 +6,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 $module->version  = 2004020500;
-$module->requires = 2004013101;  // Requires this Moodle version
+$module->requires = 2004052501;  // Requires this Moodle version
 $module->cron     = 60;
 
 ?>
index c72afecc20a77fa02310510da436708eae86cee8..93d3af09c9a1c3916fd59ea957b6563230eb47c2 100644 (file)
@@ -1,14 +1,6 @@
 <!-- This page defines the form to create or edit an instance of this module -->
 <!-- It is used from /course/mod.php.  The whole instance is available as $form. -->
 
-<?php
-    if ($usehtmleditor = can_use_html_editor()) {
-        $defaultformat = FORMAT_HTML;
-    } else {
-        $defaultformat = FORMAT_MOODLE;
-    }
-?>
-
 <form name="form" method="post" action="mod.php">
 <center>
 <table cellpadding=5>
@@ -46,9 +38,3 @@
 <input type="submit" value="<?php  print_string("savechanges") ?>">
 </center>
 </form>
-
-<?php 
-   if ($usehtmleditor) { 
-       use_html_editor();
-   }
-?>
index f95b2e1e9e6ed11e6220023ab8ad28884ba7bd26..e26dc308eaccfb152dad07fdba758a0911388855 100644 (file)
@@ -6,7 +6,7 @@
 /////////////////////////////////////////////////////////////////////////////////
 
 $module->version  = 2004021900;  // The current module version (Date: YYYYMMDDXX)
-$module->requires = 2004013101;  // Requires this Moodle version
+$module->requires = 2004052501;  // Requires this Moodle version
 $module->cron     = 0;           // Period for cron to check this module (secs)
 
 ?>
index 224bfc6df57b07ba8052c3959eb7a81a89482b35..92d58bcc564e82edfc6c5193836386967991563b 100644 (file)
@@ -2,7 +2,8 @@
 <!-- It is used from /course/mod.php.  The whole instance is available as $form. -->
 <?php
 
-require("$CFG->dirroot/mod/lesson/lib.php");  // for parameter array
+    require_once("$CFG->dirroot/mod/lesson/lib.php");  // for parameter array
+    $nohtmleditorneeded = true;
 
 // set the defaults
     if (empty($form->name)) {
@@ -38,6 +39,7 @@ require("$CFG->dirroot/mod/lesson/lib.php");  // for parameter array
     if (!isset($form->deadline)) {
         $form->deadline = 0;
     }
+
 ?>
 
 <FORM name="form" method="post" action="<?php echo $ME ?>">
index 45896bdd5137600736cba2e22701dab81d6928c1..b55aa0f8be3a4694f12e03680b2b519da0fa2013 100644 (file)
@@ -6,7 +6,7 @@
 /////////////////////////////////////////////////////////////////////////////////
 
 $module->version  = 2004032700;  // The current module version (Date: YYYYMMDDXX)
-$module->requires = 2004013101;  // Requires this Moodle version
+$module->requires = 2004052501;  // Requires this Moodle version
 $module->cron     = 0;           // Period for cron to check this module (secs)
 
 ?>
index aa6d6a144a2568fe7f6047aff267838552b1a579..77d4ffd0679afb6c97fc564fd9d475a7e723c9c9 100644 (file)
     </td>
 </tr>
 <tr valign=top>
-    <td align=right><p><b><?php print_string("introduction", "quiz") ?>:</b></p></td>
+    <td align=right><p><b><?php print_string("introduction", "quiz") ?>:</b></p>
+      <br />
+    <font size="1">
+     <?php
+        if ($usehtmleditor) {
+           helpbutton("richtext", get_string("helprichtext"), "moodle", true, true);
+        } else {
+           helpbutton("text", get_string("helptext"), "moodle", true, true); 
+           echo '<br />';
+           emoticonhelpbutton("form", "description");
+           echo '<br />';
+        } 
+      ?>
+      <br />
+      </font>
+    </td>
     <td>
-        <textarea name="intro" rows=4 cols=50 wrap="virtual"><?php p($form->intro) ?></textarea>
         <?php 
-           helpbutton("text", get_string("helptext")); 
+           print_textarea($usehtmleditor, 20, 50, 680, 400, "intro", $form->intro);
         ?>
     </td>
 </tr>
index 192c313c7f1bb7a9eebfee56c512c5ee672c476c..4bd366e9a31c74a1cd2effa5ddab55f86c93d042 100755 (executable)
@@ -91,7 +91,7 @@ class quiz_report extends quiz_default_report {
     $user_resps = qr_quiz_responses($thisquizid);
 //    //print_object($user_resps);
     foreach($user_resps as $thiskey => $thisresp){
-        $userdata[$thisresp->userid][$thisresp->attemptno]['response'][$thisresp->question]=$thisresp->answer;
+        $userdata[$thisresp->userid][$thisresp->attemptno]['response'][$thisresp->question]=s($thisresp->answer);
         $userdata[$thisresp->userid][$thisresp->attemptno]['grade']=$thisresp->sumgrades;
         $userdata[$thisresp->userid][$thisresp->attemptno]['name']=fullname($thisresp);
         $userdata[$thisresp->userid][$thisresp->attemptno]['attemptid']=$thisresp->aid;
index a9ac318ff4000cd038b40a84aae5434e9156147e..5fc03bb1736b533996f99dfa8c18a479d494bc47 100644 (file)
@@ -6,7 +6,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 $module->version  = 2004060200;   // The (date) version of this module
-$module->requires = 2004013101;   // Requires this Moodle version
+$module->requires = 2004052501;   // Requires this Moodle version
 $module->cron     = 0;            // How often should cron check this module (seconds)?
 
 ?>
index 0836c1572b317efe4cc400a9ad1b0f94822d6def..f2e38e4e4240319dcd9f93e2b0ad8358d433688a 100644 (file)
         </form>
 <?php
         if ($usehtmleditor and $form->type == HTML) {
-            use_html_editor();
+            use_html_editor("alltext");
         }
         print_simple_box_end();
         print_footer($course);
index 1ae7bb196b31e4f7d5a86492454ab608e50dd328..28831b939d9e26ff4e21a76226e4bf9e9e755fb7 100644 (file)
@@ -14,6 +14,7 @@
     if (empty($form->alltext)) {
         $form->alltext = "";
     }
+    $nohtmleditorneeded = true;
 ?>
 
 
@@ -54,7 +55,7 @@
      </font>
     </td>
     <td>
-        <textarea name="summary" rows=5 cols=50 wrap="virtual"><?php p($form->summary) ?></textarea>
+        <?php print_textarea(false, 7, 50, 680, 400, "summary", $form->summary); ?>
     </td>
 </tr>
 </table>
index 023a4396456d27068e73730ff5fcf502f7d22c2b..b99b92a0bfbfd62911955e06a9f65c5a6136ae73 100644 (file)
@@ -6,7 +6,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 $module->version  = 2004013101;
-$module->requires = 2004051600;  // Requires this Moodle version
+$module->requires = 2004052501;  // Requires this Moodle version
 $module->cron     = 0;
 
 ?>
index 07f2ef093fe8895acafed0d79e964d36e948c4db..ad7db3c9308aab310deb51dd848b141e11a396de 100755 (executable)
@@ -52,7 +52,7 @@
                </font>
            </td>
            <td>
-               <textarea name="summary" rows=5 cols=50 wrap="virtual"><?php p($form->summary) ?></textarea>
+        <?php print_textarea($usehtmleditor, 20, 50, 680, 400, "summary", $form->summary); ?>
            </td>
        </tr>
        <tr valign=top>
index e3ee06f79de88689cc38bce8ff7c06cbc3f6da88..826d36bff6b06b471ba958440516923f55670e93 100755 (executable)
@@ -6,6 +6,7 @@
 /////////////////////////////////////////////////////////////////////////////////
 
 $module->version  = 2004040900;   // The (date) version of this module
+$module->requires = 2004051600;   // The version of Moodle that is required
 $module->cron     = 0;            // How often should cron check this module (seconds)?
 
 ?>
index 60f3902201a546b543e79bfb8be49b4a55560286..06e8e9143da4361e7818026a89a4390034163f9d 100644 (file)
@@ -8,6 +8,7 @@
     if (!isset($form->intro)) {
         $form->intro = "";
     }
+    $nohtmleditorneeded = true;
 ?>
 
 <form name="form" method="post" action="../mod/survey/details.php">
index 9bea0284091d64128777ab6e08ac3a11175aa67e..fbddeddc2fb0e4fdb13d3e29b8ee310daf4a5714 100644 (file)
@@ -6,7 +6,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 $module->version  = 2004021900;
-$module->requires = 2004013101;  // Requires this Moodle version
+$module->requires = 2004051600;  // Requires this Moodle version
 $module->cron     = 0;
 
 ?>
index 26d09a369f60000d69f02b2b702cb3794edfd577..cec406c85da958db5836275f5922e57497467bca 100644 (file)
@@ -1,12 +1,4 @@
 <?php
-       // set the defaults...
-    if ($usehtmleditor = can_use_richtext_editor()) {
-        $defaultformat = FORMAT_HTML;
-        $onsubmit = "onsubmit=\"copyrichtext(document.form.description);\"";
-    } else {
-        $defaultformat = FORMAT_MOODLE;
-        $onsubmit = "";
-    }
        // ...and fill the form if needed
     if (empty($form->name)) {
         $form->name = "";
@@ -49,7 +41,7 @@
     }
 ?>
 
-<form name="form" method="post" <?php echo $onsubmit ?> action="mod.php">
+<form name="form" method="post" action="mod.php">
 <table cellpadding=5>
 <tr valign=top>
     <td align=right><P><B><?php  print_string("title", "workshop") ?>:</B></P></TD>
     </td>
 </tr>
 <tr valign=top>
-    <td align=right><P><B><?php  print_string("description", "workshop") ?>:</B></P></TD>
+    <td align=right><p><b><?php  print_string("description", "workshop") ?>:</b></p>
+    <font size="1">
+     <?php
+        helpbutton("writing", get_string("helpwriting"), "moodle", true, true);
+        echo "<br />";
+        if ($usehtmleditor) {
+           helpbutton("richtext", get_string("helprichtext"), "moodle", true, true);
+        } else {
+           helpbutton("text", get_string("helptext"), "moodle", true, true);
+           echo "<br />";
+           emoticonhelpbutton("form", "description", "moodle", true, true);
+           echo "<br />";
+        } 
+      ?>
+      <br />
+    </font>
     <td>
     <?php  
        print_textarea($usehtmleditor, 20, 60, 595, 400, "description", $form->description);
     
-       if ($usehtmleditor) { 
-           helpbutton("richtext", get_string("helprichtext"));
-       } else { 
-           helpbutton("text", get_string("helptext"));
-       }
-       echo "<P align=right>";
-       print_string("formattexttype");
-       echo ":&nbsp;";
-       if (!$form->format) {
-           $form->format = $defaultformat;
+       if ($usehtmleditor) {
+           echo '<input type="hidden" name="format" value="'.FORMAT_HTML.'" />';
+       } else {
+           echo '<p align="right">';
+           helpbutton("textformat", get_string("formattexttype"));
+           print_string("formattexttype");
+           echo ':&nbsp;';
+           if (!$form->format) {
+               $form->format = $defaultformat;
+           }
+           choose_from_menu(format_text_menu(), "format", $form->format, ""); 
+           echo '</p>';
        }
-       choose_from_menu(format_text_menu(), "format", $form->format, ""); 
-       helpbutton("textformat", get_string("formattexttype"));
-       echo "</P>";
     ?>
     </td>
 </tr>
 
 </CENTER>
 </FORM>
-
-<?php  
-   if ($usehtmleditor) { 
-       print_richedit_javascript("form", "description", "no");
-   }
-?>
-
index 0072334947d826bd176e96bf4639d2988ef982d3..48be810ae8f44c4bbc14263cdcd2371b9749add4 100644 (file)
@@ -6,7 +6,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 $module->version  = 2004052100;
-$module->requires = 2004013101;  // Requires this Moodle version
+$module->requires = 2004051600;  // Requires this Moodle version
 $module->cron     = 60;
 
 ?>
index 39135a0b85e366ac8d4feff0477c1feeb6a33f5f..4715b99e4ce49f72bca44d67b03e1c7317a84430 100644 (file)
@@ -1,4 +1,4 @@
-<?PHP //$Id
+<?PHP //$Id$
     //This file returns the required rss feeds
     //The URL format MUST include:
     //    course: the course id
index e97d948e31e5c4db1bb13bdf80be779e2af5b5c4..88369413eda55ee42d85ebe91289fba78002068d 100644 (file)
@@ -9,5 +9,4 @@ $version = 2004060100;   // The current version is a date (YYYYMMDDXX)
 
 $release = "1.4 development";   // User-friendly version number
 
-
 ?>