Moodle
  1. Moodle
  2. MDL-31255

Moving course section when JavaScript is off does not update highlighted section

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1, 2.2, 2.3
    • Fix Version/s: 2.1.5, 2.2.2
    • Component/s: Course
    • Labels:
    • Database:
      Any
    • Testing Instructions:
      Hide

      Note to testers: Please test this under 21 and 22, that will make testing under master unnecessary (100% = 22_STABLE) and bring us good safety for incoming minor stable releases.

      1. Turn Javascript off
      2. Highlight the section
      3. Move either the highlighted section up or down or the section that replaces highlighted one on the move.
      Show
      Note to testers: Please test this under 21 and 22, that will make testing under master unnecessary (100% = 22_STABLE) and bring us good safety for incoming minor stable releases. Turn Javascript off Highlight the section Move either the highlighted section up or down or the section that replaces highlighted one on the move.
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-31255-master-3
    • Rank:
      37720

      Description

      It appeared that the highlighted section remain on the same section number and not being updated on the section move when Javascript is off.

        Issue Links

          Activity

          Hide
          Ruslan Kabalin added a comment -

          This can be cleanly cherry-picked to 2.2, 2.1

          Show
          Ruslan Kabalin added a comment - This can be cleanly cherry-picked to 2.2, 2.1
          Hide
          Michael de Raadt added a comment -

          Thanks for reporting that and providing a solution.

          Show
          Michael de Raadt added a comment - Thanks for reporting that and providing a solution.
          Hide
          Dan Poltawski added a comment -

          Hi Ruslan,

          Do you have permission to send things for peer review? If so, please do this in future as it'll speed up our review.

          Show
          Dan Poltawski added a comment - Hi Ruslan, Do you have permission to send things for peer review? If so, please do this in future as it'll speed up our review.
          Hide
          Dan Poltawski added a comment -

          Hi Ruslan,

          The basic idea looks good but we strongly discourage passing function variables by reference unless there is no other way as it breaks the 'self contained' nature of a function.

          So i'd suggest coming up with another solution which doesn't require passing by reference.

          Show
          Dan Poltawski added a comment - Hi Ruslan, The basic idea looks good but we strongly discourage passing function variables by reference unless there is no other way as it breaks the 'self contained' nature of a function. So i'd suggest coming up with another solution which doesn't require passing by reference.
          Hide
          Ruslan Kabalin added a comment -

          Hi Dan, thanks a lot for reviewing. I have re-factored it a little. See updated version.

          Show
          Ruslan Kabalin added a comment - Hi Dan, thanks a lot for reviewing. I have re-factored it a little. See updated version.
          Hide
          Dan Poltawski added a comment -

          Hi Ruslan,

          Looks great - my only comment is on the added phpdoc:

          @return boolean Result
          

          It would be good to give an indication what the result is represented as, e.g.

          @return boolean true if section moved successfully
          
          Show
          Dan Poltawski added a comment - Hi Ruslan, Looks great - my only comment is on the added phpdoc: @ return boolean Result It would be good to give an indication what the result is represented as, e.g. @ return boolean true if section moved successfully
          Hide
          Ruslan Kabalin added a comment -

          Hi Dan, I have fixed the phpdoc string.

          Show
          Ruslan Kabalin added a comment - Hi Dan, I have fixed the phpdoc string.
          Hide
          Eloy Lafuente (stronk7) 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
          Eloy Lafuente (stronk7) 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
          Eloy Lafuente (stronk7) added a comment -

          Integrated, thanks (21, 22 & master).

          Show
          Eloy Lafuente (stronk7) added a comment - Integrated, thanks (21, 22 & master).
          Hide
          Jason Fowler added a comment -

          All good in 2.2 and 2.1

          Show
          Jason Fowler added a comment - All good in 2.2 and 2.1
          Hide
          Ruslan Kabalin added a comment -

          Thanks a lot

          Show
          Ruslan Kabalin added a comment - Thanks a lot
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Your changes are now upstream and will be included in the next minor released scheduled for March 13th (next Monday!).

          icao_reverse('arreis olik rebemevon afla letoh ognat');
          

          Closing, ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Your changes are now upstream and will be included in the next minor released scheduled for March 13th (next Monday!). icao_reverse('arreis olik rebemevon afla letoh ognat'); Closing, ciao
          Hide
          Ruslan Kabalin added a comment -

          icao_reverse('arreis olik rebemevon afla letoh ognat');

          .-- . ... -.. — – .

          Show
          Ruslan Kabalin added a comment - icao_reverse('arreis olik rebemevon afla letoh ognat'); .-- . . .. -. . — – .

            People

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

              Dates

              • Created:
                Updated:
                Resolved: