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

Lesson timer throws errors about undeclared javascript vars

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.6, 2.5, 2.6
    • Fix Version/s: 2.4.7, 2.5.3
    • Component/s: Lesson
    • Labels:
      None
    • Testing Instructions:
      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.
    • Affected Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-42663_master

      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

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  11/Nov/13