Is there a way to change a user from one course group to another using a CSV upload file?

Is there a way to change a user from one course group to another using a CSV upload file?

by Mark Whitington -
Number of replies: 11

Is there a way to change a user from one course group to another using a CSV upload file?

Our situation is that we are using Moodle 1.9 and have no student management system or LDAP ability. We are uploading new users using the bulk upload CSV file.

I am happy about initially assigning users to specific courses and groups within those courses.

Labels: username, firstname, lastname, email, institution, department, course1, group1, type1,

For example: 123456, Mary, Smith, mary@hotmail.com, FMC, ward5, Fire Safety, ward5, 1

My difficulty is that significant numbers of our users move from department to department where there roles may change.

For example: A nurse may be a participant/student in the "Fire Safety" course and then move to a new ward. They may change roles such that they become a non-editing teacher within the new ward, but still within the same "Fire Safety" course.

If I resend their details via CSV  (see below)

Labels: username, firstname, lastname, email, institution, department, course1, group1, type1, (same as above)

For example: 123456, Mary, Smith, mary@hotmail.com, FMC, ward2, Fire Safety, ward2, 3

  • the department will change in line with the new ward move, and
  • they will be added to a new group (ward2)
  • They will be elevated to the non-editing teacher role.
  • I believe they will not be removed from the initial ward5 group.

Is there a way to remove Mary Smith from the initial group (ward5)?
(Other than manually removing Mary from the ward5 group)

Any assistance will be greatfully accepted!

Mark

Average of ratings: -
In reply to Mark Whitington

Re: Is there a way to change a user from one course group to another using a CSV upload file?

by Marcus Hoberg -

Hi Mark,

did you find a way to unenrol people via csv tables? We now have the same task here, people that chnaged role in a bigger number of courses, and I would like take and give role in one spreadsheet.

Best regards, Marcus 

In reply to Marcus Hoberg

Re: Is there a way to change a user from one course group to another using a CSV upload file?

by John Andrewartha -
Add a a unenrol field in the csv. Set to 0 do nothing set to 1 unenrol the student. Don't forget to select the unenrol from the upload users.
In reply to John Andrewartha

Re: Is there a way to change a user from one course group to another using a CSV upload file?

by Mark Whitington -
Thanks for the information.

I do not believe that I can un-enrol users without losing their grades.
I was hoping to move my users from one group to another group, not to move courses.

I am thinking though that I could empty each group of users within the course, then upload the updated csv file with the correct groups included. This way I am not removing the users from the course and hence their grades should remain intact.
Cheers
Mark

In reply to Mark Whitington

Re: Is there a way to change a user from one course group to another using a CSV upload file?

by Paul Fynn -

Hi Mark,

A word of caution with groups and existing work - I have run into problems with this in the past in terms of having students in more than one group on a course page;  I think switching students around groups AFTER work has been input by those students will cause disruption.

It seems likely that work is permanently coded to a student and group based on the group that the student is in when they first submit.  If the student is in more than one group, the work seems to be assigned to the first group that shows up in the list.

Hence, the work may not be visible if you look  at the student through a different group, and if you change the groups completely the student seems to lose access to the group.

This is counter-intuitive to me as I would expect ALL work to be coded to the student, with the question of the group then being addresses through a look up table. I don't see why a student (and their work) should not be visible in any number of groups that they are attached to (which seems to be the case with groupings).

regards

Paul

In reply to John Andrewartha

Re: Is there a way to change a user from one course group to another using a CSV upload file?

by Marcus Hoberg -

Hi John,

sounds reasonable. Your have a scv-template for this? I´m not sure about the command for unenrolling people. Didn´t find anythings in the docs.

username   course1   unenrol1   ?

Can I enrol (via "type" or "role") and enrol in one csv?

Best Regards, Marcus

In reply to Marcus Hoberg

Re: Is there a way to change a user from one course group to another using a CSV upload file?

by John Andrewartha -
Marcus,
Here is a quick and dirty CSV. Add courses and groups to suite, don't leave any field blank and use UTF-8 encoding.
In reply to Marcus Hoberg

Re: Is there a way to change a user from one course group to another using a CSV upload file?

by Martyn Wheeler -

I have tried setting an unenrol field in the csv file but Moodle doesn't like it (1.9.7) it says:

"unenrol" is not a valid field name

Any ideas? Is this a 2.0 feature?

Martyn

In reply to Martyn Wheeler

Re: Is there a way to change a user from one course group to another using a CSV upload file?

by John Andrewartha -
Opps sorry. unenrol should be delete. I did say quick and dirty.
In reply to John Andrewartha

Re: Is there a way to change a user from one course group to another using a CSV upload file?

by Ray Lawrence -

Doesn't that refer to deleting a user (completely)? From the help file:

Special field names: used for changing of usernames and deleting of users, see below

deleted, oldusername


In reply to Mark Whitington

Re: Is there a way to change a user from one course group to another using a CSV upload file?

by jensy will -

Mark, have you found a way to change a user's group with a csv file? I'd like to do the same thing. However, the csv file just adds the user to new groups without removing them from the original group.

In reply to jensy will

Re: Is there a way to change a user from one course group to another using a CSV upload file?

by Mark Whitington -

Hi Jensy,

No I have not found a way to change a users group... that is delete them from the initial group and add them to a new group without their grades being affected.

Sorry