forked from frumbert/wp2moodle-moodle
-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.html
103 lines (87 loc) · 3.5 KB
/
config.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
<?php
global $OUTPUT;
// set to defaults if undefined
if (!isset($config->sharedsecret)) {
$config->sharedsecret = 'this is not a secure key, change it';
}
if (!isset($config->timeout)) {
$config->timeout = '5';
}
if (!isset($config->logoffurl)) {
$config->logoffurl = '';
}
if (!isset($config->autoopen)) {
$config->autoopen = 'no';
}
if (!isset($config->updateuser)) {
$config->updateuser = 'yes';
}
?>
<table cellspacing="0" cellpadding="5" border="0">
<tr valign="top" class="required">
<td align="right"><label for="sharedsecret"><?php print_string("auth_wp2moodle_secretkey", "auth_wp2moodle") ?></label></td>
<td>
<input id="sharedsecret" name="sharedsecret" type="text" size="30" value="<?php echo $config->sharedsecret?>" />
<?php
if (isset($err["sharedsecret"])) {
echo $OUTPUT->error_text($err["sharedsecret"]);
}
?>
</td>
<td><?php print_string("auth_wp2moodle_secretkey_desc", "auth_wp2moodle") ?></td>
</tr>
<tr valign="top" class="required">
<td align="right"><label for="timeout"><?php print_string("auth_wp2moodle_timeout", "auth_wp2moodle") ?></label></td>
<td>
<input id="timeout" name="timeout" type="text" size="3" maxlength="3" value="<?php echo $config->timeout?>" />
<?php
if (isset($err["timeout"])) {
echo $OUTPUT->error_text($err["timeout"]);
}
?>
</td>
<td><?php print_string("auth_wp2moodle_timeout_desc", "auth_wp2moodle") ?></td>
</tr>
<tr valign="top" class="">
<td align="right"><label for="logoffurl"><?php print_string("auth_wp2moodle_logoffurl", "auth_wp2moodle") ?></label></td>
<td>
<input id="logoffurl" name="logoffurl" type="text" size="30" value="<?php echo $config->logoffurl?>" />
<?php
if (isset($err["logoffurl"])) {
echo $OUTPUT->error_text($err["logoffurl"]);
}
?>
</td>
<td><?php print_string("auth_wp2moodle_logoffurl_desc", "auth_wp2moodle") ?></td>
</tr>
<tr valign="top" class="">
<td align="right"><label for="logoffurl"><?php print_string("auth_wp2moodle_autoopen", "auth_wp2moodle") ?></label></td>
<td>
<select id="autoopen" name="autoopen">
<option value='yes'<?php if ($config->autoopen=='yes') { echo "selected-'selected'"; } ?>><?php echo get_string('yes') ?></option>
<option value='no'<?php if ($config->autoopen!='yes') { echo "selected='selected'"; } ?>><?php echo get_string('no') ?></option>
</select>
<?php
if (isset($err["autoopen"])) {
echo $OUTPUT->error_text($err["autoopen"]);
}
?>
</td>
<td><?php print_string("auth_wp2moodle_autoopen_desc", "auth_wp2moodle") ?></td>
</tr>
<tr valign="top" class="">
<td align="right"><label for="updateuser"><?php print_string("auth_wp2moodle_updateuser", "auth_wp2moodle") ?></label></td>
<td>
<select id="updateuser" name="updateuser">
<option value='yes'<?php if ($config->updateuser=='yes') { echo "selected-'selected'"; } ?>><?php echo get_string('yes') ?></option>
<option value='no'<?php if ($config->updateuser!='yes') { echo "selected='selected'"; } ?>><?php echo get_string('no') ?></option>
</select>
<?php
if (isset($err["updateuser"])) {
echo $OUTPUT->error_text($err["updateuser"]);
}
?>
</td>
<td><?php print_string("auth_wp2moodle_updateuser_desc", "auth_wp2moodle") ?></td>
</tr>
</table>