Badge Enrolment

With this enrolment plugin users can only enrol into a course when they have one or more required site badges.
Price option: Free

Supports Moodle 2.9-3.6 See all versions
Latest release: 7 years ago
Installations: 202
Downloads (last 90 days): 30

Frankenstyle name: enrol_badgeenrol
Enrolment
Badges

Comments

Comments are no longer open for new posts. Existing comments remain available to read.

Hello Angelika,
sorry for replying so late.
You can add multiple instances of the badge enrolment to your course and configure diffenrent badges for each badge enrolment instance. Your users will only have to pass the requirements for one of these instances.
Hope it helps.
Greetings!
Hallo Matthias, soweit ich gesehen habe müssen Kursteilnehmer ALLE ausgewählten Badges haven. Ich habe einen Moodle-Kurs in 3 Sprachen und somit 'identische' Badges, eben nur in verschiedenen Sprachen. Die Badges habe ich miteinander verbunden, so wie Moodle das vorschlägt. Nun würde ich die Kursanmeldung gerne so regeln, dass einer dieser Badges ausreicht, um sich einzuschreiben. Ist das möglich?
(Kannst gerne in Deutsch antworten)
Besten Dank
Hello Matthias, as far as I've seen course participants need to have all badges to enter the course. I have a Moodle course in 3 languages, thus I have 3 different badges for one and the same thing (I related them as suggested by Moodle). Now I would like to set it up in a way that course participants only need to have one of them to enter the course.
Hello, it is possible to have the OR condition to badges selected? At the moment if I choose 2 badges both are required, I want grant access to students if they only have 1 badge of both. Thanks
Hi,
Do you plan to make the version compatible with moodle 3.11 or 4.0?
Ricardo
Thank you very much for this plugin, it's very useful for my LMS.
Though I noticed that when students already earned badge before I set up the badge enrolment, they can't enroll in the course automatically.
So I need to evoke the badge first and give them the badge again manually. Can you please tell me how to fix this? I would like all of my old students to enroll automatically with badge enrolment.
Matthias thanks very much for your work! Highly appreciated! Peter Jonker
There is now an updated version of this plugin available for the latest versions of Moodle.
Sorry for waiting so long, but there wasn´t much time in the last two years. I will try to update my plugins consistently from now on.
There is also now an option for automatic enrolment.
@Peter Jonker: This issue is now fixed.
Got the wrong end of the stick with this one. I was expecting it to automatically enrol students based on badge enrolment.
I only had 30 minutes for this but I created a function which could use some refining (and perhaps it could cycle through the badges table instead of the entire users table) but in principle something like this could be enclosed in a public cron() function:
function dotheenrols(){
global $OUTPUT, $USER, $DB;
$all_users = $DB->get_records_sql('SELECT * FROM mdl_user');
foreach ($all_users as $r_user){
//set all user table variables
$user_id = $r_user->id;
if ($record = $DB->get_record('badge_issued', array('badgeid' => 3, 'userid' => $user_id))) {
//they have the badge
$context = context_course::instance(19);
$context2 = context_course::instance(29);
// What role to enrol as?
$studentroleid = $DB->get_field('role', 'id', array('shortname' => 'student'));
// Loop through the students.
if (!is_enrolled($context, $user_id)) {
// Not already enrolled so try enrolling them.
if (!enrol_try_internal_enrol(19, $user_id, $studentroleid, time())) {
// There's a problem.
throw new moodle_exception('unabletoenrolerrormessage', 'langsourcefile');
}
}
if (!is_enrolled($context2, $user_id)) {
// Not already enrolled so try enrolling them.
if (!enrol_try_internal_enrol(29, $user_id, $studentroleid, time())) {
// There's a problem.
throw new moodle_exception('unabletoenrolerrormessage', 'langsourcefile');
}
}
}
}
echo"done the enrols";
}
Does someone know, how to use this in the current moodle version ?
Thanks
Tobi
This is potentially a very useful plugin. Its strange to me how few Moodle users have courses with no pre-requisites - its quite common on any training setup. I have found that if manual enrolments are also enabled on a course then this overrides badge enrolment. It seems the way it works is that one is automatically enrolled on a course as soon as the required badge is earned. Can somebody confirm this please.
I have a requirement that a person only get enrolled on a course if their instructor enrols then AND they have completed another course. I can't seem to achieve this using this plugin.
Dear Matthias, we are having a problem adding the enrolment method resolving in an error which is also being reported in your github
Could you please let us know if you are able to work around this error. Our Moodle version is 2.7.8
https://github.com/m-schwabe/enrol_badgeenrol/issues/2
Debug info: SELECT id FROM {role} WHERE archetype = ?
[array (
0 => 'student',
)]
Error code: multiplerecordsfound
Good day, I need help I cant get the plugin to work with my site badges. I need a student to be enrolled into a course after they get an average of 65% of all the activities in the first course. The course badge seems to work but the site badge isn't.
May you please help been trying to solve this.
Thanks,
Hey! This is exactly what I needed and I already installed the plugin. I've got a problem though. The restricted courses show now the Line "You need the badge XYZ to enrol in this course." - seems fine. BUT the "enrol me" button underneath is still active and the seemingly excluded user can STILL enrol.
Any ideas...?
Hi Matthias
Do you have plans to update this plugin for Moodle 3.0 and/or 3.1?
Matthias, great plugin, I have installed on the latest moodle, it comes up in the course, but when I add a site wide badge and give that to students, then those students do not automatically appear enrolled in that course.
I now know that the student themselves need to actually enter the course themselves to "self enrol".
well done