]> git.mjollnir.org Git - moodle.git/commitdiff
Minor code cleanups
authormoodler <moodler>
Tue, 20 May 2003 08:03:12 +0000 (08:03 +0000)
committermoodler <moodler>
Tue, 20 May 2003 08:03:12 +0000 (08:03 +0000)
  - lowercasing
  - removing short php tags
  - adding some emoticon help here and there

mod/assignment/mod.html
mod/choice/mod.html
mod/forum/mod.html
mod/journal/mod.html
mod/quiz/mod.html
mod/resource/details.php
mod/resource/mod.html

index c235e785158df06386171238bd878a86eb758b53..555cfb4af8de007fc3ad52a0170b72fca0b65a8e 100644 (file)
@@ -1,4 +1,4 @@
-<?
+<?php
     if ($usehtmleditor = can_use_richtext_editor()) {
         $defaultformat = FORMAT_HTML;
         $onsubmit = "onsubmit=\"copyrichtext(document.form.description);\"";
     }
 ?>
 
-<form name="form" method="post" <?=$onsubmit ?> action="<?=$ME ?>">
+<form name="form" method="post" <?php echo $onsubmit ?> action="<?php echo $ME ?>">
 <table cellpadding=5>
 <tr valign=top>
-    <td align=right><P><B><? print_string("assignmentname", "assignment") ?>:</B></P></TD>
+    <td align=right><p><b><?php print_string("assignmentname", "assignment") ?>:</b></p></td>
     <td>
-        <input type="text" name="name" size=60 value="<? p($form->name) ?>">
+        <input type="text" name="name" size=60 value="<?php p($form->name) ?>">
     </td>
 </tr>
 <tr valign=top>
-    <td align=right><P><B><? print_string("description", "assignment") ?>:</B></P>
-    <font SIZE="1">
-     <? helpbutton("writing", get_string("helpwriting"), "moodle", true, true) ?><br \>
-     <? helpbutton("questions", get_string("helpquestions"), "moodle", true, true) ?><br \>
-     <? if ($usehtmleditor) { ?>
-        <? helpbutton("richtext", get_string("helprichtext"), "moodle", true, true) ?>
-     <? } else { ?>
-        <? helpbutton("text", get_string("helptext"), "moodle", true, true) ?>
-     <? } ?><br \>
-     </font>
+    <td align=right><p><b><?php print_string("description", "assignment") ?>:</b></p>
+    <font size="1">
+     <?php
+        helpbutton("writing", get_string("helpwriting"), "moodle", true, true);
+        echo "<br />";
+        helpbutton("questions", get_string("helpquestions"), "moodle", true, true);
+        echo "<br />";
+        if ($usehtmleditor) {
+           helpbutton("richtext", get_string("helprichtext"), "moodle", true, true);
+        } else {
+           emoticonhelpbutton("form", "description");
+        } 
+      ?>
+      <br />
+    </font>
     </td>
     <td>
-    <? 
+    <?php
        print_textarea($usehtmleditor, 20, 60, 680, 400, "description", $form->description);
     
-       echo "<P align=right>";
+       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, ""); 
-       helpbutton("textformat", get_string("formattexttype"));
-       echo "</P>";
+       echo "</p>";
     ?>
     </td>
 </tr>
 <tr valign=top>
-    <td align=right><P><B><? print_string("assignmenttype", "assignment") ?>:</B></P></TD>
+    <td align=right><p><b><?php print_string("assignmenttype", "assignment") ?>:</b></p></td>
     <td>
-    <?PHP
+    <?php
        require("$CFG->dirroot/mod/assignment/lib.php");
        asort($ASSIGNMENT_TYPE);
        choose_from_menu($ASSIGNMENT_TYPE, "type", $form->type, "");
@@ -80,9 +85,9 @@
     </td>
 </tr>
 <tr>
-    <td align=right><P><B><? print_string("allowresubmit", "assignment") ?>:</B></P></TD>
+    <td align=right><p><b><?php print_string("allowresubmit", "assignment") ?>:</b></p></td>
     <td>
-    <?PHP 
+    <?php 
         $options[0] = get_string("no"); $options[1] = get_string("yes");
         choose_from_menu($options, "resubmit", $form->resubmit, "");
         helpbutton("resubmit", get_string("allowresubmit", "assignment"), "assignment");
@@ -90,9 +95,9 @@
     </td>
 </tr>
 <tr valign=top>
-    <td align=right><P><B><? print_string("maximumgrade") ?>:</B></P></TD>
+    <td align=right><p><b><?php print_string("maximumgrade") ?>:</b></p></td>
     <td>
-        <?
+        <?php
         for ($i=100; $i>=0; $i--) {
             $grades[$i] = $i;
         }
     </td>
 </tr>
 <tr valign=top>
-    <td align=right><P><B><? print_string("maximumsize", "assignment") ?>:</B></P></TD>
+    <td align=right><p><b><?php print_string("maximumsize", "assignment") ?>:</b></p></td>
     <td>
-        <?
+        <?php
         $sizelist = array("10Kb", "50Kb", "100Kb", "500Kb", "1Mb", "2Mb", "5Mb", "10Mb", "20Mb", "50Mb");
         $maxsize = get_max_upload_file_size();
         $sizeinlist = false;
     </td>
 </tr>
 <tr valign=top>
-    <td align=right><P><B><? print_string("duedate", "assignment") ?>:</B></td>
-    <td><?
+    <td align=right><p><b><?php print_string("duedate", "assignment") ?>:</b></td>
+    <td><?php
            print_date_selector("dueday", "duemonth", "dueyear", $form->timedue);
            echo "&nbsp;-&nbsp;";
            print_time_selector("duehour", "dueminute", $form->timedue);
     ?></td>
 </tr>
 </table>
-<BR>
-<CENTER>
-<input type="hidden" name=course     value="<? p($form->course) ?>">
-<input type="hidden" name=coursemodule  value="<? p($form->coursemodule) ?>">
-<input type="hidden" name=section       value="<? p($form->section) ?>">
-<input type="hidden" name=module     value="<? p($form->module) ?>">
-<input type="hidden" name=modulename value="<? p($form->modulename) ?>">
-<input type="hidden" name=instance   value="<? p($form->instance) ?>">
-<input type="hidden" name=mode       value="<? p($form->mode) ?>">
-<input type="submit" value="<? print_string("savechanges") ?>">
-<input type="submit" name=cancel value="<? print_string("cancel") ?>">
-</CENTER>
-</FORM>
+<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") ?>">
+</center>
+</form>
 
-<? 
+<?php 
    if ($usehtmleditor) { 
        print_richedit_javascript("form", "description", "yes");
    }
index e03894aa801a68809b591df4eb12c09b7bc6c332..95233e5ec9f9459b1dca70ebd551fb65c6e4cab7 100644 (file)
@@ -1,4 +1,4 @@
-<?PHP
+<?php
     if (empty($form->name)) {
         $form->name = "";
     }
     }
 
 ?>
-<form name="form" method="post" <?=$onsubmit ?> action="<?=$ME ?>">
+<form name="form" method="post" <?php echo $onsubmit ?> action="<?php echo $ME ?>">
 
 <table cellpadding=5>
 
 <tr valign=top>
-    <td align=right><P><B><? print_string("choicename","choice") ?>:</B></P></TD>
+    <td align=right><p><b><?php print_string("choicename","choice") ?>:</b></p></td>
     <td>
-        <input type="text" name="name" size=30 value="<? p($form->name) ?>">
+        <input type="text" name="name" size=30 value="<?php p($form->name) ?>">
     </td>
 </tr>
 
 <tr valign=top>
-    <td align=right><P><B><? print_string("choicetext","choice") ?>:</B></P>
-    <font SIZE="1">
-     <? helpbutton("writing", get_string("helpwriting"), "moodle", true, true) ?><br \>
-     <? helpbutton("questions", get_string("helpquestions"), "moodle", true, true) ?><br \>
-     <? if ($usehtmleditor) { ?>
-        <? helpbutton("richtext", get_string("helprichtext"), "moodle", true, true) ?>
-     <? } else { ?>
-        <? helpbutton("text", get_string("helptext"), "moodle", true, true) ?>
-     <? } ?><br \>
-     </font>
+    <td align=right><p><b><?php print_string("choicetext","choice") ?>:</b></p>
+    <font size="1">
+     <?php
+        helpbutton("writing", get_string("helpwriting"), "moodle", true, true);
+        echo "<br />";
+        helpbutton("questions", get_string("helpquestions"), "moodle", true, true);
+        echo "<br />";
+        if ($usehtmleditor) {
+           helpbutton("richtext", get_string("helprichtext"), "moodle", true, true);
+        } else {
+           emoticonhelpbutton("form", "text");
+        }   
+      ?>
+      <br />
+    </font>
     </td>
     <td>
-    <? 
+    <?php 
        print_textarea($usehtmleditor, 20, 60, 680, 400, "text", $form->text);
     
-       echo "<P align=right>";
+       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, ""); 
-       helpbutton("textformat", get_string("formattexttype"));
-       echo "</P>";
+       echo "</p>";
     ?>
     </td>
 </tr>
 
 <tr valign=top>
-    <td align=right><P><B><? print_string("choice","choice","1") ?>:</B></P></TD>
+    <td align=right><p><b><?php print_string("choice","choice","1") ?>:</b></p></td>
     <td>
-        <input type="text" name="answer1" size=60 value="<? p($form->answer1) ?>">
-        <? helpbutton("options", get_string("modulenameplural", "choice"), "choice") ?>
+        <input type="text" name="answer1" size=60 value="<?php p($form->answer1) ?>">
+        <?php helpbutton("options", get_string("modulenameplural", "choice"), "choice") ?>
     </td>
 </tr>
 
 <tr valign=top>
-    <td align=right><P><B><? print_string("choice","choice","2") ?>:</B></P></TD>
+    <td align=right><p><b><?php print_string("choice","choice","2") ?>:</b></p></td>
     <td>
-        <input type="text" name="answer2" size=60 value="<? p($form->answer2) ?>">
-        <? helpbutton("options", get_string("modulenameplural", "choice"), "choice") ?>
+        <input type="text" name="answer2" size=60 value="<?php p($form->answer2) ?>">
+        <?php helpbutton("options", get_string("modulenameplural", "choice"), "choice") ?>
     </td>
 </tr>
 
 <tr valign=top>
-    <td align=right><P><B><? print_string("choice","choice","3") ?>:</B></P></TD>
+    <td align=right><p><b><?php print_string("choice","choice","3") ?>:</b></p></td>
     <td>
-        <input type="text" name="answer3" size=60 value="<? p($form->answer3) ?>">
-        <? helpbutton("options", get_string("modulenameplural", "choice"), "choice") ?>
+        <input type="text" name="answer3" size=60 value="<?php p($form->answer3) ?>">
+        <?php helpbutton("options", get_string("modulenameplural", "choice"), "choice") ?>
     </td>
 </tr>
 <tr valign=top>
-    <td align=right><P><B><? print_string("choice","choice","4") ?>:</B></P></TD>
+    <td align=right><p><b><?php print_string("choice","choice","4") ?>:</b></p></td>
     <td>
-        <input type="text" name="answer4" size=60 value="<? p($form->answer4) ?>">
-        <? helpbutton("options", get_string("modulenameplural", "choice"), "choice") ?>
+        <input type="text" name="answer4" size=60 value="<?php p($form->answer4) ?>">
+        <?php helpbutton("options", get_string("modulenameplural", "choice"), "choice") ?>
     </td>
 </tr>
 <tr valign=top>
-    <td align=right><P><B><? print_string("choice","choice","5") ?>:</B></P></TD>
+    <td align=right><p><b><?php print_string("choice","choice","5") ?>:</b></p></td>
     <td>
-        <input type="text" name="answer5" size=60 value="<? p($form->answer5) ?>">
-        <? helpbutton("options", get_string("modulenameplural", "choice"), "choice") ?>
+        <input type="text" name="answer5" size=60 value="<?php p($form->answer5) ?>">
+        <?php helpbutton("options", get_string("modulenameplural", "choice"), "choice") ?>
     </td>
 </tr>
 <tr valign=top>
-    <td align=right><P><B><? print_string("choice","choice","6") ?>:</B></P></TD>
+    <td align=right><p><b><?php print_string("choice","choice","6") ?>:</b></p></td>
     <td>
-        <input type="text" name="answer6" size=60 value="<? p($form->answer6) ?>">
-        <? helpbutton("options", get_string("modulenameplural", "choice"), "choice") ?>
+        <input type="text" name="answer6" size=60 value="<?php p($form->answer6) ?>">
+        <?php helpbutton("options", get_string("modulenameplural", "choice"), "choice") ?>
     </td>
 </tr>
 <tr valign=top>
-    <td align=right><P><B><? print_string("publish","choice") ?>:</b></p></td>
+    <td align=right><P><B><?php print_string("publish","choice") ?>:</b></p></td>
     <td>
-        <?
+        <?php
         require("$CFG->dirroot/mod/choice/lib.php");
         choose_from_menu($CHOICE_PUBLISH, "publish", "$form->publish", "");
         ?>
 
 </table>
 
-<CENTER>
-<input type="hidden" name=course     value="<? p($form->course) ?>">
-<input type="hidden" name=coursemodule  value="<? p($form->coursemodule) ?>">
-<input type="hidden" name=section       value="<? p($form->section) ?>">
-<input type="hidden" name=module     value="<? p($form->module) ?>">
-<input type="hidden" name=modulename value="<? p($form->modulename) ?>">
-<input type="hidden" name=instance   value="<? p($form->instance) ?>">
-<input type="hidden" name=mode       value="<? p($form->mode) ?>">
-<input type="submit" value="<? print_string("savechanges") ?>">
-<input type="submit" name=cancel value="<? print_string("cancel") ?>">
-</CENTER>
-</FORM>
+<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") ?>">
+</center>
+</form>
 
-<?PHP
+<?php
    if ($usehtmleditor) { 
        print_richedit_javascript("form", "text", "yes");
    }
index e84098840835b0e6aae972d1e228139934e42296..c2a457da944c3c5c01f85e50955f86d8ecb4c560 100644 (file)
@@ -1,4 +1,4 @@
-<?PHP
+<?php
     if (empty($form->name)) {
         $form->name = "";
     }
         $form->forcesubscribe = "";
     }
 ?>
-<form name="form" method="post" action="<?=$ME ?>">
+<form name="form" method="post" action="<?php echo $ME ?>">
 <table cellpadding=5>
 <tr>
 <tr valign=top>
-    <td align=right><P><B><? print_string("forumname", "forum")?>:</B></P></TD>
+    <td align=right><p><b><?php print_string("forumname", "forum")?>:</b></p></td>
     <td>
-        <input type="text" name="name" size=30 value="<? p($form->name) ?>">
+        <input type="text" name="name" size=30 value="<?php p($form->name) ?>">
     </td>
 </tr>
 <tr valign=top>
-    <td align=right><P><B><? print_string("forumtype", "forum")?>:</B></P></TD>
+    <td align=right><p><b><?php print_string("forumtype", "forum")?>:</b></p></td>
     <td>
-    <?
+    <?php
        $student = strtolower($course->student);
        require("$CFG->dirroot/mod/forum/lib.php");
        asort($FORUM_TYPES);
     </td>
 </tr>
 <tr valign=top>
-    <td align=right><P><B><? print_string("forumintro", "forum")?>:</B></P>
-    <font SIZE="1">
-     <? helpbutton("writing", get_string("helpwriting"), "moodle", true, true) ?><br \>
-     <? helpbutton("questions", get_string("helpquestions"), "moodle", true, true) ?><br \>
-     <? helpbutton("text", get_string("helptext"), "moodle", true, true) ?><br \>
-     </font>
+    <td align=right><p><b><?php print_string("forumintro", "forum")?>:</b></p>
+    <font size="1">
+     <?php
+        helpbutton("writing", get_string("helpwriting"), "moodle", true, true);
+        echo "<br />";
+        helpbutton("questions", get_string("helpquestions"), "moodle", true, true);
+        echo "<br />";
+        emoticonhelpbutton("form", "intro");
+        echo " <br />";
+      ?>
+    </font>
     </td>
     <td>
-        <textarea name="intro" rows=4 cols=50 wrap="virtual"><? p($form->intro) ?></textarea>
+        <textarea name="intro" rows=4 cols=50 wrap="virtual"><?php p($form->intro) ?></textarea>
     </td>
 </tr>
 
 <tr valign=top>
-    <td align=right><P><B><? print_string("allowdiscussions", "forum", strtolower("$course->student")) ?>:</B></P></TD>
+    <td align=right><p><b><?php print_string("allowdiscussions", "forum", strtolower("$course->student")) ?>:</b></p></td>
     <td>
-        <? choose_from_menu($FORUM_OPEN_MODES, "open", $form->open, ""); ?>
-        <? helpbutton("allowdiscussions", get_string("allowdiscussions", "forum", strtolower("$course->student")), "forum") ?>
+        <?php 
+            choose_from_menu($FORUM_OPEN_MODES, "open", $form->open, "");
+            helpbutton("allowdiscussions", get_string("allowdiscussions", 
+                       "forum", strtolower("$course->student")), "forum");
+        ?>
     </td>
 </tr>
 
 <tr>
-    <td align=right><P><B><? print_string("allowratings", "forum") ?>:</B></P></TD>
+    <td align=right><p><b><?php print_string("allowratings", "forum") ?>:</b></p></td>
     <td>
-        <? $options[0] = get_string("no"); $options[1] = get_string("yes"); ?>
-        <? choose_from_menu($options, "assessed", $form->assessed, ""); ?>
-        <? helpbutton("ratings", get_string("allowratings", "forum"), "forum") ?>
+        <?php 
+            $options[0] = get_string("no"); 
+            $options[1] = get_string("yes");
+            choose_from_menu($options, "assessed", $form->assessed, "");
+            helpbutton("ratings", get_string("allowratings", "forum"), "forum");
+        ?>
     </td>
 </tr>
 <tr>
-    <td align=right><P><B><? print_string("forcesubscribeq", "forum") ?>:</B></P></TD>
+    <td align=right><p><b><?php print_string("forcesubscribeq", "forum") ?>:</b></p></td>
     <td>
-        <? choose_from_menu($options, "forcesubscribe", $form->forcesubscribe, ""); ?>
-        <? helpbutton("subscription", get_string("forcesubscribeq", "forum"), "forum") ?>
+        <?php 
+            choose_from_menu($options, "forcesubscribe", $form->forcesubscribe, "");
+            helpbutton("subscription", get_string("forcesubscribeq", "forum"), "forum");
+        ?>
     </td>
 </tr>
 </table>
-<CENTER>
+<center>
 <input type="hidden" name=course     value="<? p($form->course) ?>">
 <input type="hidden" name=coursemodule  value="<? p($form->coursemodule) ?>">
 <input type="hidden" name=section       value="<? p($form->section) ?>">
 <input type="hidden" name=mode       value="<? p($form->mode) ?>">
 <input type="submit" value="<? print_string("savechanges") ?>">
 <input type="submit" name=cancel value="<? print_string("cancel") ?>">
-</CENTER>
-</FORM>
+</center>
+</form>
index 91907eae271c93624bdd5de7e0e6a203db6dc77d..0aebbcf87769c39614805c4b18a8dcda2e97a533 100644 (file)
@@ -1,4 +1,4 @@
-<?PHP
+<?php
     if (!isset($form->name)) {
         $form->name = "";
     }
     }
 ?>
 
-<form name="form" method="post" action="<?=$ME ?>">
+<form name="form" method="post" action="<?php echo $ME ?>">
 <table cellpadding=5>
 <tr valign=top>
-    <td align=right><P><B><? print_string("journalname", "journal") ?>:</B></P></TD>
+    <td align=right><p><b><?php print_string("journalname", "journal") ?>:</b></p></td>
     <td>
-        <input type="text" name="name" size=30 value="<? p($form->name) ?>">
+        <input type="text" name="name" size=30 value="<?php p($form->name) ?>">
     </td>
 </tr>
 <tr valign=top>
-    <td align=right><P><B><? print_string("journalquestion", "journal") ?>:</B></P>
+    <td align=right><p><b><?php print_string("journalquestion", "journal") ?>:</b></p>
     <font SIZE="1">
-     <? helpbutton("writing", get_string("helpwriting"), "moodle", true, true) ?><br \>
-     <? helpbutton("questions", get_string("helpquestions"), "moodle", true, true) ?><br \>
-     </font>
+     <?php
+        helpbutton("writing", get_string("helpwriting"), "moodle", true, true);
+        echo "<br />";
+        helpbutton("questions", get_string("helpquestions"), "moodle", true, true);
+        echo "<br />";
+        emoticonhelpbutton("form", "intro");
+      ?>
+      <br />
+    </font>
     
     </TD>
     <td>
-        <textarea name="intro" rows=15 cols=30 wrap="virtual"><? p($form->intro) ?></textarea>
+        <textarea name="intro" rows=15 cols=30 wrap="virtual"><?php p($form->intro) ?></textarea>
     </td>
 </tr>
 <tr valign=top>
-    <TD align=right><P><B><? print_string("daysavailable", "journal") ?>:</B></P></TD>
-    <TD>
-    <?
+    <td align=right><p><b><?php print_string("daysavailable", "journal") ?>:</b></p></td>
+    <td>
+    <?php
         $options = array();
         $options[0] = get_string("alwaysopen", "journal");
         for ($i=1;$i<=13;$i++) {
         $options[365] = get_string("numweeks", "", 52);
         choose_from_menu($options, "days", "$form->days");
      ?>
-    </TD>
+    </td>
 </tr>
 
 </table>
-<CENTER>
-<input type="hidden" name=course     value="<? p($form->course) ?>">
-<input type="hidden" name=coursemodule  value="<? p($form->coursemodule) ?>">
-<input type="hidden" name=section       value="<? p($form->section) ?>">
-<input type="hidden" name=module     value="<? p($form->module) ?>">
-<input type="hidden" name=modulename value="<? p($form->modulename) ?>">
-<input type="hidden" name=instance   value="<? p($form->instance) ?>">
-<input type="hidden" name=mode       value="<? p($form->mode) ?>">
-<input type="submit" value="<? print_string("savechanges") ?>">
-<input type="submit" name=cancel value="<? print_string("cancel") ?>">
-</FORM>
-</CENTER>
+<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") ?>">
+</form>
+</center>
index b9cd4dfa9d1cc1b21520681afa196bfa8aa8c1a2..51c777d90f2d04650a91db1fa354941e76838b63 100644 (file)
@@ -1,7 +1,7 @@
 <!-- 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 
+<?php 
     require_once("$CFG->dirroot/mod/quiz/lib.php");
 
     if (!isset($form->name)) {
 
 
 
-<FORM name="form" method="post" action="<?=$CFG->wwwroot?>/mod/quiz/edit.php">
-<CENTER>
-<TABLE cellpadding=5>
-<TR valign=top>
-    <TD align=right><P><B><? print_string("name") ?>:</B></P></TD>
-    <TD>
-        <INPUT type="text" name="name" size=40 value="<? p($form->name) ?>">
-    </TD>
-</TR>
-<TR valign=top>
-    <TD align=right><P><B><? print_string("introduction", "quiz") ?>:</B></P></TD>
-    <TD>
-        <textarea name="intro" rows=4 cols=50 wrap="virtual"><? p($form->intro) ?></textarea>
-        <? helpbutton("text", get_string("helptext")); ?>
-    </TD>
-</TR>
-<TR valign=top>
-    <TD align=right><P><B><? print_string("quizopen", "quiz") ?>:</B></P></TD>
-    <TD>
-    <?
+<form name="form" method="post" action="<?php echo $CFG->wwwroot ?>/mod/quiz/edit.php">
+<center>
+<table cellpadding=5>
+<tr valign=top>
+    <td align=right><p><b><?php print_string("name") ?>:</b></p></td>
+    <td>
+        <input type="text" name="name" size=40 value="<?php p($form->name) ?>">
+    </td>
+</tr>
+<tr valign=top>
+    <td align=right><p><b><?php print_string("introduction", "quiz") ?>:</b></p></td>
+    <td>
+        <textarea name="intro" rows=4 cols=50 wrap="virtual"><?php p($form->intro) ?></textarea>
+        <?php 
+           helpbutton("text", get_string("helptext")); 
+        ?>
+    </td>
+</tr>
+<tr valign=top>
+    <td align=right><p><b><?php print_string("quizopen", "quiz") ?>:</b></p></td>
+    <td>
+    <?php
         if (!$form->timeopen and $course->format == "weeks") {
             $form->timeopen  = $course->startdate + (($form->section - 1) * 608400);
         }
         print_time_selector("openhour", "openminute", $form->timeopen);
         helpbutton("timeopen", get_string("quizopen","quiz"), "quiz");
      ?>
-    </TD>
-</TR>
-<TR valign=top>
-    <TD align=right><P><B><? print_string("quizclose", "quiz") ?>:</B></P></TD>
-    <TD>
-    <?
+    </td>
+</tr>
+<tr valign=top>
+    <td align=right><p><b><?php print_string("quizclose", "quiz") ?>:</b></p></td>
+    <td>
+    <?php
         if (!$form->timeclose and $course->format == "weeks") {
             $form->timeclose  = $course->startdate + (($form->section) * 608400);
         }
         print_time_selector("closehour", "closeminute", $form->timeclose);
         helpbutton("timeopen", get_string("quizclose","quiz"), "quiz");
      ?>
-    </TD>
-</TR>
-<TR valign=top>
-    <TD align=right><P><B><? print_string("shufflequestions", "quiz") ?>:</B></P></TD>
-    <TD>
-    <?
+    </td>
+</tr>
+<tr valign=top>
+    <td align=right><p><b><?php print_string("shufflequestions", "quiz") ?>:</b></p></td>
+    <td>
+    <?php
         $options = array();
         $options[0] = get_string("no");
         $options[1] = get_string("yes");
         choose_from_menu($options, "shufflequestions", "$form->shufflequestions", "");
         helpbutton("shufflequestions", get_string("shufflequestions","quiz"), "quiz");
      ?>
-    </TD>
-</TR>
-<TR valign=top>
-    <TD align=right><P><B><? print_string("shuffleanswers", "quiz") ?>:</B></P></TD>
-    <TD>
-    <?
+    </td>
+</tr>
+<tr valign=top>
+    <td align=right><p><b><?php print_string("shuffleanswers", "quiz") ?>:</b></p></td>
+    <td>
+    <?php
         $options = array();
         $options[0] = get_string("no");
         $options[1] = get_string("yes");
         choose_from_menu($options, "shuffleanswers", "$form->shuffleanswers", "");
         helpbutton("shuffleanswers", get_string("shuffleanswers","quiz"), "quiz");
      ?>
-    </TD>
-</TR>
-<TR valign=top>
-    <TD align=right><P><B><? print_string("attemptsallowed", "quiz") ?>:</B></P></TD>
-    <TD>
-    <?
+    </td>
+</tr>
+<tr valign=top>
+    <td align=right><p><b><?php print_string("attemptsallowed", "quiz") ?>:</b></p></td>
+    <td>
+    <?php
         $options = array();
         $options[0] = get_string("attemptsunlimited", "quiz");
         $options[1] = "1 ".strtolower(get_string("attempt", "quiz"));
         choose_from_menu($options, "attempts", "$form->attempts", "");
         helpbutton("attempts", get_string("attemptsallowed","quiz"), "quiz");
      ?>
-    </TD>
-</TR>
-<TR valign=top>
-    <TD align=right><P><B><? print_string("grademethod", "quiz") ?>:</B></P></TD>
-    <TD>
-    <?
+    </td>
+</tr>
+<tr valign=top>
+    <td align=right><p><b><?php print_string("grademethod", "quiz") ?>:</b></p></td>
+    <td>
+    <?php
         $options = array();
         $options[1] = get_string("gradehighest", "quiz");
         $options[2] = get_string("gradeaverage", "quiz");
         choose_from_menu($QUIZ_GRADE_METHOD, "grademethod", "$form->grademethod", "");
         helpbutton("grademethod", get_string("grademethod","quiz"), "quiz");
      ?>
-    </TD>
-</TR>
-<TR valign=top>
-    <TD align=right><P><B><? print_string("showfeedback", "quiz") ?>:</B></P></TD>
-    <TD>
-    <?
+    </td>
+</tr>
+<tr valign=top>
+    <td align=right><p><b><?php print_string("showfeedback", "quiz") ?>:</b></p></td>
+    <td>
+    <?php
         $options = array();
         $options[0] = get_string("no");
         $options[1] = get_string("yes");
         choose_from_menu($options, "feedback", "$form->feedback", "");
         helpbutton("feedback", get_string("showfeedback","quiz"), "quiz");
      ?>
-    </TD>
-</TR>
-<TR valign=top>
-    <TD align=right><P><B><? print_string("showcorrectanswer", "quiz") ?>:</B></P></TD>
-    <TD>
-    <?
+    </td>
+</tr>
+<tr valign=top>
+    <td align=right><p><b><?php print_string("showcorrectanswer", "quiz") ?>:</b></p></td>
+    <td>
+    <?php
         $options = array();
         $options[0] = get_string("no");
         $options[1] = get_string("yes");
         choose_from_menu($options, "correctanswers", "$form->correctanswers", "");
         helpbutton("correctanswers", get_string("showcorrectanswer","quiz"), "quiz");
      ?>
-    </TD>
-</TR>
-<TR valign=top>
-    <TD align=right><P><B><? print_string("allowreview", "quiz") ?>:</B></P></TD>
-    <TD>
-    <?
+    </td>
+</tr>
+<tr valign=top>
+    <td align=right><p><b><?php print_string("allowreview", "quiz") ?>:</b></p></td>
+    <td>
+    <?php
         $options = array();
         $options[0] = get_string("no");
         $options[1] = get_string("yes");
         choose_from_menu($options, "review", "$form->review", "");
         helpbutton("review", get_string("allowreview","quiz"), "quiz");
      ?>
-    </TD>
-</TR>
-<TR valign=top>
-    <TD align=right><P><B><? print_string("maximumgrade") ?>:</B></P></TD>
-    <TD>
-    <?
+    </td>
+</tr>
+<tr valign=top>
+    <td align=right><p><b><?php print_string("maximumgrade") ?>:</b></p></td>
+    <td>
+    <?php
         for ($i=100; $i>=1; $i--) {
             $grades[$i] = $i;
         }
         choose_from_menu($grades, "grade", "$form->grade", "");
         helpbutton("maxgrade", get_string("maximumgrade"), "quiz");
      ?>
-    </TD>
-</TR>
-</TABLE>
-<INPUT type="hidden" name=questions     value="<? p($form->questions) ?>">
-<!-- These hidden variables are always the same -->
-<INPUT type="hidden" name=course        value="<? p($form->course) ?>">
-<INPUT type="hidden" name=coursemodule  value="<? p($form->coursemodule) ?>">
-<INPUT type="hidden" name=section       value="<? p($form->section) ?>">
-<INPUT type="hidden" name=module        value="<? p($form->module) ?>">
-<INPUT type="hidden" name=modulename    value="<? p($form->modulename) ?>">
-<INPUT type="hidden" name=instance      value="<? p($form->instance) ?>">
-<INPUT type="hidden" name=mode          value="<? p($form->mode) ?>">
-<input type="hidden" name=destination   value="<?=$ME ?>">
-<INPUT type="submit" value="<? print_string("continue") ?>">
-</CENTER>
-</FORM>
+    </td>
+</tr>
+</table>
+<input type="hidden" name=questions     value="<?php p($form->questions) ?>">
+<!-- these hidden variables are always the same -->
+<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="hidden" name=destination   value="<?php echo $ME ?>">
+<INPUT type="submit" value="<?php print_string("continue") ?>">
+</center>
+</form>
index 664e73c47cf8aeae8a84cb830a597d579e4f4dcc..8cc156521961bbb201c84872d922d8121ecb96a0 100644 (file)
                         <font size="1">
                         <? helpbutton("writing", get_string("helpwriting"), "moodle", true, true) ?><br />
                         <? helpbutton("text", get_string("helptext"), "moodle", true, true) ?> <br />
+                        <? emoticonhelpbutton("theform", "alltext") ?> <br />
                         </font>
                     </td>
                     <td>
                         <font size="1">
                         <? helpbutton("writing", get_string("helpwriting"), "moodle", true, true) ?><br />
                         <? if ($usehtmleditor) {
-                            helpbutton("richtext", get_string("helprichtext"), "moodle", true, true);
+                              helpbutton("richtext", get_string("helprichtext"), "moodle", true, true);
                            } else {   
-                            helpbutton("html", get_string("helphtml"), "moodle", true, true);
-                           } ?><br />
+                              helpbutton("html", get_string("helphtml"), "moodle", true, true);
+                           } ?> <br />
                         </font>
                     </td>
                     <td>
index 792e56718e92732e54ea1e100eb4dbee20c61bed..74a2b684d55f97f4076690d2c7e8fd8eaec20449 100644 (file)
@@ -1,4 +1,4 @@
-<?PHP
+<?php
     if (empty($form->name)) {
         $form->name = "";
     }
 ?>
 
 
-<form name="form" method="post" action="<?=$CFG->wwwroot?>/mod/resource/details.php">
+<form name="form" method="post" action="<?php echo $CFG->wwwroot ?>/mod/resource/details.php">
 <table cellpadding=5>
 <tr valign=top>
-    <td align=right><P><B><? print_string("name") ?>:</B></P></TD>
+    <td align=right><p><b><?php print_string("name") ?>:</b></p></td>
     <td>
-        <input type="text" name="name" size=50 value="<? p($form->name) ?>">
+        <input type="text" name="name" size=50 value="<?php p($form->name) ?>">
     </td>
 </tr>
 <tr valign=top>
-    <td align=right><P><B><? print_string("resourcetype", "resource") ?>:</B></P></TD>
+    <td align=right><p><b><?php print_string("resourcetype", "resource") ?>:</b></p></td>
     <td>
-    <?
+    <?php
        require("$CFG->dirroot/mod/resource/lib.php");
        asort($RESOURCE_TYPE);
        if (!$form->type) {
     </td>
 </tr>
 <tr valign=top>
-    <td align=right><P><B><? print_string("summary") ?>:</B></P>
-     <font SIZE="1">
-     <? helpbutton("summary", get_string("summary"), "resource", true, true); ?><br \>
-     <? helpbutton("writing", get_string("helpwriting"), "moodle", true, true) ?><br \>
-     <? helpbutton("text", get_string("helptext"), "moodle", true, true) ?><br \>
+    <td align=right><p><b><?php print_string("summary") ?>:</b></p>
+     <font size="1">
+     <?php
+        helpbutton("summary", get_string("summary"), "resource", true, true);
+        echo "<br \>";
+        helpbutton("writing", get_string("helpwriting"), "moodle", true, true);
+        echo "<br \>";
+        helpbutton("text", get_string("helptext"), "moodle", true, true);
+     ?>
+     <br />
      </font>
     </td>
     <td>
-        <textarea name="summary" rows=5 cols=50 wrap="virtual"><? p($form->summary) ?></textarea>
+        <textarea name="summary" rows=5 cols=50 wrap="virtual"><?php p($form->summary) ?></textarea>
     </td>
 </tr>
 </table>
-<CENTER>
-<input type="hidden" name=reference   value="<? p($form->reference) ?>">
+<center>
+<input type="hidden" name=reference   value="<?php p($form->reference) ?>">
 
-<input type="hidden" name=course      value="<? p($form->course) ?>">
-<input type="hidden" name=coursemodule  value="<? p($form->coursemodule) ?>">
-<input type="hidden" name=section        value="<? p($form->section) ?>">
-<input type="hidden" name=module      value="<? p($form->module) ?>">
-<input type="hidden" name=modulename  value="<? p($form->modulename) ?>">
-<input type="hidden" name=instance    value="<? p($form->instance) ?>">
-<input type="hidden" name=mode        value="<? p($form->mode) ?>">
-<input type="hidden" name=destination value="<?=$ME ?>">
-<input type="submit" value="<? print_string("continue") ?>">
-</CENTER>
-</FORM>
+<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="hidden" name=destination value="<?php echo $ME ?>">
+<input type="submit" value="<?php print_string("continue") ?>">
+</center>
+</form>