File: mod.html

package info (click to toggle)
moodle 1.6.3-2%2Betch3
  • links: PTS
  • area: main
  • in suites: etch
  • size: 37,172 kB
  • ctags: 51,688
  • sloc: php: 231,916; sql: 5,631; xml: 2,688; sh: 1,185; perl: 638; makefile: 48; pascal: 36
file content (107 lines) | stat: -rw-r--r-- 3,649 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<?php
    if (!isset($form->name)) {
        $form->name = '';
    }
    if (!isset($form->intro)) {
        $form->intro = '';
    }
    if (!isset($form->assessed)) {
        $form->assessed = '0';
    }
    if (!isset($form->days)) {
        if ($course->format == 'weeks') {
            $form->days = '7';
        } else {
            $form->days = '0';
        }
    }
?>

<form name="form" method="post" action="mod.php">
<table cellpadding="5">
<tr valign="top">
    <td align="right"><strong><?php print_string('journalname', 'journal') ?>:</strong></td>
    <td>
        <input type="text" name="name" size="30" value="<?php p($form->name) ?>" alt="<?php print_string('journalname', 'journal') ?>"/>
    </td>
</tr>

<tr valign="top">
    <td align="right"><strong><?php print_string('journalquestion', 'journal') ?>:</strong>
     <?php
        echo '<br />';
        helpbutton('writing', get_string('helpwriting'), 'moodle', true, true);
        echo '<br />';
        helpbutton('questions', get_string('helpquestions'), 'moodle', true, true);
        echo '<br />';
        if ($usehtmleditor) {
           helpbutton('richtext', get_string('helprichtext'), 'moodle', true, true);
        } else {
           emoticonhelpbutton('form', 'intro');
        } 
        echo '<br />';
      ?>
    </td>
    <td>
    <?php
       print_textarea($usehtmleditor, 20, 60, 680, 400, 'intro', $form->intro);

       if ($usehtmleditor) {
           echo '<input type="hidden" name="format" value="'.FORMAT_HTML.'" />';
       } else {
           echo '<p align="right">';
           helpbutton('textformat', get_string('formattexttype'));
           print_string('formattexttype');
           echo ':&nbsp;';
           if (!$form->introformat) {
               $form->introformat = $defaultformat;
           }
           choose_from_menu(format_text_menu(), 'introformat', $form->introformat, '');
           echo "</p>";
       }
    ?>
    </td>
</tr>


<tr valign="top">
    <td align="right"><strong><?php print_string('grade') ?>:</strong></td>
    <td>
        <?php
        print_grade_menu($course->id, 'assessed', "$form->assessed");
        ?>
    </td>
</tr>
<tr valign="top">
    <td align="right"><strong><?php print_string('daysavailable', 'journal') ?>:</strong></td>
    <td>
    <?php
        $options = array();
        $options[0] = get_string('alwaysopen', 'journal');
        for ($i=1;$i<=13;$i++) {
            $options[$i] = get_string('numdays', '', $i);
        }
        for ($i=2;$i<=16;$i++) {
            $days = $i * 7;
            $options[$days] = get_string('numweeks', '', $i);
        }
        $options[365] = get_string('numweeks', '', 52);
        choose_from_menu($options, 'days', "$form->days");
     ?>
    </td>
</tr>
<?php print_standard_coursemodule_settings($form); ?>
</table>
<center>
<input type="hidden" name="course"        value="<?php p($form->course) ?>" />
<input type="hidden" name="sesskey"       value="<?php p($form->sesskey) ?>" />
<input type="hidden" name="coursemodule"  value="<?php p($form->coursemodule) ?>" />
<input type="hidden" name="section"       value="<?php p($form->section) ?>" />
<input type="hidden" name="module"        value="<?php p($form->module) ?>" />
<input type="hidden" name="modulename"    value="<?php p($form->modulename) ?>" />
<input type="hidden" name="instance"      value="<?php p($form->instance) ?>" />
<input type="hidden" name="mode"          value="<?php p($form->mode) ?>" />
<input type="submit" value="<?php print_string('savechanges') ?>" />
<input type="submit" name="cancel" value="<?php print_string('cancel') ?>" />
</center>
</form>