mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
Activities can now be hidden/shown from the activity editing page. Also for modules that know about groups the groupmode can be set from there. See bug 2533. This required adding to the mod.html files calls to new functions print_visible_setting() and print_groupmode_setting() which are combined in print_standard_coursemodule_settings().
The visibility of coursemodules is now always set through the function set_coursemodule_visible() in order to make sure that the associated events get updated in the calendar appropriately. If moving a coursemodule to a hidden section then the module is set to hidden as well and its events are hidden in the calendar. If deleting a coursemodule its events are deleted from the calendar. The function choose_from_menu() has an extra optional argument $disabled which, when set to true, will disable the menu. For the sake of consistency the function set_groupmode_for_module has been renamed to set_coursemodule_groupmode and the functions show_course_module() and hide_course_module() have been combined to set_coursemodule_visible().
This commit is contained in:
parent
2fd4148763
commit
48e535bc35
107
course/lib.php
107
course/lib.php
@ -934,11 +934,7 @@ function set_section_visible($courseid, $sectionnumber, $visibility) {
|
|||||||
if (!empty($section->sequence)) {
|
if (!empty($section->sequence)) {
|
||||||
$modules = explode(",", $section->sequence);
|
$modules = explode(",", $section->sequence);
|
||||||
foreach ($modules as $moduleid) {
|
foreach ($modules as $moduleid) {
|
||||||
if ($visibility) {
|
set_coursemodule_visible($moduleid, $visibility);
|
||||||
show_course_module($moduleid);
|
|
||||||
} else {
|
|
||||||
hide_course_module($moduleid);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rebuild_course_cache($courseid);
|
rebuild_course_cache($courseid);
|
||||||
@ -1534,34 +1530,35 @@ function add_mod_to_section($mod, $beforemod=NULL) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function set_groupmode_for_module($id, $groupmode) {
|
function set_coursemodule_groupmode($id, $groupmode) {
|
||||||
return set_field("course_modules", "groupmode", $groupmode, "id", $id);
|
return set_field("course_modules", "groupmode", $groupmode, "id", $id);
|
||||||
}
|
}
|
||||||
|
|
||||||
function hide_course_module($mod) {
|
function set_coursemodule_visible($id, $visible) {
|
||||||
$cm = get_record('course_modules', 'id', $mod);
|
$cm = get_record('course_modules', 'id', $id);
|
||||||
$modulename = get_field('modules', 'name', 'id', $cm->module);
|
$modulename = get_field('modules', 'name', 'id', $cm->module);
|
||||||
if ($events = get_records_select('event', "instance = '$cm->instance' AND modulename = '$modulename'")) {
|
if ($events = get_records_select('event', "instance = '$cm->instance' AND modulename = '$modulename'")) {
|
||||||
foreach($events as $event) {
|
foreach($events as $event) {
|
||||||
hide_event($event);
|
if ($visible) {
|
||||||
|
show_event($event);
|
||||||
|
} else {
|
||||||
|
hide_event($event);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return set_field("course_modules", "visible", 0, "id", $mod);
|
return set_field("course_modules", "visible", $visible, "id", $id);
|
||||||
}
|
}
|
||||||
|
|
||||||
function show_course_module($mod) {
|
function delete_course_module($id) {
|
||||||
$cm = get_record('course_modules', 'id', $mod);
|
$cm = get_record('course_modules', 'id', $id);
|
||||||
$modulename = get_field('modules', 'name', 'id', $cm->module);
|
$modulename = get_field('modules', 'name', 'id', $cm->module);
|
||||||
if ($events = get_records_select('event', "instance = '$cm->instance' AND modulename = '$modulename'")) {
|
if ($events = get_records_select('event', "instance = '$cm->instance' AND modulename = '$modulename'")) {
|
||||||
foreach($events as $event) {
|
foreach($events as $event) {
|
||||||
show_event($event);
|
delete_event($event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return set_field("course_modules", "visible", 1, "id", $mod);
|
return set_field("course_modules", "visible", 0, "id", $id);
|
||||||
}
|
return set_field("course_modules", "deleted", 1, "id", $id);
|
||||||
|
|
||||||
function delete_course_module($mod) {
|
|
||||||
return set_field("course_modules", "deleted", 1, "id", $mod);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function delete_mod_from_section($mod, $section) {
|
function delete_mod_from_section($mod, $section) {
|
||||||
@ -1634,10 +1631,13 @@ function moveto_module($mod, $section, $beforemod=NULL) {
|
|||||||
|
|
||||||
if ($mod->section != $section->id) {
|
if ($mod->section != $section->id) {
|
||||||
$mod->section = $section->id;
|
$mod->section = $section->id;
|
||||||
|
|
||||||
if (!update_record("course_modules", $mod)) {
|
if (!update_record("course_modules", $mod)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
// if moving to a hidden section then hide module
|
||||||
|
if (!$section->visible) {
|
||||||
|
set_coursemodule_visible($mod->id, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Add the module into the new section
|
/// Add the module into the new section
|
||||||
@ -1776,4 +1776,73 @@ function course_in_meta ($course) {
|
|||||||
return record_exists("course_meta","child_course",$course->id);
|
return record_exists("course_meta","child_course",$course->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Print standard form elements on module setup forms in mod/.../mod.html
|
||||||
|
*/
|
||||||
|
function print_standard_coursemodule_settings($form) {
|
||||||
|
print_groupmode_setting($form);
|
||||||
|
print_visible_setting($form);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Print groupmode form element on module setup forms in mod/.../mod.html
|
||||||
|
*/
|
||||||
|
function print_groupmode_setting($form) {
|
||||||
|
|
||||||
|
if (! $course = get_record('course', 'id', $form->course)) {
|
||||||
|
error("This course doesn't exist");
|
||||||
|
}
|
||||||
|
if ($form->coursemodule) {
|
||||||
|
if (! $cm = get_record('course_modules', 'id', $form->coursemodule)) {
|
||||||
|
error("This course module doesn't exist");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$cm = null;
|
||||||
|
}
|
||||||
|
$groupmode = groupmode($course, $cm);
|
||||||
|
if ($course->groupmode or (!$course->groupmodeforce)) {
|
||||||
|
echo '<tr valign="top">';
|
||||||
|
echo '<td align="right"><b>'.get_string('groupmode').':</b></td>';
|
||||||
|
echo '<td>';
|
||||||
|
unset($choices);
|
||||||
|
$choices[NOGROUPS] = get_string('groupsnone');
|
||||||
|
$choices[SEPARATEGROUPS] = get_string('groupsseparate');
|
||||||
|
$choices[VISIBLEGROUPS] = get_string('groupsvisible');
|
||||||
|
choose_from_menu($choices, 'groupmode', $groupmode, '', '', 0, false, $course->groupmodeforce);
|
||||||
|
helpbutton('groupmode', get_string('groupmode'));
|
||||||
|
echo '</td></tr>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Print visibility setting form element on module setup forms in mod/.../mod.html
|
||||||
|
*/
|
||||||
|
function print_visible_setting($form) {
|
||||||
|
|
||||||
|
if ($form->coursemodule) {
|
||||||
|
$visible = get_field('course_modules', 'visible', 'id', $form->coursemodule);
|
||||||
|
} else {
|
||||||
|
$visible = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($form->mode == 'add') { // in this case $form->section is the section number, not the id
|
||||||
|
$hiddensection = !get_field('course_sections', 'visible', 'section', $form->section, 'course', $form->course);
|
||||||
|
} else {
|
||||||
|
$hiddensection = !get_field('course_sections', 'visible', 'id', $form->section);
|
||||||
|
}
|
||||||
|
if ($hiddensection) {
|
||||||
|
$visible = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
echo '<tr valign="top">';
|
||||||
|
echo '<td align="right"><b>'.get_string('showimmediately').':</b></td>';
|
||||||
|
echo '<td>';
|
||||||
|
unset($choices);
|
||||||
|
$choices[1] = get_string('yes');
|
||||||
|
$choices[0] = get_string('no');
|
||||||
|
choose_from_menu($choices, 'visible', $visible, '', '', 0, false, $hiddensection);
|
||||||
|
echo '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -67,6 +67,20 @@
|
|||||||
if (is_string($return)) {
|
if (is_string($return)) {
|
||||||
error($return, "view.php?id=$course->id");
|
error($return, "view.php?id=$course->id");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// to deal with pre-1.5 modules
|
||||||
|
if (!isset($mod->visible)) {
|
||||||
|
//We get the section's visible field status
|
||||||
|
$mod->visible = get_field("course_sections","visible","id",$sectionid);
|
||||||
|
}
|
||||||
|
if (!isset($mod->groupmode)) {
|
||||||
|
$course = get_record('course', 'id', $mod->course);
|
||||||
|
$cm = get_record('course_modules', 'id', $mod->coursemodule);
|
||||||
|
$mod->groupmode = groupmode($course, $cm);
|
||||||
|
}
|
||||||
|
|
||||||
|
set_coursemodule_visible($mod->coursemodule, $mod->visible);
|
||||||
|
set_coursemodule_groupmode($mod->coursemodule, $mod->groupmode);
|
||||||
|
|
||||||
if (isset($mod->redirect)) {
|
if (isset($mod->redirect)) {
|
||||||
$SESSION->returnpage = $mod->redirecturl;
|
$SESSION->returnpage = $mod->redirecturl;
|
||||||
@ -113,12 +127,18 @@
|
|||||||
if (! $sectionid = add_mod_to_section($mod) ) {
|
if (! $sectionid = add_mod_to_section($mod) ) {
|
||||||
error("Could not add the new course module to that section");
|
error("Could not add the new course module to that section");
|
||||||
}
|
}
|
||||||
//We get the section's visible field status
|
|
||||||
$visible = get_field("course_sections","visible","id",$sectionid);
|
// to deal with pre-1.5 modules
|
||||||
|
if (!isset($mod->visible)) {
|
||||||
if (! set_field("course_modules", "visible", $visible, "id", $mod->coursemodule)) {
|
//We get the section's visible field status
|
||||||
error("Could not update the course module with the correct visibility");
|
$mod->visible = get_field("course_sections","visible","id",$sectionid);
|
||||||
}
|
}
|
||||||
|
if (!isset($mod->groupmode)) {
|
||||||
|
$mod->groupmode = get_field('course', 'groupmode', 'id', $mod->course);
|
||||||
|
}
|
||||||
|
|
||||||
|
set_coursemodule_visible($mod->coursemodule, $mod->visible);
|
||||||
|
set_coursemodule_groupmode($mod->coursemodule, $mod->groupmode);
|
||||||
|
|
||||||
if (! set_field("course_modules", "section", $sectionid, "id", $mod->coursemodule)) {
|
if (! set_field("course_modules", "section", $sectionid, "id", $mod->coursemodule)) {
|
||||||
error("Could not update the course module with the correct section");
|
error("Could not update the course module with the correct section");
|
||||||
@ -250,7 +270,7 @@
|
|||||||
error("You can't modify this course!");
|
error("You can't modify this course!");
|
||||||
}
|
}
|
||||||
|
|
||||||
hide_course_module($cm->id);
|
set_coursemodule_visible($cm->id, 0);
|
||||||
|
|
||||||
rebuild_course_cache($cm->course);
|
rebuild_course_cache($cm->course);
|
||||||
|
|
||||||
@ -280,7 +300,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($module->visible and ($section->visible or (SITEID == $cm->course))) {
|
if ($module->visible and ($section->visible or (SITEID == $cm->course))) {
|
||||||
show_course_module($cm->id);
|
set_coursemodule_visible($cm->id, 1);
|
||||||
rebuild_course_cache($cm->course);
|
rebuild_course_cache($cm->course);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -301,7 +321,7 @@
|
|||||||
error("You can't modify this course!");
|
error("You can't modify this course!");
|
||||||
}
|
}
|
||||||
|
|
||||||
set_groupmode_for_module($cm->id, $_GET['groupmode']);
|
set_coursemodule_groupmode($cm->id, $_GET['groupmode']);
|
||||||
|
|
||||||
rebuild_course_cache($cm->course);
|
rebuild_course_cache($cm->course);
|
||||||
|
|
||||||
|
@ -916,6 +916,7 @@ $string['showalltopics'] = 'Show all topics';
|
|||||||
$string['showallusers'] = 'Show all users';
|
$string['showallusers'] = 'Show all users';
|
||||||
$string['showallweeks'] = 'Show all weeks';
|
$string['showallweeks'] = 'Show all weeks';
|
||||||
$string['showgrades'] = 'Show grades';
|
$string['showgrades'] = 'Show grades';
|
||||||
|
$string['showimmediately'] = 'Show immediately';
|
||||||
$string['showlistofcourses'] = 'Show list of courses';
|
$string['showlistofcourses'] = 'Show list of courses';
|
||||||
$string['showonlytopic'] = 'Show only topic $a';
|
$string['showonlytopic'] = 'Show only topic $a';
|
||||||
$string['showonlyweek'] = 'Show only week $a';
|
$string['showonlyweek'] = 'Show only week $a';
|
||||||
|
@ -600,19 +600,18 @@ function close_window_button() {
|
|||||||
* @param type description
|
* @param type description
|
||||||
* @todo Finish documenting this function
|
* @todo Finish documenting this function
|
||||||
*/
|
*/
|
||||||
function choose_from_menu ($options, $name, $selected='', $nothing='choose', $script='', $nothingvalue='0', $return=false) {
|
function choose_from_menu ($options, $name, $selected='', $nothing='choose', $script='', $nothingvalue='0', $return=false, $disabled=false) {
|
||||||
|
|
||||||
if ($nothing == 'choose') {
|
if ($nothing == 'choose') {
|
||||||
$nothing = get_string('choose') .'...';
|
$nothing = get_string('choose') .'...';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($script) {
|
$attributes = ($script) ? 'onchange="'. $script .'"' : '';
|
||||||
$javascript = 'onchange="'. $script .'"';
|
if ($disabled) {
|
||||||
} else {
|
$attributes .= ' disabled="disabled"';
|
||||||
$javascript = '';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$output = '<select name="'. $name .'" '. $javascript .'>' . "\n";
|
$output = '<select name="'. $name .'" '. $attributes .'>' . "\n";
|
||||||
if ($nothing) {
|
if ($nothing) {
|
||||||
$output .= ' <option value="'. $nothingvalue .'"'. "\n";
|
$output .= ' <option value="'. $nothingvalue .'"'. "\n";
|
||||||
if ($nothingvalue === $selected) {
|
if ($nothingvalue === $selected) {
|
||||||
|
@ -111,11 +111,11 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
<td align="right"><b><?php print_string("maximumsize", "assignment") ?>:</b></td>
|
<td align="right"><b><?php print_string("maximumsize", "assignment") ?>:</b></td>
|
||||||
<td><?php
|
<td><?php
|
||||||
$choices = get_max_upload_sizes($CFG->maxbytes, $course->maxbytes);
|
$choices = get_max_upload_sizes($CFG->maxbytes, $course->maxbytes);
|
||||||
choose_from_menu ($choices, "maxbytes", $form->maxbytes, "");
|
choose_from_menu ($choices, "maxbytes", $form->maxbytes, "");
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
<td align="right"><b><?php print_string("duedate", "assignment") ?>:</b></td>
|
<td align="right"><b><?php print_string("duedate", "assignment") ?>:</b></td>
|
||||||
@ -125,6 +125,7 @@
|
|||||||
print_time_selector("duehour", "dueminute", $form->timedue);
|
print_time_selector("duehour", "dueminute", $form->timedue);
|
||||||
?></td>
|
?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<?php print_standard_coursemodule_settings($form); ?>
|
||||||
</table>
|
</table>
|
||||||
<br />
|
<br />
|
||||||
<center>
|
<center>
|
||||||
|
@ -20,13 +20,13 @@ if (empty($form->grade)) {
|
|||||||
// error_reporting(E_ALL);
|
// error_reporting(E_ALL);
|
||||||
// if we're adding a new instance
|
// if we're adding a new instance
|
||||||
if (empty($form->id)) {
|
if (empty($form->id)) {
|
||||||
if (isset($CFG->attendance_dynsection) && ($CFG->attendance_dynsection == "1")) { $form->dynsection = 1; }
|
if (isset($CFG->attendance_dynsection) && ($CFG->attendance_dynsection == "1")) { $form->dynsection = 1; }
|
||||||
if (isset($CFG->attendance_autoattend) && ($CFG->attendance_autoattend == "1")) { $form->autoattend = 1; }
|
if (isset($CFG->attendance_autoattend) && ($CFG->attendance_autoattend == "1")) { $form->autoattend = 1; }
|
||||||
if (isset($CFG->attendance_grade) && ($CFG->attendance_grade == "1")) { $form->grade = 1; }
|
if (isset($CFG->attendance_grade) && ($CFG->attendance_grade == "1")) { $form->grade = 1; }
|
||||||
$form->maxgrade = isset($CFG->attendance_maxgrade)?$CFG->attendance_maxgrade:0;
|
$form->maxgrade = isset($CFG->attendance_maxgrade)?$CFG->attendance_maxgrade:0;
|
||||||
$form->hours = isset($CFG->attendance_default_hours)?$CFG->attendance_default_hours:1;
|
$form->hours = isset($CFG->attendance_default_hours)?$CFG->attendance_default_hours:1;
|
||||||
$form->day = time();
|
$form->day = time();
|
||||||
$form->notes = "";
|
$form->notes = "";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<form name="form" method="post" action="<?php echo $ME ?>">
|
<form name="form" method="post" action="<?php echo $ME ?>">
|
||||||
@ -44,7 +44,6 @@ if (empty($form->id)) {
|
|||||||
<input type="text" name="name" size="60" value="<?php p($form->notes)?>" alt="<?php print_string("name") ?>" />
|
<input type="text" name="name" size="60" value="<?php p($form->notes)?>" alt="<?php print_string("name") ?>" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
<td align="right"><b><?php print_string("dayofroll", "attendance") ?>:</b></td>
|
<td align="right"><b><?php print_string("dayofroll", "attendance") ?>:</b></td>
|
||||||
<td colspan="3"><?php print_date_selector("theday", "themonth", "theyear", $form->day) ?></td>
|
<td colspan="3"><?php print_date_selector("theday", "themonth", "theyear", $form->day) ?></td>
|
||||||
@ -106,7 +105,7 @@ for ($i=0;$i<=100;$i++){ $opt2[$i] = $i; } ?>
|
|||||||
helpbutton("maxgrade", get_string("maxgradevalue","attendance"), "attendance");
|
helpbutton("maxgrade", get_string("maxgradevalue","attendance"), "attendance");
|
||||||
?></td>
|
?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<?php print_visible_setting($form); ?>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
||||||
@ -120,7 +119,7 @@ for ($i=0;$i<=100;$i++){ $opt2[$i] = $i; } ?>
|
|||||||
foreach ($rolls as $roll) {
|
foreach ($rolls as $roll) {
|
||||||
$sroll[$roll->userid][$roll->hour]->status=$roll->status;
|
$sroll[$roll->userid][$roll->hour]->status=$roll->status;
|
||||||
$sroll[$roll->userid][$roll->hour]->notes=$roll->notes;
|
$sroll[$roll->userid][$roll->hour]->notes=$roll->notes;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// get the list of students along with student ID field
|
// get the list of students along with student ID field
|
||||||
// get back array of stdclass objects in sorted order, with members:
|
// get back array of stdclass objects in sorted order, with members:
|
||||||
@ -135,27 +134,27 @@ for ($i=0;$i<=100;$i++){ $opt2[$i] = $i; } ?>
|
|||||||
echo "<table width=\"100%\" border=\"0\" valign=\"top\" align=\"center\" ".
|
echo "<table width=\"100%\" border=\"0\" valign=\"top\" align=\"center\" ".
|
||||||
"cellpadding=\"5\" cellspacing=\"1\" class=\"generaltable\">";
|
"cellpadding=\"5\" cellspacing=\"1\" class=\"generaltable\">";
|
||||||
if ($form->hours >1) {
|
if ($form->hours >1) {
|
||||||
echo "<tr><th valign=\"top\" align=\"right\" colspan=\"3\" nowrap class=\"generaltableheader\">".
|
echo "<tr><th valign=\"top\" align=\"right\" colspan=\"3\" nowrap class=\"generaltableheader\">".
|
||||||
"Hours:</th>\n";
|
"Hours:</th>\n";
|
||||||
for($i=1;$i<=$form->hours;$i++) {
|
for($i=1;$i<=$form->hours;$i++) {
|
||||||
echo "<th valign=\"top\" align=\"center\" colspan=\"3\" nowrap class=\"generaltableheader\">".
|
echo "<th valign=\"top\" align=\"center\" colspan=\"3\" nowrap class=\"generaltableheader\">".
|
||||||
"$i</th>\n";
|
"$i</th>\n";
|
||||||
}
|
}
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
} // if more than one hour for each day
|
} // if more than one hour for each day
|
||||||
echo "<tr><th valign=\"top\" align=\"left\" nowrap class=\"generaltableheader\">Last Name</th>\n";
|
echo "<tr><th valign=\"top\" align=\"left\" nowrap class=\"generaltableheader\">Last Name</th>\n";
|
||||||
echo "<th valign=\"top\" align=\"left\" nowrap class=\"generaltableheader\">First Name</th>\n";
|
echo "<th valign=\"top\" align=\"left\" nowrap class=\"generaltableheader\">First Name</th>\n";
|
||||||
echo "<th valign=\"top\" align=\"left\" nowrap class=\"generaltableheader\">ID</th>\n";
|
echo "<th valign=\"top\" align=\"left\" nowrap class=\"generaltableheader\">ID</th>\n";
|
||||||
$P=get_string("presentshort","attendance");
|
$P=get_string("presentshort","attendance");
|
||||||
$T=get_string("tardyshort","attendance");
|
$T=get_string("tardyshort","attendance");
|
||||||
$A=get_string("absentshort","attendance");
|
$A=get_string("absentshort","attendance");
|
||||||
// generate the headers for the attendance hours
|
// generate the headers for the attendance hours
|
||||||
for($i=1;$i<=$form->hours;$i++) {
|
for($i=1;$i<=$form->hours;$i++) {
|
||||||
echo "<th valign=\"top\" align=\"center\" nowrap class=\"generaltableheader\">".$P."</th>\n";
|
echo "<th valign=\"top\" align=\"center\" nowrap class=\"generaltableheader\">".$P."</th>\n";
|
||||||
echo "<th valign=\"top\" align=\"center\" nowrap class=\"generaltableheader\">".$T."</th>\n";
|
echo "<th valign=\"top\" align=\"center\" nowrap class=\"generaltableheader\">".$T."</th>\n";
|
||||||
echo "<th valign=\"top\" align=\"center\" nowrap class=\"generaltableheader\">".$A."</th>\n";
|
echo "<th valign=\"top\" align=\"center\" nowrap class=\"generaltableheader\">".$A."</th>\n";
|
||||||
}
|
}
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
$table->head = array("Last Name","First Name","ID",
|
$table->head = array("Last Name","First Name","ID",
|
||||||
get_string("presentlong","attendance"),
|
get_string("presentlong","attendance"),
|
||||||
get_string("tardylong","attendance"),
|
get_string("tardylong","attendance"),
|
||||||
@ -170,27 +169,27 @@ if ($form->hours >1) {
|
|||||||
echo "<tr><td align=\"left\" nowrap class=\"generaltablecell\" style=\"border-top: 1px solid;\">".$student->lastname."</td>\n";
|
echo "<tr><td align=\"left\" nowrap class=\"generaltablecell\" style=\"border-top: 1px solid;\">".$student->lastname."</td>\n";
|
||||||
echo "<td align=\"left\" nowrap class=\"generaltablecell\" style=\"border-top: 1px solid;\">".$student->firstname."</td>\n";
|
echo "<td align=\"left\" nowrap class=\"generaltablecell\" style=\"border-top: 1px solid;\">".$student->firstname."</td>\n";
|
||||||
echo "<td align=\"left\" nowrap class=\"generaltablecell\" style=\"border-top: 1px solid;\">".$student->idnumber."</td>\n";
|
echo "<td align=\"left\" nowrap class=\"generaltablecell\" style=\"border-top: 1px solid;\">".$student->idnumber."</td>\n";
|
||||||
for($j=1;$j<=$form->hours;$j++) {
|
for($j=1;$j<=$form->hours;$j++) {
|
||||||
// set the attendance defaults for each student
|
// set the attendance defaults for each student
|
||||||
$r1c=$r2c=$r3c=" ";
|
$r1c=$r2c=$r3c=" ";
|
||||||
$rollstatus = (($form->edited==0)?$CFG->attendance_default_student_status:
|
$rollstatus = (($form->edited==0)?$CFG->attendance_default_student_status:
|
||||||
((isset($sroll[$student->id][$j]->status)?$sroll[$student->id][$j]->status:0)));
|
((isset($sroll[$student->id][$j]->status)?$sroll[$student->id][$j]->status:0)));
|
||||||
if ($rollstatus==1) {$r2c="checked=\"checked\"";}
|
if ($rollstatus==1) {$r2c="checked=\"checked\"";}
|
||||||
elseif ($rollstatus==2) {$r3c="checked=\"checked\"";}
|
elseif ($rollstatus==2) {$r3c="checked=\"checked\"";}
|
||||||
else {$r1c="checked=\"checked\"";}
|
else {$r1c="checked=\"checked\"";}
|
||||||
$radio1="<input type=\"radio\" name=\"student_".$student->id."_".$j."\" value=\"0\" ".$r1c." />";
|
$radio1="<input type=\"radio\" name=\"student_".$student->id."_".$j."\" value=\"0\" ".$r1c." />";
|
||||||
$radio2="<input type=\"radio\" name=\"student_".$student->id."_".$j."\" value=\"1\" ".$r2c." />";
|
$radio2="<input type=\"radio\" name=\"student_".$student->id."_".$j."\" value=\"1\" ".$r2c." />";
|
||||||
$radio3="<input type=\"radio\" name=\"student_".$student->id."_".$j."\" value=\"2\" ".$r3c." />";
|
$radio3="<input type=\"radio\" name=\"student_".$student->id."_".$j."\" value=\"2\" ".$r3c." />";
|
||||||
echo "<td align=\"left\" nowrap class=\"generaltablecell\" style=\"border-left: 1px dotted; border-top: 1px solid;\">".$radio1."</td>\n";
|
echo "<td align=\"left\" nowrap class=\"generaltablecell\" style=\"border-left: 1px dotted; border-top: 1px solid;\">".$radio1."</td>\n";
|
||||||
echo "<td align=\"left\" nowrap class=\"generaltablecell\" style=\"border-top: 1px solid;\">".$radio2."</td>\n";
|
echo "<td align=\"left\" nowrap class=\"generaltablecell\" style=\"border-top: 1px solid;\">".$radio2."</td>\n";
|
||||||
echo "<td align=\"left\" nowrap class=\"generaltablecell\" style=\"border-top: 1px solid;\">".$radio3."</td>\n";
|
echo "<td align=\"left\" nowrap class=\"generaltablecell\" style=\"border-top: 1px solid;\">".$radio3."</td>\n";
|
||||||
} // for loop
|
} // for loop
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
// $radio1="<input type=\"radio\" name=\"student_".$student->id."\" value=\"0\" checked=\"checked\" />";
|
// $radio1="<input type=\"radio\" name=\"student_".$student->id."\" value=\"0\" checked=\"checked\" />";
|
||||||
// $radio2="<input type=\"radio\" name=\"student_".$student->id."\" value=\"1\" />";
|
// $radio2="<input type=\"radio\" name=\"student_".$student->id."\" value=\"1\" />";
|
||||||
// $radio3="<input type=\"radio\" name=\"student_".$student->id."\" value=\"2\" />";
|
// $radio3="<input type=\"radio\" name=\"student_".$student->id."\" value=\"2\" />";
|
||||||
// $table->data[$i]=array($student->lastname, $student->firstname,
|
// $table->data[$i]=array($student->lastname, $student->firstname,
|
||||||
// $student->idnumber, $radio1,$radio2,$radio3);
|
// $student->idnumber, $radio1,$radio2,$radio3);
|
||||||
// $i++;
|
// $i++;
|
||||||
}
|
}
|
||||||
// doing the table manually now
|
// doing the table manually now
|
||||||
|
@ -61,8 +61,8 @@
|
|||||||
?></td>
|
?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
<td align="right"><b><?php print_string('savemessages', 'chat')?>:</b></td>
|
<td align="right"><b><?php print_string('savemessages', 'chat')?>:</b></td>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
unset($options);
|
unset($options);
|
||||||
$options[0] = get_string('neverdeletemessages', 'chat');
|
$options[0] = get_string('neverdeletemessages', 'chat');
|
||||||
@ -83,8 +83,8 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
<td align="right"><b><?php print_string('studentseereports', 'chat')?>:</b></td>
|
<td align="right"><b><?php print_string('studentseereports', 'chat')?>:</b></td>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
unset($options);
|
unset($options);
|
||||||
$options[0] = get_string('no');
|
$options[0] = get_string('no');
|
||||||
@ -93,7 +93,7 @@
|
|||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<?php print_standard_coursemodule_settings($form); ?>
|
||||||
</table>
|
</table>
|
||||||
<center>
|
<center>
|
||||||
<input type="hidden" name="course" value="<?php p($form->course) ?>" />
|
<input type="hidden" name="course" value="<?php p($form->course) ?>" />
|
||||||
@ -107,4 +107,4 @@
|
|||||||
<input type="submit" value="<?php print_string('savechanges') ?>" />
|
<input type="submit" value="<?php print_string('savechanges') ?>" />
|
||||||
<input type="submit" name="cancel" value="<?php print_string('cancel') ?>" />
|
<input type="submit" name="cancel" value="<?php print_string('cancel') ?>" />
|
||||||
</center>
|
</center>
|
||||||
</form>
|
</form>
|
@ -258,7 +258,7 @@
|
|||||||
<br />
|
<br />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<?php print_standard_coursemodule_settings($form); ?>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<center>
|
<center>
|
||||||
|
@ -48,9 +48,9 @@ print_heading_with_help(get_string("furtherinformation", "dialogue"), "info", "d
|
|||||||
<td align="right"><p><b><?php print_string("deleteafter", "dialogue") ?>:</b></p></td>
|
<td align="right"><p><b><?php print_string("deleteafter", "dialogue") ?>:</b></p></td>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
require("$CFG->dirroot/mod/dialogue/lib.php");
|
require("$CFG->dirroot/mod/dialogue/lib.php");
|
||||||
choose_from_menu($DIALOGUE_DAYS, "deleteafter", $form->deleteafter, "");
|
choose_from_menu($DIALOGUE_DAYS, "deleteafter", $form->deleteafter, "");
|
||||||
helpbutton("deleteafter", get_string("deleteafter", "dialogue"), "dialogue");
|
helpbutton("deleteafter", get_string("deleteafter", "dialogue"), "dialogue");
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -91,7 +91,7 @@ print_heading_with_help(get_string("furtherinformation", "dialogue"), "info", "d
|
|||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<?php print_standard_coursemodule_settings($form); ?>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
<center>
|
<center>
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
require("$CFG->dirroot/mod/exercise/lib.php"); // for parameter arrays
|
require("$CFG->dirroot/mod/exercise/lib.php"); // for parameter arrays
|
||||||
// ...and fill the form if needed
|
// ...and fill the form if needed
|
||||||
if (empty($form->name)) {
|
if (empty($form->name)) {
|
||||||
$form->name = "";
|
$form->name = "";
|
||||||
}
|
}
|
||||||
if (!isset($form->gradingstrategy)) {
|
if (!isset($form->gradingstrategy)) {
|
||||||
$form->gradingstrategy = 1;
|
$form->gradingstrategy = 1;
|
||||||
}
|
}
|
||||||
if (empty($form->usemaximum)) {
|
if (empty($form->usemaximum)) {
|
||||||
$form->usemaximum = 0;
|
$form->usemaximum = 0;
|
||||||
}
|
}
|
||||||
@ -28,7 +28,7 @@
|
|||||||
if (empty($form->deadline)) {
|
if (empty($form->deadline)) {
|
||||||
$form->deadline = "";
|
$form->deadline = "";
|
||||||
}
|
}
|
||||||
if (!isset($form->usepassword)) {
|
if (!isset($form->usepassword)) {
|
||||||
$form->usepassword = 0;
|
$form->usepassword = 0;
|
||||||
}
|
}
|
||||||
if (empty($form->showleaguetable)) {
|
if (empty($form->showleaguetable)) {
|
||||||
@ -54,7 +54,7 @@
|
|||||||
<td align="right"><b><?php print_string("description", "exercise") ?>:</b></td>
|
<td align="right"><b><?php print_string("description", "exercise") ?>:</b></td>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
echo get_string("descriptionofexercise", "exercise", $course->students);
|
echo get_string("descriptionofexercise", "exercise", $course->students);
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -120,10 +120,10 @@
|
|||||||
<td align="right"><b><?php print_string("comparisonofassessments", "exercise") ?>:</b></td>
|
<td align="right"><b><?php print_string("comparisonofassessments", "exercise") ?>:</b></td>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
// set up comparison names
|
// set up comparison names
|
||||||
foreach ($EXERCISE_ASSESSMENT_COMPS as $KEY => $COMPARISON) {
|
foreach ($EXERCISE_ASSESSMENT_COMPS as $KEY => $COMPARISON) {
|
||||||
$COMPARISONS[] = $COMPARISON['name'];
|
$COMPARISONS[] = $COMPARISON['name'];
|
||||||
}
|
}
|
||||||
choose_from_menu($COMPARISONS, "assessmentcomps", $form->assessmentcomps, "");
|
choose_from_menu($COMPARISONS, "assessmentcomps", $form->assessmentcomps, "");
|
||||||
helpbutton("comparisonofassessments", get_string("comparisonofassessments", "exercise"), "exercise");
|
helpbutton("comparisonofassessments", get_string("comparisonofassessments", "exercise"), "exercise");
|
||||||
?>
|
?>
|
||||||
@ -135,7 +135,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
$options[0] = get_string("no"); $options[1] = get_string("yes");
|
$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", "exercise"), "exercise");
|
helpbutton("usepassword", get_string("usepassword", "exercise"), "exercise");
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
@ -145,7 +145,7 @@
|
|||||||
<td align="right"><b><?php print_string("password"); ?>:</b></td>
|
<td align="right"><b><?php print_string("password"); ?>:</b></td>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" name="password" size="10" value="" alt="<?php print_string("password"); ?>" /> <?php echo " (".get_string("leavetokeep").")"; ?>
|
<input type="text" name="password" size="10" value="" alt="<?php print_string("password"); ?>" /> <?php echo " (".get_string("leavetokeep").")"; ?>
|
||||||
<?php helpbutton("password", get_string("password"), "exercise"); ?>
|
<?php helpbutton("password", get_string("password"), "exercise"); ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
@ -208,7 +208,7 @@
|
|||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<?php print_standard_coursemodule_settings($form); ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
|
|
||||||
|
@ -266,6 +266,7 @@
|
|||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<?php print_standard_coursemodule_settings($form); ?>
|
||||||
</table>
|
</table>
|
||||||
<center>
|
<center>
|
||||||
<input type="hidden" name="course" value="<?php p($form->course) ?>" />
|
<input type="hidden" name="course" value="<?php p($form->course) ?>" />
|
||||||
|
@ -95,7 +95,7 @@ if (!isset($form->assesstimefinish)) {
|
|||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
<td align="right"><b><?php echo get_string("entbypage", "glossary") ?>:</b></td>
|
<td align="right"><b><?php echo get_string("entbypage", "glossary") ?>:</b></td>
|
||||||
<td align="left">
|
<td align="left">
|
||||||
<input name="entbypage" type="text" size="2" value="<?php p($form->entbypage) ?>" /> <?php helpbutton("entbypage", get_string("entbypage", "glossary"), "glossary") ?>
|
<input name="entbypage" type="text" size="2" value="<?php p($form->entbypage) ?>" /> <?php helpbutton("entbypage", get_string("entbypage", "glossary"), "glossary") ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
@ -147,7 +147,7 @@ if (!$mainglossary or $mainglossary->id == $form->instance ) {
|
|||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
} else {
|
} else {
|
||||||
echo "<input type=\"hidden\" name=\"mainglossary\" value=\"0\" />";
|
echo "<input type=\"hidden\" name=\"mainglossary\" value=\"0\" />";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
@ -498,6 +498,7 @@ if (!$mainglossary or $mainglossary->id == $form->instance ) {
|
|||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<?php print_visible_setting($form); ?>
|
||||||
</table>
|
</table>
|
||||||
<!-- These hidden variables are always the same -->
|
<!-- These hidden variables are always the same -->
|
||||||
<input type="hidden" name="course" value="<?php p($form->course) ?>" />
|
<input type="hidden" name="course" value="<?php p($form->course) ?>" />
|
||||||
|
@ -91,7 +91,7 @@
|
|||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<?php print_standard_coursemodule_settings($form); ?>
|
||||||
</table>
|
</table>
|
||||||
<center>
|
<center>
|
||||||
<input type="hidden" name="course" value="<?php p($form->course) ?>" />
|
<input type="hidden" name="course" value="<?php p($form->course) ?>" />
|
||||||
|
@ -4,13 +4,13 @@
|
|||||||
require_once("styles.php");
|
require_once("styles.php");
|
||||||
require("$CFG->dirroot/mod/lesson/locallib.php"); // for parameter array
|
require("$CFG->dirroot/mod/lesson/locallib.php"); // for parameter array
|
||||||
if ($form->mode == "add") {
|
if ($form->mode == "add") {
|
||||||
if ($defaults = get_record("lesson_default", "course", $form->course)) {
|
if ($defaults = get_record("lesson_default", "course", $form->course)) {
|
||||||
foreach ($defaults as $name => $value) {
|
foreach ($defaults as $name => $value) {
|
||||||
if (!is_numeric($name)) {
|
if (!is_numeric($name)) {
|
||||||
$form->$name = $value;
|
$form->$name = $value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// set the defaults
|
// set the defaults
|
||||||
@ -45,11 +45,11 @@ if ($form->mode == "add") {
|
|||||||
$form->available = 0;
|
$form->available = 0;
|
||||||
}
|
}
|
||||||
if (!isset($form->deadline)) {
|
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"]);
|
$form->deadline = gmmktime($currentdate["hours"], $currentdate["minutes"], $currentdate["seconds"], $currentdate["mon"]+1, $currentdate["mday"], $currentdate["year"]);
|
||||||
}
|
}
|
||||||
/// CDC-FLAG ///
|
/// CDC-FLAG ///
|
||||||
if (!isset($form->usepassword)) {
|
if (!isset($form->usepassword)) {
|
||||||
$form->usepassword = 0;
|
$form->usepassword = 0;
|
||||||
}
|
}
|
||||||
if (!isset($form->custom)) {
|
if (!isset($form->custom)) {
|
||||||
@ -79,32 +79,32 @@ if ($form->mode == "add") {
|
|||||||
if (!isset($form->bgcolor)) {
|
if (!isset($form->bgcolor)) {
|
||||||
$form->bgcolor = "#FFFFFF";
|
$form->bgcolor = "#FFFFFF";
|
||||||
}
|
}
|
||||||
if (!isset($form->displayleft)) {
|
if (!isset($form->displayleft)) {
|
||||||
$form->displayleft = 0;
|
$form->displayleft = 0;
|
||||||
}
|
}
|
||||||
if (!isset($form->highscores)) {
|
if (!isset($form->highscores)) {
|
||||||
$form->highscores = 0;
|
$form->highscores = 0;
|
||||||
}
|
}
|
||||||
if (!isset($form->maxhighscores)) {
|
if (!isset($form->maxhighscores)) {
|
||||||
$form->maxhighscores = 10;
|
$form->maxhighscores = 10;
|
||||||
}
|
}
|
||||||
if (!isset($form->practice)) {
|
if (!isset($form->practice)) {
|
||||||
$form->practice = 0;
|
$form->practice = 0;
|
||||||
}
|
}
|
||||||
if (!isset($form->review)) {
|
if (!isset($form->review)) {
|
||||||
$form->review = 0;
|
$form->review = 0;
|
||||||
}
|
}
|
||||||
if (!isset($form->lessondefault)) {
|
if (!isset($form->lessondefault)) {
|
||||||
$form->lessondefault = 0;
|
$form->lessondefault = 0;
|
||||||
}
|
}
|
||||||
if (!isset($form->modattempts)) {
|
if (!isset($form->modattempts)) {
|
||||||
$form->modattempts = 0;
|
$form->modattempts = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$form->deleteattempts = "";
|
$form->deleteattempts = "";
|
||||||
|
|
||||||
/// CDC-FLAG ///
|
/// CDC-FLAG ///
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<form name="form" method="post" action="<?php echo $ME ?>">
|
<form name="form" method="post" action="<?php echo $ME ?>">
|
||||||
@ -113,9 +113,9 @@ if ($form->mode == "add") {
|
|||||||
<table cellpadding="5">
|
<table cellpadding="5">
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<?php print_heading(get_string("general", "lesson"), "left", 4); ?>
|
<?php print_heading(get_string("general", "lesson"), "left", 4); ?>
|
||||||
</td><td></td>
|
</td><td></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
@ -129,9 +129,9 @@ if ($form->mode == "add") {
|
|||||||
<td align="right"><b><?php print_string("timed", "lesson"); ?>:</b></td>
|
<td align="right"><b><?php print_string("timed", "lesson"); ?>:</b></td>
|
||||||
<td>
|
<td>
|
||||||
<?PHP
|
<?PHP
|
||||||
$options = array();
|
$options = array();
|
||||||
$options[0] = get_string("no"); $options[1] = get_string("yes");
|
$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");
|
helpbutton("timed", get_string("timed", "lesson"), "lesson");
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
@ -141,7 +141,7 @@ if ($form->mode == "add") {
|
|||||||
<td align="right"><b><?php print_string("maxtime", "lesson"); ?>:</b></td>
|
<td align="right"><b><?php print_string("maxtime", "lesson"); ?>:</b></td>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" name="maxtime" maxlength="7" size="7" value="<?php p($form->maxtime) ?>" />
|
<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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
@ -149,7 +149,7 @@ if ($form->mode == "add") {
|
|||||||
<td align="right"><b><?php print_string("maximumnumberofanswersbranches", "lesson") ?>:</b></td>
|
<td align="right"><b><?php print_string("maximumnumberofanswersbranches", "lesson") ?>:</b></td>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
$numbers = array();
|
$numbers = array();
|
||||||
for ($i=20; $i>1; $i--) {
|
for ($i=20; $i>1; $i--) {
|
||||||
$numbers[$i] = $i;
|
$numbers[$i] = $i;
|
||||||
}
|
}
|
||||||
@ -160,18 +160,18 @@ if ($form->mode == "add") {
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<br/><?php print_heading(get_string("gradeoptions", "lesson"), "left", 4); ?>
|
<br/><?php print_heading(get_string("gradeoptions", "lesson"), "left", 4); ?>
|
||||||
</td><td></td>
|
</td><td></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td align="right"><b><?php print_string("practice", "lesson"); ?>:</b></td>
|
<td align="right"><b><?php print_string("practice", "lesson"); ?>:</b></td>
|
||||||
<td>
|
<td>
|
||||||
<?PHP
|
<?PHP
|
||||||
$options = array();
|
$options = array();
|
||||||
$options[0] = get_string("no"); $options[1] = get_string("yes");
|
$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");
|
helpbutton("practice", get_string("practice", "lesson"), "lesson");
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
@ -181,9 +181,9 @@ if ($form->mode == "add") {
|
|||||||
<td align="right"><b><?php print_string("customscoring", "lesson"); ?>:</b></td>
|
<td align="right"><b><?php print_string("customscoring", "lesson"); ?>:</b></td>
|
||||||
<td>
|
<td>
|
||||||
<?PHP
|
<?PHP
|
||||||
$options = array();
|
$options = array();
|
||||||
$options[0] = get_string("no"); $options[1] = get_string("yes");
|
$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");
|
helpbutton("custom", get_string("customscoring", "lesson"), "lesson");
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
@ -193,7 +193,7 @@ if ($form->mode == "add") {
|
|||||||
<td align="right"><b><?php print_string("maximumgrade") ?>:</b></td>
|
<td align="right"><b><?php print_string("maximumgrade") ?>:</b></td>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
$grades = array();
|
$grades = array();
|
||||||
for ($i=100; $i>=0; $i--) {
|
for ($i=100; $i>=0; $i--) {
|
||||||
$grades[$i] = $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 align="right"><b><?php print_string("canretake", "lesson", $course->student) ?>:</b></td>
|
||||||
<td>
|
<td>
|
||||||
<?PHP
|
<?PHP
|
||||||
$options = array();
|
$options = array();
|
||||||
$options[0] = get_string("no"); $options[1] = get_string("yes");
|
$options[0] = get_string("no"); $options[1] = get_string("yes");
|
||||||
choose_from_menu($options, "retake", $form->retake, "");
|
choose_from_menu($options, "retake", $form->retake, "");
|
||||||
helpbutton("retake", get_string("canretake", "lesson", $course->student), "lesson");
|
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 align="right"><b><?php print_string("handlingofretakes", "lesson") ?>:</b></td>
|
||||||
<td>
|
<td>
|
||||||
<?PHP
|
<?PHP
|
||||||
$options = array();
|
$options = array();
|
||||||
$options[0] = get_string("usemean", "lesson"); $options[1] = get_string("usemaximum", "lesson");
|
$options[0] = get_string("usemean", "lesson"); $options[1] = get_string("usemaximum", "lesson");
|
||||||
choose_from_menu($options, "usemaxgrade", $form->usemaxgrade, "");
|
choose_from_menu($options, "usemaxgrade", $form->usemaxgrade, "");
|
||||||
helpbutton("handlingofretakes", get_string("handlingofretakes", "lesson"), "lesson");
|
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 align="right"><b><?php print_string("ongoing", "lesson"); ?>:</b></td>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
$options = array();
|
$options = array();
|
||||||
$options[0] = get_string("no"); $options[1] = get_string("yes");
|
$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");
|
helpbutton("ongoing", get_string("ongoing", "lesson"), "lesson");
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<br/><?php print_heading(get_string("flowcontrol", "lesson"), "left", 4); ?>
|
<br/><?php print_heading(get_string("flowcontrol", "lesson"), "left", 4); ?>
|
||||||
</td><td></td>
|
</td><td></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td align="right"><b><?php print_string("modattempts", "lesson"); ?>:</b></td>
|
<td align="right"><b><?php print_string("modattempts", "lesson"); ?>:</b></td>
|
||||||
<td>
|
<td>
|
||||||
<?PHP
|
<?PHP
|
||||||
$options = array();
|
$options = array();
|
||||||
$options[0] = get_string("no"); $options[1] = get_string("yes");
|
$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");
|
helpbutton("modattempts", get_string("modattempts", "lesson"), "lesson");
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
@ -261,9 +261,9 @@ if ($form->mode == "add") {
|
|||||||
<td align="right"><b><?php print_string("displayreview", "lesson"); ?>:</b></td>
|
<td align="right"><b><?php print_string("displayreview", "lesson"); ?>:</b></td>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
$options = array();
|
$options = array();
|
||||||
$options[0] = get_string("no"); $options[1] = get_string("yes");
|
$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");
|
helpbutton("review", get_string("displayreview", "lesson"), "lesson");
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
@ -322,18 +322,18 @@ if ($form->mode == "add") {
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<br/><?php print_heading(get_string("lessonformating", "lesson"), "left", 4); ?>
|
<br/><?php print_heading(get_string("lessonformating", "lesson"), "left", 4); ?>
|
||||||
</td><td></td>
|
</td><td></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td align="right"><b><?php print_string("slideshow", "lesson"); ?>:</b></td>
|
<td align="right"><b><?php print_string("slideshow", "lesson"); ?>:</b></td>
|
||||||
<td>
|
<td>
|
||||||
<?PHP
|
<?PHP
|
||||||
$options = array();
|
$options = array();
|
||||||
$options[0] = get_string("no"); $options[1] = get_string("yes");
|
$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");
|
helpbutton("slideshow", get_string("slideshow", "lesson"), "lesson");
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
@ -343,7 +343,7 @@ if ($form->mode == "add") {
|
|||||||
<td align="right"><b><?php print_string("slideshowwidth", "lesson"); ?>:</b></td>
|
<td align="right"><b><?php print_string("slideshowwidth", "lesson"); ?>:</b></td>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" name="width" maxlength="7" size="7" value="<?php p($form->width) ?>" />px
|
<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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
@ -351,7 +351,7 @@ if ($form->mode == "add") {
|
|||||||
<td align="right"><b><?php print_string("slideshowheight", "lesson"); ?>:</b></td>
|
<td align="right"><b><?php print_string("slideshowheight", "lesson"); ?>:</b></td>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" name="height" maxlength="7" size="7" value="<?php p($form->height) ?>" />px
|
<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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
@ -359,7 +359,7 @@ if ($form->mode == "add") {
|
|||||||
<td align="right"><b><?php print_string("slideshowbgcolor", "lesson"); ?>:</b></td>
|
<td align="right"><b><?php print_string("slideshowbgcolor", "lesson"); ?>:</b></td>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" name="bgcolor" maxlength="7" size="7" value="<?php p($form->bgcolor) ?>" />
|
<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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -368,27 +368,27 @@ if ($form->mode == "add") {
|
|||||||
<td align="right"><b><?php print_string("displayleftmenu", "lesson"); ?>:</b></td>
|
<td align="right"><b><?php print_string("displayleftmenu", "lesson"); ?>:</b></td>
|
||||||
<td>
|
<td>
|
||||||
<?PHP
|
<?PHP
|
||||||
$options = array();
|
$options = array();
|
||||||
$options[0] = get_string("no"); $options[1] = get_string("yes");
|
$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");
|
helpbutton("displayleft", get_string("displayleftmenu", "lesson"), "lesson");
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<br/><?php print_heading(get_string("accesscontrol", "lesson"), "left", 4); ?>
|
<br/><?php print_heading(get_string("accesscontrol", "lesson"), "left", 4); ?>
|
||||||
</td><td></td>
|
</td><td></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td align="right"><b><?php print_string("usepassword", "lesson"); ?>:</b></td>
|
<td align="right"><b><?php print_string("usepassword", "lesson"); ?>:</b></td>
|
||||||
<td>
|
<td>
|
||||||
<?PHP
|
<?PHP
|
||||||
$options = array();
|
$options = array();
|
||||||
$options[0] = get_string("no"); $options[1] = get_string("yes");
|
$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");
|
helpbutton("usepassword", get_string("usepassword", "lesson"), "lesson");
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
@ -398,7 +398,7 @@ if ($form->mode == "add") {
|
|||||||
<td align="right"><b><?php print_string("password", "lesson"); ?>:</b></td>
|
<td align="right"><b><?php print_string("password", "lesson"); ?>:</b></td>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" name="password" size="7" value="" /> <?php echo " (".get_string("leavetokeep").")"; ?>
|
<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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
@ -416,23 +416,23 @@ if ($form->mode == "add") {
|
|||||||
<td><?php
|
<td><?php
|
||||||
print_date_selector("deadlineday", "deadlinemonth", "deadlineyear", $form->deadline);
|
print_date_selector("deadlineday", "deadlinemonth", "deadlineyear", $form->deadline);
|
||||||
echo " - ";
|
echo " - ";
|
||||||
print_time_selector("deadlinehour", "deadlineminute", $form->deadline);
|
print_time_selector("deadlinehour", "deadlineminute", $form->deadline);
|
||||||
?></td>
|
?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<br/><?php print_heading(get_string("other", "lesson"), "left", 4); ?>
|
<br/><?php print_heading(get_string("other", "lesson"), "left", 4); ?>
|
||||||
</td><td></td>
|
</td><td></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td align="right"><b><?php print_string("treeview", "lesson"); ?>:</b></td>
|
<td align="right"><b><?php print_string("treeview", "lesson"); ?>:</b></td>
|
||||||
<td>
|
<td>
|
||||||
<?PHP
|
<?PHP
|
||||||
$options = array();
|
$options = array();
|
||||||
$options[0] = get_string("no"); $options[1] = get_string("yes");
|
$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");
|
helpbutton("tree", get_string("treeview", "lesson"), "lesson");
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
@ -442,9 +442,9 @@ if ($form->mode == "add") {
|
|||||||
<td align="right"><b><?php print_string("displayhighscores", "lesson"); ?>:</b></td>
|
<td align="right"><b><?php print_string("displayhighscores", "lesson"); ?>:</b></td>
|
||||||
<td>
|
<td>
|
||||||
<?PHP
|
<?PHP
|
||||||
$options = array();
|
$options = array();
|
||||||
$options[0] = get_string("no"); $options[1] = get_string("yes");
|
$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");
|
helpbutton("highscores", get_string("displayhighscores", "lesson"), "lesson");
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
@ -454,7 +454,7 @@ if ($form->mode == "add") {
|
|||||||
<td align="right"><b><?php print_string("maxhighscores", "lesson"); ?>:</b></td>
|
<td align="right"><b><?php print_string("maxhighscores", "lesson"); ?>:</b></td>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" name="maxhighscores" maxlength="7" size="7" value="<?php p($form->maxhighscores) ?>" />
|
<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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
@ -462,28 +462,28 @@ if ($form->mode == "add") {
|
|||||||
<td align="right"><b><?php print_string("lessondefault", "lesson"); ?>:</b></td>
|
<td align="right"><b><?php print_string("lessondefault", "lesson"); ?>:</b></td>
|
||||||
<td>
|
<td>
|
||||||
<?PHP
|
<?PHP
|
||||||
$options = array();
|
$options = array();
|
||||||
$options[0] = get_string("no"); $options[1] = get_string("yes");
|
$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");
|
helpbutton("lessondefault", get_string("lessondefault", "lesson"), "lesson");
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
if ($form->mode != "add") {
|
if ($form->mode != "add") {
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="right"><b><?php print_string("deleteattempts", "lesson"); ?>:</b></td>
|
<td align="right"><b><?php print_string("deleteattempts", "lesson"); ?>:</b></td>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" name="deleteattempts" size="7" value="" />
|
<input type="text" name="deleteattempts" size="7" value="" />
|
||||||
<?php helpbutton("deleteattempts", get_string("deleteattempts", "lesson"), "lesson"); ?>
|
<?php helpbutton("deleteattempts", get_string("deleteattempts", "lesson"), "lesson"); ?>
|
||||||
<input type="hidden" name="deleteattemptsid" value="<?php echo $USER->id; ?>" />
|
<input type="hidden" name="deleteattemptsid" value="<?php echo $USER->id; ?>" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
} // end if statement if ($form->mode != "add") {
|
} // end if statement if ($form->mode != "add") {
|
||||||
?>
|
?>
|
||||||
|
<?php print_visible_setting($form); ?>
|
||||||
</table>
|
</table>
|
||||||
<!-- These hidden variables are always the same -->
|
<!-- These hidden variables are always the same -->
|
||||||
<input type="hidden" name="course" value="<?php p($form->course) ?>" />
|
<input type="hidden" name="course" value="<?php p($form->course) ?>" />
|
||||||
|
@ -351,7 +351,7 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
<?php print_standard_coursemodule_settings($form); ?>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,4 +13,4 @@
|
|||||||
<p><?php print_string("directoryinfo", "resource") ?></p>
|
<p><?php print_string("directoryinfo", "resource") ?></p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<?php print_visible_setting($form); ?>
|
||||||
|
@ -193,4 +193,4 @@ for ($i=0; $i < $this->maxparameters; $i++) {
|
|||||||
|
|
||||||
</td></tr>
|
</td></tr>
|
||||||
|
|
||||||
|
<?php print_visible_setting($form); ?>
|
||||||
|
@ -121,3 +121,4 @@
|
|||||||
|
|
||||||
</td></tr>
|
</td></tr>
|
||||||
|
|
||||||
|
<?php print_visible_setting($form); ?>
|
@ -135,5 +135,5 @@
|
|||||||
|
|
||||||
</td></tr>
|
</td></tr>
|
||||||
|
|
||||||
|
<?php print_visible_setting($form); ?>
|
||||||
|
|
||||||
|
@ -1,76 +1,77 @@
|
|||||||
<?php
|
<?php
|
||||||
if (empty($form->name)) {
|
if (empty($form->name)) {
|
||||||
$form->name = "";
|
$form->name = "";
|
||||||
}
|
}
|
||||||
if (empty($form->reference)) {
|
if (empty($form->reference)) {
|
||||||
$form->reference = "";
|
$form->reference = "";
|
||||||
}
|
}
|
||||||
if (empty($form->summary)) {
|
if (empty($form->summary)) {
|
||||||
$form->summary = "";
|
$form->summary = "";
|
||||||
}
|
}
|
||||||
if (empty($form->launch)) {
|
if (empty($form->launch)) {
|
||||||
$form->launch = "";
|
$form->launch = "";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
<form name="form" method="post" action="<?php echo $CFG->wwwroot ?>/mod/scorm/details.php">
|
<form name="form" method="post" action="<?php echo $CFG->wwwroot ?>/mod/scorm/details.php">
|
||||||
<table cellpadding="5">
|
<table cellpadding="5">
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
<td align="right"><b><?php print_string("name") ?>:</b></td>
|
<td align="right"><b><?php print_string("name") ?>:</b></td>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" name="name" size="50" value="<?php p($form->name) ?>" alt="<?php print_string("name") ?>" />
|
<input type="text" name="name" size="50" value="<?php p($form->name) ?>" alt="<?php print_string("name") ?>" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
$strfilename = get_string("coursepacket", "scorm");
|
$strfilename = get_string("coursepacket", "scorm");
|
||||||
$strchooseafile = get_string("chooseapacket", "scorm");
|
$strchooseafile = get_string("chooseapacket", "scorm");
|
||||||
?>
|
?>
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
<td align="right" nowrap="nowrap">
|
<td align="right" nowrap="nowrap">
|
||||||
<b><?php echo $strfilename?>:</b>
|
<b><?php echo $strfilename?>:</b>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
echo "<input name=\"reference\" size=\"50\" value=\"$form->reference\" alt=\"$strfilename\" /> ";
|
echo "<input name=\"reference\" size=\"50\" value=\"$form->reference\" alt=\"$strfilename\" /> ";
|
||||||
button_to_popup_window ("/files/index.php?id=$course->id&choose=form.reference",
|
button_to_popup_window ("/files/index.php?id=$course->id&choose=form.reference",
|
||||||
"coursefiles", $strchooseafile, 500, 750, $strchooseafile);
|
"coursefiles", $strchooseafile, 500, 750, $strchooseafile);
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
<td align="right"><b><?php print_string("summary") ?>:</b><br />
|
<td align="right"><b><?php print_string("summary") ?>:</b><br />
|
||||||
<font size="1">
|
<font size="1">
|
||||||
<?php
|
<?php
|
||||||
helpbutton("summary", get_string("summary"), "scorm", true, true);
|
helpbutton("summary", get_string("summary"), "scorm", true, true);
|
||||||
echo "<br />";
|
echo "<br />";
|
||||||
helpbutton("writing", get_string("helpwriting"), "moodle", true, true);
|
helpbutton("writing", get_string("helpwriting"), "moodle", true, true);
|
||||||
echo "<br />";
|
echo "<br />";
|
||||||
helpbutton("text", get_string("helptext"), "moodle", true, true);
|
helpbutton("text", get_string("helptext"), "moodle", true, true);
|
||||||
?>
|
?>
|
||||||
</font>
|
</font>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<?php print_textarea($usehtmleditor, 20, 50, 680, 400, "summary", $form->summary); ?>
|
<?php print_textarea($usehtmleditor, 20, 50, 680, 400, "summary", $form->summary); ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<?php print_visible_setting($form); ?>
|
||||||
</table>
|
</table>
|
||||||
<input type="hidden" name="course" value="<?php p($form->course) ?>" />
|
<input type="hidden" name="course" value="<?php p($form->course) ?>" />
|
||||||
<input type="hidden" name="sesskey" value="<?php p($form->sesskey) ?>" />
|
<input type="hidden" name="sesskey" value="<?php p($form->sesskey) ?>" />
|
||||||
<input type="hidden" name="coursemodule" value="<?php p($form->coursemodule) ?>" />
|
<input type="hidden" name="coursemodule" value="<?php p($form->coursemodule) ?>" />
|
||||||
<input type="hidden" name="datadir" value="<?php p($form->datadir) ?>" />
|
<input type="hidden" name="datadir" value="<?php p($form->datadir) ?>" />
|
||||||
<input type="hidden" name="launch" value="<?php p($form->launch) ?>" />
|
<input type="hidden" name="launch" value="<?php p($form->launch) ?>" />
|
||||||
<input type="hidden" name="popup" value="<?php p($form->popup) ?>" />
|
<input type="hidden" name="popup" value="<?php p($form->popup) ?>" />
|
||||||
<input type="hidden" name="auto" value="<?php p($form->auto) ?>" />
|
<input type="hidden" name="auto" value="<?php p($form->auto) ?>" />
|
||||||
<input type="hidden" name="maxgrade" value="<?php p($form->maxgrade) ?>" />
|
<input type="hidden" name="maxgrade" value="<?php p($form->maxgrade) ?>" />
|
||||||
<input type="hidden" name="grademethod" value="<?php p($form->grademethod) ?>" />
|
<input type="hidden" name="grademethod" value="<?php p($form->grademethod) ?>" />
|
||||||
<input type="hidden" name="section" value="<?php p($form->section) ?>" />
|
<input type="hidden" name="section" value="<?php p($form->section) ?>" />
|
||||||
<input type="hidden" name="module" value="<?php p($form->module) ?>" />
|
<input type="hidden" name="module" value="<?php p($form->module) ?>" />
|
||||||
<input type="hidden" name="modulename" value="<?php p($form->modulename) ?>" />
|
<input type="hidden" name="modulename" value="<?php p($form->modulename) ?>" />
|
||||||
<input type="hidden" name="instance" value="<?php p($form->instance) ?>" />
|
<input type="hidden" name="instance" value="<?php p($form->instance) ?>" />
|
||||||
<input type="hidden" name="mode" value="<?php p($form->mode) ?>" />
|
<input type="hidden" name="mode" value="<?php p($form->mode) ?>" />
|
||||||
<input type="hidden" name="destination" value="<?php echo $ME ?>" />
|
<input type="hidden" name="destination" value="<?php echo $ME ?>" />
|
||||||
<center>
|
<center>
|
||||||
<input type="submit" value="<?php print_string("continue") ?>" />
|
<input type="submit" value="<?php print_string("continue") ?>" />
|
||||||
</center>
|
</center>
|
||||||
</form>
|
</form>
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<?php print_standard_coursemodule_setting($form); ?>
|
||||||
</table>
|
</table>
|
||||||
<center>
|
<center>
|
||||||
<input type="hidden" name="intro" value="<?php p($form->intro) ?>" />
|
<input type="hidden" name="intro" value="<?php p($form->intro) ?>" />
|
||||||
|
@ -203,7 +203,7 @@
|
|||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<?php print_visible_setting($form); ?>
|
||||||
</table>
|
</table>
|
||||||
<!-- These hidden variables are always the same -->
|
<!-- These hidden variables are always the same -->
|
||||||
<input type="hidden" name="course" value="<?php p($form->course) ?>" />
|
<input type="hidden" name="course" value="<?php p($form->course) ?>" />
|
||||||
|
@ -419,7 +419,7 @@
|
|||||||
helpbutton("releasegrades", get_string("releaseteachergrades", "workshop"), "workshop");
|
helpbutton("releasegrades", get_string("releaseteachergrades", "workshop"), "workshop");
|
||||||
?></td>
|
?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<?php print_visible_setting($form); ?>
|
||||||
</table>
|
</table>
|
||||||
<br />
|
<br />
|
||||||
<center>
|
<center>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user