From 23653b52f82df443c9d7ae53118e1d21b8ed122e Mon Sep 17 00:00:00 2001
From: TamaraGunkel <tamara.nrw@web.de>
Date: Thu, 15 Feb 2018 12:28:27 +0100
Subject: [PATCH] Fixes #8 use class instead of general identifier

---
 amd/src/form.js | 2 +-
 lib.php         | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/amd/src/form.js b/amd/src/form.js
index 2baaa55..36626a6 100644
--- a/amd/src/form.js
+++ b/amd/src/form.js
@@ -39,7 +39,7 @@ define(['jquery'], function($) {
                     xhrFields: {withCredentials: true},
                     data: $('#ltiLaunchForm').serialize(),
                     complete: function () {
-                        $("iframe").each(function () {
+                        $(".ocplayer").each(function () {
                             $(this).attr('src', $(this).data('framesrc'));
                         });
                     }
diff --git a/lib.php b/lib.php
index ce23b44..390d9c4 100644
--- a/lib.php
+++ b/lib.php
@@ -57,6 +57,7 @@ function filter_opencast_login() {
     $params['context_id'] = $COURSE->id;
     $params['context_label'] = trim($COURSE->shortname);
     $params['context_title'] = trim($COURSE->fullname);
+    $params['resource_link_id'] = 'o' . random_int(1000,9999) . '-' . random_int(1000,9999);
     $params['resource_link_title'] = 'Opencast';
     $params['context_type'] = ($COURSE->format == 'site') ? 'Group' : 'CourseSection';
     $params['lis_person_name_given'] = $USER->firstname;
@@ -79,7 +80,6 @@ function filter_opencast_login() {
     } else {
         $params['tool_consumer_instance_name'] = get_site()->shortname;
     }
-    $params['tool_consumer_instance_description'] = trim(html_to_text(get_site()->fullname, 0));
 
     $params['launch_presentation_document_target'] = 'iframe';
     $params['oauth_signature_method'] = 'HMAC-SHA1';
-- 
GitLab