Skip to content

Commit

Permalink
Merge pull request #366 from Opencast-Moodle/update/m404
Browse files Browse the repository at this point in the history
WIP - Place Holder for preparing a Moodle_404_Stable Update
  • Loading branch information
NinaHerrmann authored Jun 6, 2024
2 parents da07aee + 6aeaabe commit f6d0d22
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 10 deletions.
8 changes: 4 additions & 4 deletions batchupload.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@

$customdata = [
'courseid' => $courseid, 'metadata_catalog' => $batchmetadatacatalog,
'eventdefaults' => $usereventdefaults, 'ocinstanceid' => $ocinstanceid
'eventdefaults' => $usereventdefaults, 'ocinstanceid' => $ocinstanceid,
];
if ($series) {
$customdata['series'] = $series;
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion block_opencast.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)]);
Expand Down
3 changes: 0 additions & 3 deletions classes/local/addtranscription_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
Expand Down
1 change: 1 addition & 0 deletions classes/local/apibridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
],
Expand Down
4 changes: 2 additions & 2 deletions db/access.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
'contextlevel' => CONTEXT_COURSE,
'archetypes' => [
'manager' => CAP_ALLOW,
'editingteacher' => CAP_ALLOW
'editingteacher' => CAP_ALLOW,
],
],
'block/opencast:manageseriesforcourse' => [
Expand All @@ -161,7 +161,7 @@
'contextlevel' => CONTEXT_COURSE,
'archetypes' => [
'manager' => CAP_ALLOW,
'editingteacher' => CAP_ALLOW
'editingteacher' => CAP_ALLOW,
],
],
'block/opencast:deleteevent' => [
Expand Down
3 changes: 3 additions & 0 deletions tests/behat/block_opencast_addlti.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions tests/behat/block_opencast_cleanup_backup.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit f6d0d22

Please sign in to comment.