2 // Make sure all variables are defined
3 if (!isset($form->showreports
)) {
4 $form->showreports
= 0;
6 if (!isset($form->maxbytes
)) {
9 if (!isset($form->hiddensections
)) {
10 $form->hiddensections
= 0;
12 if (!isset($form->lang
)) {
15 if (!isset($form->theme
)) {
18 if (!isset($form->enrolperiod
)) {
19 $form->enrolperiod
= 0;
21 if (!isset($form->metacourse
)) {
22 $form->metacourse
= 0;
25 <form method=
"post" action=
"edit.php" name=
"form">
26 <table cellpadding=
"9" cellspacing=
"0" >
27 <?php if (iscreator()) { ?>
29 <td align=
"right"><?php print_string("category") ?>:
</td>
31 $displaylist = array();
32 $parentlist = array();
33 make_categories_list($displaylist, $parentlist);
34 choose_from_menu($displaylist, "category", "$form->category", "");
35 helpbutton("coursecategory", get_string("category"));
41 <td align=
"right"><?php print_string("fullname") ?>:
</td>
42 <td><input type=
"text" name=
"fullname" maxlength=
"254" size=
"50" value=
"<?php p($form->fullname) ?>" alt
="<?php print_string("fullname
") ?>" />
43 <?php
helpbutton("coursefullname", get_string("fullname")) ?>
44 <?php if (isset($err["fullname"])) formerr($err["fullname"]); ?>
48 <td align=
"right"><?php print_string("shortname") ?>:
</td>
49 <td><input type=
"text" name=
"shortname" maxlength=
"15" size=
"10" value=
"<?php p($form->shortname) ?>" alt
="<?php print_string("shortname
") ?>" />
50 <?php
helpbutton("courseshortname", get_string("shortname")) ?>
51 <?php if (isset($err["shortname"])) formerr($err["shortname"]); ?>
55 <td align=
"right"><?php print_string("idnumber") ?>:
</td>
56 <td><input type=
"text" name=
"idnumber" maxlength=
"100" size=
"10" value=
"<?php p($form->idnumber) ?>" alt
="><?php print_string("idnumber
") ?>" />
57 <?php
helpbutton("courseidnumber", get_string("idnumber")) ?>
58 <?php if (isset($err["idnumber"])) formerr($err["idnumber"]); ?>
62 <td align=
"right"><?php print_string("summary") ?>:
</td>
64 print_textarea($usehtmleditor, 10, 50, 660, 200, "summary", $form->summary
);
65 helpbutton("text", get_string("helptext"));
66 if (isset($err["summary"])) formerr($err["summary"]);
71 <td align=
"right"><?php print_string("format") ?>:
</td>
73 choose_from_menu ($form->courseformats
, "format", "$form->format", "");
74 helpbutton("courseformats", get_string("courseformats"));
79 <td align=
"right"><?php print_string("startdate") ?>:
</td>
81 print_date_selector("startday", "startmonth", "startyear", $form->startdate
);
82 helpbutton("coursestartdate", get_string("startdate"));
86 <td align=
"right"><?php print_string("enrolperiod") ?>:
</td>
89 $periodmenu[0] = get_string('unlimited');
90 for ($i=1; $i<=365; $i++
) {
91 $seconds = $i * 86400;
92 $periodmenu[$seconds] = get_string('numdays', '', $i);
94 choose_from_menu ($periodmenu, "enrolperiod", "$form->enrolperiod", "");
95 helpbutton("enrolperiod", get_string("enrolperiod"));
100 <td align=
"right"><?php print_string("numberweeks") ?>:
</td>
102 for ($i=1; $i<=52; $i++
) {
103 $sectionmenu[$i] = "$i";
105 choose_from_menu ($sectionmenu, "numsections", "$form->numsections", "");
106 helpbutton("coursenumsections", get_string("numberweeks"));
110 <td align=
"right"><?php print_string("groupmode") ?>:
</td>
113 $choices[NOGROUPS
] = get_string("groupsnone");
114 $choices[SEPARATEGROUPS
] = get_string("groupsseparate");
115 $choices[VISIBLEGROUPS
] = get_string("groupsvisible");
116 choose_from_menu ($choices, "groupmode", $form->groupmode
, "");
117 helpbutton("groupmode", get_string("groupmode"));
119 echo ' ';
120 print_string('force');
123 $choices["0"] = get_string("no");
124 $choices["1"] = get_string("yes");
125 choose_from_menu ($choices, "groupmodeforce", $form->groupmodeforce
, "");
126 helpbutton("groupmodeforce", get_string("groupmodeforce")); ?>
130 <td align=
"right"><?php print_string("availability") ?>:
</td>
133 $choices["0"] = get_string("courseavailablenot");
134 $choices["1"] = get_string("courseavailable");
135 choose_from_menu ($choices, "visible", $form->visible
, "");
136 helpbutton("courseavailability", get_string("availability")); ?>
140 <td align=
"right"><?php print_string("enrolmentkey") ?>:
</td>
141 <td><input type=
"text" name=
"password" size=
"25" value=
"<?php p($form->password) ?>" alt
="<?php print_string("enrolmentkey
") ?>" />
142 <?php
helpbutton("enrolmentkey", get_string("enrolmentkey")) ?>
143 <?php if (isset($err["password"])) formerr($err["password"]); ?>
147 <td align=
"right"><?php print_string("opentoguests") ?>:
</td>
150 $choices["0"] = get_string("guestsno");
151 $choices["1"] = get_string("guestsyes");
152 $choices["2"] = get_string("guestskey");
153 choose_from_menu ($choices, "guest", $form->guest
, "");
154 helpbutton("guestaccess", get_string("opentoguests")); ?>
158 if ($CFG->enrol
!= 'internal') {
161 <td align=
"right"><?php print_string("cost") ?>:
</td>
162 <td><input type=
"text" name=
"cost" maxlength=
"6" size=
"6" value=
"<?php p($form->cost) ?>" alt
="<?php print_string("cost
") ?>" />
163 <?php
helpbutton("cost", get_string("cost")) ?>
170 <td align=
"right"><?php print_string("hiddensections") ?>:
</td>
173 $choices["0"] = get_string("hiddensectionscollapsed");
174 $choices["1"] = get_string("hiddensectionsinvisible");
175 choose_from_menu ($choices, "hiddensections", $form->hiddensections
, "");
176 helpbutton("coursehiddensections", get_string("hiddensections")); ?>
180 <td align=
"right"><?php print_string("newsitemsnumber") ?>:
</td>
182 $newsitem = get_string("newsitem");
183 $newsitems = get_string("newsitems");
185 $options = array("0" => "0 $newsitems",
186 "1" => "1 $newsitem",
187 "2" => "2 $newsitems",
188 "3" => "3 $newsitems",
189 "4" => "4 $newsitems",
190 "5" => "5 $newsitems",
191 "6" => "6 $newsitems",
192 "7" => "7 $newsitems",
193 "8" => "8 $newsitems",
194 "9" => "9 $newsitems",
195 "10" => "10 $newsitems");
196 choose_from_menu ($options, "newsitems", "$form->newsitems", "");
197 helpbutton("coursenewsitems", get_string("newsitemsnumber"));
202 <td align=
"right"><?php print_string("showgrades") ?>:
</td>
205 $choices["0"] = get_string("no");
206 $choices["1"] = get_string("yes");
207 choose_from_menu ($choices, "showgrades", $form->showgrades
, "");
208 helpbutton("coursegrades", get_string("grades")); ?>
212 <td align=
"right"><?php print_string("showreports") ?>:
</td>
215 $choices["0"] = get_string("no");
216 $choices["1"] = get_string("yes");
217 choose_from_menu ($choices, "showreports", $form->showreports
, "");
218 helpbutton("coursereports", get_string("activityreport")); ?>
222 <td align=
"right"><?php print_string("maximumupload") ?>:
</td>
224 $choices = get_max_upload_sizes($CFG->maxbytes
);
225 choose_from_menu ($choices, "maxbytes", $form->maxbytes
, "");
226 helpbutton("courseuploadsize", get_string("maximumupload")); ?>
230 <td align=
"right"><?php print_string("wordforteacher") ?>:
</td>
231 <td><input type=
"text" name=
"teacher" maxlength=
"100" size=
"25" value=
"<?php p($form->teacher) ?>" alt
="<?php print_string("wordforteacher
") ?>" />
232 (<?php
print_string("wordforteachereg") ?>)
233 <?php if (isset($err["teacher"])) formerr($err["teacher"]); ?>
237 <td align=
"right"><?php print_string("wordforteachers") ?>:
</td>
238 <td><input type=
"text" name=
"teachers" maxlength=
"100" size=
"25" value=
"<?php p($form->teachers) ?>" alt
="<?php print_string("wordforteachers
") ?>" />
239 (<?php
print_string("wordforteacherseg") ?>)
240 <?php if (isset($err["teachers"])) formerr($err["teachers"]); ?>
244 <td align=
"right"><?php print_string("wordforstudent") ?>:
</td>
245 <td><input type=
"text" name=
"student" maxlength=
"100" size=
"25" value=
"<?php p($form->student) ?>" alt
="<?php print_string("wordforstudent
") ?>" />
246 (<?php
print_string("wordforstudenteg") ?>)
247 <?php if (isset($err["student"])) formerr($err["student"]); ?>
251 <td align=
"right"><?php print_string("wordforstudents") ?>:
</td>
252 <td><input type=
"text" name=
"students" maxlength=
"100" size=
"25" value=
"<?php p($form->students) ?>" alt
="<?php print_string("wordforstudents
") ?>" />
253 (<?php
print_string("wordforstudentseg") ?>)
254 <?php if (isset($err["students"])) formerr($err["students"]); ?>
258 <td align=
"right"><?php print_string("forcelanguage") ?>:
</td>
261 $languages[''] = get_string("forceno");
262 $languages +
= get_list_of_languages();
263 choose_from_menu ($languages, "lang", $form->lang
, "", "", "");
267 <?php if (!empty($CFG->allowcoursethemes
)) { ?>
269 <td align=
"right"> <?php print_string("forcetheme") ?>:
</td>
272 $themes[''] = get_string("forceno");
273 $themes +
= get_list_of_themes();
274 choose_from_menu($themes, 'theme', $form->theme
, "", "", "");
280 <td align=
"right"><?php print_string("managemeta") ?>:
</td>
283 if (empty($disable_meta)) {
284 $meta[0] = get_string('no');
285 $meta[1] = get_string('yes');
286 choose_from_menu($meta,"metacourse",$form->metacourse
,"","","");
288 echo ((empty($form->metacourse
)) ?
get_string("no") : get_string("yes"));
289 echo " - $disable_meta ";
295 <td><input type=
"submit" value=
"<?php print_string("savechanges
") ?>" /></td
>
298 <?php
if(!iscreator()) { ?>
299 <input type=
"hidden" name=
"category" value=
"<?php echo $form->category ?>" />
301 <input type=
"hidden" name=
"id" value=
"<?php echo $form->id ?>" />
302 <input type
="hidden" name
="sesskey" value
="<?php echo $form->sesskey ?>" />