Hikashop enrols users into the wrong role
- Web Buster UK Ltd
-
Topic Author
- Offline
- Elite Member
-
Moodle 3.1.1
Joomdle 1.0.7
When a user buys a course through Hikashop (Joomla frontend), he is enrolled into the course as Teacher in Moodle. We have set manual enrolment default role as Student and joomdle enrolment default role as Student. When the user enrols through self-enrolment in Moodle, he is correctly placed as Student. Is there anything else we are missing?
Please Log in or Create an account to join the conversation.
- Antonio Durán
-
- Offline
- Moderator
-
- Posts: 7930
I think it's the first time I've heard about this problem, so most likely it will have something to do with your specific configuration...
Have you changed roles in Moodle? Student has database id=5 in Moodle normal installation, and that's what Joomdle uses for enrolments.
Only other thing I can think of is: are you using profile types integration?
Please Log in or Create an account to join the conversation.
- Web Buster UK Ltd
-
Topic Author
- Offline
- Elite Member
-
You might spot something because we have installed this on 2 sites and its doing the same on both sites.
Please Log in or Create an account to join the conversation.
- Antonio Durán
-
- Offline
- Moderator
-
- Posts: 7930
Please Log in or Create an account to join the conversation.
- Web Buster UK Ltd
-
Topic Author
- Offline
- Elite Member
-
info sent
Please Log in or Create an account to join the conversation.
- Web Buster UK Ltd
-
Topic Author
- Offline
- Elite Member
-
Antonio Durán wrote: Hi.
I think it's the first time I've heard about this problem, so most likely it will have something to do with your specific configuration...
Have you changed roles in Moodle? Student has database id=5 in Moodle normal installation, and that's what Joomdle uses for enrolments.
Only other thing I can think of is: are you using profile types integration?
It seems to be a new issue, it had been working fine previously with Joomdle 1.0.6. Roles are unchanged moodle's defaults
We don't use profile types integration.
Please Log in or Create an account to join the conversation.
- Web Buster UK Ltd
-
Topic Author
- Offline
- Elite Member
-
Many thanks Antonio for your very prompt help, who has identified the issue is due to roleid=5 is Teacher and not Student.
Is there a way to set which role a user gets assigned after buying a course through Hikashop? This might solve our problem with the wrong role (id) being used.
Please Log in or Create an account to join the conversation.
- Antonio Durán
-
- Offline
- Moderator
-
- Posts: 7930
I have never seen that in a Moodle installation, so if I were you I would just reinstall, to avoid potential problems in the future.
Please Log in or Create an account to join the conversation.
- Web Buster UK Ltd
-
Topic Author
- Offline
- Elite Member
-
We are currently looking into this but one very possible reason is due to auto-increment in our MySQL database causing it to increment by 2 instead of 1 each time.
Please Log in or Create an account to join the conversation.
- Antonio Durán
-
- Offline
- Moderator
-
- Posts: 7930
But googling it, it seems it can happen:
dba.stackexchange.com/questions/5656/mys...crement-going-2-by-2
Please Log in or Create an account to join the conversation.