This commit is contained in:
Markos Gogoulos
2026-04-27 12:59:49 +03:00
parent 204aceb459
commit 52cb257661
4 changed files with 50 additions and 2 deletions
+9 -1
View File
@@ -459,7 +459,7 @@ class LaunchView(View):
base_url = reverse('lti:embed_media', args=[media.friendly_token])
return self.build_url_with_embed_params(base_url, embed_params)
except Media.DoesNotExist:
pass
return reverse('lti:media_not_found')
my_media_url = reverse('lti:my_media') + '?mode=lms_embed_mode'
if custom.get('embed_share_media') == '0':
@@ -677,6 +677,14 @@ class PublicKeyPEMView(View):
)
@method_decorator(xframe_options_exempt, name='dispatch')
class MediaNotFoundView(View):
"""Shown when a media token from an LTI launch no longer exists."""
def get(self, request):
return render(request, 'lti/media_not_found.html', status=404)
@method_decorator(xframe_options_exempt, name='dispatch')
class MyMediaLTIView(View):
"""