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

FEATURE_GROUPS has different default values in different parts of code

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.6, 3.5.3, 3.6.1, 3.7
    • Fix Version/s: 3.5.4, 3.6.2
    • Component/s: Course, Groups
    • Labels:

      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

            Assignee:
            rezaie9 Shamim Rezaie
            Reporter:
            marina Marina Glancy
            Peer reviewer:
            Mathew May
            Integrator:
            Jun Pataleta
            Tester:
            CiBoT
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              14/Jan/19