ewallah / moodle-enrol_coursecompleted Goto Github PK
View Code? Open in Web Editor NEWEnrolment on course completion
Home Page: https://moodle.org/plugins/enrol_coursecompleted
License: GNU General Public License v3.0
Enrolment on course completion
Home Page: https://moodle.org/plugins/enrol_coursecompleted
License: GNU General Public License v3.0
Hello,
My apologies, I created a pull request prior to creating this issue. The use case for including the course link in the email is that, the user is automatically enrolled in a course that they may not know about once they have completed a different course. We have found this causes some confusion if we do not send an email informing the user they have been enrolled into a course. Including the link in the email increases the percentage of users that launch the course after being enrolled.
I have made the necessary changes to add this additional placeholder, and am hoping you agree to it's value and will incorporate it.
Regards,
Ron
In Moodle 3.5 when setting the enrollment duration for this plug-in in a course, users are not being automatically unenrolled when the enrollment duration is up.
Example:
• add an instance to course B that enrolls user based on completion of Course A
• set enrollment duration for instance in Course B to 1 hour
• have test user complete Course A and get enrolled into Course B
• wait an hour or more and student is not unenrolled from Course B
This is with the settings set to unenroll the user in the Enrolment expiry action as well.
Hello,
If I roll person to course 2 after completing course 1 and then I remove "course completed" mark from the person on course 1 I would like to see an feature that unenrols them from course 2.
We had this plugin working fine until we installed an auto-group plugin as we wanted users to be enrolled into specific groups when auto enrolled to a course. Note that sometimes these groups would not exist and therefore it is required to have these groups created. Course completion enrolment plugin seems to only work with groups that exist.
However after installing the auto group plugin, the course completion enrolment plugin does not auto enrol but shows the eligible users in a + sign against enrolment methods of the course. We also uninstalled both plugins and tried with course enrolment plugin alone but get the same behaviour.
Any reasons/suggestions to enrol automatically?
Our Moodle version is 3.11+ (Build: 20210701) and Auto group plugin is from https://moodle.org/plugins/local_autogroup version used is 2.5 (2020072700)
Hi,
I created a course and I described as completion criteria having finished 4 activities AND having a minimum score of 60 points in the final test (it is a four-step test).
According to the logic of completion only users who have both the requirements complete the course.
I created a second course and as enrollmnet methods I chose the completion of the first course.
Everything works fine for users who accomplish both the criteria. What is really odd is that in the second course are enrolled users who shouldn't be enrolled too (they didn't reach the minimum score).
I attach:
If you look at the results of the starting course you can see that it is really odd: the first user shouldn't be enrolled in the second course but he is. The second user with the same problem (he didn't reach the minimum score) isn't enrolled in the scond course.
Thank you.
Fil
Is there anyway to know from the repo which release is which commit?
cftr manual enrolments:
lang/en/enrol_manual.php
33:$string['confirmbulkdeleteenrolment'] = 'Are you sure you want to delete these user enrolments?';
bulkchangeforms.php
18: * This file contains form for bulk changing user enrolments.
27:require_once("$CFG->dirroot/enrol/bulkchange_forms.php");
30: * The form to collect required information when bulk editing users enrolments.
35:class enrol_manual_editselectedusers_form extends enrol_bulk_enrolment_change_form {}
38: * The form to confirm the intention to bulk delete users enrolments.
43:class enrol_manual_deleteselectedusers_form extends enrol_bulk_enrolment_confirm_form {}
locallib.php
160: * A bulk operation for the manual enrolment plugin to edit selected users.
165:class enrol_manual_editselectedusers_operation extends enrol_bulk_enrolment_operation {
168: * Returns the title to display for this bulk operation.
177: * Returns the identifier for this bulk operation. This is the key used when the plugin
178: * returns an array containing all of the bulk operations it supports.
185: * Processes the bulk operation request for the given userids with the provided properties.
282: * Returns a enrol_bulk_enrolment_operation extension form to be used
291: require_once($CFG->dirroot.'/enrol/manual/bulkchangeforms.php');
298: * A bulk operation for the manual enrolment plugin to delete selected users enrolments.
303:class enrol_manual_deleteselectedusers_operation extends enrol_bulk_enrolment_operation {
306: * Returns the title to display for this bulk operation.
315: * Returns the identifier for this bulk operation. This is the key used when the plugin
316: * returns an array containing all of the bulk operations it supports.
325: * Returns a enrol_bulk_enrolment_operation extension form to be used
334: require_once($CFG->dirroot.'/enrol/manual/bulkchangeforms.php');
339: $defaultcustomdata['message'] = get_string('confirmbulkdeleteenrolment', 'enrol_manual');
345: * Processes the bulk operation request for the given userids with the provided properties.
367: // Display a notification message after the bulk user unenrollment.
lib.php
359: * The manual plugin has several bulk operations that can be performed.
363: public function get_bulk_operations(course_enrolment_manager $manager) {
367: $bulkoperations = array();
369: $bulkoperations['editselectedusers'] = new enrol_manual_editselectedusers_operation($manager, $this);
372: $bulkoperations['deleteselectedusers'] = new enrol_manual_deleteselectedusers_operation($manager, $this);
374: return $bulkoperations;
Hello
I want to know if it's possible to add one more condition with this plugin .
What I want, it is the possibility when a course is completed , a new one is open but 5 days (or more/ less) after .
For example, a course A completed on 15/01/2019 then the course B will open at 20/01/2019
Other question : Possible to use this on activity instead course ?
Thanks !
There should be some basic checking that the role was not deleted between the configuration of the enrolment and the actual enrolment.
Hi Renaat,
We use your plugin for our courses, but the latest version has a strange issue.
When the option Display learning path (enrol_coursecompleted | svglearnpath) is checked, a user that is not enrolled in the course and will only get a white screen.
Fix: As soon as we disable the "Display learning path" option from your plugins settings it instantly starts working .
This only happens when the course has an instance of this plugin.
Other courses without such an instance just display "You cannot Enrol yourself".
Moodle version 3.8.3+
PHP 7.3
Apache 2.4.6
Kind Regards,
DB
Hi,
It looks like the user enrollment does not work for me and I don't really know why.
After that I logged out, created a new user and completed the necessary course. However, somehow I am not enrolled for the following course, even though I ran the cron job and flushed all the caches. I also changed the order of the enrollment methods and and put "After completion of course" first.
In the "Users" column of the "Enrollment methods" table, a "1" is entered under "After completing the course", so something seems to be working. However, I am not registered in the course.
Am I missing something out? Did I forgot to include a step in the setup? Is there some sort of documentation besides the README I so I can check the installation and setup?
Very useful plugin, well done!
When I activate the "Custom welcome message" function and the "Start date" function, the message to users arrives when they have completed the previous course, not when their enrollment in the current course is activated (on the day I have entered in the "start date").
Thank you for the effort you are putting into this.
Complete and precise steps to reproduce the behavior:
As the enrolment only starts next week, the user should NOT be enrolled.
The request is add to the plugin the ability to auto enrol people who haven't complete a specific course during course validity.
Do you think is possible?
When setting the enrol_coursecompleted enrollment expiry action to unenroll from course, - Students are set to not current instead of being unenrolled
We have different user cohorts, for example Cohort 1 and Cohort 2
They have to to all courses 1 - 5 sequentially, this would be possible with your plugin.
But after that there are deepening courses so that Cohort 1 has to continue with 7 and Cohort 2 with 6 and so on.
We have around 10 groups and 10 deepening courses.
We think about using your module as a basis for our implementation: Allow in auto enroll to specify one or more cohorts for which the auto enrollment should be triggered.
Woudl that be in scope of the module? Would such a PR be merged? Do you have any hints where to start that?
As I understand, the enrolment checks via event observation for course completion, not as a cron job, thus it should happen rather instantly? Or is it still reliant on some general Moodle cronjob?
Steve has a bit of trouble with the plugin enrol_coursecompleted_moodle40_2022042300.
It will not downgrade from v3.9.7 (2022042302) that was installed with version 3.11.
The addition of this code, making this plugin encounter this Moodle bug.
I'm setting up a new Moodle v3.11. I've installed the enrol upon completion mod but it doesn't show up in available enrollment methods. Is there something else I need to active to get it to work?
Hello,
Would it be possible for you to change the date of the plugin for different version releases? This would help automated installations.
On:
https://moodle.org/plugins/pluginversions.php?plugin=enrol_coursecompleted
you have:
3.6 (2019022300)Moodle 3.6
3.5 (2019022300)Moodle 3.5
3.4 (2019022300)Moodle 3.4
Every release has the same 2019022300 date which doesn't work with automation installation.
there are 3 courses: common 101
, C1 201
and C2 201
C1 201
and C2 201
need common 101
to be completed for auto enrollment
visiting C1 201
, by clicking on C1 201
link in Available courses
, takes to a page like this (https://SITE/enrol/index.php?id=20)
Link common 101
on this page takes to https://SITE/enrol/index.php?id=20, that is to C1 201
common 101
on this page should take user to common 101
(https://SITE/course/view.php?id=19) instead of C1 201
(https://SITE/enrol/index.php?id=20)moodle-enrol_coursecompleted/lib.php
Line 90 in 69bf5dc
Plugin is working as expected otherwise.
Thank you for writing and maintaining this very useful plugin, and having a look at this issue.
Hi,
We use git submodules to install plugin to our Moodle sites. We have noticed a recent change (probably from early Aug) breaks our codebases completely.
This is because the following commit is no longer on the main branch (nor its on any branch): 9171a97
Moodle 3.9 is still in security support till the end of this year (11 Dec). We have clients still on this LTS and when trying to get the latest security releases out to their sites, this repo breaks our CI/CD process.
We cannot use an older commit in the main branch due to this: 584b590 - it jumps from v3.9.3 to v4.0.0. Our site is currently on v3.9.4, so cannot downgrade to 3.9.3 nor upgrade to 4.0.0 due to version incompatibility.
The way we support this in our plugins is by creating a MOODLE_39_STABLE branch so the older Moodles which are still in the process of upgrading from 3.9 to 4.1 can still checkout the latest supported code. Would this be possible to create a MOODLE_39_STABLE branch in this repo so our CI/CD tools can successfully clone the repo as a submodule?
When visiting a course that has been configured to base enrolment on completion of another course that has since be deleted a database error occurs.
This is because the code assumes that the queried course will always exist. Suggestions for fix would be:
Please answer the following questions for yourself before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.
We have multiple courses set up that require the completion of a pre-requisite course. However, when students successfully complete the courses, they are not automatically enrolled in the next course. Therefore, we have to do it manually.
We have set up a CRON to force the update every 15 minutes; however, this hasn't worked. Script used is
moodle.DOMAIN/admin/cli/scheduled_task.php --execute='\core\task\completion_regular_task'
though is does run successfully.
Execute scheduled task: Calculate regular completion data (core\task\completion_regular_task)
... started 18:40:38. Current memory use 15.4 MB.
Running completion_criteria_date->cron()
Running completion_criteria_activity->cron()
Running completion_criteria_duration->cron()
Running completion_criteria_grade->cron()
Running completion_criteria_course->cron()
Aggregating completions
... used 6 dbqueries
... used 0.083964109420776 seconds
Scheduled task complete```
See screenshots above
We expect students to be enrolled automatically. With the amount of students we have its becoming very difficult to manually enrol students.
Please provide any relevant information about your setup. This is important in case the issue is not reproducible, except under certain conditions.
Please answer the following questions for yourself before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.
The course dropdown to select which course is to be completed prior to allowing enrollment in the next course is limited to a list of 100 courses. Our Moodle site has nearly three times that many courses. Can the list be made to show all courses within the site?
Complete and precise steps to reproduce the behavior:
I expect to see all of the courses available in the Moodle site to choose from.
Please provide any relevant information about your setup. This is important in case the issue is not reproducible, except under certain conditions.
If applicable, add screenshots to help explain your problem.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.