Meirza
fbc2732d9f
MDL-76508 templates: Handling non-JSON string
...
When the param string contains a left curly bracket as the first character,
the system will assume the string is a JSON string and will be parsed and returned as an object.
But in some cases, the string is not JSON and will return an error if the system parses it.
For example, a user might have used the course name with a left curly bracket as the first character.
Adding a double quote after the left curly bracket to differentiate between string and JSON string,
so it can be safe to parse the string, and also added try..catch to ensure that the parsing creates an object type.
2022-12-23 09:57:36 +07:00
..
2022-06-08 18:18:47 +02:00
2022-07-13 08:20:54 +05:30
2022-12-23 09:57:36 +07:00
2022-11-28 14:43:04 +08:00
2022-12-21 08:38:09 +00:00
2022-11-29 13:24:43 +03:00
2022-12-09 10:49:12 +01:00
2022-12-16 18:53:58 +05:30
2022-08-26 16:34:20 +02:00
2022-11-26 16:16:20 +01:00
2022-12-07 18:32:13 +01:00
2022-08-26 16:34:20 +02:00
2022-11-10 13:19:38 +01:00
2022-12-13 14:22:47 +00:00
2022-12-01 08:55:34 +03:00
2022-08-26 16:34:20 +02:00
2022-12-01 16:08:29 +01:00
2022-10-05 13:55:56 +08:00
2022-10-14 13:33:41 +08:00
2022-11-30 14:01:31 +11:00
2022-10-24 16:10:11 +02:00
2022-09-27 12:19:41 +01:00
2022-10-13 15:17:52 +08:00
2022-11-23 09:45:23 +08:00
2022-10-03 10:10:06 +11:00
2022-11-28 16:12:20 +01:00
2022-10-20 09:32:47 +11:00
2022-10-12 11:27:12 +08:00
2022-11-04 13:38:23 +01:00
2022-10-14 17:22:38 +11:00
2022-08-26 16:34:20 +02:00
2022-11-16 17:02:42 +01:00
2022-10-20 22:01:15 +01:00
2022-10-05 13:55:56 +08:00
2022-09-19 10:50:02 +10:00
2022-10-28 14:09:38 +02:00
2022-12-02 11:55:35 +03:00
2022-11-04 16:51:20 +01:00
2022-12-07 12:51:08 +01:00
2022-11-17 07:03:22 +01:00
2022-12-02 14:54:46 +08:00
2022-12-21 08:38:09 +00:00
2022-12-01 08:55:34 +03:00
2022-11-08 18:05:51 +07:00
2022-09-30 10:02:54 +08:00
2022-10-17 19:19:36 +11:00
2022-11-08 16:49:18 +01:00
2022-12-09 10:49:12 +01:00
2022-12-09 10:49:12 +01:00
2022-08-19 18:38:59 +10:00
2022-06-08 15:40:44 +01:00
2022-12-02 09:42:35 +01:00
2022-07-13 08:20:54 +05:30
2022-06-22 10:33:25 +10:00
2022-10-31 14:18:31 +13:00
2022-07-13 08:20:54 +05:30
2022-07-19 14:13:36 +08:00
2022-07-13 08:20:54 +05:30
2022-12-14 09:57:03 +01:00
2022-12-05 11:39:14 +01:00
2022-11-11 12:53:24 +08:00
2022-03-31 16:49:03 +01:00
2022-04-29 13:31:55 +01:00
2022-04-29 13:31:55 +01:00
2022-07-13 08:20:54 +05:30
2022-11-17 08:54:47 +00:00
2022-11-10 12:42:14 +01:00
2022-10-11 11:09:51 +02:00
2022-07-13 08:20:54 +05:30
2022-10-20 11:31:33 +01:00
2022-12-09 11:19:18 +00:00
2022-05-10 13:17:06 +01:00
2022-10-10 16:46:13 +02:00
2022-11-21 11:41:12 +01:00
2022-10-25 16:35:58 +02:00
2022-11-24 16:40:46 +08:00
2022-10-31 18:58:06 +08:00
2022-12-09 13:47:19 +01:00
2022-10-21 22:32:12 +01:00
2022-07-14 11:11:54 +10:00
2022-11-28 16:12:20 +01:00
2022-11-28 16:12:20 +01:00
2022-07-13 08:20:54 +05:30
2022-11-15 16:24:52 +08:00
2022-12-05 12:44:17 +01:00
2022-10-07 16:15:51 +11:00
2022-11-28 16:12:20 +01:00
2022-12-01 08:55:34 +03:00
2022-12-12 12:29:19 +00:00
2022-11-14 17:36:55 +03:00
2022-11-28 16:12:20 +01:00
2022-12-09 13:47:19 +01:00
2022-10-10 16:46:13 +02:00