forked from tmuras/moodle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsite.html
150 lines (148 loc) · 6.51 KB
/
site.html
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<form method="post" action="site.php" name="form">
<table cellpadding="9" cellspacing="0" >
<tr valign="top">
<td align="right"><?php print_string("fullsitename") ?>:</td>
<td><input type="text" name="fullname" size="50" maxlength="254" value="<?php p($form->fullname) ?>" alt="<?php print_string("fullsitename") ?>" />
<?php if (isset($err["fullname"])) formerr($err["fullname"]); ?>
</td>
</tr>
<tr valign="top">
<td align="right"><?php print_string("shortsitename") ?>:</td>
<td><input type="text" name="shortname" size="15" maxlength="15" value="<?php p($form->shortname) ?>" alt="<?php print_string("shortsitename") ?>" />
<?php if (isset($err["shortname"])) formerr($err["shortname"]); ?>
</td>
</tr>
<tr valign="top">
<td align="right"><?php print_string("frontpagedescription") ?>:<br /><br />
<?PHP
helpbutton("writing", get_string("helpwriting"), "moodle", true, true);
echo "<br />";
if ($usehtmleditor) {
helpbutton("richtext", get_string("helprichtext"), "moodle", true, true);
} else {
helpbutton("html", get_string("helphtml"), "moodle", true, true);
}
echo "<br />";
?>
</td>
<td><?php print_textarea($usehtmleditor, 20, 50, 600, 400, "summary", $form->summary); ?></td>
</tr>
<tr valign="top">
<td align="right"><?php print_string("frontpageformat") ?>:</td>
<td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<?php
$coursecount = (count_records('course') <= FRONTPAGECOURSELIMIT);
$options = array(FRONTPAGENEWS => get_string("frontpagenews"),
FRONTPAGECOURSELIST => get_string("frontpagecourselist"),
FRONTPAGECATEGORYNAMES => get_string("frontpagecategorynames"),
FRONTPAGECATEGORYCOMBO => get_string("frontpagecategorycombo"),
);
$values = array(get_string('hide'), get_string('order1', 'admin'), get_string('order2', 'admin'), get_string('order3', 'admin'), get_string('order4', 'admin'));
$seq = array_flip(explode(',',$form->frontpage));
foreach ($seq as $k => $s) {
$seq[$k]++;
}
if (!$coursecount and isset($seq[FRONTPAGECOURSELIST])) {
unset($seq[FRONTPAGECOURSELIST]); //disable course list option when too many course present
}
foreach ($options as $key => $option) {
$disabled = (!$coursecount and ($key == FRONTPAGECOURSELIST));
echo "<td>$option<br />";
choose_from_menu ($values, "frontpage[$key]", isset($seq[$key])?$seq[$key]:0, '', '', 0, false, $disabled);
echo '</td>';
}
?>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td align="right"><?php print_string("frontpageformatloggedin") ?>:</td>
<td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<?php
$seq = array_flip(explode(',',$form->frontpageloggedin));
foreach ($seq as $k => $s) {
$seq[$k]++;
}
foreach ($options as $key => $option) {
echo "<td>$option<br />";
choose_from_menu ($values, "frontpageloggedin[$key]", isset($seq[$key])?$seq[$key]:0, '');
echo '</td>';
}
?>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td align="right"><?php print_string("sitesection") ?>:</td>
<td><?php
unset($choices);
$choices["0"] = get_string("no");
$choices["1"] = get_string("yes");
choose_from_menu ($choices, "numsections", $form->numsections, "");
?>
</td>
</tr>
<tr valign="top">
<td align="right"><?php print_string("newsitemsnumber") ?>:</td>
<td><?php
$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");
choose_from_menu ($options, "newsitems", "$form->newsitems", "");
?>
</td>
</tr>
<tr valign="top">
<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") ?>" />
(<?php print_string("wordforteachereg") ?>)
<?php if (isset($err["teacher"])) formerr($err["teacher"]); ?>
</td>
</tr>
<tr valign="top">
<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") ?>" />
(<?php print_string("wordforteacherseg") ?>)
<?php if (isset($err["teachers"])) formerr($err["teachers"]); ?>
</td>
</tr>
<tr valign="top">
<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") ?>" />
(<?php print_string("wordforstudenteg") ?>)
<?php if (isset($err["student"])) formerr($err["student"]); ?>
</td>
</tr>
<tr valign="top">
<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") ?>" />
(<?php print_string("wordforstudentseg") ?>)
<?php if (isset($err["students"])) formerr($err["students"]); ?>
</td>
</tr>
<tr>
<td></td>
<td><input type="submit" value="<?php print_string("savechanges") ?>" /></td>
</tr>
</table>
<input type="hidden" name="id" value="<?php p($form->id) ?>" />
<input type="hidden" name="category" value="<?php p($form->category) ?>" />
<input type="hidden" name="format" value="<?php p($form->format) ?>" />
<input type="hidden" name="sesskey" value="<?php p($sesskey) ?>" />
</form>