Consider making quick menu for teachers using the filter codes plugin: https://moodle.org/plugins/filter_filtercodes
Then you can add links that utilize the filter codes that make dynamic links for which ever course you are in.
Then you can add links that utilize the filter codes that make dynamic links for which ever course you are in.