- Posts: 14
How To / General
[Solved] Question on the Joomdle Auth Plugin in Moodle
- Adolfo Franco
-
Topic Author
- Offline
- New Member
-
- English Teacher & Moodler
Less
More
11 years 1 month ago - 11 years 1 month ago #1
by Adolfo Franco
[Solved] Question on the Joomdle Auth Plugin in Moodle was created by Adolfo Franco
Hi.
I have a little problem which is not directly related to Joomdle, I think, so I'm just cheking out.
I use Joomla to create users thru forms and Joomdle to add validated users to Moodle - this latter step is done manually for policy reasons. Once in Moodle, I wanted them to receive an automated welcome message and so I use an Moodle plugin called Moodle Welcome. This is important because otherwise I have to manually email every new user from Joomdle to give them follow up instructions.
So far so good. However, altough the Joomdle auth plugin is listed in that Moodle Welcome plugin and so eligible to the welcome message, the message/e-mail is not sent.
I sure asked the plugin developer and he said that he had not tried the Joomdle auth plugin yet. But acoording to him, "This plugin (the Moodle Welcome) hooks into Moodle's event triggers that are fired when a new user is created. Auth plugins should fire this event. If the Joomdle auth plugin does not have this trigger no email will be send."
Well, since all users added thru Joomdle are sucessfully created in Moodle with no other issues, I believe the so called event is indeed trigered and the problem resides somewhere else.
I'm just asking for an opinion. Thanks
I have a little problem which is not directly related to Joomdle, I think, so I'm just cheking out.
I use Joomla to create users thru forms and Joomdle to add validated users to Moodle - this latter step is done manually for policy reasons. Once in Moodle, I wanted them to receive an automated welcome message and so I use an Moodle plugin called Moodle Welcome. This is important because otherwise I have to manually email every new user from Joomdle to give them follow up instructions.
So far so good. However, altough the Joomdle auth plugin is listed in that Moodle Welcome plugin and so eligible to the welcome message, the message/e-mail is not sent.
I sure asked the plugin developer and he said that he had not tried the Joomdle auth plugin yet. But acoording to him, "This plugin (the Moodle Welcome) hooks into Moodle's event triggers that are fired when a new user is created. Auth plugins should fire this event. If the Joomdle auth plugin does not have this trigger no email will be send."
Well, since all users added thru Joomdle are sucessfully created in Moodle with no other issues, I believe the so called event is indeed trigered and the problem resides somewhere else.
I'm just asking for an opinion. Thanks
Last edit: 11 years 1 month ago by Antonio Durán.
The topic has been locked.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7936
11 years 1 month ago #2
by Antonio Durán
Replied by Antonio Durán on topic Question on the Joomdle Auth Plugin in Moodle
Hi Adolfo.
Joomdle should be triggering event as it calls create_user_record(), which triggers the event.
Is the plugin working for moodle-only users? I mean: if you set the plugin to use manual auth plugin too, and create a new user in moodle as an admin, does the email work?
Joomdle should be triggering event as it calls create_user_record(), which triggers the event.
Is the plugin working for moodle-only users? I mean: if you set the plugin to use manual auth plugin too, and create a new user in moodle as an admin, does the email work?
The topic has been locked.
- Adolfo Franco
-
Topic Author
- Offline
- New Member
-
- English Teacher & Moodler
Less
More
- Posts: 14
11 years 1 month ago #3
by Adolfo Franco
Replied by Adolfo Franco on topic Question on the Joomdle Auth Plugin in Moodle
Hi Antonio,
Thanks for the reply.
I have tested it with a manual account and the Moodle Welcome plugin sent the email just fine.
Thanks for the reply.
I have tested it with a manual account and the Moodle Welcome plugin sent the email just fine.
The topic has been locked.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7936
11 years 1 month ago #4
by Antonio Durán
Replied by Antonio Durán on topic Question on the Joomdle Auth Plugin in Moodle
I installed the plugin and checked how it all works toguether, and see the same: it will not work as it is now.
But it seems I have found a quick fix that should make it work.
Add this function to moodle/auth/joomdle/auth.php:
You can put this function anywhere inside the class, so you can put it just after this line:
But it seems I have found a quick fix that should make it work.
Add this function to moodle/auth/joomdle/auth.php:
Code:
function get_userinfo($username) {
global $CFG, $DB;
$username = utf8_decode ($username);
$username = strtolower ($username);
$juser_info = $this->call_method ("getUserInfo", $username, '');
return $juser_info;
}
You can put this function anywhere inside the class, so you can put it just after this line:
Code:
class auth_plugin_joomdle extends auth_plugin_manual {
The topic has been locked.
- Adolfo Franco
-
Topic Author
- Offline
- New Member
-
- English Teacher & Moodler
Less
More
- Posts: 14
11 years 1 month ago #5
by Adolfo Franco
Replied by Adolfo Franco on topic Question on the Joomdle Auth Plugin in Moodle
Thank you I'll try it out and let you know.
The topic has been locked.
- Adolfo Franco
-
Topic Author
- Offline
- New Member
-
- English Teacher & Moodler
Less
More
- Posts: 14
11 years 1 month ago - 11 years 1 month ago #6
by Adolfo Franco
Replied by Adolfo Franco on topic Question on the Joomdle Auth Plugin in Moodle
:woohoo: It has worked just fine!
Thank you again.
Thank you again.
Last edit: 11 years 1 month ago by Adolfo Franco. Reason: Typo
The topic has been locked.