file analysistable.html was added on branch MOODLE_15_STABLE on 2005-07-15 19:46...
[moodle.git] / course / edit.html
blob0d2c50481093040b3b868e2d6b29cb2c7bf5f327
1 <?php
2 // Make sure all variables are defined
3 if (!isset($form->showreports)) {
4 $form->showreports = 0;
6 if (!isset($form->maxbytes)) {
7 $form->maxbytes = 0;
9 if (!isset($form->hiddensections)) {
10 $form->hiddensections = 0;
12 if (!isset($form->lang)) {
13 $form->lang = '';
15 if (!isset($form->theme)) {
16 $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()) { ?>
28 <tr valign="top">
29 <td align="right"><?php print_string("category") ?>:</td>
30 <td><?php
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"));
37 </td>
38 </tr>
39 <?php } ?>
40 <tr valign="top">
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"]); ?>
45 </td>
46 </tr>
47 <tr valign="top">
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"]); ?>
52 </td>
53 </tr>
54 <tr valign="top">
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"]); ?>
59 </td>
60 </tr>
61 <tr valign="top">
62 <td align="right"><?php print_string("summary") ?>:</td>
63 <td><?php
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"]);
68 </td>
69 </tr>
70 <tr valign="top">
71 <td align="right"><?php print_string("format") ?>:</td>
72 <td><?php
73 choose_from_menu ($form->courseformats, "format", "$form->format", "");
74 helpbutton("courseformats", get_string("courseformats"));
76 </td>
77 </tr>
78 <tr valign="top">
79 <td align="right"><?php print_string("startdate") ?>:</td>
80 <td><?php
81 print_date_selector("startday", "startmonth", "startyear", $form->startdate);
82 helpbutton("coursestartdate", get_string("startdate"));
83 ?></td>
84 </tr>
85 <tr valign="top">
86 <td align="right"><?php print_string("enrolperiod") ?>:</td>
87 <td>
88 <?php
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"));
97 </td>
98 </tr>
99 <tr valign="top">
100 <td align="right"><?php print_string("numberweeks") ?>:</td>
101 <td><?php
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"));
107 ?></td>
108 </tr>
109 <tr valign="top">
110 <td align="right"><?php print_string("groupmode") ?>:</td>
111 <td><?php
112 unset($choices);
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 '&nbsp;&nbsp;&nbsp;&nbsp;';
120 print_string('force');
121 echo ': ';
122 unset($choices);
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")); ?>
127 </td>
128 </tr>
129 <tr valign="top">
130 <td align="right"><?php print_string("availability") ?>:</td>
131 <td><?php
132 unset($choices);
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")); ?>
137 </td>
138 </tr>
139 <tr valign="top">
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"]); ?>
144 </td>
145 </tr>
146 <tr valign="top">
147 <td align="right"><?php print_string("opentoguests") ?>:</td>
148 <td><?php
149 unset($choices);
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")); ?>
155 </td>
156 </tr>
157 <?php
158 if ($CFG->enrol != 'internal') {
160 <tr valign="top">
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")) ?>
164 </td>
165 </tr>
166 <?php
169 <tr valign="top">
170 <td align="right"><?php print_string("hiddensections") ?>:</td>
171 <td><?php
172 unset($choices);
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")); ?>
177 </td>
178 </tr>
179 <tr valign="top">
180 <td align="right"><?php print_string("newsitemsnumber") ?>:</td>
181 <td><?php
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"));
199 </td>
200 </tr>
201 <tr valign="top">
202 <td align="right"><?php print_string("showgrades") ?>:</td>
203 <td><?php
204 unset($choices);
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")); ?>
209 </td>
210 </tr>
211 <tr valign="top">
212 <td align="right"><?php print_string("showreports") ?>:</td>
213 <td><?php
214 unset($choices);
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")); ?>
219 </td>
220 </tr>
221 <tr valign="top">
222 <td align="right"><?php print_string("maximumupload") ?>:</td>
223 <td><?php
224 $choices = get_max_upload_sizes($CFG->maxbytes);
225 choose_from_menu ($choices, "maxbytes", $form->maxbytes, "");
226 helpbutton("courseuploadsize", get_string("maximumupload")); ?>
227 </td>
228 </tr>
229 <tr valign="top">
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"]); ?>
234 </td>
235 </tr>
236 <tr valign="top">
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"]); ?>
241 </td>
242 </tr>
243 <tr valign="top">
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"]); ?>
248 </td>
249 </tr>
250 <tr valign="top">
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"]); ?>
255 </td>
256 </tr>
257 <tr valign="top">
258 <td align="right"><?php print_string("forcelanguage") ?>:</td>
259 <td>
260 <?php
261 $languages[''] = get_string("forceno");
262 $languages += get_list_of_languages();
263 choose_from_menu ($languages, "lang", $form->lang, "", "", "");
265 </td>
266 </tr>
267 <?php if (!empty($CFG->allowcoursethemes)) { ?>
268 <tr valign="top">
269 <td align="right"> <?php print_string("forcetheme") ?>: </td>
270 <td>
271 <?php
272 $themes[''] = get_string("forceno");
273 $themes += get_list_of_themes();
274 choose_from_menu($themes, 'theme', $form->theme, "", "", "");
276 </td>
277 </tr>
278 <?php } ?>
279 <tr valign="top">
280 <td align="right"><?php print_string("managemeta") ?>:</td>
281 <td>
282 <?php
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,"","","");
287 } else {
288 echo ((empty($form->metacourse)) ? get_string("no") : get_string("yes"));
289 echo " - $disable_meta ";
290 } ?>
291 </td>
292 </tr>
293 <tr>
294 <td></td>
295 <td><input type="submit" value="<?php print_string("savechanges") ?>" /></td>
296 </tr>
297 </table>
298 <?php if(!iscreator()) { ?>
299 <input type="hidden" name="category" value="<?php echo $form->category ?>" />
300 <?php } ?>
301 <input type="hidden" name="id" value="<?php echo $form->id ?>" />
302 <input type="hidden" name="sesskey" value="<?php echo $form->sesskey ?>" />
303 </form>