D'oh - counting $totalcount wrongly (duplicate courses are ignored)
[moodle-linuxchix.git] / auth / cas / config.html
blobd666ce1283e2b708a3212b8526160da985947640
1 <?php
3 global $CFG;
4 require_once 'languages.php';
6 $createoptions[0] = get_string("no");
7 $createoptions[1] = get_string("yes");
9 // set to defaults if undefined
10 if (!isset ($config->hostname)) {
11 $config->hostname = '';
13 if (!isset ($config->port)) {
14 $config->port = '';
16 if (!isset ($config->casversion)) {
17 $config->casversion = '';
19 if (!isset ($config->baseuri)) {
20 $config->baseuri = '';
22 if (!isset ($config->language)) {
23 $config->language = '';
25 if (!isset ($config->use_cas)) {
26 $config->use_cas = '';
28 if (!isset ($config->auth_user_create)) {
29 $config->auth_user_create = '0';
31 if (!isset ($config->create_user)) {
32 $config->create_user = '0';
34 if (!isset($config->changepasswordurl)) {
35 $config->changepasswordurl = '';
39 <table cellspacing="0" cellpadding="5" border="0" align="center">
41 <tr>
42 <td colspan="2">
43 <h4><?php print_string('auth_cas_server_settings', 'auth') ?> </h4>
44 </td>
45 </tr>
47 <tr valign="top" class="required">
48 <td align="right"><?php print_string('auth_cas_use_cas', 'auth') ?>:</td>
49 <td>
50 <?php
52 unset($options);
53 $options[1] = get_string('yes');
54 choose_from_menu ($options, 'use_cas', $config->use_cas, get_string('no'), '', '');
57 </td>
58 <td><?php print_string('auth_cas_enabled', 'auth') ?></td>
59 </tr>
61 <tr valign="top" class="required">
62 <td align="right"><?php print_string('auth_cas_hostname_key', 'auth') ?>:</td>
63 <td>
64 <input name="hostname" type="text" size="30" value="<?php echo $config->hostname ?>" />
65 <?php
67 if (isset($err['hostname'])) {
68 formerr($err['hostname']);
72 </td>
73 <td><?php print_string('auth_cas_hostname', 'auth') ?></td>
74 </tr>
76 <tr valign="top" class="required">
77 <td align="right"><?php print_string('auth_cas_baseuri_key', 'auth') ?>:</td>
78 <td>
79 <input name="baseuri" type="text" size="30" value="<?php echo $config->baseuri ?>" />
80 <?php
82 if (isset($err['baseuri'])) {
83 formerr($err['baseuri']);
87 </td>
88 <td><?php print_string('auth_cas_baseuri', 'auth') ?></td>
89 </tr>
91 <tr valign="top" class="required">
92 <td align="right"><?php print_string('auth_cas_port_key', 'auth') ?>:</td>
93 <td>
94 <input name="port" type="text" size="30" value="<?php echo $config->port ?>" />
95 <?php
97 if (isset($err['port'])) {
98 formerr($err['port']);
102 </td>
103 <td><?php print_string('auth_cas_port', 'auth') ?></td>
104 </tr>
106 <tr valign="top" class="required">
107 <td align="right"><?php print_string('auth_cas_casversion', 'auth') ?>:</td>
108 <td>
109 <input name="casversion" type="text" size="30" value="<?php echo $config->casversion ?>" />
110 <?php
112 if (isset($err['casversion'])) {
113 formerr($err['casversion']);
117 </td>
118 <td><?php print_string('auth_cas_version', 'auth') ?></td>
119 </tr>
121 <tr valign="top" class="required">
122 <td align="right"><?php print_string('auth_cas_language_key', 'auth') ?>:</td>
123 <td>
124 <?php
126 choose_from_menu($CASLANGUAGES, 'language', $config->language, '');
129 </td>
130 <td><?php print_string('auth_cas_language', 'auth') ?></td>
131 </tr>
133 <tr valign="top">
134 <td align="right"><?php print_string('auth_cas_auth_user_create', 'auth') ?>: </td>
135 <td>
136 <?php
138 choose_from_menu($createoptions, 'auth_user_create', $config->auth_user_create, '');
139 if (isset($err['auth_user_create'])) {
140 formerr($err['auth_user_create']);
144 </td>
145 <td>
146 <?php print_string("auth_user_creation","auth"); ?>
147 </td>
148 </tr>
150 <tr valign="top" class="required">
151 <td align="right"><?php print_string('auth_cas_create_user_key', 'auth') ?>:</td>
152 <td>
153 <?php
155 unset($options);
156 $options[0] = get_string('no');
157 $options[1] = get_string('yes');
158 choose_from_menu($options, 'create_user', $config->create_user, '');
161 </td>
162 <td><?php print_string('auth_cas_create_user', 'auth') ?></td>
163 </tr>
165 <tr valign="top">
166 <td align="right"><?php print_string('auth_cas_changepasswordurl', 'auth') ?>: </td>
167 <td>
168 <input name="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
169 <?php
171 if (isset($err['changepasswordurl'])) {
172 formerr($err['changepasswordurl']);
176 </td>
177 <td><?php print_string('changepasswordhelp', 'auth') ?></td>
178 </tr>
180 </table>
182 <?php
184 $ldapplugin = get_auth_plugin('ldap');
185 $ldapplugin->config_form(get_config('auth/ldap'), $err);