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

Lesson timer throws errors about undeclared javascript vars

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.4.6, 2.5, 2.6
    • 2.4.7, 2.5.3
    • Lesson
    • None
    • MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE
    • MOODLE_24_STABLE, MOODLE_25_STABLE
    • MDL-42663_master
    • Hide
      1. Go to a course and add a lesson with "Time limit (minutes)" set to 5
      2. Add a content page on it
      3. Login as student
      4. Open the inspector JS console and access the lesson
      5. You SHOULD NOT see any error about Uncaught ReferenceError: servertime|starttime is not defined
      6. Wait a while (not more than 5 minutes)
      7. The next steps are to ensure that the timer (in a block) is still working properly
        1. Wait a while and refresh the page
        2. The time remaining value SHOULD be less than before
        3. You SHOULD NOT see any error about Uncaught ReferenceError: servertime|starttime is not defined
        4. Wait more than 5 minutes and refresh the page
        5. You SHOULD see You did not answer any questions. You have received a 0 for this lesson.
      Show
      Go to a course and add a lesson with "Time limit (minutes)" set to 5 Add a content page on it Login as student Open the inspector JS console and access the lesson You SHOULD NOT see any error about Uncaught ReferenceError: servertime|starttime is not defined Wait a while (not more than 5 minutes) The next steps are to ensure that the timer (in a block) is still working properly Wait a while and refresh the page The time remaining value SHOULD be less than before You SHOULD NOT see any error about Uncaught ReferenceError: servertime|starttime is not defined Wait more than 5 minutes and refresh the page You SHOULD see You did not answer any questions. You have received a 0 for this lesson.

    Description

      I've tried it in Chrome + Linux and using:

      • cachejs -> disabled + yuicomboloading -> disabled
      • cachejs -> enabled + yuicomboloading -> enabled

      I discovered it while working on MDL-42625 as the undeclared vars breaks the JS and M.util.pending_js is always full.

      Attachments

        Issue Links

          Activity

            People

              dmonllao David Monllaó
              dmonllao David Monllaó
              Rossiani Wijaya Rossiani Wijaya
              Damyon Wiese Damyon Wiese
              Frédéric Massart Frédéric Massart
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                11/Nov/13