apluslms / a-plus

A+ frontend portal - A+ LMS documentation:
https://apluslms.github.io/
Other
65 stars 72 forks source link

Add course navigation to the 403 forbidden error page #1300

Open markkuriekkinen opened 10 months ago

markkuriekkinen commented 10 months ago

When a student is browsing course chapters and opens a chapter that is not yet visible (e.g., because of course module model answer chapter reveal rules), it would be useful if the error page could still include the course navigation: next/previous chapter links and the left-side course menu. Currently, 403 error pages do not include any course-specific navigation.

One potential challenge for the implementation is that the error pages are rendered outside the usual course views. Is it feasible to add any course context there? Note that the 403 error page may also be used in contexts that have nothing to do with a specific course, thus they can't always render course navigation.

https://docs.djangoproject.com/en/4.2/ref/views/#the-403-http-forbidden-view

Started from https://github.com/apluslms/a-plus/issues/1247#issuecomment-1741845049