changed the options settings to be more compliant with the rest of the
modules. Added help page links for many options. Changed the style of the add multiple interface to match mod.php
This commit is contained in:
+43
-7
@@ -142,6 +142,12 @@ if (isset($_POST["course"])) {
|
||||
|
||||
unset($SESSION->modform); // Clear any old ones that may be hanging around.
|
||||
|
||||
|
||||
$icon = "<img align=absmiddle height=16 width=16 src=\"$CFG->modpixpath/$module->name/icon.gif\"> ";
|
||||
|
||||
print_heading_with_help($pageheading, "mods", $module->name, $icon);
|
||||
print_simple_box_start("center", "", "$THEME->cellheading");
|
||||
|
||||
|
||||
/// Print the main part of the page
|
||||
|
||||
@@ -190,39 +196,68 @@ $form->hours = isset($CFG->attendance_default_hours)?$CFG->attendance_default_ho
|
||||
<input type="checkbox" name="fri" "checked">
|
||||
<?php print_string("saturday","attendance"); echo ":"; ?>
|
||||
<input type="checkbox" name="sat" >
|
||||
<?php helpbutton("choosedays", get_string("choosedays","attendance"), "attendance");?>
|
||||
</TD>
|
||||
</TR>
|
||||
|
||||
<tr valign=top>
|
||||
<TD align="right"><P><B><?php print_string("dynamicsectionmulti", "attendance") ?>:</B></P></TD>
|
||||
<TD align="left">
|
||||
<input type="checkbox" name="dynsection" <?php echo !empty($form->dynsection) ? 'checked' : '' ?> >
|
||||
</TD>
|
||||
<?php
|
||||
$options = array();
|
||||
$options[0] = get_string("no");
|
||||
$options[1] = get_string("yes");
|
||||
choose_from_menu($options, "dynsection", "", "");
|
||||
helpbutton("dynsection", get_string("dynamicsectionmulti","attendance"), "attendance");
|
||||
?>
|
||||
<!-- <input type="checkbox" name="dynsection" <?php echo !empty($form->dynsection) ? 'checked' : '' ?> > -->
|
||||
</TD>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<TD align="right"><P><B><?php print_string("autoattendmulti", "attendance") ?>:</B></P></TD>
|
||||
<TD align="left">
|
||||
<input type="checkbox" name="autoattend" <?php echo !empty($form->autoattend) ? 'checked' : '' ?> >
|
||||
<?php
|
||||
$options = array();
|
||||
$options[0] = get_string("no");
|
||||
$options[1] = get_string("yes");
|
||||
choose_from_menu($options, "autoattend", "", "");
|
||||
helpbutton("autoattendmulti", get_string("autoattend","attendance"), "attendance");
|
||||
?>
|
||||
|
||||
|
||||
<!-- <input type="checkbox" name="autoattend" <?php echo !empty($form->autoattend) ? 'checked' : '' ?> > -->
|
||||
</TD>
|
||||
</tr>
|
||||
<?php // starting with 2 to allow for the nothing value in choose_from_menu to be the default of 1
|
||||
for ($i=2;$i<=24;$i++){ $opt[$i] = $i; } ?>
|
||||
<TR valign=top>
|
||||
<TD align=right><P><B><?php print_string("hoursineachclass", "attendance") ?>:</B></P></TD>
|
||||
<TD colspan="3" align="left"><?php choose_from_menu($opt, "hours", $form->hours, "1","","1") ?></td>
|
||||
<TD colspan="3" align="left"><?php choose_from_menu($opt, "hours", $form->hours, "1","","1") ?>
|
||||
<?php helpbutton("hours", get_string("hoursinclass","attendance"), "attendance"); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr valign=top>
|
||||
<TD align="right"><P><B><?php print_string("gradevaluemulti", "attendance") ?>:</B></P></TD>
|
||||
<TD align="left">
|
||||
<input type="checkbox" name="grade" <?php echo !empty($form->grade) ? 'checked' : '' ?> >
|
||||
<?php
|
||||
$options = array();
|
||||
$options[0] = get_string("no");
|
||||
$options[1] = get_string("yes");
|
||||
choose_from_menu($options, "grade", "", "");
|
||||
helpbutton("grade", get_string("gradevalue","attendance"), "attendance");
|
||||
?>
|
||||
|
||||
<!-- <input type="checkbox" name="grade" <?php echo !empty($form->grade) ? 'checked' : '' ?> > -->
|
||||
</TD>
|
||||
</tr>
|
||||
<?php // starting with 2 to allow for the nothing value in choose_from_menu to be the default of 1
|
||||
for ($i=0;$i<=100;$i++){ $opt2[$i] = $i; } ?>
|
||||
<TR valign=top>
|
||||
<TD align=right><P><B><?php print_string("maxgradevalue", "attendance") ?>:</B></P></TD>
|
||||
<TD colspan="3" align="left"><?php choose_from_menu($opt2, "maxgrade", $form->maxgrade, "0","","0") ?></td>
|
||||
<TD colspan="3" align="left"><?php choose_from_menu($opt2, "maxgrade", $form->maxgrade, "0","","0");
|
||||
helpbutton("maxgrade", get_string("maxgradevalue","attendance"), "attendance");
|
||||
?></td>
|
||||
</tr>
|
||||
|
||||
|
||||
@@ -243,8 +278,9 @@ for ($i=0;$i<=100;$i++){ $opt2[$i] = $i; } ?>
|
||||
</FORM>
|
||||
|
||||
<?php
|
||||
print_simple_box_end();
|
||||
/// Finish the page
|
||||
print_footer($course);
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
+38
-11
@@ -29,6 +29,12 @@ if (empty($form->id)) {
|
||||
<!-- <TD align=right><P><B><? print_string("takeroll", "attendance") ?>:</B></P></TD> -->
|
||||
<!-- <TD align=left><? 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 colspan="3">
|
||||
<input type="text" name="notes" size=60 value="<?php p($form->notes)?>">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<TR valign=top>
|
||||
<TD align=right><P><B><?php print_string("dayofroll", "attendance") ?>:</B></P></TD>
|
||||
@@ -37,40 +43,61 @@ if (empty($form->id)) {
|
||||
<tr valign=top>
|
||||
<TD align="right"><P><B><?php print_string("dynamicsection", "attendance") ?>:</B></P></TD>
|
||||
<TD align="left">
|
||||
<input type="checkbox" name="dynsection" <?php echo !empty($form->dynsection) ? 'checked' : '' ?> >
|
||||
<?php
|
||||
$options = array();
|
||||
$options[0] = get_string("no");
|
||||
$options[1] = get_string("yes");
|
||||
choose_from_menu($options, "dynsection", "$form->dynsection", "");
|
||||
helpbutton("dynsection", get_string("dynamicsection","attendance"), "attendance");
|
||||
?>
|
||||
<!-- <input type="checkbox" name="dynsection" <?php echo !empty($form->dynsection) ? 'checked' : '' ?> > -->
|
||||
</TD>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<TD align="right"><P><B><?php print_string("autoattend", "attendance") ?>:</B></P></TD>
|
||||
<TD align="left">
|
||||
<input type="checkbox" name="autoattend" <?php echo !empty($form->autoattend) ? 'checked' : '' ?> >
|
||||
|
||||
<?php
|
||||
$options = array();
|
||||
$options[0] = get_string("no");
|
||||
$options[1] = get_string("yes");
|
||||
choose_from_menu($options, "autoattend", "$form->autoattend", "");
|
||||
helpbutton("autoattend", get_string("autoattend","attendance"), "attendance");
|
||||
?>
|
||||
|
||||
<!-- <input type="checkbox" name="autoattend" <?php echo !empty($form->autoattend) ? 'checked' : '' ?> > -->
|
||||
</TD>
|
||||
</tr>
|
||||
<?php // starting with 2 to allow for the nothing value in choose_from_menu to be the default of 1
|
||||
for ($i=2;$i<=24;$i++){ $opt[$i] = $i; } ?>
|
||||
<TR valign=top>
|
||||
<TD align=right><P><B><?php print_string("hoursinclass", "attendance") ?>:</B></P></TD>
|
||||
<TD colspan="3" align="left"><?php choose_from_menu($opt, "hours", $form->hours, "1","","1") ?></td>
|
||||
<TD colspan="3" align="left"><?php choose_from_menu($opt, "hours", $form->hours, "1","","1") ?>
|
||||
<?php helpbutton("hours", get_string("hoursinclass","attendance"), "hours"); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign=top>
|
||||
<TD align="right"><P><B><?php print_string("gradevalue", "attendance") ?>:</B></P></TD>
|
||||
<TD align="left">
|
||||
<input type="checkbox" name="grade" <?php echo !empty($form->grade) ? 'checked' : '' ?> >
|
||||
<?php
|
||||
$options = array();
|
||||
$options[0] = get_string("no");
|
||||
$options[1] = get_string("yes");
|
||||
choose_from_menu($options, "grade", "$form->grade", "");
|
||||
helpbutton("grade", get_string("gradevalue","attendance"), "attendance");
|
||||
?>
|
||||
<!-- <input type="checkbox" name="grade" <?php echo !empty($form->grade) ? 'checked' : '' ?> > -->
|
||||
</TD>
|
||||
</tr>
|
||||
<?php // starting with 2 to allow for the nothing value in choose_from_menu to be the default of 1
|
||||
for ($i=0;$i<=100;$i++){ $opt2[$i] = $i; } ?>
|
||||
<TR valign=top>
|
||||
<TD align=right><P><B><?php print_string("maxgradevalue", "attendance") ?>:</B></P></TD>
|
||||
<TD colspan="3" align="left"><?php choose_from_menu($opt2, "maxgrade", $form->maxgrade, "0","","0") ?></td>
|
||||
<TD colspan="3" align="left"><?php choose_from_menu($opt2, "maxgrade", $form->maxgrade, "0","","0");
|
||||
helpbutton("maxgrade", get_string("maxgradevalue","attendance"), "attendance");
|
||||
?></td>
|
||||
</tr>
|
||||
|
||||
<tr valign=top>
|
||||
<td align=right><p><b><?php print_string("notes", "attendance") ?>:</b></p></td>
|
||||
<td colspan="3">
|
||||
<input type="text" name="notes" size=60 value="<?php p($form->notes)?>">
|
||||
</td>
|
||||
</tr>
|
||||
</TABLE>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user