Skip to content

Commit

Permalink
Make hidden courses accessible with LTI
Browse files Browse the repository at this point in the history
When an A+ course is intended to be accessed as LTI tool from another
learning platform, teacher may wish to prevent direct access from
the regular A+ front page, for example to avoid possible confusion in
grade management  between the two systems. Therefore teacher can now
hide a course, while it is still available with LTI.

Closes #1240
  • Loading branch information
PasiSa authored and markkuriekkinen committed Oct 20, 2023
1 parent e5c63f5 commit 1f68a3a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion course/permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ def is_object_visible(self, request, view, course): # pylint: disable=arguments-
return True

# Course is not visible if it's hidden
if not course.visible_to_students:
# If course is launched through LTI, it is shown even if marked as hidden in A+ UI.
if not request.session.get('lti-launch-id') and not course.visible_to_students:
self.error_msg(_('COURSE_VISIBILITY_ERROR_NOT_VISIBLE'))
return False

Expand Down

0 comments on commit 1f68a3a

Please sign in to comment.