mirror of
https://github.com/mediacms-io/mediacms.git
synced 2026-04-30 10:26:13 -04:00
push
This commit is contained in:
+1
-1
@@ -1 +1 @@
|
||||
VERSION = "8.99921"
|
||||
VERSION = "8.99922"
|
||||
|
||||
@@ -14,6 +14,7 @@ urlpatterns = [
|
||||
path('jwks/', views.JWKSView.as_view(), name='jwks'),
|
||||
path('public-key/', views.PublicKeyPEMView.as_view(), name='public_key_pem'),
|
||||
path('select-media/', deep_linking.SelectMediaView.as_view(), name='select_media'),
|
||||
path('media-not-found/', views.MediaNotFoundView.as_view(), name='media_not_found'),
|
||||
path('my-media/', views.MyMediaLTIView.as_view(), name='my_media'),
|
||||
path('embed/<str:friendly_token>/', views.EmbedMediaLTIView.as_view(), name='embed_media'),
|
||||
]
|
||||
|
||||
+9
-1
@@ -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):
|
||||
"""
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Media Not Found</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
||||
max-width: 600px;
|
||||
margin: 50px auto;
|
||||
padding: 20px;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
.container {
|
||||
background: white;
|
||||
border-radius: 8px;
|
||||
padding: 30px;
|
||||
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
||||
text-align: center;
|
||||
}
|
||||
.icon {
|
||||
font-size: 48px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
h1 {
|
||||
color: #555;
|
||||
margin-top: 0;
|
||||
font-size: 22px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="icon">🎬</div>
|
||||
<h1>Media does no longer exist</h1>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user