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

Invisible default sections lead to unexpected visibility layout

XMLWordPrintable

    • MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE
    • MOODLE_33_STABLE, MOODLE_34_STABLE
    • wip-MDL-60241-master
    • Hide

      Analyse, if this problem really affects your instance with:

      select course from mdl_course_sections where section = 0 and visible = 0;

      This returns a list of all affected course ids. Then you can manually change the visibility of these default sections to 1 with:

      update mdl_course_sections set visible = 1 where section = 0 and visible = 0

      Afterwards, you either need to purge all caches or you need to make any change to each affected course (such as adding modules, hide unhide module, move modules) so that the course cache is invalidated and rebuild.

      Show
      Analyse, if this problem really affects your instance with: select course from mdl_course_sections where section = 0 and visible = 0 ; This returns a list of all affected course ids. Then you can manually change the visibility of these default sections to 1 with: update mdl_course_sections set visible = 1 where section = 0 and visible = 0 Afterwards, you either need to purge all caches or you need to make any change to each affected course (such as adding modules, hide unhide module, move modules) so that the course cache is invalidated and rebuild.
    • Hide

      Before upgrade:

      1. Create/use a course in topics format, hide one of the sections, make sure there is at least one activity in the general section (usually announcements), remember course id
      2. Create/use a course in weeks format, hide one of the sections, make sure there is at least one activity in the general section (usually announcements), remember course id
      3. Open adminer/phpmyadmin/etc and execute: update mdl_course_sections set visible=0 where section=0 and course in (?,?) where (?,?) are two course ids you noted above
      4. Purge all caches
      5. View these two courses, make sure that your general section is displayed as hidden and the activity in it "available but not visible"
      6. UPGRADE
      7. View these two courses, make sure that the general section and activity in it is now visible but the other section that you hid is still hidden
      Show
      Before upgrade: Create/use a course in topics format, hide one of the sections, make sure there is at least one activity in the general section (usually announcements), remember course id Create/use a course in weeks format, hide one of the sections, make sure there is at least one activity in the general section (usually announcements), remember course id Open adminer/phpmyadmin/etc and execute: update mdl_course_sections set visible=0 where section=0 and course in (?,?) where (?,?) are two course ids you noted above Purge all caches View these two courses, make sure that your general section is displayed as hidden and the activity in it "available but not visible" UPGRADE View these two courses, make sure that the general section and activity in it is now visible but the other section that you hid is still hidden

      Somehow, it happened in our instance that some of our courses have the visibility of the default section (id = 0) set to false. There are many more reports of this issue in different Moodle Forums.

      However, there is no possibility in the front-end to actually set the visibility of the default section. So I have no idea, how this happened.

      Unfortunately, this leads to pretty ugly course views in Moodle 3.3:

      • The default section with visible = 0 are marked (correctly?) as invisible (label: Hidden from students). In Moodle 3.2 this setting had no effect.

      • All contents, which were previously visible in the section, are put to stealth mode.
      • The default section is however still visible for students.
      • All contents in stealth mode within this section are also displayed to the user (label: Available but not shown on course page)

            marina Marina Glancy
            tobias.reischmann Tobias Reischmann
            Mark Nelson Mark Nelson
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Bas Brands Bas Brands
            Votes:
            19 Vote for this issue
            Watchers:
            24 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.