Your Moodle version

Other: CSV group import

Maintained by Picture of Kirill Astashov Kirill Astashov
Allows to assign users to groups offline and upload a CSV file. Will populate existing groups and create new groups as well.
304

Allows to assign users to groups offline and upload in a CSV file. Will populate existing groups  and create new groups as well. Usernames must exist and be enrolled in the course. The patch modifies core group import script and the related language file.

Installation:
* Apply patch.

Basic CSV fields used:
* coursename (for course short name)
* username
* groupname

Sample CSV file:

coursename,userid,group
Courseshortname1,username1,Group1
Courseshortname1,username2,Group2
Courseshortname1,username3,Group2

Field names recognised as username:
* user
* userid
* username
* user id
* login
* login name
* studentid
* student id

Field names recognised as group name:
* groupname
* group

Developed by NetSpot, Australia.
Funded by the University of New South Wales.

Contributors

Picture of Kirill Astashov
Kirill Astashov (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • MD shot of me from his iphone4
    Thu, May 16, 2013, 10:28 AM
    Hi Kirill, thanks for the patch, any chance you might want to submit this as a patch in the tracker?
    I'm not sure but it seems like it could be improved and brought into core with a little refining (by anyone) as the target functionality seems generic enough.

    This patch though could also be converted to an admin tool plugin to make it more useful to others.

    The git commit is below incase anyone wants to access this quickly via git. https://github.com/kastashov/moodle/commit/de7a1b0bd5bb75c1a5cfb0e718465a81cdc8705f
  • Picture of Kirill Astashov
    Thu, May 16, 2013, 11:18 AM
    Hi Aparup,

    Thanks for the response, we'll discuss options.

    > The git commit is below incase anyone wants to access this quickly via git

    I doubt that, cos the plugin is still in 'Waiting for approval' state. smile
  • MD shot of me from his iphone4
    Thu, May 16, 2013, 1:58 PM
    Cool, please update with a bug tracker url (to any MDL or simply to github to maintain patch) after deciding. smile

    I've now approved this patch within the Other category. You will need to submit a new entry if you convert it to an actual plugin.
  • Picture of layal fakher
    Wed, May 22, 2013, 5:51 PM
    ou il faut mettre ce plugin!,dans quel file dans moodle
  • Picture of Kirill Astashov
    Thu, May 23, 2013, 8:14 AM
    Layal, it's not a standalone plugin, its a patch to group/import.php and lang/en/group.php. You have to be familiar with git to be able to apply this patch automatically. Changes to the files can be found here https://github.com/kastashov/moodle/commit/de7a1b0bd5bb75c1a5cfb0e718465a81cdc8705f (lines to delete marked red with "minus" sign, lines to add marked green with "plus" sign).
  • Picture of Thomas Robb
    Tue, Aug 13, 2013, 10:43 AM

    I've made a small block called "groupreg" that allows teachers to register students in a course and add them to existing or new groups from a .csv file. This overcomes one problem with the CSV import function presented here since it requires that users already be enrolled in the course.

    The .csv file contains one or two fields. The first is either the students' usernames or email addresses. The second field is the new or existing group name. An Excel report of the results can be downloaded.

    The block should be compatible with 2.3 or newer, but has not been tested on all versions. I've attached the block herewith.

    It is available here: https://github.com/spnova/groupreg/tree/0123204d874f89ce4fcd0aa83803a4b7ce9d2fee or contact me at tom@tomrobb.com

    Feedback welcome!
  • Picture of Normand Charette
    Fri, Nov 15, 2013, 8:51 AM
    Hi Thomas Robb. Thank you for your contribution. I installed the block you recommended however it needs some more work in Moodle 2.5 or I need to better understand the block. Where do you recommend adding the block? Do you have another discussion thread that we can discuss your block further?
Please login to post comments