MOODLE thinks it 1969

MOODLE thinks it 1969

Jason Bedell གིས-
Number of replies: 11
Hello,

I am trying to integrate Mahara on MOODLE 1.9. I turned networking to on. Mahara then tells me it cannot retrieve the public key from the remote server. I get this message in MOODLE:
About your server
Public key:
Valid until: Wednesday, 31 December 1969, 06:00 PM

Does anyone know how to fix this?

Thank you.
དཔྱ་སྙོམས་ཀྱི་སྐུགས་ཚུ།: -
In reply to Jason Bedell

회신: MOODLE thinks it 1969

Jong-Dae Park གིས-

I think you need to copy the public key of mahara into Moodle manually.

In reply to Jong-Dae Park

Re: 회신: MOODLE thinks it 1969

Jason Bedell གིས-
MOODLE is able to see and use Mahara's public key, but Mahara cannot retrieve MOODLE's.

I think both sites have to be able to see each other's public key to allow for single sign on. Or am I understanding it wrong?
In reply to Jason Bedell

Re: 회신: MOODLE thinks it 1969

Jason Bedell གིས-
It works on my shared server when you follow these directions:
If the public key does not appear, you will have to delete the mnet_localhost_id value in the mdl_config table of your Moodle database so that the mnet environment is forced to renew the environment parameters.

You can do this using the phpMyAdmin tool available in your cPanel. Once in phpMyAdmin, select your Moodle database and browse the table mdl_config. Find the option mnet_localhost_id and delete its value.

Then you can go to your Moodle admin area and check your public key. Please note that once the new public key is activated, the mnet_localhost_id value will be changed. Once this is done, you won't be able to log in to Moodle. To resolve this issue, you should change the mnethostid value for each user in the mdl_user table to match the new value of mnet_localhost_id.

Thanks for the help.
In reply to Jason Bedell

Re: 회신: MOODLE thinks it 1969

Clark Moodler གིས-
Aha, perfect, Thank You, Jason!

(p.s. I couldn't get beyond the step on page 13 in the Mahoodle.pdf until I did this...)

Of course, I got to the end, and then went to try it, and now cannot get into Moodle at all! None of my accounts work - it says

"Invalid login, please try again
If you are a Moodle Network remote user and can confirm your email address here, you can be redirected to your login page."

I've tried adding accounts on mahara as well... but I'm locked out.... Hrmpf!


In reply to Clark Moodler

Re: 회신: MOODLE thinks it 1969

Jason Bedell གིས-
I remember the frustration very well. Did you make sure that mnethostid value for each user in the mdl_user table matches the new value of mnet_localhost_id. On mine, the mnethostid value became 3 (I think), so I had to manually change the ment_localhost_id from 1 to 3. Once I did that, all users could log in. Hope this helps.

In reply to Jason Bedell

Re: 회신: MOODLE thinks it 1969

Clark Moodler གིས-
It did help, thanks! I got in, but now when I click on the network server for Mahara, I get a 404 error: (not at all related to the earlier part of this thread, but in case you have an inkling about thisདགའ་འཛུམ་

The requested URL /mahara/auth/mnet/land.php?token=edit6ec24&idp=http://www.mysite.com/moodle&wantsurl=%2F does not exist.

The strange thing is, in both apps I have properly configured with the correct wwwroot address, but it looks like something is still off...

Thought this would all be a little easier! དགའ་འཛུམ་
In reply to Clark Moodler

Re: 회신: MOODLE thinks it 1969

Nigel McNie གིས-
Hi - what version of Moodle are you using? Version 1.8 does not do SSO with Mahara. If using version 1.9, you have to have set the peer application type to "Mahara" on the Moodle peers page, rather than the default of Moodle.

Hope that helps!
In reply to Clark Moodler

Re: 회신: MOODLE thinks it 1969

Jason Bedell གིས-
I haven't seen that particular problem. You said the wwwroot is properly configured, which is the most common problem. How is your site configured? ie. My MOODLE is www.mysite.com and my Mahara is www.mysite.com/mahara. I don't have slashes, but in other forums people have put a slash in one wwwroot and not the other which caused problems. Hope this helps.
In reply to Jason Bedell

Re: 회신: MOODLE thinks it 1969

Anthony Borrow གིས-
Core developers གི་པར Plugin developers གི་པར Testers གི་པར
Going back and rereading this more carefully, I realize what I did wrong. I deleted the mnet_localhost_id value which then did not allow me to login to the site. Rather than using the word delete I would say set the mnet_localhost_id='' with UPDATE mdl_config SET value='' WHERE name='mnet_localhost_id'; I figured I would post a little warning so that folks did not do what I did. I realized I had done something wrong when I was receiving the error message that the guest account could not be created and the database was not corrupted. Peace - Anthony
In reply to Anthony Borrow

Re: 회신: MOODLE thinks it 1969

Anthony Borrow གིས-
Core developers གི་པར Plugin developers གི་པར Testers གི་པར
I attempted this on one of my servers and then it kept me from logging in. I'm not sure that this suggestion of removing the value for the mnet_localhost_id actually helps at least for me it only created problems. Perhaps I am missing something. Peace - Anthony