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

Timeline block: SyntaxError if double quotes " " used in Assignment name

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 3.7.1
    • Blocks
    • MOODLE_37_STABLE

      Timeline block enabled for all users in Dashboard. If user has upcoming assignments in timeline block it gives SyntaxError popup.
      Also shows empty timeline for that particular course/assignment if Shorted by course.

      Full error message in popup:
      SyntaxError
      JSON.parse: expected ',' or '}' after property value in object at line 1 column 37 of the JSON data

      How to repeat error:
      1. Enrol any user to course
      2. Add new Assignment to that course
      3. Enter Assignment name using quotes, for example: Assignment for "Task 1"
      3. Enable start and end date, so it would appear in calendar and in Timeline block (let's say 1 week from now)
      4. Open Dashboard with user enroled to that course.
      5. You will get popup with SyntaxError.
      6. Enter same course and remove quotes from Assignment name. There will be no SyntexErrors in Dashboard.

      If we use single quotes Assignment for 'Task 1' there is no errors. Only double quotes gives SyntaxError.
      It seems that error is triggered by " symbol in any case.

      How can it be fixed?

       

      Thanks.

        1. timeline_1.jpg
          timeline_1.jpg
          187 kB
        2. timeline_2.jpg
          timeline_2.jpg
          111 kB
        3. timeline_3.jpg
          timeline_3.jpg
          141 kB

            Unassigned Unassigned
            marius Marius Šadauskas
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 10 minutes
                10m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.