Permalink
Browse files

uncommented the require style sheet (was there a problem?), also rear…

…ranged lesson settings into categories.
  • Loading branch information...
1 parent a22fd25 commit d6847e5d95e778b5c5d2f2570158dbd572b19179 michaelpenne committed Jan 27, 2005
Showing with 136 additions and 109 deletions.
  1. +136 −109 mod/lesson/mod.html
View
@@ -1,7 +1,7 @@
<!-- define a new instance of lesson -->
<!-- It is used from /course/mod.php. The whole instance is available as $form. -->
<?php
-//require_once("styles.php");
+require_once("styles.php");
require("$CFG->dirroot/mod/lesson/locallib.php"); // for parameter array
if ($form->mode == "add") {
if ($defaults = get_record("lesson_default", "course", $form->course)) {
@@ -30,7 +30,7 @@
$form->maxattempts = 1;
}
if (!isset($form->nextpagedefault)) {
- $form->nextpagedefault = 1;
+ $form->nextpagedefault = 0;
}
if (!isset($form->minquestions)) {
$form->minquestions = 0;
@@ -50,16 +50,16 @@
}
/// CDC-FLAG ///
if (!isset($form->usepassword)) {
- $form->usepassword = 1;
+ $form->usepassword = 0;
}
if (!isset($form->custom)) {
$form->custom = 1;
}
if (!isset($form->ongoing)) {
- $form->ongoing = 1;
+ $form->ongoing = 0;
}
if (!isset($form->timed)) {
- $form->timed = 1;
+ $form->timed = 0;
}
if (!isset($form->maxtime)) {
$form->maxtime = 20;
@@ -92,7 +92,7 @@
$form->practice = 0;
}
if (!isset($form->review)) {
- $form->review = 1;
+ $form->review = 0;
}
if (!isset($form->lessondefault)) {
$form->lessondefault = 0;
@@ -111,55 +111,79 @@
<center>
<table cellpadding="5">
+
+<tr>
+ <td>
+ <?php print_heading(get_string("general", "lesson"), "left", 4); ?>
+ </td><td></td>
+</tr>
+
<tr valign="top">
<td align="right"><b><?php print_string("name") ?>:</b></td>
<td>
<!-- //CDC hidden label added. --><label for="name" class="hidden-label">Name</label><input type="text" id="name" name="name" size="30" value="<?php p($form->name) ?>" />
</td>
</tr>
-<!-- CDC-FLAG -->
<tr>
- <td align="right"><b><?php print_string("practice", "lesson"); ?>:</b></td>
+ <td align="right"><b><?php print_string("timed", "lesson"); ?>:</b></td>
<td>
<?PHP
$options[0] = get_string("no"); $options[1] = get_string("yes");
- choose_from_menu($options, "practice", $form->practice, "");
- helpbutton("practice", get_string("practice", "lesson"), "lesson");
+ choose_from_menu($options, "timed", $form->timed, "");
+ helpbutton("timed", get_string("timed", "lesson"), "lesson");
?>
</td>
</tr>
<tr>
- <td align="right"><b><?php print_string("modattempts", "lesson"); ?>:</b></td>
+ <td align="right"><b><?php print_string("maxtime", "lesson"); ?>:</b></td>
<td>
- <?PHP
- $options[0] = get_string("no"); $options[1] = get_string("yes");
- choose_from_menu($options, "modattempts", $form->modattempts, "");
- helpbutton("modattempts", get_string("modattempts", "lesson"), "lesson");
- ?>
+ <input type="text" name="maxtime" maxlength="7" size="7" value="<?php p($form->maxtime) ?>" />
+ <?php helpbutton("maxtime", get_string("maxtime", "lesson"), "lesson"); ?>
+ </td>
+</tr>
+
+<tr valign="top">
+ <td align="right"><b><?php print_string("maximumnumberofanswersbranches", "lesson") ?>:</b></td>
+ <td>
+ <?php
+ for ($i=20; $i>1; $i--) {
+ $numbers[$i] = $i;
+ }
+ choose_from_menu($numbers, "maxanswers", "$form->maxanswers", "");
+ helpbutton("maxanswers", get_string("maximumnumberofanswersbranches", "lesson"), "lesson");
+ ?>
</td>
</tr>
<tr>
- <td align="right"><b><?php print_string("usepassword", "lesson"); ?>:</b></td>
+ <td>
+ <br/><?php print_heading(get_string("gradeoptions", "lesson"), "left", 4); ?>
+ </td><td></td>
+</tr>
+
+<tr>
+ <td align="right"><b><?php print_string("practice", "lesson"); ?>:</b></td>
<td>
<?PHP
$options[0] = get_string("no"); $options[1] = get_string("yes");
- choose_from_menu($options, "usepassword", $form->usepassword, "");
- helpbutton("usepassword", get_string("usepassword", "lesson"), "lesson");
+ choose_from_menu($options, "practice", $form->practice, "");
+ helpbutton("practice", get_string("practice", "lesson"), "lesson");
?>
</td>
</tr>
<tr>
- <td align="right"><b><?php print_string("password", "lesson"); ?>:</b></td>
+ <td align="right"><b><?php print_string("customscoring", "lesson"); ?>:</b></td>
<td>
- <input type="text" name="password" size="7" value="" /> <?php echo " (".get_string("leavetokeep").")"; ?>
- <?php helpbutton("password", get_string("password", "lesson"), "lesson"); ?>
+ <?PHP
+ $options[0] = get_string("no"); $options[1] = get_string("yes");
+ choose_from_menu($options, "custom", $form->custom, "");
+ helpbutton("custom", get_string("customscoring", "lesson"), "lesson");
+ ?>
</td>
</tr>
-<!-- CDC-FLAG -->
<tr valign="top">
<td align="right"><b><?php print_string("maximumgrade") ?>:</b></td>
@@ -174,14 +198,24 @@
</td>
</tr>
-<!-- CDC-FLAG -->
<tr>
- <td align="right"><b><?php print_string("customscoring", "lesson"); ?>:</b></td>
+ <td align="right"><b><?php print_string("canretake", "lesson", $course->student) ?>:</b></td>
<td>
<?PHP
$options[0] = get_string("no"); $options[1] = get_string("yes");
- choose_from_menu($options, "custom", $form->custom, "");
- helpbutton("custom", get_string("customscoring", "lesson"), "lesson");
+ choose_from_menu($options, "retake", $form->retake, "");
+ helpbutton("retake", get_string("canretake", "lesson", $course->student), "lesson");
+ ?>
+ </td>
+</tr>
+
+<tr>
+ <td align="right"><b><?php print_string("handlingofretakes", "lesson") ?>:</b></td>
+ <td>
+ <?PHP
+ $options[0] = get_string("usemean", "lesson"); $options[1] = get_string("usemaximum", "lesson");
+ choose_from_menu($options, "usemaxgrade", $form->usemaxgrade, "");
+ helpbutton("handlingofretakes", get_string("handlingofretakes", "lesson"), "lesson");
?>
</td>
</tr>
@@ -196,18 +230,32 @@
?>
</td>
</tr>
-<!-- CDC-FLAG -->
-<tr valign="top">
- <td align="right"><b><?php print_string("maximumnumberofanswersbranches", "lesson") ?>:</b></td>
+<tr>
+ <td>
+ <br/><?php print_heading(get_string("flowcontrol", "lesson"), "left", 4); ?>
+ </td><td></td>
+</tr>
+
+<tr>
+ <td align="right"><b><?php print_string("modattempts", "lesson"); ?>:</b></td>
<td>
- <?php
- for ($i=20; $i>1; $i--) {
- $numbers[$i] = $i;
- }
- choose_from_menu($numbers, "maxanswers", "$form->maxanswers", "");
- helpbutton("maxanswers", get_string("maximumnumberofanswersbranches", "lesson"), "lesson");
- ?>
+ <?PHP
+ $options[0] = get_string("no"); $options[1] = get_string("yes");
+ choose_from_menu($options, "modattempts", $form->modattempts, "");
+ helpbutton("modattempts", get_string("modattempts", "lesson"), "lesson");
+ ?>
+ </td>
+</tr>
+
+<tr>
+ <td align="right"><b><?php print_string("displayreview", "lesson"); ?>:</b></td>
+ <td>
+ <?php
+ $options[0] = get_string("no"); $options[1] = get_string("yes");
+ choose_from_menu($options, "review", $form->review, "");
+ helpbutton("review", get_string("displayreview", "lesson"), "lesson");
+ ?>
</td>
</tr>
@@ -225,19 +273,6 @@
</td>
</tr>
-<!-- CDC-FLAG -->
-<tr>
- <td align="right"><b><?php print_string("displayreview", "lesson"); ?>:</b></td>
- <td>
- <?php
- $options[0] = get_string("no"); $options[1] = get_string("yes");
- choose_from_menu($options, "review", $form->review, "");
- helpbutton("review", get_string("displayreview", "lesson"), "lesson");
- ?>
- </td>
-</tr>
-<!-- CDC-FLAG -->
-
<tr>
<td align="right"><b><?php print_string("actionaftercorrectanswer", "lesson") ?>:</b></td>
<td>
@@ -276,59 +311,10 @@
</td>
</tr>
-<!-- CDC-FLAG -->
-<tr>
- <td align="right"><b><?php print_string("timed", "lesson"); ?>:</b></td>
- <td>
- <?PHP
- $options[0] = get_string("no"); $options[1] = get_string("yes");
- choose_from_menu($options, "timed", $form->timed, "");
- helpbutton("timed", get_string("timed", "lesson"), "lesson");
- ?>
- </td>
-</tr>
-
<tr>
- <td align="right"><b><?php print_string("maxtime", "lesson"); ?>:</b></td>
- <td>
- <input type="text" name="maxtime" maxlength="7" size="7" value="<?php p($form->maxtime) ?>" />
- <?php helpbutton("maxtime", get_string("maxtime", "lesson"), "lesson"); ?>
- </td>
-</tr>
-<!-- CDC-FLAG -->
-
-<tr>
- <td align="right"><b><?php print_string("canretake", "lesson", $course->student) ?>:</b></td>
- <td>
- <?PHP
- $options[0] = get_string("no"); $options[1] = get_string("yes");
- choose_from_menu($options, "retake", $form->retake, "");
- helpbutton("retake", get_string("canretake", "lesson", $course->student), "lesson");
- ?>
- </td>
-</tr>
-
-<tr>
- <td align="right"><b><?php print_string("handlingofretakes", "lesson") ?>:</b></td>
- <td>
- <?PHP
- $options[0] = get_string("usemean", "lesson"); $options[1] = get_string("usemaximum", "lesson");
- choose_from_menu($options, "usemaxgrade", $form->usemaxgrade, "");
- helpbutton("handlingofretakes", get_string("handlingofretakes", "lesson"), "lesson");
- ?>
- </td>
-</tr>
-
-<!-- CDC-FLAG -->
-<tr>
- <td align="right"><b><?php print_string("treeview", "lesson"); ?>:</b></td>
- <td>
- <?PHP
- $options[0] = get_string("no"); $options[1] = get_string("yes");
- choose_from_menu($options, "tree", $form->tree, "");
- helpbutton("tree", get_string("treeview", "lesson"), "lesson");
- ?>
- </td>
+ <td>
+ <br/><?php print_heading(get_string("lessonformating", "lesson"), "left", 4); ?>
+ </td><td></td>
</tr>
<tr>
@@ -379,24 +365,29 @@
</tr>
<tr>
- <td align="right"><b><?php print_string("displayhighscores", "lesson"); ?>:</b></td>
+ <td>
+ <br/><?php print_heading(get_string("accesscontrol", "lesson"), "left", 4); ?>
+ </td><td></td>
+</tr>
+
+<tr>
+ <td align="right"><b><?php print_string("usepassword", "lesson"); ?>:</b></td>
<td>
<?PHP
$options[0] = get_string("no"); $options[1] = get_string("yes");
- choose_from_menu($options, "highscores", $form->highscores, "");
- helpbutton("highscores", get_string("displayhighscores", "lesson"), "lesson");
+ choose_from_menu($options, "usepassword", $form->usepassword, "");
+ helpbutton("usepassword", get_string("usepassword", "lesson"), "lesson");
?>
</td>
</tr>
<tr>
- <td align="right"><b><?php print_string("maxhighscores", "lesson"); ?>:</b></td>
+ <td align="right"><b><?php print_string("password", "lesson"); ?>:</b></td>
<td>
- <input type="text" name="maxhighscores" maxlength="7" size="7" value="<?php p($form->maxhighscores) ?>" />
- <?php helpbutton("maxhighscores", get_string("maxhighscores", "lesson"), "lesson"); ?>
+ <input type="text" name="password" size="7" value="" /> <?php echo " (".get_string("leavetokeep").")"; ?>
+ <?php helpbutton("password", get_string("password", "lesson"), "lesson"); ?>
</td>
</tr>
-<!-- CDC-FLAG -->
<tr valign="top">
<td align="right"><b><?php print_string("available", "lesson") ?>:</b></td>
@@ -417,6 +408,42 @@
</tr>
<tr>
+ <td>
+ <br/><?php print_heading(get_string("other", "lesson"), "left", 4); ?>
+ </td><td></td>
+</tr>
+
+<tr>
+ <td align="right"><b><?php print_string("treeview", "lesson"); ?>:</b></td>
+ <td>
+ <?PHP
+ $options[0] = get_string("no"); $options[1] = get_string("yes");
+ choose_from_menu($options, "tree", $form->tree, "");
+ helpbutton("tree", get_string("treeview", "lesson"), "lesson");
+ ?>
+ </td>
+</tr>
+
+<tr>
+ <td align="right"><b><?php print_string("displayhighscores", "lesson"); ?>:</b></td>
+ <td>
+ <?PHP
+ $options[0] = get_string("no"); $options[1] = get_string("yes");
+ choose_from_menu($options, "highscores", $form->highscores, "");
+ helpbutton("highscores", get_string("displayhighscores", "lesson"), "lesson");
+ ?>
+ </td>
+</tr>
+
+<tr>
+ <td align="right"><b><?php print_string("maxhighscores", "lesson"); ?>:</b></td>
+ <td>
+ <input type="text" name="maxhighscores" maxlength="7" size="7" value="<?php p($form->maxhighscores) ?>" />
+ <?php helpbutton("maxhighscores", get_string("maxhighscores", "lesson"), "lesson"); ?>
+ </td>
+</tr>
+
+<tr>
<td align="right"><b><?php print_string("lessondefault", "lesson"); ?>:</b></td>
<td>
<?PHP

0 comments on commit d6847e5

Please sign in to comment.