diff --git a/batchupload.php b/batchupload.php index c368d570..c6f0ee81 100644 --- a/batchupload.php +++ b/batchupload.php @@ -132,7 +132,7 @@ $customdata = [ 'courseid' => $courseid, 'metadata_catalog' => $batchmetadatacatalog, - 'eventdefaults' => $usereventdefaults, 'ocinstanceid' => $ocinstanceid + 'eventdefaults' => $usereventdefaults, 'ocinstanceid' => $ocinstanceid, ]; if ($series) { $customdata['series'] = $series; @@ -257,13 +257,13 @@ } $newfileitemid = file_get_unused_draft_itemid(); - $newfilerecord = array( + $newfilerecord = [ 'contextid' => $uploadedfile->get_contextid(), 'component' => $uploadedfile->get_component(), 'filearea' => $uploadedfile->get_filearea(), 'itemid' => $newfileitemid, - 'timemodified' => time() - ); + 'timemodified' => time(), + ]; $newfile = $fs->create_file_from_storedfile($newfilerecord, $uploadedfile); // Delete the old job. file_deletionmanager::fulldelete_file($uploadedfile); diff --git a/block_opencast.php b/block_opencast.php index a1beb16c..63868e51 100644 --- a/block_opencast.php +++ b/block_opencast.php @@ -238,7 +238,7 @@ public function get_content_for_output($output) { 'id' => $COURSE->id, 'bui_deleteid' => $this->instance->id, 'bui_confirm' => 1, - 'sesskey' => sesskey() + 'sesskey' => sesskey(), ]); $this->page->requires->js_call_amd('block_opencast/block_delete_handler', 'init', [$this->context->id, $deleteurl->out(false)]); diff --git a/classes/local/addtranscription_form.php b/classes/local/addtranscription_form.php index 015c1ca8..bcc70131 100644 --- a/classes/local/addtranscription_form.php +++ b/classes/local/addtranscription_form.php @@ -52,9 +52,6 @@ public function definition() { // Get the renderer to use its methods. $this->renderer = $PAGE->get_renderer('block_opencast'); $ocinstanceid = $this->_customdata['ocinstanceid']; - $identifier = $this->_customdata['identifier']; - $courseid = $this->_customdata['courseid']; - $mform = $this->_form; $explanation = html_writer::tag('p', get_string('addnewtranscription_desc', 'block_opencast')); diff --git a/classes/local/apibridge.php b/classes/local/apibridge.php index 81407dc5..a1b397cb 100644 --- a/classes/local/apibridge.php +++ b/classes/local/apibridge.php @@ -340,6 +340,7 @@ public function get_block_videos($courseid, $withmetadata = false) { 'withacl' => true, 'withmetadata' => $withmetadata === true, 'withpublications' => true, + 'includeInternalPublication' => false, // Somehow causes error in Opencast 15 if withpublications is used without it. 'sort' => [ 'start_date' => 'DESC', ], diff --git a/db/access.php b/db/access.php index abd9a6e2..37689eac 100644 --- a/db/access.php +++ b/db/access.php @@ -152,7 +152,7 @@ 'contextlevel' => CONTEXT_COURSE, 'archetypes' => [ 'manager' => CAP_ALLOW, - 'editingteacher' => CAP_ALLOW + 'editingteacher' => CAP_ALLOW, ], ], 'block/opencast:manageseriesforcourse' => [ @@ -161,7 +161,7 @@ 'contextlevel' => CONTEXT_COURSE, 'archetypes' => [ 'manager' => CAP_ALLOW, - 'editingteacher' => CAP_ALLOW + 'editingteacher' => CAP_ALLOW, ], ], 'block/opencast:deleteevent' => [ diff --git a/tests/behat/block_opencast_addlti.feature b/tests/behat/block_opencast_addlti.feature index bd2626e6..c9a7be05 100644 --- a/tests/behat/block_opencast_addlti.feature +++ b/tests/behat/block_opencast_addlti.feature @@ -214,6 +214,9 @@ Feature: Add Opencast LTI series module as Teacher Given the following config values are set as admin: | addltisection_1 | 1 | block_opencast | And I log in as "teacher1" + And I am on "Course 1" course homepage with editing mode on + And I edit the section "1" and I fill the form with: + | Section name | Topic 1 | And I am on "Course 1" course homepage And I click on "Go to overview..." "link" And I click on "Add Opencast LTI series module to course" "link" diff --git a/tests/behat/block_opencast_cleanup_backup.feature b/tests/behat/block_opencast_cleanup_backup.feature index 34dba8e0..d0a4ac2d 100644 --- a/tests/behat/block_opencast_cleanup_backup.feature +++ b/tests/behat/block_opencast_cleanup_backup.feature @@ -35,6 +35,7 @@ Feature: Restore courses as Teacher | importvideoshandleseriesenabled_1 | 1 | block_opencast | | importvideoshandleepisodeenabled_1 | 1 | block_opencast | | addltiepisodeenabled_1 | 1 | block_opencast | + | enableasyncbackup | 0 | | And I setup the opencast test api And I upload a testvideo And I log in as "admin"