moodle-an-hochschulen / moodle-local_profilecohort

Moodle plugin which lets admins manage cohort memberships based on users' custom profile fields
GNU General Public License v3.0
23 stars 19 forks source link

Or Conditions #18

Closed scotthardwick closed 5 years ago

scotthardwick commented 5 years ago

Hi!

I have been testing out this component and am curious, is it possible to have or conditions as well?

We have several use cases I am trying to see if this could handle.

If field "Enrollment Semester" = 20191 put in cohort "Fall students" If field "StudentProgram"= MBA put in cohort "All MBA Students"

If field "Enrollment Semester"= 20191 or 20192 put in cohort "Fall/Spring students"

If field "StudentProgram" = MBA and (field "Enrollment Semester" = 20191 or 20192) put in cohort "Fall/Spring All Modes MBA students"

If field "StudentProgram"= MBA and field "Enrollment Method" = Online and (field "Enrollment Semester"=20191 or 20192) put in cohort "Online Fall/Spring MBA Students"

Thanks for all of your help!

Scott

abias commented 5 years ago

Hi Scott,

If field "StudentProgram"= MBA and field "Enrollment Method" = Online and (field "Enrollment Semester"=20191 or 20192) put in cohort "Online Fall/Spring MBA Students"

I think you can realize this with two rule sets

If field "StudentProgram"= MBA and field "Enrollment Method" = Online and field "Enrollment Semester"=20191 put in cohort "Online Fall/Spring MBA Students"
If field "StudentProgram"= MBA and field "Enrollment Method" = Online and field "Enrollment Semester"=20192 put in cohort "Online Fall/Spring MBA Students"

or am I wrong?

The list will be somehow bloated. But the functionality is there as far as I see.

Cheers, Alex