Forums
Hi, guys,
another question in a few hours !! As you can easily guess, I'm still in the 'dummy' category with Opigno ...
Here is the question.
I've got a class with 5 courses. Each of the last 4 courses depends on the first one. I mean, when you take and pass the first one, you can then take all of the others.
So, what I expect is that when a user logs in for the first time she sees just the first one, as she is in a pending status for the others.
Once she passes the first, all other courses appear.
But, as I use a test user, who never logged in before, as he logs in for the first time the classes shows 2 courses, the first (correct) and the last one (?!).
I'm probably missing something.
Can you guess what?
Thanks again.
GP
Hi GP,
Hi GP,
Please confirm that all 4 couses have the course 1 inside the required course field.
Maybe you have incorrectly chosen the required course for the one that is beeing shown. Can happen.
I just tested and it worked fine.
Another thing that could have happened was that you created that course and added that user as active. And only afterwards added the user to the class. If that is the case, remove the user from the class and add him again.
Best regards
In reply to Hi GP, by James Aparicio
James, thanks.
Hi GP,
Hi GP,
I just tested this and it worked perfectly.
Make sure that when you add a user to the class, afterwards he is set as active on couse 1 and pending on all the others.
Make sure the course 1 has a required lesson for the user to have to pass in order to complete the course 1.
Maybe the lesson you have required for the user to pass is of type theory? If so, the user will score always 0. Maybe you forgot to change the pass rate of the lesson? By default it is 75%. You have to set it as 0.
Best regards
In reply to Hi GP, by James Aparicio
Hi, James.
Hi GP,
Hi GP,
Thank you for finding this bug.
I have fixed it and it will be included in our next release.
https://www.drupal.org/node/2337461
In the meanwhile look at the changes in the opigno_og_prereq.rules.inc and make those changes to your code. profiles/opigno_lms/modules/opigno/opigno_og_prereq.
http://cgit.drupalcode.org/opigno/commit/?id=3363629
http://cgit.drupalcode.org/opigno/commit/?id=df8e033
After doing that, on your platform, go to
admin/config/workflow/rules/reaction/manage/rules_get_courses_that_require_this_course
and substitute the "fetch entity by property" action by the action under Opigno called " Get passed courses with required course" passing the variable "course" and providing the variable "entities_fetched".
The problem was that the action "fetch entity by property" respects entity access, and because the rule is triggered by a user that does not have access to that entity, it was not fetching the courses that require the given course.
If you do these changes it will work.
In reply to Hi GP, by James Aparicio
Hi, I applied patch e I
You did both changes?
You did both changes?
Implementation missing means you did not do the second one.
Best regards
Yes, I applied all changes,
Hello, i reapplied the patch
This is a fantastic website