From dda39921bcbd7188da2e2fde7634abf8f31dc95b Mon Sep 17 00:00:00 2001 From: NinaHerrmann Date: Tue, 19 Mar 2024 09:34:53 +0100 Subject: [PATCH 1/5] Minor Style changes an changing the ci branch to test against main --- .github/workflows/moodle-ci.yml | 2 +- batchupload.php | 8 ++++---- block_opencast.php | 2 +- db/access.php | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/moodle-ci.yml b/.github/workflows/moodle-ci.yml index 48865715..345a7b96 100644 --- a/.github/workflows/moodle-ci.yml +++ b/.github/workflows/moodle-ci.yml @@ -8,7 +8,7 @@ on: [ push, pull_request ] jobs: call-moodle-ci-workflow: - uses: Opencast-Moodle/moodle-workflows-opencast/.github/workflows/moodle-ci.yml@master + uses: Opencast-Moodle/moodle-workflows-opencast/.github/workflows/moodle-ci.yml@update/m404 with: requires-tool-plugin: true requires-mod-plugin: true 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/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' => [ From 116bc0ab8b0bb882e27f28123e64870e8e3b7f4c Mon Sep 17 00:00:00 2001 From: NinaHerrmann Date: Tue, 19 Mar 2024 10:19:26 +0100 Subject: [PATCH 2/5] removed unused variables to trigger a new ci --- classes/local/addtranscription_form.php | 3 --- 1 file changed, 3 deletions(-) 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')); From a80bd9f3962b5743efcef51eb98ad5d20e1863b1 Mon Sep 17 00:00:00 2001 From: Justus Dieckmann Date: Sun, 2 Jun 2024 19:01:56 +0200 Subject: [PATCH 3/5] Adjust behat feature for moodle 4.4 --- tests/behat/block_opencast_addlti.feature | 3 +++ 1 file changed, 3 insertions(+) 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" From f5a0e9c89f1fec746b1b63d1e6cf38fe3bf6167a Mon Sep 17 00:00:00 2001 From: Justus Dieckmann Date: Tue, 4 Jun 2024 21:56:11 +0200 Subject: [PATCH 4/5] Fix behat errors for moodle 4.4 --- classes/local/apibridge.php | 1 + tests/behat/block_opencast_cleanup_backup.feature | 1 + 2 files changed, 2 insertions(+) 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/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" From 6aeaabeb8ef4212cedd64b6f5d32b77ae9d6c74c Mon Sep 17 00:00:00 2001 From: Nina Herrmann Date: Wed, 5 Jun 2024 09:56:47 +0200 Subject: [PATCH 5/5] Update moodle-ci.yml --- .github/workflows/moodle-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/moodle-ci.yml b/.github/workflows/moodle-ci.yml index 345a7b96..48865715 100644 --- a/.github/workflows/moodle-ci.yml +++ b/.github/workflows/moodle-ci.yml @@ -8,7 +8,7 @@ on: [ push, pull_request ] jobs: call-moodle-ci-workflow: - uses: Opencast-Moodle/moodle-workflows-opencast/.github/workflows/moodle-ci.yml@update/m404 + uses: Opencast-Moodle/moodle-workflows-opencast/.github/workflows/moodle-ci.yml@master with: requires-tool-plugin: true requires-mod-plugin: true