A little hint about the moodle groups/course/users organization?

A little hint about the moodle groups/course/users organization?

Daniele Pignedoli -
回帖数:6
Hi guys, im using Moodle 3 for my first moodle project an I would love to have some hints before starting writing some code.
First of all, my situation require a syncronization between user groups gathered via LDAP (Microsoft Active Directory) and groups inside moodle, I'll have a 1:1 mapping between those groups (but every user can belongs to more groups, obviously), where every group will have his own Course.

So, after a quick lookup post-installation in moodle, my questions are:

  1. Every user inside a "Global Group" (cohort) inside a "Course Category" is automatically enrolled to all the courses inside that "Course Category", right?
  2. Is possible to create "Global Groups" not belonging to any "Course Category" (context: System) and enroll programmatically all the user inside of them to a specific "Course Category"?

Thanks for help ;)

回复Daniele Pignedoli

Re: A little hint about the moodle groups/course/users organization?

Chris Collman -

Hi,

This maybe over my head, even on the interface level.  I work with cohorts but not on the course category level.   As far as I know, cohorts can be enrolled in a course with a specific role on the course level .   You can give cohorts specific permissions on a course category level  (see below).   

Is there automatic enrollment in every course within a course category level?  My answer is no.  Can  you assign a cohort  a specific role that will allow the members to self enroll (overriding manual enrollment)?  I have never done it but see user self enrollment permissions.

Here is my simple overview. Cohorts exist at the system wide or at the course category context level for purposes of enrollment in specific courses. For example you might have a ClassOf2018 cohort on the system level and FrenchStudents  or LatinStudents cohorts in the Language Department course category level.    Thus the Language Department can create their cohorts that are not seen by the Math Department but can use the system wide ClassOf2018 cohort.

Hope this helps.  I am sure there are devious ways of doing what you want via code 微笑

Chris


 

回复Daniele Pignedoli

Re: A little hint about the moodle groups/course/users organization?

Melanie Scott -

While I don't believe you can have the ldap creation auto-add people to cohorts, you can bulk add people using Bulk User Actions.  It all depends on how you set things up and what you want.  Once people are assigned to cohorts, you can assign the cohort to as many (or as few) courses as you like.  These cohort enrollments can include groups assignment if you want.  If you want an additional person added to all the courses a cohort is assigned to, you just add them to the cohort and Voila! they are enrolled.

Cohorts can be at the site level or in category levels.  If you only want specific cohorts available for specific course areas, that's how I'd do it.  I keep several years (we track training by year) in one site and each year is it's own category...so I create cohorts in the year categories, since people move, change jobs, etc between years.  Initially I had site cohorts but found that categories work better for me.  It ensures the cohorts are only available for the courses I want them available for.

It also sounded like you wanted to enroll students in course categories.  I can't express how much I discourage that.  Primarily because category enrollment isn't "real" enrollment and while the student might be able to access the course, they probably wouldn't get a grade and it would be VERY confusing.  Also, you have to fiddle with site settings to get it to work because it used to be possible to enroll in categories and no one thought it was a good idea, so in 2.X that "feature" went away.

回复Melanie Scott

Re: A little hint about the moodle groups/course/users organization?

Daniele Pignedoli -

Hi Melanie, thanks for your reply and sorry for the long wait ;)

I ended up using Enroll sync plugin to automatically enroll all the 'students' into a specific group to a specific course - this is what my customer asked me.

Im not working on a 'school' application but on a 'corporate training' system, so the enrollment is pretty mandatory for all the employees who get assigned to the courses.


回复Daniele Pignedoli

Re: A little hint about the moodle groups/course/users organization?

Visvanath Ratnaweera -
Particularly helpful Moodlers的头像 Translators的头像
Hi Daniele

You wrote:
> I ended up using Enroll sync plugin to automatically enroll all the 'students' into a specific group to a specific course

What is exactly the "Enroll sync plugin"? Couldn't find it under the https://docs.moodle.org/en/Enrolment_plugins.

Does it answer your question? I had a similar question: "Is LDAP enrollment also groups/groupings/cohorts capable?" https://moodle.org/mod/forum/discuss.php?d=324567. which led to the third party plug-in https://github.com/patrickpollet/moodle_local_ldap. See also, MDL-25011.

In any case, the correct forum is "Enrolment" https://moodle.org/mod/forum/view.php?id=2981 - I think.
回复Visvanath Ratnaweera

Re: A little hint about the moodle groups/course/users organization?

Daniele Pignedoli -

Sorry, the plugin is named "Cohort sync" and is already present into the default moodle installation.

For the LDAP sync, I ended up writing a small local plugin that read the LDAP tree (once a day, via cron task) and syncronize the users; Then I mapped moodle's cohorts with LDAP groups and the trick is done - the only thing i need to do is to insert users into the right cohort with cohort_add_member() function.

I didnt use the default auth LDAP plugin becose my situation is slightly different