-
Bug
-
Resolution: Fixed
-
Minor
-
3.8.5, 3.9.1, 3.9.2, 3.10
-
MOODLE_310_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE
-
MOODLE_38_STABLE, MOODLE_39_STABLE
-
1 - In timeline, change the filter to "Sort by courses"
2 - Change the length to 3 months.
2.1 - The pref is saved in the database.
2.2 - A call is made to the server with those params
https://192.168.33.10/lib/ajax/service.php?sesskey=c7CfFhMT7U&info=core_calendar_get_action_events_by_courses
[{"index":0,"methodname":"core_calendar_get_action_events_by_courses","args":{"courseids":["90","74"],"limitnum":6,"timesortfrom":1597032000,"timesortto":1604808000}}]
(1604808000 - 1597032000) / 86400 = 90 (3 months days window)
3 - Navigate away from the Dashboard and comeback
4 - The same call is made to the server with those params
[{"index":0,"methodname":"core_calendar_get_action_events_by_courses","args":{"courseids":[90,74],"limitnum":6,"timesortfrom":1597032000,"timesortto":1599624000}}]
(1599624000 - 1597032000) / 86400 = 30 (back to 30 days window)
The webservice seems to only receive $timesortfrom and $timesortto.
/calendar/externallib.php line 591
public static function get_calendar_action_events_by_courses(
array $courseids, $timesortfrom = null, $timesortto = null, $limitnum = 10) {
I think it should be the Javascript (probably /blocks/timeline/amd/src/view_courses.js) that should remember/ask for the block_timeline_user_filter_preference preference before it's first call when the dashboard loads.
Moodle 3.8.4+ (Build: 20200807)
Thank you