diff --git a/OpenCast.class.php b/OpenCast.class.php
index 821befab7..41605be27 100644
--- a/OpenCast.class.php
+++ b/OpenCast.class.php
@@ -61,6 +61,7 @@ public function __construct()
}
$this->addStylesheet("assets/css/courseware.scss");
+ $this->addStylesheet("assets/css/opencast.scss");
VersionHelper::get()->registerCoursewareBlock($this);
}
@@ -265,7 +266,6 @@ public function perform($unconsumed_path)
$app->group('/opencast/api', new RouteMap($app));
$app->run();
} else {
- $this->addStylesheet("assets/css/opencast.scss");
$css = VersionHelper::get()->getVersionSpecificStylesheet();
if ($css) {
diff --git a/courseware/vueapp/components/CoursewareVideoTable.vue b/courseware/vueapp/components/CoursewareVideoTable.vue
index 60ea42f43..f12382c2e 100644
--- a/courseware/vueapp/components/CoursewareVideoTable.vue
+++ b/courseware/vueapp/components/CoursewareVideoTable.vue
@@ -7,7 +7,7 @@
+ -->
+
+
\ No newline at end of file
diff --git a/courseware/vueapp/components/LtiAuth.vue b/courseware/vueapp/components/LtiAuth.vue
new file mode 100644
index 000000000..0c0455aab
--- /dev/null
+++ b/courseware/vueapp/components/LtiAuth.vue
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/courseware/vueapp/components/Tag.vue b/courseware/vueapp/components/Tag.vue
new file mode 100644
index 000000000..bd43f8e04
--- /dev/null
+++ b/courseware/vueapp/components/Tag.vue
@@ -0,0 +1,19 @@
+
+
+
+ {{ tag }}
+
+
+
+
\ No newline at end of file
diff --git a/courseware/vueapp/components/VideoCard.vue b/courseware/vueapp/components/VideoCard.vue
new file mode 100644
index 000000000..c1774ce1c
--- /dev/null
+++ b/courseware/vueapp/components/VideoCard.vue
@@ -0,0 +1,235 @@
+
+
+
+
+
+
+
+
+
+
+
+ {{event.title}}
+
+
+
+
+ - {{ datetime(event.created) }} Uhr
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/courseware/vueapp/courseware-plugin-opencast-video.vue b/courseware/vueapp/courseware-plugin-opencast-video.vue
index 76836f6ba..383ffdd21 100644
--- a/courseware/vueapp/courseware-plugin-opencast-video.vue
+++ b/courseware/vueapp/courseware-plugin-opencast-video.vue
@@ -11,24 +11,19 @@
>
-
-
-
-
-
-
-
-
-
- Dieses Video ist für die Teilnehmenden dieser Veranstaltung nicht sichtbar!
- Korrigieren sie die Sichtbarkeitseinstellungen im Opencast-Reiter.
-
-
+
+
+ Dieses Video ist für die Teilnehmenden dieser Veranstaltung nicht sichtbar!
+ Korrigieren sie die Sichtbarkeitseinstellungen im Opencast-Reiter.
+
+
@@ -69,8 +64,9 @@ export default {
components: {
CoursewareSearchBar,
- CoursewareVideoTable
+ CoursewareVideoTable,
},
+
props: {
block: Object,
canEdit: Boolean,
@@ -93,8 +89,6 @@ export default {
currentEpisodeId : null,
currentEpisodeURL : null,
currentVisible : '',
- ltiConnections : [],
- ltiConnected: false
}
},
@@ -112,15 +106,6 @@ export default {
}) ?? {}
);
},
-
- lti_connected() {
- if (!this.currentEpisodeURL || this.ltiConnections.length == 0) {
- return false;
- }
- let edpisode_url = new URL(this.currentEpisodeURL);
- let lti_connection = this.ltiConnections.find(connection => connection.launch_url.includes(edpisode_url.hostname));
- return lti_connection?.authenticated == true;
- }
},
methods: {
@@ -175,7 +160,7 @@ export default {
attributes.payload.episode_id = this.currentEpisodeId;
attributes.payload.url = this.currentEpisodeURL;
attributes.payload.visible = this.currentVisible;
-
+
if (this.container?.id && this.block?.id) {
return this.updateBlock({
attributes,
@@ -197,7 +182,6 @@ export default {
let copied_from = get(this.block, "attributes.payload.copied_from", "");
if (copied_from) {
- console.log('copied_from: ', copied_from);
this.storeBlock();
}
},
@@ -227,63 +211,9 @@ export default {
view.loadingVideos = false;
})
},
-
- async runLTI() {
- let view = this;
- return axios.get(STUDIP.ABSOLUTE_URI_STUDIP + 'plugins.php/opencast/api/lti/launch_data/' + this.context.id)
- .then(({data}) => {
- if (data.lti.length > 0) {
- data.lti.forEach(connection => view.ltiConnections.push({
- launch_url: JSON.parse(JSON.stringify(connection.launch_url)),
- launch_data: JSON.parse(JSON.stringify(connection.launch_data)),
- authenticated: false
- }));
- view.ltiConnections.forEach(connection => view.checkConnection(connection));
- } else {
- console.log('No LTI data found');
- }
- });
- },
-
- async checkConnection(connection) {
- let view = this;
- return axios({
- method: 'GET',
- url: connection.launch_url,
- crossDomain: true,
- withCredentials: true,
- }).then(({ data }) => {
- if (!data.roles) {
- view.authenticateLTI(connection);
- } else {
- connection.authenticated = true;
- }
- }).catch(() => {
- view.authenticateLTI(connection);
- });
- },
-
- async authenticateLTI(connection) {
- return axios({
- method: 'POST',
- url: connection.launch_url,
- data: new URLSearchParams(connection.launch_data),
- crossDomain: true,
- withCredentials: true,
- headers: {
- "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
- }
- }).then(() => {
- connection.authenticated = true;
- }).catch(() => {
- console.log('LTI Authentication failed:', connection.launch_url);
- connection.authenticated = false;
- });
- }
},
mounted() {
- this.runLTI();
this.initCurrentData();
this.loadVideos();
},
diff --git a/lib/Routes/Config/SimpleConfigList.php b/lib/Routes/Config/SimpleConfigList.php
index 88d0119d3..f67f85508 100644
--- a/lib/Routes/Config/SimpleConfigList.php
+++ b/lib/Routes/Config/SimpleConfigList.php
@@ -48,7 +48,11 @@ public function __invoke(Request $request, Response $response, $args)
'server' => $config_list ?: [],
'settings' => $this->getGlobalConfig(),
'workflows' => $workflows->toArray(),
- 'workflow_configs' => $workflow_configs->toArray()
+ 'workflow_configs' => $workflow_configs->toArray(),
+ 'plugin_assets_url' => \PluginEngine::getPlugin('Opencast')->getAssetsUrl(),
+ 'auth_url' => \PluginEngine::getURL('opencast', [], 'redirect/authenticate', true),
+ 'redirect_url' => \PluginEngine::getURL('opencast', [], 'redirect/perform', true),
+ 'course_id' => \Context::getId() ?: null
], $response);
}