Details

    • Testing Instructions:
      Hide

      Ensure that you have cachejs enabled, and jsrev not set

      • Open dev tools to the 'Network' tab
      • Open course page and turn editing on
      • Check that the course/dndupload.js was loaded through lib/javascript.php
      • Check that dndupload works
      Show
      Ensure that you have cachejs enabled, and jsrev not set Open dev tools to the 'Network' tab Open course page and turn editing on Check that the course/dndupload.js was loaded through lib/javascript.php Check that dndupload works
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE
    • Pull Master Branch:

      Description

      I just discovered that the defintion in course/dnduploadlib.php for inclusion of the JS code (course/dndupload.js) uses a moodle_url, so is not using lib/javascript.php and is not being sent with caching headers.

        Gliffy Diagrams

          Activity

          Hide
          Andrew Nicols added a comment -

          This will break for anyone doing strange things with forcing browser caching, and force a suck of an extra 40KB on every page load using course/dndupload.js.

          Show
          Andrew Nicols added a comment - This will break for anyone doing strange things with forcing browser caching, and force a suck of an extra 40KB on every page load using course/dndupload.js.
          Hide
          Andrew Nicols added a comment -

          I'm not sure whether this should be backported to stable branches, my gut feeling is that it should but I'd appreciate any input.

          If so, I'll create stable branches after peer review.

          Show
          Andrew Nicols added a comment - I'm not sure whether this should be backported to stable branches, my gut feeling is that it should but I'd appreciate any input. If so, I'll create stable branches after peer review.
          Hide
          Andrew Nicols added a comment -

          P.s. Petr: Sorry for giving you this, but I suspect you know more about the potential browser caching issues than anyone else.

          Show
          Andrew Nicols added a comment - P.s. Petr: Sorry for giving you this, but I suspect you know more about the potential browser caching issues than anyone else.
          Hide
          Petr Skoda added a comment -

          +1, moodle_url() should not be ever used for JS files like this

          Show
          Petr Skoda added a comment - +1, moodle_url() should not be ever used for JS files like this
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Integrated (23, 24 & master), thanks!

          Note: the 23 branch (MDL-38658-m23) was missing so I simply cherry-picked from 24.

          Show
          Eloy Lafuente (stronk7) added a comment - Integrated (23, 24 & master), thanks! Note: the 23 branch ( MDL-38658 -m23) was missing so I simply cherry-picked from 24.
          Hide
          Jason Fowler added a comment -

          I must be doing something wrong, or the testing instructions aren't thorough enough to ensure it works correctly, because I am not seeing anything.

          Show
          Jason Fowler added a comment - I must be doing something wrong, or the testing instructions aren't thorough enough to ensure it works correctly, because I am not seeing anything.
          Hide
          Jason Fowler added a comment -

          Ah, figured it out... you need to turn on editing ... whoops.

          Show
          Jason Fowler added a comment - Ah, figured it out... you need to turn on editing ... whoops.
          Hide
          Jason Fowler added a comment -

          All working. Thanks Andrew.

          Show
          Jason Fowler added a comment - All working. Thanks Andrew.
          Hide
          Damyon Wiese added a comment -

          Thanks for your hard work. This issue has been integrated upstream and is now available via git (and in some hours, via mirrors and downloads).

          Show
          Damyon Wiese added a comment - Thanks for your hard work. This issue has been integrated upstream and is now available via git (and in some hours, via mirrors and downloads).

            People

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

              Dates

              • Created:
                Updated:
                Resolved: