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

Hidden course sections are shown even when set to invisible

    Details

    • Testing Instructions:
      Show
      See MDLQA-1304
    • Affected Branches:
      MOODLE_21_STABLE

      Description

      As reported by Nicolas in MDLQA-1304:

      The hidden sections are displayed as collapsed in both modes, i.e. even when setting for hidden sections is "Invisible".

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            marina Marina Glancy added a comment -

            Can not reproduce. Everything works as expected.

            Show
            marina Marina Glancy added a comment - Can not reproduce. Everything works as expected.
            Hide
            cfollin Chris Follin added a comment -

            This problem exists in 2.1.3 but seems to be resolved in 2.2.1. I updated the affected versions. Also, please see attached screenshots of the topic displaying correctly (actually not displaying) in 2.2 but displaying as collapsed when it should be invisible in 2.1.

            This issue should be reopened since Moodle 2.1 is still a supported version.

            Show
            cfollin Chris Follin added a comment - This problem exists in 2.1.3 but seems to be resolved in 2.2.1. I updated the affected versions. Also, please see attached screenshots of the topic displaying correctly (actually not displaying) in 2.2 but displaying as collapsed when it should be invisible in 2.1. This issue should be reopened since Moodle 2.1 is still a supported version.
            Hide
            salvetore Michael de Raadt added a comment -

            This seems to be working in recent versions, but may still be a problem in 2.1.

            Show
            salvetore Michael de Raadt added a comment - This seems to be working in recent versions, but may still be a problem in 2.1.
            Hide
            salvetore Michael de Raadt added a comment -

            I just tried this in Moodle 2.1.4+ (Build: 20120213) and hidden sections were correctly invisible.

            Can you help us determine if there is something else going in here, Chris? What steps are you following to achieve your presented results? I did...

            1. Log in as admin
            2. Enter a course
            3. Edit settings (in course)
            4. Change "Hidden sections" setting to "Hidden sections are completely invisible"
            5. Save settings
            6. Hide a section by clicking the eye icon
            7. Log in as a student
            8. Enter same course
            9. Check section visibility
            Show
            salvetore Michael de Raadt added a comment - I just tried this in Moodle 2.1.4+ (Build: 20120213) and hidden sections were correctly invisible. Can you help us determine if there is something else going in here, Chris? What steps are you following to achieve your presented results? I did... Log in as admin Enter a course Edit settings (in course) Change "Hidden sections" setting to "Hidden sections are completely invisible" Save settings Hide a section by clicking the eye icon Log in as a student Enter same course Check section visibility
            Hide
            cfollin Chris Follin added a comment -

            Michael,

            I did exactly those steps except I created a new course rather than editing an existing one. We're on 2.1.3 but I'm not sure if that makes a difference from 2.1.4.

            Show
            cfollin Chris Follin added a comment - Michael, I did exactly those steps except I created a new course rather than editing an existing one. We're on 2.1.3 but I'm not sure if that makes a difference from 2.1.4.
            Hide
            cfollin Chris Follin added a comment -

            I tried to reproduce this in 2.1.4 but I was not able to do so. Looking into the code, there is a difference between 2.1.3 and 2.1.4.

            From course/format/topics/format.php...

            2.1.4:

            $showsection = (has_capability('moodle/course:viewhiddensections', $context) or $thissection->visible or !$course->hiddensections);

            2.1.3:

            $showsection = get_section_show($thissection, $modinfo);

            In 2.1.3, get_section_show() is returning true when it should be false. The revised way of determining $showsection in 2.1.4 is working correctly.

            Show
            cfollin Chris Follin added a comment - I tried to reproduce this in 2.1.4 but I was not able to do so. Looking into the code, there is a difference between 2.1.3 and 2.1.4. From course/format/topics/format.php... 2.1.4: $showsection = (has_capability('moodle/course:viewhiddensections', $context) or $thissection->visible or !$course->hiddensections); 2.1.3: $showsection = get_section_show($thissection, $modinfo); In 2.1.3, get_section_show() is returning true when it should be false. The revised way of determining $showsection in 2.1.4 is working correctly.
            Hide
            cfollin Chris Follin added a comment -

            Issue is present in 2.1.3 but already resolved in 2.1.4.

            Show
            cfollin Chris Follin added a comment - Issue is present in 2.1.3 but already resolved in 2.1.4.

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: