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

Course content inaccessible when groupmembersonly is enabled, but no grouping is set

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Not a bug
    • 2.2.1, 2.3.3, 2.4
    • None
    • Groups
    • MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
    • Hide

      Manually uncheck groupmembersonly setting or run following sql command:

      UPDATE mdl_course_modules 
      SET groupmembersonly = 0
      WHERE groupingid = 0 AND groupmembersonly = 1

      Show
      Manually uncheck groupmembersonly setting or run following sql command: UPDATE mdl_course_modules SET groupmembersonly = 0 WHERE groupingid = 0 AND groupmembersonly = 1
    • Hide
      1. Go to Site administration > Development > Experimental > Experimental settings and click "Enable group members only"
      2. Go to course and upload course content. In the "Common module settings" section, click "Show advanced" and click "Available for group members only", but select "None" for the grouping.
      3. Go to course settings and enable guest access
      4. Visit course as guest user
        1. EXPECTED: You can see the uploaded course content
        2. ACTUAL: You do not see the uploaded course content

      The regular testing for groupings and groupmembersonly should be performed as well to ensure no regressions.

      Show
      Go to Site administration > Development > Experimental > Experimental settings and click "Enable group members only" Go to course and upload course content. In the "Common module settings" section, click "Show advanced" and click "Available for group members only", but select "None" for the grouping. Go to course settings and enable guest access Visit course as guest user EXPECTED: You can see the uploaded course content ACTUAL: You do not see the uploaded course content The regular testing for groupings and groupmembersonly should be performed as well to ensure no regressions.

    Description

      Hello all,

      when enabling the enablegroupmembersonly - flag in Experiemental settings the course content is completely disappeared for role participant.

      I found that there must be going wrong in update_user_visible()

      The debugger jumps into

      else if (!empty($CFG->enablegroupmembersonly) and !empty($this->groupmembersonly)
                      and !has_capability('moodle/site:accessallgroups', $modcontext, $userid)) {
                  $groups = $this->modinfo->get_groups($this->groupingid);
      .....

      Then group is empty... so that uservisible is set to "false"

      In the corresponding course there is NO group setting done.
      That makes no sense.
      Hope somebody can help...

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              lestefan Stefan L
              David Woloszyn, Huong Nguyen, Jake Dallimore, Michael Hawkins, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: