Multi select menu custom user profile field

User profile fields ::: profilefield_multiselect
Maintained by Nitin Jain
A multiselect 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,
Latest release:
380 sites
113 downloads
32 fans
Current versions available: 2

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.

Potential privacy issues

N/A

Screenshots

Screenshot #0
Screenshot #1

Contributors

Nitin Jain (Lead maintainer)
balaji jadhav: Contributor
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • sara rabie
    Tue, 4 Apr 2017, 3:50 PM
    i use moodle 3.2 when i try add this query
    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???
  • Sandipa Mukherjee
    Tue, 13 Nov 2018, 3:52 PM
    I am using this plugin in moodle 3.5 and getting this notice.

    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()
  • Sandipa Mukherjee
    Wed, 14 Nov 2018, 4:50 PM
    I have solved the notice.

    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
  • Miguel Bejarano
    Wed, 18 Nov 2020, 5:28 AM
    Hi

    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
  • kavya mishra
    Fri, 20 Aug 2021, 1:37 PM
    Hi Nitin Jain
    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
  • Fernando Oliveira
    Fri, 27 Aug 2021, 2:24 AM
    Has anyone come across this error: https://www.screencast.com/t/2KwG6ZaLO6u (I assume this plugin in not compatible with Moodle 3.11?)
  • Alessandro Pagano
    Fri, 3 Sept 2021, 11:04 PM
    This plugin works well!
    What about the multiple value for the field for CSV import?
  • Channara Chea
    Fri, 8 Oct 2021, 4:06 AM
    So I have a weird issue with this plugin. It works great except for some reason it prevents my course navigation drawer from appearing. The navigation just stays the main site navigation. Any ideas? And there is no uninstall option, so I have to restore my moodle each time I test using it.
  • Natasha Scott
    Wed, 10 Nov 2021, 5:24 AM
    We are running into the same problem. After upgrading to 3.11 the 'cog' used for the action menu on the frontpage disappeared. We thought originally it was some sort of theming issue. But we enabled explicit PHP logging and could see there was a PHP error being generated by this module.

    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.
  • Venkata Surreddy Dwarampudi
    Thu, 30 Dec 2021, 3:16 PM
    Yes, the same issue 'cog' disappear issue occurred in our project. By changing following function parameters in __construct function of field.class.php file, we are able to fix the issue. Please try and see.

    Before: format_string($option);

    After: format_string($option, true, ['context' => context_system::instance()])
  • morscheidt Morscheidt
    Wed, 5 Jan 2022, 6:09 PM
    in 3.11, the missing menu in the drawer or missing course editing button is due to the "context error" caused by the plugin.
    To solve , I arrived to the same conclusion as @venkata by comparison with standart Menu field type.


  • Jan de Lange
    Mon, 23 May 2022, 10:15 PM
    Is there a new version comming up for moodle 3.11 or even 4.0?
  • Iron Man
    Tue, 7 June 2022, 10:24 PM
    Is an update scheduled for moodle 3.11 or even 4.0? If Not, is it possible to assign a new lead maintainer?
  • Gaurang Rathod
    Mon, 15 Aug 2022, 10:53 PM
    How can I update this multi select custom field values using Moodle API ?
    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?
  • Michael Smith
    Fri, 20 Oct 2023, 11:36 PM
    I see a pull request on the github repo for this. This needs to be incorporated into the plugin.
1 2
Please login to post comments