Moodle
  1. Moodle
  2. MDL-33369

We need to add a new optional sectionid parameter to refer to course sections and not be dependent on section changes

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.3
    • Component/s: Course
    • Labels:
    • Testing Instructions:
      Hide

      Test 1

      1. Goto course>Edit settings> set 'course layout' to 'show one section per page'
      2. view any course page and make a note of the course id
      3. view the "course_sections" table in the database and filter records corresponding to the courseid above
      4. Try visiting moodle/course/view.php?id=2&sectionid=x
        Where x is any value of the 'id' column from the records listed in step 3
      5. Make sure you are taken to a section page corresponding to that sectionid and the correct node is highlighted in the navigation
      6. Goto course home page and move the section around.
      7. Repeat step 4 and 5 with the section just moved.

      Test 2 (Testing for regressions)

      1. click on any section from the course page and make sure you are taken to the correct section page
      2. Click the next and previous sections links and make sure they work fine
      3. Click on any section link from navigation and make sure you are taken to the correct section page
      Show
      Test 1 Goto course>Edit settings> set 'course layout' to 'show one section per page' view any course page and make a note of the course id view the "course_sections" table in the database and filter records corresponding to the courseid above Try visiting moodle/course/view.php?id=2&sectionid=x Where x is any value of the 'id' column from the records listed in step 3 Make sure you are taken to a section page corresponding to that sectionid and the correct node is highlighted in the navigation Goto course home page and move the section around. Repeat step 4 and 5 with the section just moved. Test 2 (Testing for regressions) click on any section from the course page and make sure you are taken to the correct section page Click the next and previous sections links and make sure they work fine Click on any section link from navigation and make sure you are taken to the correct section page
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull Master Branch:
      MDL-33369-master
    • Rank:
      41236

      Description

      The problem is that in multiple places we now try and link to course sections and the link is broken if the section is moved.

        Issue Links

          Activity

          Hide
          Dan Poltawski added a comment -

          Tentatively adding this to the MUST FIX backlog, because we've had a few issues with this.

          Show
          Dan Poltawski added a comment - Tentatively adding this to the MUST FIX backlog, because we've had a few issues with this.
          Hide
          Dan Poltawski added a comment -

          Unassigning from myself because i'm not working on this at the moment and be happy if someone else picks it up.

          Show
          Dan Poltawski added a comment - Unassigning from myself because i'm not working on this at the moment and be happy if someone else picks it up.
          Hide
          Dan Poltawski added a comment -

          Hi Ankit

          1. Watch whitespace: if($sectionid) { should be if ($sectionid) {
          2. use MUST_EXIST for get_field rather than generating your own error
          3. Is the fact that the section is not in the url going to cause problems (e.g. navigation)
          Show
          Dan Poltawski added a comment - Hi Ankit Watch whitespace: if($sectionid) { should be if ($sectionid) { use MUST_EXIST for get_field rather than generating your own error Is the fact that the section is not in the url going to cause problems (e.g. navigation)
          Hide
          Dan Poltawski added a comment -

          Looks good now, thanks

          Show
          Dan Poltawski added a comment - Looks good now, thanks
          Hide
          Ankit Agarwal added a comment -

          Thanks Dan.

          Sending for integration.

          Thanks

          Show
          Ankit Agarwal added a comment - Thanks Dan. Sending for integration. Thanks
          Hide
          Dan Poltawski added a comment -

          The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

          TIA and ciao

          Show
          Dan Poltawski added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
          Hide
          Ankit Agarwal added a comment -

          rebased
          Thanks

          Show
          Ankit Agarwal added a comment - rebased Thanks
          Hide
          Aparup Banerjee added a comment -

          This seems to have been pushed into integration master already. just updating the status here. (And setting integrator back to Sam)

          On to integrating MDL-33465 now.

          This should be ready for testing now.

          Show
          Aparup Banerjee added a comment - This seems to have been pushed into integration master already. just updating the status here. (And setting integrator back to Sam) On to integrating MDL-33465 now. This should be ready for testing now.
          Hide
          Rossiani Wijaya added a comment -

          This works great.

          Test passed.

          Show
          Rossiani Wijaya added a comment - This works great. Test passed.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          We could celebrate it today... but better if we perform a bigger party after releasing Moodle 2.3.

          Print this message and come to Perth that day, it's valid for one beer, wine, coke or... water, as you wish.

          Many thanks for your collaboration!

          Ciao

          Show
          Eloy Lafuente (stronk7) added a comment - We could celebrate it today... but better if we perform a bigger party after releasing Moodle 2.3. Print this message and come to Perth that day, it's valid for one beer, wine, coke or... water, as you wish. Many thanks for your collaboration! Ciao

            People

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

              Dates

              • Created:
                Updated:
                Resolved: