rogiervandongen / moodle-local_mass_enroll

A tool to allow teachers to enrol existing users to their courses using CSV files (without bothering the admins)
Other
4 stars 10 forks source link

self enrolled users cannot be mass-unenrolled using moodle-local_mass_enroll #4

Open wiebkemueller-hsh opened 3 years ago

wiebkemueller-hsh commented 3 years ago

Dear Plugin-Contributors,

we've made the following observation: self-enrolled user in a course were exported to a csv file, which was then added to the tab /local/mass_enroll/mass_unenroll.php?. Instead of unenrolling the users, the system showed the following message:

last name, first name NOT enrolled

But the users were definitely enrolled. Has this behaviour been observed beforehand?

STEPS to reproduce:

Moodle Version 3.9 Plugin Version 2.7.0 (Build 2015092402) (2015092402)

Thank you for looking into it.

Regards Wiebke

rogiervandongen commented 3 years ago

Dear Wiebke, I will try to reproduce. It may or may not have been that this behaviour has ever been observed, but I'm not aware of any such issue. Mind, the original author has passed away a few years ago and I've only taken over the plugin when there was a need for it at the time. One of the few things I've done is make sure the plugin is/was compatible with Moodle 2.7 onwards. Since then, not much has changed as you can see from the last commits that have already been 4 years ago.

I will, however, definitely look into this issue and the other 2 that are open. Thanks again for finding and denoting the issue!

Cheers, Rogier

rogiervandongen commented 3 years ago

Dear Wiebke,

I've performed all 6 tests (enrol/unenrol for each of the three possible fields: username/login, email and id number). I seem to be unable to reproduce the issue you've provided.

This made me think: is it possible you may have forgotten to select the correct variables/fields in the same interface you upload the CSV? Mainly the CSV separator and even more important, selecting the correct identification of the first column. This has to be done before processing the CSV because it influences the detection process. The processor does not provide detection of the first field type (even though it should be indicated in the first line odf the CSV file).

I do realise it might be a lot easier if auto-detection would be in place, provided the names of the first column can either be username, email or idnumber and nothing else.

Having said this, it is important to know that the mass_enroll plugin is only capable of handling manual enrolments. Patrick most likely had reasons to only allow for (un)enrolments using manual enrolment, but with a good explanation and relevant use case, I'll consider changing this behaviour. It may be undesirable to unenrol users that were enrolled using any other method than manual enrolment. For example: self enrolment is user initiated, hence unenrolling these users might get a lot of angry faces. The same reasoning, but on a whole new level, might be the case when you're using plugins for paid enrolments (paypal, classicpay, mollie, stripe, etc etc). Looking forward to hearing from you, Cheers, Rogier

wiebkemueller-hsh commented 3 years ago

Dear Rogier,

thanks for your quick reply. We did select the correct variables/fields (E-Mail). But - the problematic enrolments were all self enrolments, so thats the key to our problem. I didn’t know that the unenrolment would only consider manual enrolments.

Actually our teacher had to use this method to get interested students IN the course, but he wanted to use the mass unenrolment to get those OUT of the course that didn’t register for the final exams and therefore wouldn’t be considered from then on in further course communication.

Best regards Wiebke

Von: Rogier van Dongen notifications@github.com Gesendet: Freitag, 11. Dezember 2020 17:06 An: rogiervandongen/moodle-local_mass_enroll moodle-local_mass_enroll@noreply.github.com Cc: Müller, Wiebke wiebke.mueller@hs-hannover.de; Author author@noreply.github.com Betreff: Re: [rogiervandongen/moodle-local_mass_enroll] self enrolled users cannot be mass-unenrolled using moodle-local_mass_enroll (#4)

Dear Wiebke,

I've performed all 6 tests (enrol/unenrol for each of the three possible fields: username/login, email and id number). I seem to be unable to reproduce the issue you've provided.

This made me think: is it possible you may have forgotten to select the correct variables/fields in the same interface you upload the CSV? Mainly the CSV separator and even more important, selecting the correct identification of the first column. This has to be done before processing the CSV because it influences the detection process. The processor does not provide detection of the first field type (even though it should be indicated in the first line odf the CSV file).

I do realise it might be a lot easier if auto-detection would be in place, provided the names of the first column can either be username, email or idnumber and nothing else.

Having said this, it is important to know that the mass_enroll plugin is only capable of handling manual enrolments. Patrick most likely had reasons to only allow for (un)enrolments using manual enrolment, but with a good explanation and relevant use case, I'll consider changing this behaviour. It may be undesirable to unenrol users that were enrolled using any other method than manual enrolment. For example: self enrolment is user initiated, hence unenrolling these users might get a lot of angry faces. The same reasoning, but on a whole new level, might be the case when you're using plugins for paid enrolments (paypal, classicpay, mollie, stripe, etc etc). Looking forward to hearing from you, Cheers, Rogier

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/rogiervandongen/moodle-local_mass_enroll/issues/4#issuecomment-743280356, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ARJQDRI65IRTGZX7YF23SX3SUI7NHANCNFSM4UWVT4IQ.

rogiervandongen commented 3 years ago

Dear Wiebke,

All things considered, I will actually extend the plugin with a method with the ability to indicate processing enrolment methods other than manual. It should serve your request and this is basically fine for self enrolment. However, I will explicitly note it's up to the end user to be very careful with whom they unenrol (cohort enrolment and paid enrolments are among those to treat with extreme care).

Thanks for your input1 Regards, Rogier

wiebkemueller-hsh commented 3 years ago

Thank you, have a good end of the year!