Skip to content

Subsection navigation is inconsistent and not updated after reordering #260

Description

@cmoehl

Description
Navigation between subsections is not updated correctly. The previous/next navigation treats sections and subsections inconsistently and does not reflect the actual order of subsections after they have been reordered.

To Reproduce
Steps to reproduce the behaviour:

  1. Create a course with 1 section.
  2. Open Section 1.
  3. Create Subsection 1.
  4. Create Subsection 2 below Subsection 1.
  5. Open Subsection 1.
    • Navigation unexpectedly shows "Section 1" on the left.
    • No navigation is shown on the right.
  6. Open Subsection 2.
    • Navigation shows "Subsection 1" on the left (as expected).
    • No navigation is shown on the right (as expected).
  7. Move Subsection 1 below Subsection 2.
  8. Open Subsection 1.
    • Navigation still shows "Section 1" on the left.
    • No navigation is shown on the right.

Expected behaviour
Subsection navigation should reflect the current order of subsections and should treat sections and subsections as separate navigation levels.

Expected results:

  • Before reordering:
    • Subsection 1: no navigation on the left; "Subsection 2" on the right.
    • Subsection 2: "Subsection 1" on the left; no navigation on the right.
  • After reordering (Subsection 2 → Subsection 1):
    • Subsection 1: "Subsection 2" on the left; no navigation on the right.
    • Subsection 2: no navigation on the left; "Subsection 1" on the right.

Versions

  • Moodle: 5.1.5
  • Format: 500.1.0

Additional context
https://moodle.atlassian.net/browse/MDL-85755 "Section navigation does not display correct next/prev links for subsections" was fixed and is working in custom sections and weekly sections. This might help.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions