Moodle plugins directory: Restriction by other course completion | Moodle.org

Restriction by other course completion
Availability restriction ::: availability_othercompleted
Maintained by
Sam Suresh
This plugin allows restricting access of activities and resources in your course based on other course completion status.
Latest release:
1318 sites
467 downloads
39 fans
Current versions available: 3
Now you can restrict your course activities and resources by the completion status of other courses.
For example:
You have 2 courses
- Course 1
- Course 2
You want your students to complete Course 1 before accessing Course 2's first content.
Open Course 2's first content and restrict access by the setting the requirement of Course 1 Completed. Of course, you need to set Course Completion for Course 1 in the first place.
How to use?
1. Install the plugins from Moodle
2. Open any activity or resource that you want to restrict. Click add restriction and choose Other course completion.
3. Choose which course you want the user to complete before being able to open this content.
Useful links
Contributors
Sam Suresh (Lead maintainer)
Please login to view contributors details and/or to contact them
No role can see the activity in "Complete report" when this restriction is on.
Is there any way to fix this?
I installed the plugin and I get this message:
Notice: Trying to get property 'id' of non-object in /var/www/html/moodle/availability/condition/othercompleted/classes/condition.php on line 9
Is this something that could compromise functionality in your opinion?
Notice: Trying to get property 'id' of non-object in /var/www/html/MOODLESITE/availability/condition/othercompleted/classes/condition.php on line 91
Access to an activity in one course will be provided if an activity is completed in another course!
@Sam Suresh, if you can do this that would be really great!
how to restrict in course level, not activity level
So user doesn't want to enroll to this course with out completing the other course
However if the Quiz is failed, and then you manually adjust the user to passed grade (so the activity shows as complete), this plugin will not unlock the next course.
So when the user actually passes the quiz themselves (which marks the activity as complete) then this plugin works.
But if the teacher manually changes their grade from a fail to a pass (which also marks the activity as complete) then the plugin does not work as expected (bug).
It is not clear to me how to do that. In the Restrict Access section, I only see the default choices of Date, Grade, User profile, Restriction set. The plugin (v4.0.1
2023101400) is installed and enabled. Moodle version is 4.2.2.