- Posts: 3
Feature Requests
Please do NOT use this section of the forum to request help if Joomdle does not work for you in some particular way. Your post will be deleted.
Please do NOT use this section of the forum to request help if Joomdle does not work for you in some particular way. Your post will be deleted.
auto enrol on signup
- Rui Barroso
- Topic Author
- Offline
- New Member
-
Less
More
3 years 10 months ago #1
by Rui Barroso
auto enrol on signup was created by Rui Barroso
I have Joomdle working well with virtuemart.
When a user signup on Joomla i would like to auto enrol that user into a course. Is that possible? I tried the plugin enrol_signup but it's not working. Thanks in advance.
When a user signup on Joomla i would like to auto enrol that user into a course. Is that possible? I tried the plugin enrol_signup but it's not working. Thanks in advance.
Please Log in or Create an account to join the conversation.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7848
3 years 10 months ago #2
by Antonio Durán
Replied by Antonio Durán on topic auto enrol on signup
Hi.
The enrol_signup plugin worked fine last time I tested, a month ago or so.
Did you enable the enrol method and add it to the course you want users to be enroled to upon registration?
The enrol_signup plugin worked fine last time I tested, a month ago or so.
Did you enable the enrol method and add it to the course you want users to be enroled to upon registration?
Please Log in or Create an account to join the conversation.
- Rui Barroso
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 3
3 years 10 months ago #3
by Rui Barroso
Replied by Rui Barroso on topic auto enrol on signup
On the course i want the new users to be enrolled i configured like this:
www.screencast.com/t/4icOyyEsq1O
Please Log in or Create an account to join the conversation.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7848
3 years 10 months ago #4
by Antonio Durán
Replied by Antonio Durán on topic auto enrol on signup
Hi. Let me do some testing and get back to you.
Please Log in or Create an account to join the conversation.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7848
3 years 10 months ago #5
by Antonio Durán
Replied by Antonio Durán on topic auto enrol on signup
Sorry for the delay, crazy week...
I tested, and found the same issue as you did:
- Signup plugin works for manual users in Moodle
- It does not seem to work now for users created in Joomla
I will investigate more to see if I can find the reason for this, and hopefully a fix. I will let you know as soon as possible.
I tested, and found the same issue as you did:
- Signup plugin works for manual users in Moodle
- It does not seem to work now for users created in Joomla
I will investigate more to see if I can find the reason for this, and hopefully a fix. I will let you know as soon as possible.
Please Log in or Create an account to join the conversation.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7848
3 years 10 months ago #6
by Antonio Durán
Replied by Antonio Durán on topic auto enrol on signup
Hi again.
I found where the issue is.
In file moodle/auth/joomdle/auth.php, function create_joomdle_user_record we have a line commented out:
// \core\event\user_created::create_from_userid($newuser->id)->trigger();
That line is the one responsible for triggering the user_created event, used by the signup enrol plugin.
If you un-commnent that line, new users created from Joomla are correctly added to the course.
Now, I can't remember why I removed that line. Maybe it caused some issue, but I will need to do more testing to try and find out.
If you want, you can un-comment the line and test.
I found where the issue is.
In file moodle/auth/joomdle/auth.php, function create_joomdle_user_record we have a line commented out:
// \core\event\user_created::create_from_userid($newuser->id)->trigger();
That line is the one responsible for triggering the user_created event, used by the signup enrol plugin.
If you un-commnent that line, new users created from Joomla are correctly added to the course.
Now, I can't remember why I removed that line. Maybe it caused some issue, but I will need to do more testing to try and find out.
If you want, you can un-comment the line and test.
Please Log in or Create an account to join the conversation.
- Rui Barroso
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 3
3 years 10 months ago #7
by Rui Barroso
Replied by Rui Barroso on topic auto enrol on signup
Hi Antonio,
Sorry for late reply. That line was not commented out on my file: www.screencast.com/t/Q51oKSYi
Sorry for late reply. That line was not commented out on my file: www.screencast.com/t/Q51oKSYi
Please Log in or Create an account to join the conversation.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7848
3 years 9 months ago #8
by Antonio Durán
Replied by Antonio Durán on topic auto enrol on signup
Ah ok.... then I don't know what is happening... I would need to debug on the site to try to find out.
Please Log in or Create an account to join the conversation.