Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-62344

Show up ID number field in label resource settings form



    • Testing Instructions:
      1. Create new label
      2. Open the common module settings 
        1. Confirm that the ID Number field is present
    • Workaround:

      In the file mod/label/lib.php

      • lookup for the function label_supports
      • update the line

        case FEATURE_IDNUMBER:                return false;


        case FEATURE_IDNUMBER:                return true;

      In the file mod/label/lib.php lookup for the function label_supports update the line case FEATURE_IDNUMBER:                return false;  to case FEATURE_IDNUMBER:                return true;
    • Affected Branches:
    • Fixed Branches:
    • Pull from Repository:
    • Pull Master Branch:


      Label resource (mod_label) settings form do not show up ID number field. So, there is no way to set a value. Maybe, because the ID number is mainly used for grade purposes and the label resource is not used for that. In continuing education, we use label resource, achievement, and conditional activities to let user make some choice.  Learners activities are then decided from that choice. some time, learner can also change his choice and we want to keep track of completed activities and update the content to show up according to the new choice.  We use the label idnumber for custom report to make sure that all required activities for the choice are completed. 

      Let say also that using information from user's profile is not enough and not practical at all. For instance, To work in given service, a nurse need to complete some learning activities required to get access to EMR (Electronic medical records) software. If she changes the service, she need also to completes activities required for that new service. This is the case for thousands of employees (nurses, medical doctor, resident, etc). We want to avoid them to waste time on activities that are not accurate for the job

      Activities achievement report is not practical because there is huge number of employees.   

      The ID Number field is already implemented on label resource, but disable. We suggest to set 


      case FEATURE_IDNUMBER:                return true;


      in the function label_supports of mod/label/lib.php

      We provide a patch (format-patch, git diff)  with behat test in attachment 



        1. 0001-MDL-62344-mod_label-ID-number-feature-support.patch
          4 kB
          Johnny Tsheke
        2. 0002-MDL-62344-lang-update-english-string-idnumbermod_hel.patch
          2 kB
          Johnny Tsheke
        3. Screen Shot 2018-05-06 at 10.01.30 PM.png
          133 kB
          Johnny Tsheke
        4. Screen Shot 2018-05-06 at 10.06.14 PM.png
          158 kB
          Johnny Tsheke
        5. Screen Shot 2018-05-06 at 9.41.03 PM.png
          122 kB
          Johnny Tsheke
        6. Screen Shot 2018-05-06 at 9.41.24 PM.png
          156 kB
          Johnny Tsheke
        7. Screen Shot 2018-05-06 at 9.41.51 PM.png
          153 kB
          Johnny Tsheke
        8. Screen Shot 2018-05-06 at 9.42.52 PM.png
          95 kB
          Johnny Tsheke
        9. Screen Shot 2018-05-07 at 6.11.18 AM.png
          107 kB
          Johnny Tsheke
        10. Screen Shot 2018-05-22 at 4.23.17 AM.png
          187 kB
          Johnny Tsheke



            jtsheke Johnny Tsheke
            jtsheke Johnny Tsheke
            Peer reviewer:
            Andrew Lyons Andrew Lyons
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Shamim Rezaie Shamim Rezaie
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
            0 Vote for this issue
            6 Start watching this issue


              Fix Release Date: