mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
fixed up leftmenu some more
This commit is contained in:
parent
029db9ee2d
commit
49584784ac
4 changed files with 2074 additions and 2064 deletions
File diff suppressed because it is too large
Load diff
|
@ -1,16 +1,16 @@
|
|||
<!-- 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");
|
||||
echo "<style type=\"text/css\">@import url($CFG->wwwroot/mod/lesson/styles.php);</style>";
|
||||
require("$CFG->dirroot/mod/lesson/locallib.php"); // for parameter array
|
||||
if ($form->mode == "add") {
|
||||
if ($defaults = get_record("lesson_default", "course", $form->course)) {
|
||||
foreach ($defaults as $name => $value) {
|
||||
if (!is_numeric($name)) {
|
||||
$form->$name = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($defaults = get_record("lesson_default", "course", $form->course)) {
|
||||
foreach ($defaults as $name => $value) {
|
||||
if (!is_numeric($name)) {
|
||||
$form->$name = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// set the defaults
|
||||
|
@ -45,11 +45,11 @@ if ($form->mode == "add") {
|
|||
$form->available = 0;
|
||||
}
|
||||
if (!isset($form->deadline)) {
|
||||
$currentdate = usergetdate(time());
|
||||
$currentdate = usergetdate(time());
|
||||
$form->deadline = gmmktime($currentdate["hours"], $currentdate["minutes"], $currentdate["seconds"], $currentdate["mon"]+1, $currentdate["mday"], $currentdate["year"]);
|
||||
}
|
||||
/// CDC-FLAG ///
|
||||
if (!isset($form->usepassword)) {
|
||||
/// CDC-FLAG ///
|
||||
if (!isset($form->usepassword)) {
|
||||
$form->usepassword = 0;
|
||||
}
|
||||
if (!isset($form->custom)) {
|
||||
|
@ -79,32 +79,32 @@ if ($form->mode == "add") {
|
|||
if (!isset($form->bgcolor)) {
|
||||
$form->bgcolor = "#FFFFFF";
|
||||
}
|
||||
if (!isset($form->displayleft)) {
|
||||
$form->displayleft = 0;
|
||||
}
|
||||
if (!isset($form->highscores)) {
|
||||
$form->highscores = 0;
|
||||
}
|
||||
if (!isset($form->displayleft)) {
|
||||
$form->displayleft = 0;
|
||||
}
|
||||
if (!isset($form->highscores)) {
|
||||
$form->highscores = 0;
|
||||
}
|
||||
if (!isset($form->maxhighscores)) {
|
||||
$form->maxhighscores = 10;
|
||||
}
|
||||
if (!isset($form->practice)) {
|
||||
$form->practice = 0;
|
||||
}
|
||||
if (!isset($form->review)) {
|
||||
$form->review = 0;
|
||||
}
|
||||
if (!isset($form->lessondefault)) {
|
||||
$form->lessondefault = 0;
|
||||
}
|
||||
if (!isset($form->modattempts)) {
|
||||
$form->modattempts = 0;
|
||||
}
|
||||
if (!isset($form->practice)) {
|
||||
$form->practice = 0;
|
||||
}
|
||||
if (!isset($form->review)) {
|
||||
$form->review = 0;
|
||||
}
|
||||
if (!isset($form->lessondefault)) {
|
||||
$form->lessondefault = 0;
|
||||
}
|
||||
if (!isset($form->modattempts)) {
|
||||
$form->modattempts = 0;
|
||||
}
|
||||
|
||||
|
||||
$form->deleteattempts = "";
|
||||
|
||||
$form->deleteattempts = "";
|
||||
|
||||
/// CDC-FLAG ///
|
||||
/// CDC-FLAG ///
|
||||
?>
|
||||
|
||||
<form name="form" method="post" action="<?php echo $ME ?>">
|
||||
|
@ -113,9 +113,9 @@ if ($form->mode == "add") {
|
|||
<table cellpadding="5">
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<?php print_heading(get_string("general", "lesson"), "left", 4); ?>
|
||||
</td><td></td>
|
||||
<td>
|
||||
<?php print_heading(get_string("general", "lesson"), "left", 4); ?>
|
||||
</td><td></td>
|
||||
</tr>
|
||||
|
||||
<tr valign="top">
|
||||
|
@ -129,9 +129,9 @@ if ($form->mode == "add") {
|
|||
<td align="right"><b><?php print_string("timed", "lesson"); ?>:</b></td>
|
||||
<td>
|
||||
<?PHP
|
||||
$options = array();
|
||||
$options = array();
|
||||
$options[0] = get_string("no"); $options[1] = get_string("yes");
|
||||
choose_from_menu($options, "timed", $form->timed, "");
|
||||
choose_from_menu($options, "timed", $form->timed, "");
|
||||
helpbutton("timed", get_string("timed", "lesson"), "lesson");
|
||||
?>
|
||||
</td>
|
||||
|
@ -141,7 +141,7 @@ if ($form->mode == "add") {
|
|||
<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"); ?>
|
||||
<?php helpbutton("maxtime", get_string("maxtime", "lesson"), "lesson"); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
@ -149,7 +149,7 @@ if ($form->mode == "add") {
|
|||
<td align="right"><b><?php print_string("maximumnumberofanswersbranches", "lesson") ?>:</b></td>
|
||||
<td>
|
||||
<?php
|
||||
$numbers = array();
|
||||
$numbers = array();
|
||||
for ($i=20; $i>1; $i--) {
|
||||
$numbers[$i] = $i;
|
||||
}
|
||||
|
@ -160,18 +160,18 @@ if ($form->mode == "add") {
|
|||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<br/><?php print_heading(get_string("gradeoptions", "lesson"), "left", 4); ?>
|
||||
</td><td></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 = array();
|
||||
$options = array();
|
||||
$options[0] = get_string("no"); $options[1] = get_string("yes");
|
||||
choose_from_menu($options, "practice", $form->practice, "");
|
||||
choose_from_menu($options, "practice", $form->practice, "");
|
||||
helpbutton("practice", get_string("practice", "lesson"), "lesson");
|
||||
?>
|
||||
</td>
|
||||
|
@ -181,9 +181,9 @@ if ($form->mode == "add") {
|
|||
<td align="right"><b><?php print_string("customscoring", "lesson"); ?>:</b></td>
|
||||
<td>
|
||||
<?PHP
|
||||
$options = array();
|
||||
$options = array();
|
||||
$options[0] = get_string("no"); $options[1] = get_string("yes");
|
||||
choose_from_menu($options, "custom", $form->custom, "");
|
||||
choose_from_menu($options, "custom", $form->custom, "");
|
||||
helpbutton("custom", get_string("customscoring", "lesson"), "lesson");
|
||||
?>
|
||||
</td>
|
||||
|
@ -193,7 +193,7 @@ if ($form->mode == "add") {
|
|||
<td align="right"><b><?php print_string("maximumgrade") ?>:</b></td>
|
||||
<td>
|
||||
<?php
|
||||
$grades = array();
|
||||
$grades = array();
|
||||
for ($i=100; $i>=0; $i--) {
|
||||
$grades[$i] = $i;
|
||||
}
|
||||
|
@ -207,7 +207,7 @@ if ($form->mode == "add") {
|
|||
<td align="right"><b><?php print_string("canretake", "lesson", $course->student) ?>:</b></td>
|
||||
<td>
|
||||
<?PHP
|
||||
$options = array();
|
||||
$options = array();
|
||||
$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");
|
||||
|
@ -219,7 +219,7 @@ if ($form->mode == "add") {
|
|||
<td align="right"><b><?php print_string("handlingofretakes", "lesson") ?>:</b></td>
|
||||
<td>
|
||||
<?PHP
|
||||
$options = array();
|
||||
$options = array();
|
||||
$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");
|
||||
|
@ -231,27 +231,27 @@ if ($form->mode == "add") {
|
|||
<td align="right"><b><?php print_string("ongoing", "lesson"); ?>:</b></td>
|
||||
<td>
|
||||
<?php
|
||||
$options = array();
|
||||
$options = array();
|
||||
$options[0] = get_string("no"); $options[1] = get_string("yes");
|
||||
choose_from_menu($options, "ongoing", $form->ongoing, "");
|
||||
choose_from_menu($options, "ongoing", $form->ongoing, "");
|
||||
helpbutton("ongoing", get_string("ongoing", "lesson"), "lesson");
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<br/><?php print_heading(get_string("flowcontrol", "lesson"), "left", 4); ?>
|
||||
</td><td></td>
|
||||
<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
|
||||
$options = array();
|
||||
$options = array();
|
||||
$options[0] = get_string("no"); $options[1] = get_string("yes");
|
||||
choose_from_menu($options, "modattempts", $form->modattempts, "");
|
||||
choose_from_menu($options, "modattempts", $form->modattempts, "");
|
||||
helpbutton("modattempts", get_string("modattempts", "lesson"), "lesson");
|
||||
?>
|
||||
</td>
|
||||
|
@ -261,9 +261,9 @@ if ($form->mode == "add") {
|
|||
<td align="right"><b><?php print_string("displayreview", "lesson"); ?>:</b></td>
|
||||
<td>
|
||||
<?php
|
||||
$options = array();
|
||||
$options = array();
|
||||
$options[0] = get_string("no"); $options[1] = get_string("yes");
|
||||
choose_from_menu($options, "review", $form->review, "");
|
||||
choose_from_menu($options, "review", $form->review, "");
|
||||
helpbutton("review", get_string("displayreview", "lesson"), "lesson");
|
||||
?>
|
||||
</td>
|
||||
|
@ -322,18 +322,18 @@ if ($form->mode == "add") {
|
|||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<br/><?php print_heading(get_string("lessonformating", "lesson"), "left", 4); ?>
|
||||
</td><td></td>
|
||||
<td>
|
||||
<br/><?php print_heading(get_string("lessonformating", "lesson"), "left", 4); ?>
|
||||
</td><td></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td align="right"><b><?php print_string("slideshow", "lesson"); ?>:</b></td>
|
||||
<td>
|
||||
<?PHP
|
||||
$options = array();
|
||||
$options = array();
|
||||
$options[0] = get_string("no"); $options[1] = get_string("yes");
|
||||
choose_from_menu($options, "slideshow", $form->slideshow, "");
|
||||
choose_from_menu($options, "slideshow", $form->slideshow, "");
|
||||
helpbutton("slideshow", get_string("slideshow", "lesson"), "lesson");
|
||||
?>
|
||||
</td>
|
||||
|
@ -343,7 +343,7 @@ if ($form->mode == "add") {
|
|||
<td align="right"><b><?php print_string("slideshowwidth", "lesson"); ?>:</b></td>
|
||||
<td>
|
||||
<input type="text" name="width" maxlength="7" size="7" value="<?php p($form->width) ?>" />px
|
||||
<?php helpbutton("width", get_string("slideshowwidth", "lesson"), "lesson"); ?>
|
||||
<?php helpbutton("width", get_string("slideshowwidth", "lesson"), "lesson"); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
@ -351,7 +351,7 @@ if ($form->mode == "add") {
|
|||
<td align="right"><b><?php print_string("slideshowheight", "lesson"); ?>:</b></td>
|
||||
<td>
|
||||
<input type="text" name="height" maxlength="7" size="7" value="<?php p($form->height) ?>" />px
|
||||
<?php helpbutton("height", get_string("slideshowheight", "lesson"), "lesson"); ?>
|
||||
<?php helpbutton("height", get_string("slideshowheight", "lesson"), "lesson"); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
@ -359,7 +359,7 @@ if ($form->mode == "add") {
|
|||
<td align="right"><b><?php print_string("slideshowbgcolor", "lesson"); ?>:</b></td>
|
||||
<td>
|
||||
<input type="text" name="bgcolor" maxlength="7" size="7" value="<?php p($form->bgcolor) ?>" />
|
||||
<?php helpbutton("bgcolor", get_string("slideshowbgcolor", "lesson"), "lesson"); ?>
|
||||
<?php helpbutton("bgcolor", get_string("slideshowbgcolor", "lesson"), "lesson"); ?>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -368,27 +368,27 @@ if ($form->mode == "add") {
|
|||
<td align="right"><b><?php print_string("displayleftmenu", "lesson"); ?>:</b></td>
|
||||
<td>
|
||||
<?PHP
|
||||
$options = array();
|
||||
$options = array();
|
||||
$options[0] = get_string("no"); $options[1] = get_string("yes");
|
||||
choose_from_menu($options, "displayleft", $form->displayleft, "");
|
||||
choose_from_menu($options, "displayleft", $form->displayleft, "");
|
||||
helpbutton("displayleft", get_string("displayleftmenu", "lesson"), "lesson");
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<br/><?php print_heading(get_string("accesscontrol", "lesson"), "left", 4); ?>
|
||||
</td><td></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 = array();
|
||||
$options = array();
|
||||
$options[0] = get_string("no"); $options[1] = get_string("yes");
|
||||
choose_from_menu($options, "usepassword", $form->usepassword, "");
|
||||
choose_from_menu($options, "usepassword", $form->usepassword, "");
|
||||
helpbutton("usepassword", get_string("usepassword", "lesson"), "lesson");
|
||||
?>
|
||||
</td>
|
||||
|
@ -398,7 +398,7 @@ if ($form->mode == "add") {
|
|||
<td align="right"><b><?php print_string("password", "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 helpbutton("password", get_string("password", "lesson"), "lesson"); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
@ -416,23 +416,23 @@ if ($form->mode == "add") {
|
|||
<td><?php
|
||||
print_date_selector("deadlineday", "deadlinemonth", "deadlineyear", $form->deadline);
|
||||
echo " - ";
|
||||
print_time_selector("deadlinehour", "deadlineminute", $form->deadline);
|
||||
print_time_selector("deadlinehour", "deadlineminute", $form->deadline);
|
||||
?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<br/><?php print_heading(get_string("other", "lesson"), "left", 4); ?>
|
||||
</td><td></td>
|
||||
<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 = array();
|
||||
$options = array();
|
||||
$options[0] = get_string("no"); $options[1] = get_string("yes");
|
||||
choose_from_menu($options, "tree", $form->tree, "");
|
||||
choose_from_menu($options, "tree", $form->tree, "");
|
||||
helpbutton("tree", get_string("treeview", "lesson"), "lesson");
|
||||
?>
|
||||
</td>
|
||||
|
@ -442,9 +442,9 @@ if ($form->mode == "add") {
|
|||
<td align="right"><b><?php print_string("displayhighscores", "lesson"); ?>:</b></td>
|
||||
<td>
|
||||
<?PHP
|
||||
$options = array();
|
||||
$options = array();
|
||||
$options[0] = get_string("no"); $options[1] = get_string("yes");
|
||||
choose_from_menu($options, "highscores", $form->highscores, "");
|
||||
choose_from_menu($options, "highscores", $form->highscores, "");
|
||||
helpbutton("highscores", get_string("displayhighscores", "lesson"), "lesson");
|
||||
?>
|
||||
</td>
|
||||
|
@ -454,7 +454,7 @@ if ($form->mode == "add") {
|
|||
<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"); ?>
|
||||
<?php helpbutton("maxhighscores", get_string("maxhighscores", "lesson"), "lesson"); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
@ -462,28 +462,28 @@ if ($form->mode == "add") {
|
|||
<td align="right"><b><?php print_string("lessondefault", "lesson"); ?>:</b></td>
|
||||
<td>
|
||||
<?PHP
|
||||
$options = array();
|
||||
$options = array();
|
||||
$options[0] = get_string("no"); $options[1] = get_string("yes");
|
||||
choose_from_menu($options, "lessondefault", $form->lessondefault, "");
|
||||
choose_from_menu($options, "lessondefault", $form->lessondefault, "");
|
||||
helpbutton("lessondefault", get_string("lessondefault", "lesson"), "lesson");
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
if ($form->mode != "add") {
|
||||
if ($form->mode != "add") {
|
||||
?>
|
||||
<tr>
|
||||
<td align="right"><b><?php print_string("deleteattempts", "lesson"); ?>:</b></td>
|
||||
<td>
|
||||
<input type="text" name="deleteattempts" size="7" value="" />
|
||||
<?php helpbutton("deleteattempts", get_string("deleteattempts", "lesson"), "lesson"); ?>
|
||||
<input type="hidden" name="deleteattemptsid" value="<?php echo $USER->id; ?>" />
|
||||
<?php helpbutton("deleteattempts", get_string("deleteattempts", "lesson"), "lesson"); ?>
|
||||
<input type="hidden" name="deleteattemptsid" value="<?php echo $USER->id; ?>" />
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
} // end if statement if ($form->mode != "add") {
|
||||
} // end if statement if ($form->mode != "add") {
|
||||
?>
|
||||
<?php print_visible_setting($form); ?>
|
||||
|
||||
</table>
|
||||
<!-- These hidden variables are always the same -->
|
||||
<input type="hidden" name="course" value="<?php p($form->course) ?>" />
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
<style type="text/css">
|
||||
<?php
|
||||
require_once("../../config.php");
|
||||
?>
|
||||
|
||||
img {
|
||||
border:0;
|
||||
|
@ -15,15 +17,23 @@ img {
|
|||
.footer a:link, .footer v:link, .footer a:visited {
|
||||
}
|
||||
|
||||
.leftmenutable {
|
||||
width:170px;
|
||||
height:400px;
|
||||
overflow:auto;
|
||||
background-color: <?PHP echo $THEME->cellheading2 ?>;
|
||||
vertical-align:top;
|
||||
}
|
||||
|
||||
.leftmenu a:link, .leftmenu a:active, .leftmenu a:visited, .leftmenu1 a:link, .leftmenu1 a:active, .leftmenu1 a:visited{
|
||||
font-size:.7em;
|
||||
font-size:.7em;
|
||||
vertical-align:top;
|
||||
}
|
||||
|
||||
.main a:link, .main a:active, .main a:visited{
|
||||
font-size:.9em;
|
||||
vertical-align:top;
|
||||
}
|
||||
|
||||
.viewpos {
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
1172
mod/lesson/view.php
1172
mod/lesson/view.php
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue