Restriction by course completion
Maintained by
Renaat Debleu
Restrict module and section access based on course completion.
Comments
Product ratings and reviews are coming to Moodle Marketplace. Until then, existing comments remain available to read, but new posts have been disabled.
i've try this plugin
Thanksyou for this plugin
I have been using the availability_coursecompleted plugin and noticed a potential UX improvement. Currently, the prerequisite course is displayed as a plain-text shortname.
To help users navigate faster, I have locally modified the code to display the fullname and wrap it in a clickable link. This allows students to jump directly to the required course.
However, my changes are overwritten every time I update Moodle. Could you please consider integrating this into the core code?
My suggested change in availability/condition/coursecompleted/classes/condition.php:
// Original code:
// $name = format_string(get_course($this->courseid)->shortname);
// Suggested improvement:
$courseurl = new \moodle_url('/course/view.php', array('id' => $this->courseid));
$formattedname = format_string(get_course($this->courseid)->fullname);
$name = \html_writer::link($courseurl, $formattedname);
or if you have a better suggestion
I will try that suggestion
thankyou
All tests for the MOODLE_405_STABLE branch pass on github: https://github.com/ewallah/moodle-availability_coursecompleted/actions/runs/25438919941 So I think you have course completion not enabled.
R
Did you checked the troubleshooting? https://github.com/ewallah/moodle-availability_coursecompleted/blob/main/README.md
I will try to set up a github workflow to proove this plugin is working fine.
R
I am contacting you about the Moodle plugin Restriction by course completion.
I tried installing it on a Moodle 4.5.11 platform. The installation seems to work correctly, but unfortunately the restriction does not appear when clicking on the access restrictions settings for an activity or section.
To check this further, I also tested the plugin on a Moodle 5.1 test platform, and everything works perfectly there: the restriction is available and can be used as expected.
This is unfortunate, because the plugin would meet my needs very well, but I do not plan to upgrade to Moodle 5.1 for the time being.
Do you know whether this behaviour on Moodle 4.5.11 is already known? Is there any workaround, adaptation, or version compatible with Moodle 4.5?
Thank you in advance for your reply, and thank you for your work on this plugin.
Best regards,
Nicolas Thorel
This way your gradebook, availability restrictions, groups and groupings, course completions, ... will continue to work fine.
Sorry, this plugin cannot give grades, Moodle would simply not know where the grade was coming from. Because only activities can generate a grade, you'll need a module (lesson/quiz/workshop/...) to do the job. Perhaps the most simple way would be to add a quiz where students always pass?
R
We'd like to do one other thing when the course is marked "Complete": put a mark in the gradebook to show a "Pass" for the student. Your documentation indicates that you can do other things by using this course-completion-restriction plugin ("close discussion forums, hide quizes or exams when a user finished a course"), but I can't see any examples for those. Do you know how we could set a grade in a gradebook?
You are correct. with this plugin you can only restrict access to modules and sections.
If you want to give access to a course, you need an enrol plugin: moodle-enrol_coursecompleted will do this job for you.
Is this correct, or am I missing a way to do this? Thanks
THX for the problem report. Can you report a complete error report in the tracker (https://github.com/ewallah/moodle-availability_coursecompleted/issues). I'm particularly interested in your PHP version.
Because the exception starts with a \ this is an auto load problem that should go away after you purge your caches.
Can you confirm?
R
3.11---> 4.1
Exception : Class '\availability_coursecompleted\frontend' not found
cheers
Daniel