Forums | Mahara Community

Mahara/Moodle integration /
Moodle (2.0) to Mahara (1.4) problem : wrong link provided


Iñaki Arenaza's profile picture
Posts: 253

05 July 2012, 16:06

Hi

as Hugh Davenport has pointed out, you are using the URL with the parameters"from the wrong side" of the MNET relationship. I have just configured a setup like the one you describe, with mahara at http://localhost/mahara/ and moodle at http://localhost/moodle-22/.

I make sure I'm logged out of both moodle and mahara after setting the whole thing up. Then I type the following URL in my browser:

http://localhost/mahara/auth/xmlrpc/jump.php?wr=http://localhost/moodle-22&ins=4

and I'm presented with mahara login screen, and as soon as I type my "local" mahara username and password, I'm redirected to Moodle front page already logged in. The top right message reads "You are logged in as Iñaki Arenaza from Home - Mahara (Logout)". "Home - Mahara" is the name of the Mahara peer in Moodle.

One important detail (that I didn't remember the first time, and made the SSO fail with a Mahara error message) is that you need to configure the 'Parent Authority'  for your XMLRPC authentication plugin in Mahara. As soon as I set it to 'Internal', everything started working.

If I set the wantsurl parameter pointing to a given Moodle URL, I land at that URL after authentication (in Mahara). For example, if I type:

http://localhost/mahara/auth/xmlrpc/jump.php?wr=http://localhost/moodle-22&ins=4&wantsurl=/my&remoteurl=1

I land in http://localhost/moodle-22/my. You can set any Moodle relativ URL and you will end up there.

By the way, if you are asking where did I get that "ins=4" from (and you should, as it's a requied parameter), it refers to the id of your XMLRPC authentication plugin in the auth_instance table. But there's no need to dig it up in the database :-) I simply copied the link from the remote server box that appers on the right column once you have everything correctly setup :-)

Hope that helps.

Saludos.
Iñaki.

anonymous profile picture
Account deleted
Posts: 17

11 July 2012, 4:22

Ok, so I've absolutely followed all of your instructions and replaced manually the URL by giving :

http://mahara.mysite.com/auth/xmlrpc/jump.php?wr=http://moodle.nmysite.com&ins=5&wantsurl=/&remoteurl=1

 

Both "wr" and "ins" parameters were filled (ins = 5 as my auth_instace showed up).

But I've an error again when I try to log in from Moodle to Mahara :

Access denied

You don't have the permission to access this page

Host not approved for sso

 

By the way, I think I've correctly set up the SSO authentification both in Moodle and in Mahara. I've also allowed every server to communicate and connect to my Mahara by checking the right checkbox in the "Network" menu.

Please take note that the parent authority for the XMLRPC plugin for the institution is correcty set to "internal".

I'm sure of it because i canaccess to my Mahara while I'm connected in Moodle. It looks weird to be honest.. Any suggestion?

Iñaki Arenaza's profile picture
Posts: 253

18 July 2012, 15:19

I've had a look at the code where that particular error message appears (Host not approved for sso). The error triggers when the value of the 'wr' parameter doesn't match with any of the wwwroot values of the authentication plugins (instances) of the user (including parent authorities).

So make sure you have the exact same value in the 'wr' parameter and the 'wwwroot' setting for the XMLRPC authentication plugin. The comparison is case-sensitive(!!) and compares for exact match, so make sure you don't have trailing slashes in one place and not the other, etc.

In addition to that, it also checks that the authentication plugins have 'We SSO out' and 'They auto-create Users', so make sure you have them enabled.

Saludos.
Iñaki.

anonymous profile picture
Account deleted
Posts: 12

19 July 2012, 11:11

Hi All,

still I have these parameter problems and I followed your hints to check the parent authority and check the trailing slashes, case sensitivity.

Stil I guess the problems is because of the different naming of the same parameter.

Mahara jump.php is looking for the parameter name "wr"

while

Moodle gives the paramtername "hostwwwroot"

Do you have the same occurence?

 

I just set up a fresh Mahara 1.4 and a fresh Moodle 2.3 I configured both for XMLRPC following the documentation: https://wiki.mahara.org/images/7/75/Mahoodle-updated-en.pdf

The only things I changed are "I set WE SSO OUT in Mahara institution XMLRPC configuration" and equaly I configured Moodle that users from Mahara cann SSO IN to Moodle.

The result of this configuration is, that I have a link in Mahara (if I am loged in) to get to Moodle and this link works fine. jump.php is called with the parameter name "wr".

So far so good.

Now let's come to the problem.

- Still the same configuration. -

I go to my moodle start page (not loged in) then there is a link in the upper right called "login" I click this link and land on a login page of moodle. But I do NOT log in there. Instead I click the link in the very bottom labeled:

Using your login on: Home - Mahara

Then I land on a login site of my mahara. I type in there a valid user and password and click the login button. And then I land on this error page with the Paramter Error saying:

Mahara: Invalid Parameter
A required parameter is missing or malformed

Missing parameter 'wr' and no default supplied

---

OK so far so bad. But now I look at the adressbar of my favorite browser and look there:

http://localhost/mahara/auth/xmlrpc/jump.php?hostwwwroot=http://localhost/moodle&wantsurl=&remoteurl=1

And this looks wrong because the parameters in mahara are called "wr" and "ins" and I forgot the name of the third one. You can look this up in .../mahar/htdocs/auth/xmlrpc/jump.php there it looks for wr and so on and NOT for hostwwwroot what is supplied by moodle.

I really double checked all configurations and set up new moodle and mahara again and again, but I don't know how to overcome this error.

 

By the way, what I tried is to change the jump.php in Mahara, if I change the "wr" to "hostwwwroot" then the link from moodle works fine, as expacted...but the link in mahara (if you are loged in) fails, as expacted.

I hope I described the problem understandable!?

Maybe one could help us, as we work on this for a long time.

Cheers,

Bjoern

14 results