Moodle Plugins directory: Multi select menu custom user profile field | Moodle.org
Multi select menu custom user profile field
We are happy to publish multi-select menu as a custom user profile field for Moodle.
How it could be useful:
This new custom profile field type could be used in many cases like:
1. You have to differentiate users into groups and one user could be part of multiple groups
2. You want to take inputs from user at the time of registration or you manually want to fill some information for users like education, certificates they have done.
3. There could be various other cases like this,
Installation Instructions:
1. Unzip the directory and copy inside your-moodle /user /profile /field (at the end the folder structure should look like your-moodle/user/profile/field/multiselect)
2. Log into Site as Admin user and go to site-administration -> Notification to perform installation.
3. After successful installation, you would find a new custom profile field type inside site administration -> user -> accounts -> user profile fields
4. Enjoy this new feature.
select c.id , c.fullname from {course} AS c where c.id != 1
this error data column is missing in query return values
why this error appear?
any help here???
Use of class name as constructor is deprecated
line 119 of /user/profile/lib.php: call to debugging()
line 14 of /user/profile/field/multiselect/field.class.php: call to profile_field_base->profile_field_base()
line 571 of /user/profile/lib.php: call to profile_field_multiselect->profile_field_multiselect()
line 646 of /user/profile/lib.php: call to profile_get_user_fields_with_data()
line 238 of /user/editadvanced_form.php: call to profile_definition_after_data()
line 961 of /lib/formslib.php: call to user_editadvanced_form->definition_after_data()
line 357 of /user/editadvanced.php: call to moodleform->display()
I have replaced
function profile_field_multiselect($fieldid=0, $userid=0) {
//first call parent constructor
$this->profile_field_base($fieldid, $userid);
this code with the below code
public function __construct($fieldid = 0, $userid = 0, $fielddata = null) {
//first call parent constructor
parent::__construct($fieldid, $userid, $fielddata);
in /user/profile/field/multiselect/field.class.php
Hope this helps.
Thanks and regards,
Sandipa
I assume it defines a field and I can use it in any section that allows html, right?
For example: I define the field "Preferred name" and in some activity I want to use the field as: "Hello solve the following task"
But in the documentation you cannot find instructions to use the defined field
Can you help me
If i create multi select filed for user after that some issue in moodle 3.11
after creating multi select filed, some option not showing like course enrolled button, gear icon on course page and participant menu
After creating multi select filed
Enrolled button,
Gear icon on course page
and Participant menu not appearing
What about the multiple value for the field for CSV import?
When we removed the field that field that was using the multi-select menu, then removed the module itself. After those two steps the cog came back and the errors disappeared. We do actually use this module so we'd love to see a fix.
Before: format_string($option);
After: format_string($option, true, ['context' => context_system::instance()])
To solve , I arrived to the same conclusion as @venkata by comparison with standart Menu field type.
I am using core_user_update_users moodle API and I need to update this cusotm field values. but I see moodle only support one single string value for custom fields in update user api object. Can you please help me to sort this out how can I achieve this?