I am hoping someone might help me out writing an override for the default My Courses display on the homepage. I think our teachers would love it if the Moodle homepage displayed my courses sorted by Last Accessed. This would make the homepage a much better experience for people with a lot of courses.
I have seen where the Essential theme has the My Courses drop down displayed by last access. https://github.com/gjb2048/moodle-theme_essential/blob/master/classes/output/core_renderer.php#L997-L1059
I am wondering how I can blend that code with the frontpage_my_courses function to override the $sortorder. https://github.com/moodle/moodle/blob/9a316f33672117dd6c9d575fd59351175f328289/course/renderer.php#L1983-L1996
Thank you for any help,