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.
- is duplicated by
-
MDL-66131 block_timeline causes JSON parse error when activity name contains quotes
-
- Closed
-