MDL-34011 Lesson module: fixed incorrect display of student attempt for short answer...
[moodle.git] / auth / shibboleth / config.html
blob9a1854f2e67c3f9430ea04d7aa391fa925f421c2
1 <?php
3 global $CFG;
5 // Set to defaults if undefined
6 if (!isset($config->auth_instructions) or empty($config->user_attribute)) {
7 $config->auth_instructions = get_string('auth_shib_instructions', 'auth_shibboleth', $CFG->wwwroot.'/auth/shibboleth/index.php');
9 if (!isset ($config->user_attribute)) {
10 $config->user_attribute = '';
12 if (!isset ($config->convert_data)) {
13 $config->convert_data = '';
15 if (!isset($config->changepasswordurl)) {
16 $config->changepasswordurl = '';
20 <table cellspacing="0" cellpadding="5" border="0">
22 <tr valign="top" class="required">
23 <td align="right"><label for="user_attribute"><?php print_string("username") ?>: </label></td>
24 <td>
25 <input id="user_attribute" name="user_attribute" type="text" size="30" value="<?php echo $config->user_attribute ?>" />
26 </td>
27 <td><?php print_string("auth_shib_username_description", "auth_shibboleth") ?></td>
28 </tr>
30 <tr valign="top">
31 <td align="right"><label for="convert_data"><?php print_string("auth_shib_convert_data", "auth_shibboleth") ?>: </label></td>
32 <td>
33 <input name="convert_data" id="convert_data" type="text" size="30" value="<?php echo $config->convert_data?>" />
34 <?php
36 if ($config->convert_data and $config->convert_data != '' and !is_readable($config->convert_data)) {
37 echo '<br/><span class="notifyproblem">';
38 print_string("auth_shib_convert_data_warning", "auth_shibboleth");
39 echo '</span>';
43 </td>
44 <td><?php print_string("auth_shib_convert_data_description", "auth_shibboleth"); echo (isset($config->alt_login) ? $config->alt_login : '') ?></td>
45 </tr>
47 <tr valign="top">
48 <td align="right"><?php print_string("auth_shib_integrated_wayf", "auth_shibboleth") ?>:</td>
49 <td>
50 <input name="alt_login" type="checkbox" <?php
51 if ( isset($config->alt_login) and $config->alt_login == 'on' ){
52 echo 'checked="checked"';
54 ?> />
55 </td>
56 <td><?php print_string("auth_shib_integrated_wayf_description", "auth_shibboleth") ?></td>
57 </tr>
59 <tr valign="top">
60 <td align="right"><?php print_string("auth_shib_idp_list", "auth_shibboleth") ?>:</td>
61 <td>
62 <textarea name="organization_selection" rows="10" cols="30" style="overflow: auto;"
63 ><?php
64 if (!isset($config->organization_selection)){
65 echo 'urn:mace:organization1:providerID, Example Organization 1
66 https://another.idp-id.com/shibboleth, Other Example Organization, /Shibboleth.sso/DS/SWITCHaai
67 urn:mace:organization2:providerID, Example Organization 2, /Shibboleth.sso/WAYF/SWITCHaai';
68 } else {
69 echo htmlentities($config->organization_selection);
72 </textarea>
73 <?php
74 if (isset($config->organization_selection) && empty($config->organization_selection) && isset($config->alt_login) && $config->alt_login == 'on') {
75 echo '<br/><span class="notifyproblem">';
76 print_string("auth_shib_no_organizations_warning", "auth_shibboleth");
77 echo '</span>';
80 </td>
81 <td><?php print_string("auth_shib_idp_list_description", "auth_shibboleth") ?></td>
82 </tr>
84 <tr valign="top">
85 <td align="right"><label for="logout_handler"><?php print_string("auth_shib_logout_url", "auth_shibboleth") ?>: </label></td>
86 <td>
87 <input name="logout_handler" id="logout_handler" type="text" size="30" value="<?php
88 if ( isset($config->logout_handler) and !empty($config->logout_handler)){
89 echo $config->logout_handler;
91 ?>" />
92 </td>
93 <td><?php print_string("auth_shib_logout_url_description", "auth_shibboleth") ?></td>
94 </tr>
96 <tr valign="top">
97 <td align="right"><label for="logout_return_url"><?php print_string("auth_shib_logout_return_url", "auth_shibboleth") ?>: </label></td>
98 <td>
99 <input name="logout_return_url" id="logout_return_url" type="text" size="30" value="<?php
100 if ( isset($config->logout_return_url) and !empty($config->logout_return_url)){
101 echo $config->logout_return_url;
103 ?>" />
104 </td>
105 <td><?php print_string("auth_shib_logout_return_url_description", "auth_shibboleth") ?></td>
106 </tr>
108 <tr valign="top">
109 <td align="right"><label for="login_name"><?php print_string("auth_shib_auth_method", "auth_shibboleth") ?>: </label></td>
110 <td>
111 <input name="login_name" id="login_name" type="text" size="30" value="<?php
112 if ( isset($config->login_name) and !empty($config->login_name)){
113 echo htmlentities($config->login_name);
114 } else {
115 echo 'Shibboleth Login';
117 ?>" />
118 </td>
119 <td><?php print_string("auth_shib_auth_method_description", "auth_shibboleth") ?></td>
120 </tr>
122 <tr valign="top">
123 <td align="right"><label for="changepasswordurl"><?php print_string('auth_shib_changepasswordurl', 'auth_shibboleth') ?>: </label></td>
124 <td>
125 <input name="changepasswordurl" id="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
126 <?php
128 if (isset($err['changepasswordurl'])) {
129 echo $OUTPUT->error_text($err['changepasswordurl']);
133 </td>
134 <td><?php print_string('changepasswordhelp', 'auth') ?></td>
135 </tr>
139 <?php
141 print_auth_lock_options($this->authtype, $user_fields, '<!-- empty help -->', true, false);
144 </table>