Example #1
0
    if ($config->supportcourses == 'internal') {
        echo '<div align="left">
                <input type="submit" name="initialize_roles" value="';
        print_string('auth_saml_initialize_roles', 'auth_saml');
        echo '" />
              </div>
             ';
    }
}
?>
</div>

<div id="externalmapping">
    <?php 
if (isset($err['samlexternal'])) {
    formerr($err['samlexternal']);
}
?>
    <table id="externalmappinginfo" class="center">
        <tr valign="top">
            <td colspan="2"><?php 
print_string("auth_saml_mapping_dsn_description", "auth_saml");
?>
</td>
        </tr>
        <tr valign="top" class="required">
            <td class="right"><?php 
print_string("auth_saml_course_mapping_dsn", "auth_saml");
?>
:</td>
            <td>
Example #2
0
    if ($user_is_openid && $allow_append || !$user_is_openid && $allow_change) {
        $endpoint = $CFG->wwwroot . '/auth/openid/actions.php';
        $action = $user_is_openid && $allow_append ? 'append' : 'change';
    } else {
        $errorkey = 'auth_openid_already_loggedin';
    }
} else {
    $endpoint = $CFG->wwwroot . '/login/index.php';
}
if (empty($errorkey)) {
    // NEW OpenID SSO operation
    $oid_plugin = get_auth_plugin('openid');
    if (!$login_all && empty($openid_login) && $oid_plugin->is_sso()) {
        $msg = empty($config->auth_openid_sso_message) ? $errormsg : $config->auth_openid_sso_message;
        redirect("{$endpoint}?openid_url={$config->auth_openid_custom_login}" . "&req_info=1" . ($action ? "&openid_action={$action}" : ''), $msg, empty($msg) ? -1 : 10);
        // TBD: $config->auth_openid_sso_message and delay=>10
    }
}
$navlinks = array(array('name' => $loginsite, 'link' => null, 'type' => 'misc'));
$navigation = build_navigation($navlinks);
print_header("{$site->fullname}: {$loginsite}", $site->fullname, $navigation, $focus, '', true, '<div class="langmenu">' . $langmenu . '</div>');
if (!empty($errorkey)) {
    print_error($errorkey, 'auth_openid');
}
if (!empty($errormsg)) {
    echo '<div class="loginerrors">';
    formerr($errormsg);
    echo '</div>';
}
include 'login_form.html';
print_footer();
Example #3
0
 protected function print_field($name, $caption, $field)
 {
     // Attempt to generate HTML like formslib.
     echo '<div class="fitem">';
     echo '<div class="fitemtitle">';
     if ($name) {
         echo '<label for="' . $name . '">';
     }
     echo $caption;
     if ($name) {
         echo "</label>\n";
     }
     echo '</div>';
     if (isset($this->errors[$name])) {
         $extraclass = ' error';
     } else {
         $extraclass = '';
     }
     echo '<div class="felement' . $extraclass . '">';
     if (isset($this->errors[$name])) {
         formerr($this->errors[$name]);
     }
     echo $field;
     echo '</div>';
     echo '</div>';
 }