Incorrect variable name used for parameter.
[moodle-linuxchix.git] / mod / journal / mod.html
blob270e098b8381f27fd9c1d83349bdaad6a6e3ab34
1 <?php
2 if (!isset($form->name)) {
3 $form->name = '';
5 if (!isset($form->intro)) {
6 $form->intro = '';
8 if (!isset($form->assessed)) {
9 $form->assessed = '0';
11 if (!isset($form->days)) {
12 if ($course->format == 'weeks') {
13 $form->days = '7';
14 } else {
15 $form->days = '0';
20 <form name="form" method="post" action="mod.php">
21 <table cellpadding="5">
22 <tr valign="top">
23 <td align="right"><strong><?php print_string('journalname', 'journal') ?>:</strong></td>
24 <td>
25 <input type="text" name="name" size="30" value="<?php p($form->name) ?>" alt="<?php print_string('journalname', 'journal') ?>"/>
26 </td>
27 </tr>
29 <tr valign="top">
30 <td align="right"><strong><?php print_string('journalquestion', 'journal') ?>:</strong>
31 <?php
32 echo '<br />';
33 helpbutton('writing', get_string('helpwriting'), 'moodle', true, true);
34 echo '<br />';
35 helpbutton('questions', get_string('helpquestions'), 'moodle', true, true);
36 echo '<br />';
37 if ($usehtmleditor) {
38 helpbutton('richtext', get_string('helprichtext'), 'moodle', true, true);
39 } else {
40 emoticonhelpbutton('form', 'intro');
42 echo '<br />';
44 </td>
45 <td>
46 <?php
47 print_textarea($usehtmleditor, 20, 60, 680, 400, 'intro', $form->intro);
49 if ($usehtmleditor) {
50 echo '<input type="hidden" name="format" value="'.FORMAT_HTML.'" />';
51 } else {
52 echo '<p align="right">';
53 helpbutton('textformat', get_string('formattexttype'));
54 print_string('formattexttype');
55 echo ':&nbsp;';
56 if (!$form->introformat) {
57 $form->introformat = $defaultformat;
59 choose_from_menu(format_text_menu(), 'introformat', $form->introformat, '');
60 echo "</p>";
63 </td>
64 </tr>
67 <tr valign="top">
68 <td align="right"><strong><?php print_string('grade') ?>:</strong></td>
69 <td>
70 <?php
71 print_grade_menu($course->id, 'assessed', "$form->assessed");
73 </td>
74 </tr>
75 <tr valign="top">
76 <td align="right"><strong><?php print_string('daysavailable', 'journal') ?>:</strong></td>
77 <td>
78 <?php
79 $options = array();
80 $options[0] = get_string('alwaysopen', 'journal');
81 for ($i=1;$i<=13;$i++) {
82 $options[$i] = get_string('numdays', '', $i);
84 for ($i=2;$i<=16;$i++) {
85 $days = $i * 7;
86 $options[$days] = get_string('numweeks', '', $i);
88 $options[365] = get_string('numweeks', '', 52);
89 choose_from_menu($options, 'days', "$form->days");
91 </td>
92 </tr>
93 <?php print_standard_coursemodule_settings($form); ?>
94 </table>
95 <center>
96 <input type="hidden" name="course" value="<?php p($form->course) ?>" />
97 <input type="hidden" name="sesskey" value="<?php p($form->sesskey) ?>" />
98 <input type="hidden" name="coursemodule" value="<?php p($form->coursemodule) ?>" />
99 <input type="hidden" name="section" value="<?php p($form->section) ?>" />
100 <input type="hidden" name="module" value="<?php p($form->module) ?>" />
101 <input type="hidden" name="modulename" value="<?php p($form->modulename) ?>" />
102 <input type="hidden" name="instance" value="<?php p($form->instance) ?>" />
103 <input type="hidden" name="mode" value="<?php p($form->mode) ?>" />
104 <input type="submit" value="<?php print_string('savechanges') ?>" />
105 <input type="submit" name="cancel" value="<?php print_string('cancel') ?>" />
106 </center>
107 </form>