profile_sideblock display the institution name instead peer name

Bug #1472382 reported by issam.taboubi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
New
Undecided
Unassigned

Bug Description

That is our situation:
we have an institution called "University of Montreal" in which we have an XML-RPC authentication with the name of the authority is "StudiUM" (Moodle).

The problem is: when we connect from StudiUM to Mahara, it is displayed "You have logged in from University of Montreal." it is not logical because it should show You have logged in from Studium. In the instituion "University of Montreal" We have several entities, we want to specify which entity it is.

I suggest to replace the institution name by the peer name :

replace this :
if ($authinstance) {
        $authobj = AuthFactory::create($authinstance);
        if ($authobj->authname == 'xmlrpc') {
            $peer = get_peer($authobj->wwwroot);
            if ($SESSION->get('mnetuser')) {
                $data['mnetloggedinfrom'] = get_string('youhaveloggedinfrom', 'auth.xmlrpc', $authobj->wwwroot, institution_display_name($peer->institution));
            }
            else {
                $data['peer'] = array('name' => $peer->name, 'wwwroot' => $peer->wwwroot);
            }
        }
    }

By :

if ($authinstance) {
        $authobj = AuthFactory::create($authinstance);
        if ($authobj->authname == 'xmlrpc') {
            $peer = get_peer($authobj->wwwroot);
            if ($SESSION->get('mnetuser')) {
                $data['mnetloggedinfrom'] = get_string('youhaveloggedinfrom', 'auth.xmlrpc', $authobj->wwwroot, $peer->name);
            }
            else {
                $data['peer'] = array('name' => $peer->name, 'wwwroot' => $peer->wwwroot);
            }
        }
    }

Revision history for this message
issam.taboubi (issam-tab) wrote :
Revision history for this message
issam.taboubi (issam-tab) wrote :
Revision history for this message
issam.taboubi (issam-tab) wrote :
description: updated
Revision history for this message
Aaron Wells (u-aaronw) wrote :

Hi Issam,

We actually already made this change for Mahara 15.04. :) See Bug 1413547.

Cheers,
Aaron

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.