Elegance theme : login page issue - no authentification choice

Elegance theme : login page issue - no authentification choice

by dag bro -
Number of replies: 2

Hello,

We have on our Moodle site two ways of authentification : manual and CAS.

When Elegance theme activated, the page with choice of authentification disappears and users have no possibility to log in with the CAS.

That's what we have :

and what we would like to have is the page with a choice between CAS users and Others first.

It works with any other theme on the same Moodle site.

How to fix it ?

Thank you in advance for your help.

Kind regards

Average of ratings: -
In reply to dag bro

Re: Elegance theme : login page issue - no authentification choice

by Danny Wahl -

it's not possible to have alternative login methods and use the fancy login page.  disable that in the settings and you will get the "normal" login page with CAS options. The short version of "why" is because /login/ hasn't been written as a renderer yet

MDL-40160

In reply to Danny Wahl

Re: Elegance theme : login page issue - no authentification choice

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

I deleted my last comment so as not to confuse the issue here.

Having read read MDL-40160 it should be possible ti create a custom login page if you follow the instructions found in...

../admin/settings.php?section=manageauths 

By creating a customised login page where the action in the login form points to your own site's ..login/index.php

I seem to recall Shaun Daubney having a similar problem in the older Aardvark themes, he got round it eventually using something like this...

Copyright 2011 Shaun Daubney (Aardvark theme)

<?php
    function get_content () {
    global $USER, $CFG, $SESSION, $COURSE;
    $wwwroot = '';
    $signup = '';}

    if (empty($CFG->loginhttps)) {
        $wwwroot = $CFG->wwwroot;
    } else {
        $wwwroot = str_replace("http://", "https://", $CFG->wwwroot);
    }

if (!isloggedin() or isguestuser()) {
    echo '<div class="profilelogin" id="profilelogin">';
    echo '<form id="login" method="post" action="'.$wwwroot.'/login/index.php?authldap_skipntlmsso=1">';
    echo '<ul>';
    echo '<li><input class="loginform" type="text" name="username" id="login_username" value="" placeholder="'.get_string('username').'" /></li>';
    echo '<li><input class="loginform" type="password" name="password" id="login_password" value="" placeholder="'.get_string('password').'" /></li>';
    echo '<li><input type="submit" value="&nbsp;&nbsp;'.get_string('login').'&nbsp;&nbsp;" /></li>';
    echo '</ul>';
    echo '</form>';
    echo '</div>';
    echo '</div>';
} else {
    echo '<div class="profilename" id="profilename">';
    echo '<a href="'.$CFG->wwwroot.'/user/view.php?id='.$USER->id.'&amp;course='.$COURSE->id.'">'.$USER->firstname.' '.$USER->lastname.'</a>';
?>

Cheers

Mary