Forums | Mahara Community
Mahara/Moodle integration
/
Lastname problem in mahara
15 May 2013, 15:54
Hi, i'm new here and also new in developing sites and stuff.
*intro*
Recently I am tasked to setup mahara e-portfolio system for a local university, and was asked to integrate it with moodle. Well, the process ends up well in installing and the integration process was handled by the administrator of the moodle system. User will only gain access to their e-portfolio pages through SSO from moodle.
*problem*
The problem i'm facing right now is whenever user logs into mahara via SSO from moodle, mahara will always prompt a message to insert last name (with the title being changing password).
http://postimg.org/image/4weo166nv/
While the problem is not so much on the tile being different from the body of the message, but the prompting. Even if user have inserted a last name now, the next SSO log in will prompt this message again. May I know a way so that I can pre-fill the last name for all the users during their SSO?
Edits to this post:
- Aaron Wells - 21 May 2013, 16:59
- Aaron Wells - 21 May 2013, 17:00
15 May 2013, 16:50
Hi Abdullah,
Where did you upload the photo? If you uploaded it to Mahara, it will need to be in a public space, e.g. on a public page in your account. Otherwise, it is not accessible to others. You could upload the photo elsewhere and linke the URL.
Cheers
Kristina
21 May 2013, 18:56
Thanks for the reply,
Sorry i was late in replying because it seems like the response for mahara was sent to my email spam folder, and i wasn't aware of that for awhile. But it seems Mr. Aaron has made it into a link to view the picture. (I posted the picture on an image hosting site though)
21 May 2013, 17:12
Since the image wasn't displaying, I edited your message to show a link to the image instead.
Yep, it looks like your SSO is not sending across lastname. Mahara checks when a person signs in and makes sure they've got "firstname", "lastname", and "email" populated, and sends them to that page if they don't have them all. It's the same page template it uses if they have the "force change of password on next login" flag set... we should probably file a bug to change that label if they're not actually changing their password.
Anyway, which authentication plugin are you using, on the Mahara side? Many of them have settings to tell it which field on the identity provider it should use as the last name.
Cheers,
Aaron
21 May 2013, 19:12
Thanks for handling the image problem sir.
I'm not really sure, but if I'm not mistaken, we're using XMLRPC like the one in the mahoodle.pdf instructs. I'll be sure to confirm it after the admin replies my email.
Well, the reason why I want to create a lastname for everyone is because everbody did not have a lastname in moodle database. This is confirmed by the admin herself as she has trouble handling it before so she said she have written a script to bypass or ignore the lastname in moodle. She asked me to do the same for mahara, but I don't really know how.
Mubarak
21 May 2013, 19:41
If you go to htdocs/artefact/internal/lib.php, and look at the ArtefactTypeProfile class method "get_always_mandatory_fields()" on line 408, that's ultimately what defines the fields it requires each incoming XML-RPC user to have. Just remove lastname from that list (comment out line 411) and that will probably do the trick.
Or if you want to fill in a placeholder last name, the code for that is in htdocs/auth/xmlrpc/lib.php around line 206, where it sets "user->lastname = $remoteuser->lastname;"
Cheers,
Aaron
21 May 2013, 21:32
I see, thanks for the answer. I'll try it very soon and reply the result.
I guess to fill in the lastname for user from the document htcdocs/auth/xmlrpc/lib.php, I should just change "user->lastname = $remoteuser->lastname;" to "user->lastname = "something";" right?
Mubarak
22 May 2013, 10:02
Well, if some of the people in Moodle have last names that you want to retain in Mahara, you would be better to do something like:
if (empty($remoteuser->lastname)) {
$user->lastname = 'something';
}
else {
$user->lastname = $remoteuser->lastname;
}
Cheers,
Aaron
22 May 2013, 19:03
wow, thats nice.
right now i'm trying to do the steps you've suggested but it seems the moodle server is now down for the moment. But I did get the chance to try changing the lib.php within htdocs/auth/xmlrpc but that doesn't seem to work. any idea why? It still prompts me at that moment to fill in the lastname and the new lastname I filled is the one saved.
I was about to do the 1st method you suggested which are tweaking the lib.php within htdocs/artefact/internal but the server have chosen too stop any connection.
Mubarak
(should I add Cheers before my name even if the problem is not yet solved? )
- «Previous page
- 1
- 2
- »Next page