marinaglancy / moodle-format_flexsections

25 stars 25 forks source link

Fix find_next_section behaviour in complex tree scenario. #44

Closed kabalin closed 1 year ago

kabalin commented 1 year ago

This patch makes find_next_section respect cases where requested section contains subsections, it fixes:

Scenarios to test this patch:

  1. Setup sections as:
    section1
    section2
    section3
        section4
    section5 (add activity to observe where section is moved)
    section6
    section7
    section8
    section9
  2. From scenario at step 1 move section5 before section 7 (before this patch section5 will become the last section8)
  3. From scenario at step 1 move section6 before section 5 (before this patch section6 will not move)

Fixes #37 (hopefully)