2004-09-12 12:21:27 +00:00
|
|
|
<?php
|
2004-01-25 19:37:04 +00:00
|
|
|
// Make sure all variables are defined
|
|
|
|
if (!isset($form->showreports)) {
|
|
|
|
$form->showreports = 0;
|
|
|
|
}
|
|
|
|
if (!isset($form->maxbytes)) {
|
|
|
|
$form->maxbytes = 0;
|
|
|
|
}
|
2004-05-08 18:56:45 +00:00
|
|
|
if (!isset($form->hiddensections)) {
|
|
|
|
$form->hiddensections = 0;
|
|
|
|
}
|
|
|
|
if (!isset($form->lang)) {
|
|
|
|
$form->lang = '';
|
|
|
|
}
|
2004-07-29 14:47:05 +00:00
|
|
|
if (!isset($form->enrolperiod)) {
|
|
|
|
$form->enrolperiod = 0;
|
|
|
|
}
|
2004-01-25 19:37:04 +00:00
|
|
|
?>
|
2004-09-12 12:21:27 +00:00
|
|
|
<form method="post" action="edit.php" name="form">
|
|
|
|
<table cellpadding="9" cellspacing="0" >
|
|
|
|
<tr valign="top">
|
2004-12-09 08:01:25 +00:00
|
|
|
<td align="right"><?php print_string("category") ?>:</td>
|
2004-04-29 10:28:58 +00:00
|
|
|
<td><?php
|
2003-08-07 16:01:31 +00:00
|
|
|
$displaylist = array();
|
|
|
|
$parentlist = array();
|
|
|
|
make_categories_list($displaylist, $parentlist);
|
|
|
|
choose_from_menu($displaylist, "category", "$form->category", "");
|
|
|
|
helpbutton("coursecategory", get_string("category"));
|
|
|
|
?>
|
2004-01-25 19:37:04 +00:00
|
|
|
</td>
|
2003-08-07 16:01:31 +00:00
|
|
|
</tr>
|
2004-09-12 12:21:27 +00:00
|
|
|
<tr valign="top">
|
2004-12-09 08:01:25 +00:00
|
|
|
<td align="right"><?php print_string("fullname") ?>:</td>
|
|
|
|
<td><input type="text" name="fullname" maxlength="254" size="50" value="<?php p($form->fullname) ?>" alt="<?php print_string("fullname") ?>" />
|
2003-09-09 08:38:24 +00:00
|
|
|
<?php helpbutton("coursefullname", get_string("fullname")) ?>
|
|
|
|
<?php if (isset($err["fullname"])) formerr($err["fullname"]); ?>
|
2004-01-25 19:37:04 +00:00
|
|
|
</td>
|
2001-11-22 06:23:56 +00:00
|
|
|
</tr>
|
2004-09-12 12:21:27 +00:00
|
|
|
<tr valign="top">
|
2004-12-09 08:01:25 +00:00
|
|
|
<td align="right"><?php print_string("shortname") ?>:</td>
|
|
|
|
<td><input type="text" name="shortname" maxlength="15" size="10" value="<?php p($form->shortname) ?>" alt="<?php print_string("shortname") ?>" />
|
2003-09-09 08:38:24 +00:00
|
|
|
<?php helpbutton("courseshortname", get_string("shortname")) ?>
|
|
|
|
<?php if (isset($err["shortname"])) formerr($err["shortname"]); ?>
|
2004-01-25 19:37:04 +00:00
|
|
|
</td>
|
2001-11-22 06:23:56 +00:00
|
|
|
</tr>
|
2004-09-12 12:21:27 +00:00
|
|
|
<tr valign="top">
|
2004-12-09 08:01:25 +00:00
|
|
|
<td align="right"><?php print_string("idnumber") ?>:</td>
|
|
|
|
<td><input type="text" name="idnumber" maxlength="100" size="10" value="<?php p($form->idnumber) ?>" alt="><?php print_string("idnumber") ?>" />
|
2004-06-24 11:50:33 +00:00
|
|
|
<?php helpbutton("courseidnumber", get_string("idnumber")) ?>
|
|
|
|
<?php if (isset($err["idnumber"])) formerr($err["idnumber"]); ?>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2004-09-12 12:21:27 +00:00
|
|
|
<tr valign="top">
|
2004-12-09 08:01:25 +00:00
|
|
|
<td align="right"><?php print_string("summary") ?>:</td>
|
2004-04-29 10:28:58 +00:00
|
|
|
<td><?php
|
2003-12-30 17:18:06 +00:00
|
|
|
print_textarea($usehtmleditor, 10, 50, 660, 200, "summary", $form->summary);
|
|
|
|
helpbutton("text", get_string("helptext"));
|
2004-04-29 10:28:58 +00:00
|
|
|
if (isset($err["summary"])) formerr($err["summary"]);
|
2003-12-30 17:18:06 +00:00
|
|
|
?>
|
2004-01-25 19:37:04 +00:00
|
|
|
</td>
|
2003-12-30 17:18:06 +00:00
|
|
|
</tr>
|
2004-09-12 12:21:27 +00:00
|
|
|
<tr valign="top">
|
2004-12-09 08:01:25 +00:00
|
|
|
<td align="right"><?php print_string("format") ?>:</td>
|
2004-04-29 10:28:58 +00:00
|
|
|
<td><?php
|
2003-12-30 17:18:06 +00:00
|
|
|
choose_from_menu ($form->courseformats, "format", "$form->format", "");
|
|
|
|
helpbutton("courseformats", get_string("courseformats"));
|
|
|
|
?>
|
2004-01-25 19:37:04 +00:00
|
|
|
</td>
|
2003-12-30 17:18:06 +00:00
|
|
|
</tr>
|
2004-09-12 12:21:27 +00:00
|
|
|
<tr valign="top">
|
2004-12-09 08:01:25 +00:00
|
|
|
<td align="right"><?php print_string("startdate") ?>:</td>
|
2004-01-25 19:37:04 +00:00
|
|
|
<td><?php
|
2003-12-30 17:18:06 +00:00
|
|
|
print_date_selector("startday", "startmonth", "startyear", $form->startdate);
|
|
|
|
helpbutton("coursestartdate", get_string("startdate"));
|
2004-01-25 19:37:04 +00:00
|
|
|
?></td>
|
2003-12-30 17:18:06 +00:00
|
|
|
</tr>
|
2004-09-12 12:21:27 +00:00
|
|
|
<tr valign="top">
|
2004-12-09 08:01:25 +00:00
|
|
|
<td align="right"><?php print_string("enrolperiod") ?>:</td>
|
2004-07-29 14:47:05 +00:00
|
|
|
<td>
|
|
|
|
<?php
|
|
|
|
$periodmenu[0] = get_string('unlimited');
|
|
|
|
for ($i=1; $i<=365; $i++) {
|
|
|
|
$seconds = $i * 86400;
|
|
|
|
$periodmenu[$seconds] = get_string('numdays', '', $i);
|
|
|
|
}
|
|
|
|
choose_from_menu ($periodmenu, "enrolperiod", "$form->enrolperiod", "");
|
|
|
|
helpbutton("enrolperiod", get_string("enrolperiod"));
|
|
|
|
?>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2004-09-12 12:21:27 +00:00
|
|
|
<tr valign="top">
|
2004-12-09 08:01:25 +00:00
|
|
|
<td align="right"><?php print_string("numberweeks") ?>:</td>
|
2004-01-25 19:37:04 +00:00
|
|
|
<td><?php
|
2003-12-30 17:18:06 +00:00
|
|
|
for ($i=1; $i<=52; $i++) {
|
|
|
|
$sectionmenu[$i] = "$i";
|
|
|
|
}
|
|
|
|
choose_from_menu ($sectionmenu, "numsections", "$form->numsections", "");
|
|
|
|
helpbutton("coursenumsections", get_string("numberweeks"));
|
2004-01-25 19:37:04 +00:00
|
|
|
?></td>
|
2003-12-30 17:18:06 +00:00
|
|
|
</tr>
|
2004-09-12 12:21:27 +00:00
|
|
|
<tr valign="top">
|
2004-12-09 08:01:25 +00:00
|
|
|
<td align="right"><?php print_string("groupmode") ?>:</td>
|
2004-01-25 19:37:04 +00:00
|
|
|
<td><?php
|
2003-12-30 17:18:06 +00:00
|
|
|
unset($choices);
|
|
|
|
$choices[NOGROUPS] = get_string("groupsnone");
|
|
|
|
$choices[SEPARATEGROUPS] = get_string("groupsseparate");
|
|
|
|
$choices[VISIBLEGROUPS] = get_string("groupsvisible");
|
|
|
|
choose_from_menu ($choices, "groupmode", $form->groupmode, "");
|
|
|
|
helpbutton("groupmode", get_string("groupmode"));
|
|
|
|
|
|
|
|
echo ' ';
|
|
|
|
print_string('force');
|
|
|
|
echo ': ';
|
|
|
|
unset($choices);
|
|
|
|
$choices["0"] = get_string("no");
|
|
|
|
$choices["1"] = get_string("yes");
|
|
|
|
choose_from_menu ($choices, "groupmodeforce", $form->groupmodeforce, "");
|
|
|
|
helpbutton("groupmodeforce", get_string("groupmodeforce")); ?>
|
2004-01-25 19:37:04 +00:00
|
|
|
</td>
|
2002-06-09 14:14:07 +00:00
|
|
|
</tr>
|
2004-09-12 12:21:27 +00:00
|
|
|
<tr valign="top">
|
2004-12-09 08:01:25 +00:00
|
|
|
<td align="right"><?php print_string("availability") ?>:</td>
|
2004-01-25 19:37:04 +00:00
|
|
|
<td><?php
|
2003-07-21 07:31:01 +00:00
|
|
|
unset($choices);
|
|
|
|
$choices["0"] = get_string("courseavailablenot");
|
|
|
|
$choices["1"] = get_string("courseavailable");
|
|
|
|
choose_from_menu ($choices, "visible", $form->visible, "");
|
|
|
|
helpbutton("courseavailability", get_string("availability")); ?>
|
2004-01-25 19:37:04 +00:00
|
|
|
</td>
|
2003-07-21 07:31:01 +00:00
|
|
|
</tr>
|
2004-09-12 12:21:27 +00:00
|
|
|
<tr valign="top">
|
2004-12-09 08:01:25 +00:00
|
|
|
<td align="right"><?php print_string("enrolmentkey") ?>:</td>
|
|
|
|
<td><input type="text" name="password" size="25" value="<?php p($form->password) ?>" alt="<?php print_string("enrolmentkey") ?>" />
|
2003-09-09 08:38:24 +00:00
|
|
|
<?php helpbutton("enrolmentkey", get_string("enrolmentkey")) ?>
|
|
|
|
<?php if (isset($err["password"])) formerr($err["password"]); ?>
|
2004-01-25 19:37:04 +00:00
|
|
|
</td>
|
2001-11-22 06:23:56 +00:00
|
|
|
</tr>
|
2004-09-12 12:21:27 +00:00
|
|
|
<tr valign="top">
|
2004-12-09 08:01:25 +00:00
|
|
|
<td align="right"><?php print_string("opentoguests") ?>:</td>
|
2004-01-25 19:37:04 +00:00
|
|
|
<td><?php
|
2003-07-21 07:31:01 +00:00
|
|
|
unset($choices);
|
2002-07-19 12:01:35 +00:00
|
|
|
$choices["0"] = get_string("guestsno");
|
|
|
|
$choices["1"] = get_string("guestsyes");
|
2002-08-21 12:54:27 +00:00
|
|
|
$choices["2"] = get_string("guestskey");
|
2002-08-17 14:44:45 +00:00
|
|
|
choose_from_menu ($choices, "guest", $form->guest, "");
|
|
|
|
helpbutton("guestaccess", get_string("opentoguests")); ?>
|
2004-01-25 19:37:04 +00:00
|
|
|
</td>
|
2001-11-22 06:23:56 +00:00
|
|
|
</tr>
|
2004-07-06 16:01:07 +00:00
|
|
|
<?php
|
2004-07-28 06:27:10 +00:00
|
|
|
if ($CFG->enrol != 'internal') {
|
2004-07-06 16:01:07 +00:00
|
|
|
?>
|
2004-09-12 12:21:27 +00:00
|
|
|
<tr valign="top">
|
2004-12-09 08:01:25 +00:00
|
|
|
<td align="right"><?php print_string("cost") ?>:</td>
|
|
|
|
<td><input type="text" name="cost" maxlength="6" size="6" value="<?php p($form->cost) ?>" alt="<?php print_string("cost") ?>" />
|
2004-07-06 16:01:07 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
?>
|
2004-09-12 12:21:27 +00:00
|
|
|
<tr valign="top">
|
2004-12-09 08:01:25 +00:00
|
|
|
<td align="right"><?php print_string("hiddensections") ?>:</td>
|
2004-05-10 16:29:27 +00:00
|
|
|
<td><?php
|
|
|
|
unset($choices);
|
|
|
|
$choices["0"] = get_string("hiddensectionscollapsed");
|
|
|
|
$choices["1"] = get_string("hiddensectionsinvisible");
|
|
|
|
choose_from_menu ($choices, "hiddensections", $form->hiddensections, "");
|
|
|
|
helpbutton("coursehiddensections", get_string("hiddensections")); ?>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2004-09-12 12:21:27 +00:00
|
|
|
<tr valign="top">
|
2004-12-09 08:01:25 +00:00
|
|
|
<td align="right"><?php print_string("newsitemsnumber") ?>:</td>
|
2004-04-29 10:28:58 +00:00
|
|
|
<td><?php
|
2002-07-19 12:01:35 +00:00
|
|
|
$newsitem = get_string("newsitem");
|
|
|
|
$newsitems = get_string("newsitems");
|
|
|
|
|
|
|
|
$options = array("0" => "0 $newsitems",
|
|
|
|
"1" => "1 $newsitem",
|
|
|
|
"2" => "2 $newsitems",
|
|
|
|
"3" => "3 $newsitems",
|
|
|
|
"4" => "4 $newsitems",
|
|
|
|
"5" => "5 $newsitems",
|
|
|
|
"6" => "6 $newsitems",
|
|
|
|
"7" => "7 $newsitems",
|
|
|
|
"8" => "8 $newsitems",
|
|
|
|
"9" => "9 $newsitems",
|
|
|
|
"10" => "10 $newsitems");
|
2002-08-11 15:41:54 +00:00
|
|
|
choose_from_menu ($options, "newsitems", "$form->newsitems", "");
|
2002-08-17 14:44:45 +00:00
|
|
|
helpbutton("coursenewsitems", get_string("newsitemsnumber"));
|
2002-06-25 11:49:06 +00:00
|
|
|
?>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2004-09-12 12:21:27 +00:00
|
|
|
<tr valign="top">
|
2004-12-09 08:01:25 +00:00
|
|
|
<td align="right"><?php print_string("showgrades") ?>:</td>
|
2004-01-25 19:37:04 +00:00
|
|
|
<td><?php
|
2003-08-20 07:32:24 +00:00
|
|
|
unset($choices);
|
|
|
|
$choices["0"] = get_string("no");
|
|
|
|
$choices["1"] = get_string("yes");
|
|
|
|
choose_from_menu ($choices, "showgrades", $form->showgrades, "");
|
|
|
|
helpbutton("coursegrades", get_string("grades")); ?>
|
2004-01-25 19:37:04 +00:00
|
|
|
</td>
|
2002-11-12 04:26:16 +00:00
|
|
|
</tr>
|
2004-09-12 12:21:27 +00:00
|
|
|
<tr valign="top">
|
2004-12-09 08:01:25 +00:00
|
|
|
<td align="right"><?php print_string("showreports") ?>:</td>
|
2004-01-25 19:37:04 +00:00
|
|
|
<td><?php
|
2003-10-31 05:57:30 +00:00
|
|
|
unset($choices);
|
|
|
|
$choices["0"] = get_string("no");
|
|
|
|
$choices["1"] = get_string("yes");
|
|
|
|
choose_from_menu ($choices, "showreports", $form->showreports, "");
|
|
|
|
helpbutton("coursereports", get_string("activityreport")); ?>
|
2004-01-25 19:37:04 +00:00
|
|
|
</td>
|
2003-10-31 05:57:30 +00:00
|
|
|
</tr>
|
2004-09-12 12:21:27 +00:00
|
|
|
<tr valign="top">
|
2004-12-09 08:01:25 +00:00
|
|
|
<td align="right"><?php print_string("maximumupload") ?>:</td>
|
2004-01-25 19:37:04 +00:00
|
|
|
<td><?php
|
2003-10-06 18:02:35 +00:00
|
|
|
$choices = get_max_upload_sizes($CFG->maxbytes);
|
|
|
|
choose_from_menu ($choices, "maxbytes", $form->maxbytes, "");
|
|
|
|
helpbutton("courseuploadsize", get_string("maximumupload")); ?>
|
2004-01-25 19:37:04 +00:00
|
|
|
</td>
|
2003-10-06 18:02:35 +00:00
|
|
|
</tr>
|
2004-09-12 12:21:27 +00:00
|
|
|
<tr valign="top">
|
2004-12-09 08:01:25 +00:00
|
|
|
<td align="right"><?php print_string("wordforteacher") ?>:</td>
|
|
|
|
<td><input type="text" name="teacher" maxlength="100" size="25" value="<?php p($form->teacher) ?>" alt="<?php print_string("wordforteacher") ?>" />
|
2004-04-29 10:28:58 +00:00
|
|
|
(<?php print_string("wordforteachereg") ?>)
|
2003-09-09 08:38:24 +00:00
|
|
|
<?php if (isset($err["teacher"])) formerr($err["teacher"]); ?>
|
2004-01-25 19:37:04 +00:00
|
|
|
</td>
|
2002-08-11 15:41:54 +00:00
|
|
|
</tr>
|
2004-09-12 12:21:27 +00:00
|
|
|
<tr valign="top">
|
2004-12-09 08:01:25 +00:00
|
|
|
<td align="right"><?php print_string("wordforteachers") ?>:</td>
|
|
|
|
<td><input type="text" name="teachers" maxlength="100" size="25" value="<?php p($form->teachers) ?>" alt="<?php print_string("wordforteachers") ?>" />
|
2004-01-25 19:37:04 +00:00
|
|
|
(<?php print_string("wordforteacherseg") ?>)
|
2003-09-09 08:38:24 +00:00
|
|
|
<?php if (isset($err["teachers"])) formerr($err["teachers"]); ?>
|
2004-01-25 19:37:04 +00:00
|
|
|
</td>
|
2002-09-08 03:24:38 +00:00
|
|
|
</tr>
|
2004-09-12 12:21:27 +00:00
|
|
|
<tr valign="top">
|
2004-12-09 08:01:25 +00:00
|
|
|
<td align="right"><?php print_string("wordforstudent") ?>:</td>
|
|
|
|
<td><input type="text" name="student" maxlength="100" size="25" value="<?php p($form->student) ?>" alt="<?php print_string("wordforstudent") ?>" />
|
2004-04-29 10:28:58 +00:00
|
|
|
(<?php print_string("wordforstudenteg") ?>)
|
2003-09-09 08:38:24 +00:00
|
|
|
<?php if (isset($err["student"])) formerr($err["student"]); ?>
|
2004-01-25 19:37:04 +00:00
|
|
|
</td>
|
2002-08-11 15:41:54 +00:00
|
|
|
</tr>
|
2004-09-12 12:21:27 +00:00
|
|
|
<tr valign="top">
|
2004-12-09 08:01:25 +00:00
|
|
|
<td align="right"><?php print_string("wordforstudents") ?>:</td>
|
|
|
|
<td><input type="text" name="students" maxlength="100" size="25" value="<?php p($form->students) ?>" alt="<?php print_string("wordforstudents") ?>" />
|
2004-04-29 10:28:58 +00:00
|
|
|
(<?php print_string("wordforstudentseg") ?>)
|
2003-09-09 08:38:24 +00:00
|
|
|
<?php if (isset($err["students"])) formerr($err["students"]); ?>
|
2004-01-25 19:37:04 +00:00
|
|
|
</td>
|
2002-09-08 03:24:38 +00:00
|
|
|
</tr>
|
2004-09-12 12:21:27 +00:00
|
|
|
<tr valign="top">
|
2004-12-09 08:01:25 +00:00
|
|
|
<td align="right"><?php print_string("forcelanguage") ?>:</td>
|
2004-05-08 18:56:45 +00:00
|
|
|
<td>
|
2004-04-29 10:28:58 +00:00
|
|
|
<?php
|
2004-02-10 07:17:09 +00:00
|
|
|
$languages[''] = get_string("forceno");
|
|
|
|
$languages += get_list_of_languages();
|
2004-04-29 10:28:58 +00:00
|
|
|
choose_from_menu ($languages, "lang", $form->lang, "", "", "");
|
2004-02-10 07:17:09 +00:00
|
|
|
?>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2001-11-22 06:23:56 +00:00
|
|
|
<tr>
|
2004-01-25 19:37:04 +00:00
|
|
|
<td></td>
|
2004-09-12 12:21:27 +00:00
|
|
|
<td><input type="submit" value="<?php print_string("savechanges") ?>" /></td>
|
2004-12-09 08:01:25 +00:00
|
|
|
</tr>
|
2004-02-10 07:17:09 +00:00
|
|
|
</table>
|
2004-09-12 12:21:27 +00:00
|
|
|
<input type="hidden" name="id" value="<?php echo $form->id ?>" />
|
2004-10-08 18:13:05 +00:00
|
|
|
<input type="hidden" name="sesskey" value="<?php echo $form->sesskey ?>" />
|
2004-02-10 07:17:09 +00:00
|
|
|
</form>
|