Filter course "section" by user attribute

Re: Filter course "section" by user attribute

by Tim TO. -
Number of replies: 2

As I'm looking into this, I realized that a requirement is to allow assigning multiple states to a user's profile. In noticing that there isn't a "multi-select" custom profile field format, we'd need to use something like the comma-delimited format to store states (Oregon,Washington,Nevada) in the user's state field (which is a text input).

But in regards to the "Restrict Access" based off of conditions with the user profile fields...there is a constraint where a user profile field cannot been declared more than once. Line 274 of /course/editsection_form.php creates the conditions to restrict this.

Does anyone know of customizations that allow for using the same profile field more than once in the "restrict access" conditions? And/Or is there a plugin that allows the ability to create custom fields with the "multi-select" format?

In reply to Tim TO.

Re: Filter course "section" by user attribute

by Andrew Downes -

I have the same issue. Did you get a fix? 

 

Did you try simply removing the validation? If so, did it work? 

 

Thanks, 

Andrew 

In reply to Andrew Downes

Re: Filter course "section" by user attribute

by Andrew Downes -

I notice that on the version of Moodle on my local machine (2.6.2+ (Build: 20140314)) there is no validation. Instead it simply empties the first row referring to the user profile field and only keeps the second reference. So I guess that implies that the validation is there for a reason!

I'll try and remember to create a tracker bug for that once I've eaten my dinner!

Andrew