Upload enrolment methods

Administration tool ::: tool_uploadenrolmentmethods
Maintained by Eoin Campbell
This plugin allows administrators add the "Course meta link" and "Cohort sync" enrolment methods to a range of courses from a CSV file, and specify the role for the methods participants. They can also delete, enable or disable existing enrolment methods in a course.
Latest release:
713 sites
387 downloads
49 fans
Current versions available: 2

This plugin is an enhanced version of the Upload Metacourse links block plugin on which it is based. It also provides a good work-around for a long-standing issue with the Course upload facility whereby enrolment methods are not fully supported.

Use the command Site administration > Plugins > Enrolments > Upload enrolment methods to upload a CSV file containing lines of the form:

operation, enrolment method, target course shortname, parent course shortname or cohort idnumber, disabled, group[, role]

Note that version 1.2.x requires fields in a fixed order (as above) with no heading line, but version 1.3.0. now supports an initial heading line, and allows you specify the delimiter, e.g.

operation,method,shortname,metacohort,disabled,group[,role]
add,meta,CS101-2345,Computing-Year3,1,CS101,student
upd,meta,CS101-2344,Computing-Year1,0,CS101,editingteacher

Each line of the file contains one record.
Each record is a series of data in any order separated by a specified delimiter.
All fields are required, except role, which is optional for backwards compatibility.
The allowed operations are add, del(ete), and upd(ate).
The allowed methods are 'meta' and 'cohort'.
The allowed disabled status values are 0 (enabled) and 1 (disabled).
The group field is the name of a group into which enrolled students should be placed. It will be created if it doesn't already exist.
The role field must be a valid role name such as editingteacher, student, etc.

This plugin enhances the original in that it is possible to disable existing enrolment methods in batch mode, and also that it can add an enrolment method to a course but leave it disabled.


Screenshots

Screenshot #0

Contributors

Eoin Campbell (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Comments

  • Eoin Campbell
    Fri, 15 Feb 2019, 1:04 AM
    To Mesut: thank you, I find it really useful for adding meta-courses to multiple courses in the same programme of study. Unfortunately it doesn't allow specification of the role, as I assume it's always students. Why would you want something different?
  • alain kerv
    Mon, 25 Feb 2019, 5:36 PM
    Hello,
    Thank you, it's ok with comma !
    But I still have an error message ("Line 1 [operation enrolment method]: Invalid operation.") but however creation is ok.
    Alain

  • Eoin Campbell
    Wed, 27 Feb 2019, 6:38 AM
    Note that if your first line contains field headings, you need to comment them out with a '#' or ';' character as the first character on the line.
  • Daniel Becerra
    Sat, 6 Apr 2019, 1:48 AM
    I was wondering if the Group field is now working. This would be extremely useful.
  • Eoin Campbell
    Sat, 6 Apr 2019, 3:23 AM
    The group field is supported, the documentation was out-of-date.
  • Daniel Becerra
    Sat, 6 Apr 2019, 8:04 AM
    Yes! it does work smile I just uploaded more than 2000 relationships and it worked like a charm. Thank you very much for the effort put into this!
  • Daniel Becerra
    Thu, 11 Apr 2019, 10:42 AM
    I was wondering, as @Mesut Aydemir asked, how would you do if you wanted to sync Teacher cohorts. Working with hundreds of courses, transferring teachers automatically would be way easier by cohort sync.
  • colin bruneau
    Fri, 16 Aug 2019, 4:37 PM
    Hi Eion, thank you so much for this plugin, it will save me a lot of hand work.
    As already mentionned it would be nice to have:
    - ; instead of ,
    - a field to define the course role like "student" or "teacher"
    In my case I need a cohort to be defined as "manager" because to be able to send a mail to a manager (Attendance warnings for example), they need to be registered as users but not with a "student" role.
  • Eoin Campbell
    Tue, 20 Aug 2019, 11:56 PM
    I have added an optional role field at the end of each line to specify the required role. It works for both the meta and cohort enrolment methods.
  • Jeff White
    Wed, 28 Aug 2019, 2:31 AM
    omg where was this two years ago... this will be a huge benefit to my cohort self enrollments.
  • Nelio Altoveros
    Wed, 15 July 2020, 9:27 AM
    I tried installing the plug-in in MOODLE 3.6.5 build 20190905 but I got several errors telling me that around 20 Themws will be deleted such as aftwerburner, anomaly, nimble etc. I am now using autumn so I guess the present MOODLE look will not be affected. But in the future if I want to change theme, does it mean that I have to get them again? Thanks
  • Eoin Campbell
    Wed, 15 July 2020, 4:13 PM
    The warnings have nothing to do with the enrolment methods plugin. The themes you mention are all old and out of date, and not supported on Moodle 3.6. Remove them from your site. Autumn is also a very old theme and I doubt if it runs on 3.6 either. You're probably running something else.
  • Yannick D
    Thu, 23 July 2020, 6:19 AM
    Thanks for sharing this plugin which should really be fixed in Moodle by default. I have two (or three) gripes though:
    * Please allow setting the csv delimiter to something different then ",". It’s a real pain to get comma separated csv-files out of Excel depending on region.
    * Our courses have a "–" (en-dash) in their shortnames which is removed by this plugin. The import then fails because the course isn’t found. Probably related to text encoding.
    * It would be nice and add some peace of mind to have a preview before finally importing enrollments.

    All 3 points are available with "Upload courses" and "Upload users". 1 and 2 would probably be fixed by moving to the csv library you mentioned some time ago. I really hope you or someone else will be able to implement this. Thanks again and best regards.
  • Jeavons Pablo Mesia
    Wed, 12 Aug 2020, 3:36 PM
    Hi, I installed this plugin in site. It says in the notifcations that installation was successful but the plugin does't show in the >Manage Enrol plugins page. A link show in the Enrolment category but clicking on it returns an HTTP 500 error message. Any work around on this problem? Our site is moodle site version is 3.9.1. Thanks in advance.
  • Eoin Campbell
    Wed, 12 Aug 2020, 8:00 PM
    It isn't an enrolment method, so doesn't appear in "Manage enrol plugins". Go to "Site administration > Plugins > Upload enrolment methods" instead.
Please login to post comments