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

FEATURE_GROUPS has different default values in different parts of code

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.6, 3.5.3, 3.6.1, 3.7
    • 3.5.4, 3.6.2
    • Course, Groups

    Description

      $ git grep FEATURE_GROUPS
      course/dnduploadlib.php:        if ($groupbuttons and plugin_supports('mod', $this->module->name, FEATURE_GROUPS, 0)) {
      course/lib.php:    if ($hasmanageactivities and plugin_supports('mod', $mod->modname, FEATURE_GROUPS, 0)) {
      course/moodleform_mod.php:        $this->_features->groups            = plugin_supports('mod', $this->_modname, FEATURE_GROUPS, true);
      

      Which means that in different places of code the default value is considered different. All standard module plugins define the FEATURE_GROUPS whatever it is (true or false), so the default value is never retrieved. I would recommend 0 to be default (as the more logical - if not specified, assume "no").

      Attachments

        Activity

          People

            rezaie9 Shamim Rezaie
            marina Marina Glancy
            Mathew May Mathew May
            Jun Pataleta Jun Pataleta
            CiBoT CiBoT
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona), Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              14/Jan/19