← Back to team overview

mahara-contributors team mailing list archive

[Bug 1472382] [NEW] profile_sideblock display the institution name instead peer name

 

Public bug reported:

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 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);
            }
        }
    }

** Affects: mahara
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1472382

Title:
  profile_sideblock display the institution name instead  peer name

Status in Mahara ePortfolio:
  New

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 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);
              }
          }
      }

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1472382/+subscriptions


Follow ups