Moodle
  1. Moodle
  2. MDL-31563

When changing a course section number to lower values, conten in the rest of the sections remains but is hidden

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Deferred
    • Affects Version/s: 2.0.2, 2.1.4, 2.2.1
    • Fix Version/s: None
    • Component/s: Course
    • Testing Instructions:
      Hide

      1. Create a new empty course with 20 sections
      2. Enter the course and now change the number of sections to 16
      3. Look into course_sections table and you will see that sections are still there
      4. Export the course and notice the orphaned sections are present there

      Show
      1. Create a new empty course with 20 sections 2. Enter the course and now change the number of sections to 16 3. Look into course_sections table and you will see that sections are still there 4. Export the course and notice the orphaned sections are present there
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Rank:
      38117

      Description

      If you ever try to change number of sections of an existing course to a lower value than initial Moodle will NOT remove the extra sections and associated activities etc. They will be present there forever until you actually delete the course. They will be preserved even during export/import.

      To me this looks like a bug.

        Issue Links

          Activity

          Hide
          Mary Cooch added a comment -

          Well I don't know if it's a bug or not but certainly that is the behaviour I have seen over several years and it actually proves useful to people who want to use the "unseen"/or orphaned topics to show items without actually displaying them on the course home page. I think if this was fixed such that each time you change the number of topics down it actually deletes the topic sections completely- then it might pose other problems to people who take advantage of this "bug"/feature.

          Show
          Mary Cooch added a comment - Well I don't know if it's a bug or not but certainly that is the behaviour I have seen over several years and it actually proves useful to people who want to use the "unseen"/or orphaned topics to show items without actually displaying them on the course home page. I think if this was fixed such that each time you change the number of topics down it actually deletes the topic sections completely- then it might pose other problems to people who take advantage of this "bug"/feature.
          Hide
          Michael de Raadt added a comment -

          Hi, Darko.

          Yes I too have seen teachers making use of this peculiarity. One example is to create resources in a lower section, link to it with icons in a label in an upper section, then reduce the number of sections in the course. It's not the most efficient way of achieving such an iconic format, but it worked. I suspect there would be a few problems if we simply deleted resources/activities when reducing the number of sections.

          There are a few options and it's worth opening this up for discussion (Mary, perhaps you could assist with this).

          1. Maintain the current behaviour
          2. Warn the user that reducing the sections will cause the activities/resources to become invisible, but not deleted
          3. Shift resource/activities from lower hidden sections to the next most visible remaining section
          4. Warn the user that reducing the sections will cause the activities/resources to be deleted, then delete them
          5. Delete activities/resources in sections that become hidden when the number of sections are reduced, without warning
          Show
          Michael de Raadt added a comment - Hi, Darko. Yes I too have seen teachers making use of this peculiarity. One example is to create resources in a lower section, link to it with icons in a label in an upper section, then reduce the number of sections in the course. It's not the most efficient way of achieving such an iconic format, but it worked. I suspect there would be a few problems if we simply deleted resources/activities when reducing the number of sections. There are a few options and it's worth opening this up for discussion (Mary, perhaps you could assist with this). Maintain the current behaviour Warn the user that reducing the sections will cause the activities/resources to become invisible, but not deleted Shift resource/activities from lower hidden sections to the next most visible remaining section Warn the user that reducing the sections will cause the activities/resources to be deleted, then delete them Delete activities/resources in sections that become hidden when the number of sections are reduced, without warning
          Hide
          Mary Cooch added a comment -

          I have raised this in the Lounge http://moodle.org/mod/forum/discuss.php?d=195836 - we shall see if we get any thoughts.

          Show
          Mary Cooch added a comment - I have raised this in the Lounge http://moodle.org/mod/forum/discuss.php?d=195836 - we shall see if we get any thoughts.
          Hide
          Michael de Raadt added a comment -

          I'm going to triage this as an improvement and let's see how this pans out.

          Show
          Michael de Raadt added a comment - I'm going to triage this as an improvement and let's see how this pans out.
          Hide
          Richard Oelmann added a comment -

          Huge +1 with Tim on this one. http://moodle.org/mod/forum/discuss.php?d=195836#p853143

          I have always made use of this as a feature - create a section to hold resources and activities which are then not visible to students, but are still accessible when linked to, while resources which get 'hidden' are not then available through links either.

          Please do not change this behaviour!!!

          Richard

          Show
          Richard Oelmann added a comment - Huge +1 with Tim on this one. http://moodle.org/mod/forum/discuss.php?d=195836#p853143 I have always made use of this as a feature - create a section to hold resources and activities which are then not visible to students, but are still accessible when linked to, while resources which get 'hidden' are not then available through links either. Please do not change this behaviour!!! Richard
          Hide
          Darko Miletic added a comment -

          I have no problems clarifying my position here so let us start:

          I realize that my post in this thread differs from what I wrote in the issue but I'm just being realistic here. If so many users relay on this "feature" we should keep it. My main objection is the way it is presented or not to the user responsable for managing the course. This of course applies to teacher and administrator ONLY.

          In Moodle 1.9 these sections are NEVER displayed to any user under any condition in course view regardless of the fact if course editing is off or on (I checked).

          In Moodle 2.x these sections are displayed only to teacher/admin (this is correct) when a course is in editing mode but under condition that they have at least one activity (this is wrong in my opinion).

          If I'm responsable for a course I want to know what it contains simply by looking at it, not by keeping a hidden knowledge in my skull or looking at database. This is what is wrong with current implementation of orphaned sections in Moodle course. Also the visual representation of these orphaned sections depend on course format impementation. In my opinion that is not good enough. This should go to the course block and be visible to teacher/admin ONLY.

          And have in mind that not only the people who create the course are responsable for it, there are other teachers, admins etc.

          To summarize:

          I would like to be able to view orphaned sections in course edit mode if I'm teacher or admin regardless of the fact that these sesctions may or may not have activities in them.

          Show
          Darko Miletic added a comment - I have no problems clarifying my position here so let us start: I realize that my post in this thread differs from what I wrote in the issue but I'm just being realistic here. If so many users relay on this "feature" we should keep it. My main objection is the way it is presented or not to the user responsable for managing the course. This of course applies to teacher and administrator ONLY. In Moodle 1.9 these sections are NEVER displayed to any user under any condition in course view regardless of the fact if course editing is off or on (I checked). In Moodle 2.x these sections are displayed only to teacher/admin (this is correct) when a course is in editing mode but under condition that they have at least one activity (this is wrong in my opinion). If I'm responsable for a course I want to know what it contains simply by looking at it, not by keeping a hidden knowledge in my skull or looking at database. This is what is wrong with current implementation of orphaned sections in Moodle course. Also the visual representation of these orphaned sections depend on course format impementation. In my opinion that is not good enough. This should go to the course block and be visible to teacher/admin ONLY. And have in mind that not only the people who create the course are responsable for it, there are other teachers, admins etc. To summarize: I would like to be able to view orphaned sections in course edit mode if I'm teacher or admin regardless of the fact that these sesctions may or may not have activities in them.
          Hide
          Tim Hunt added a comment -

          I really think this should be closed wont-fix.

          Show
          Tim Hunt added a comment - I really think this should be closed wont-fix.
          Hide
          Michael de Raadt added a comment -

          A solution has been implemented as part of the new paged course format work. See MDL-32771. The solution shows "orphaned activities" when editing is turned on.

          Show
          Michael de Raadt added a comment - A solution has been implemented as part of the new paged course format work. See MDL-32771 . The solution shows "orphaned activities" when editing is turned on.

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: