mod/taskchain make recent_activity function compatible with Moodle <= 2.3