Quantcast
Channel: General developer forum
Viewing all articles
Browse latest Browse all 37697

Re: don't understand this evaluation

$
0
0
by David Bogner.  

 
 

Hi Danny,

I am just curious, what are you going to override? I did change the login_url for Moodle 2.3, in order to make it possible, that the login url points to the MNET host on remote MNET sites.

In Moodle 2.4 I get some errors, I think it's because $withlinkgs was added in 2.4. What we actually did change, was the get_login_url() function -> theme_get_login_url().

Best regards,

David

function theme_get_login_url(){
    global $PAGE, $DB;
    $authplugin = get_auth_plugin('mnet');
    $authurl = $authplugin->loginpage_idp_list($PAGE->url->out());
    $host = $DB->get_record('mnet_host', array('id' => $PAGE->theme->settings->alternateloginurl),'name');
    if(!empty($authurl)){
        foreach($authurl as $key => $urlarray){
            if($urlarray['name'] == $host->name){
                $loginurl = $authurl[$key]['url'];
            } else {
                $loginurl = get_login_url();
            }
        }
    } else {
        $loginurl = get_login_url();
    }
    return $loginurl;
}

 

 

Viewing all articles
Browse latest Browse all 37697

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>