Uploading Cohort Syncs via CSV Files?

Uploading Cohort Syncs via CSV Files?

by Kaesha Thomas -
Number of replies: 11

Hi all,

We have a lot of groups and cohorts that we use to separate companies that are training through our company's moodle site. That said, it's rather difficult for me to manually create cohort syncs for each and every cohort for every company that uses our site, so I was hoping there was a way to upload cohort syncs through CSV files? Alternative methods are also welcome!

Thanks in advance!

Average of ratings: -
In reply to Kaesha Thomas

Re: Uploading Cohort Syncs via CSV Files?

by Simon Rediss-Whitfield -
In reply to Simon Rediss-Whitfield

Re: Uploading Cohort Syncs via CSV Files?

by Kaesha Thomas -

I need to have Cohort SYNCS uploaded, not cohorts. We use many plugins that bounce off of the cohort sync functionality in moodle and making them one by one is too tedious. 

In reply to Kaesha Thomas

Re: Uploading Cohort Syncs via CSV Files?

by Kaesha Thomas -

I figured out a work around by using the Auto Group feature. Thanks all

In reply to Kaesha Thomas

Re: Uploading Cohort Syncs via CSV Files?

by Christoph Ruda -

Interesting, would you mind outlining briefly how you used the auto group feature? Did you do this instead of cohort sync?

Thanks,

Christoph

In reply to Christoph Ruda

Re: Uploading Cohort Syncs via CSV Files?

by Kaesha Thomas -

Well, it got us to our end goal. Cohort Syncs, with the Profile Field Enrollment plugin, worked together to sort our companies into separate groups. Since I couldn't pre-create all of the cohort syncs because I didn't have pre-created groups to put into the cohort syncs, I needed to find a way to automatically create groups based on the users who entered. So, by using the Auto Group function, I was able to have users automatically grouped into groups in each course based on their course field (custom created check boxes that each list a course we offer). So if someone joined our site, here is how it would go:

  1. User checks list of desired courses in their sign up.
  2. User clicks Create User.
  3. Profile plugin reads the user's course fields.
  4. Profile plugin allows user to enroll in courses.
  5. Auto Group plugin reads a custom field I created called "Store ID" of the user.
  6. Auto Group plugin creates group titled their entry for the Store ID field for each course they are enrolled in.
  7. User is automatically enrolled into that specific group for each course.

Any users from the same company with the same Store ID will be added to the same group.

In reply to Kaesha Thomas

Re: Uploading Cohort Syncs via CSV Files?

by Kaesha Thomas -

*correction: I used the Enrol by user profile fields plugin, not the profile fields enrollment plugin (two different things that do different enrollments)

In reply to Kaesha Thomas

Re: Uploading Cohort Syncs via CSV Files?

by Josh K. -

Hey Kaesha,

could you tell me how you got the Auto Group plugin to run with a custom profile field?

I cannot get it to run...

1. I have created a custom profile field named "tenant"

2. I added the code :  'tenant' => get_string('tenant',  'local_autogroup')

- in /local/autogroup/classes/sort_module_profile_field.php,

- in /local/autogroup/lang/en/local_autogroup.php,

- and /local/autogroup/settings.php


With this, the settings of Auto Group Plugin shows me in the "Group By" -options  tenant in double Brackets

But when i set that Option the Plugin doesn't create groups when i enrol users...

And yes, the users have a value in that field^^


Sadly, the Developer of the Plugin doesn't seem to work on it anymore so that he could fix it (Problem is in BugTracker)

Any Help is Appreciated

In reply to Josh K.

Re: Uploading Cohort Syncs via CSV Files?

by Kaesha Thomas -

Hello,

We weren't able to get it to work with a custom field, so what we did was rename the "institution" field to what we wanted it to say (in our case, Store ID). This way, we were able to have the desired content in the UI, but still use the original SQL institution field. 

It's a pretty neat work around, and makes it pretty simple for maintenance.

In reply to Kaesha Thomas

Re: Uploading Cohort Syncs via CSV Files?

by Josh K. -

Unfortunately I think that's not a solution for me since the Profile Field has to be hidden from the User and as far as i know that's only possible to do with custom profile fields.

Thanks for the quick answer

In reply to Josh K.

Re: Uploading Cohort Syncs via CSV Files?

by Kaesha Thomas -

Well, if it helps any, our developer made the field uneditable so that our customers couldn't edit their Institution field after it was filled in by info from another site we connected it with. So that is something you may be able to do (although I have NO idea how it was done).


Best of luck!

Average of ratings: Useful (1)