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

block_timeline causes JSON parse error when activity name contains quotes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Deferred
    • Icon: Minor Minor
    • None
    • 3.6.5, 3.7.1
    • Blocks
    • MOODLE_36_STABLE, MOODLE_37_STABLE
    • MDL-66131-master
    • Hide
      1. Acces with teacher role to an a course.
      2. Click to "Add an activity or resource"
      3. Click on assignment
      4. On assignment name write a text with two or more double quotes.
      5. Config due date with a day of next 7 days
      6. Save assignment
      7. Go to Dashboard
      8. Timeline block should display the assignment correctly.
      Show
      Acces with teacher role to an a course. Click to "Add an activity or resource" Click on assignment On assignment name write a text with two or more double quotes. Config due date with a day of next 7 days Save assignment Go to Dashboard Timeline block should display the assignment correctly.

      The following error message (caused by block_timeline) appears when it has to show a due date of an activity or course name that contains at least two double quotes:

      JSON.parse: expected ',' or '}' after property value in object at line 1 column 21 of the JSON data

        1. coursenameUnescaped.png
          232 kB
          Sergio Comerón
        2. CAP.png
          112 kB
          Sergio Comerón

            Unassigned Unassigned
            mgauk Martin Gauk
            Shamim Rezaie Shamim Rezaie
            Votes:
            47 Vote for this issue
            Watchers:
            31 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours
                2h

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