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

Section return no longer works with single page course views

    Details

    • Testing Instructions:
      Hide

      The main idea of the tests is to make sure that in course editing mode the "Back" button returns you to the same view you've been before, and in case of multiple sections per page it returns to the section anchor. This should work for all editing buttons:

      • with Javascript enabled
      • with Javascript disabled
        when course display is set as
      • 'show all sections on one page'
      • 'show one section per page' and teacher was on course overview page before clicking link
      • 'show one section per page' and teacher was on section page before clicking link

      Please note: Exceptions are sections editing buttons on the right of the section in non-js mode, the functions to display them do not have argument for sectionreturn.

      1. Create a course with several sections and activities in them (Moodle Features Demo works good).
      2. Set course display to 'show all sections on one page'
      3. Enter course editing mode
      4. Click all editing buttons next to the module, perform an action and click 'return to course' and/or 'Cancel'. Make sure you return to the course page to the section where this activity is (url looks like /course/view.php?id=1#section-3). Note that in JS mode with AJAX enabled page is often not reloaded so this check is not always applicable.
      5. Add activity/resource and save it returning to course, make sure you have the right url
      6. Start adding activity/resource and press cancel, make sure you have the right url
      7. Disable JS and repeat #4-6. When you move activity from one section to another you should be returned to the target section.
      8. Enable JS
      9. Set course display to 'show one section per page'
      10. Open course overview page and enter edit mode. Even in this course display mode in editing mode you still can see all activities in the course on one page.
      11. Repeat #4-8
      12. Click on one of the sections header to view/edit just one section on page
      13. Click all editing buttons next to the module, perform an action and click 'return to course' and/or 'Cancel'. Make sure you return to the SECTION page (url looks like /course/view.php?id=1&section=3).
        Even when you are on the page for section 3 but edit activities from header (section 0), you return to the page for section 3.
      14. Add and save activity, start adding and cancel activity, check the return url
      15. Disable JS and repeat the same
      Show
      The main idea of the tests is to make sure that in course editing mode the "Back" button returns you to the same view you've been before, and in case of multiple sections per page it returns to the section anchor. This should work for all editing buttons: with Javascript enabled with Javascript disabled when course display is set as 'show all sections on one page' 'show one section per page' and teacher was on course overview page before clicking link 'show one section per page' and teacher was on section page before clicking link Please note: Exceptions are sections editing buttons on the right of the section in non-js mode, the functions to display them do not have argument for sectionreturn. Create a course with several sections and activities in them (Moodle Features Demo works good). Set course display to 'show all sections on one page' Enter course editing mode Click all editing buttons next to the module, perform an action and click 'return to course' and/or 'Cancel'. Make sure you return to the course page to the section where this activity is (url looks like /course/view.php?id=1#section-3). Note that in JS mode with AJAX enabled page is often not reloaded so this check is not always applicable. Add activity/resource and save it returning to course, make sure you have the right url Start adding activity/resource and press cancel, make sure you have the right url Disable JS and repeat #4-6. When you move activity from one section to another you should be returned to the target section. Enable JS Set course display to 'show one section per page' Open course overview page and enter edit mode. Even in this course display mode in editing mode you still can see all activities in the course on one page. Repeat #4-8 Click on one of the sections header to view/edit just one section on page Click all editing buttons next to the module, perform an action and click 'return to course' and/or 'Cancel'. Make sure you return to the SECTION page (url looks like /course/view.php?id=1&section=3). Even when you are on the page for section 3 but edit activities from header (section 0), you return to the page for section 3. Add and save activity, start adding and cancel activity, check the return url Disable JS and repeat the same
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull Master Branch:
      wip-MDL-35276-master

      Description

      When you edit or add modules on single page course views and click Save and Return to course, you are always taken to section-0, not the section the item was added on.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    12/Nov/12