diff --git a/block_opencast.php b/block_opencast.php index 06f6611c..93af14f9 100644 --- a/block_opencast.php +++ b/block_opencast.php @@ -128,7 +128,7 @@ public function get_content() { try { if ($instance->isvisible) { $apibridge = \block_opencast\local\apibridge::get_instance($instance->id); - $videos[$instance->id] = $apibridge->get_block_videos($COURSE->id, false); + $videos[$instance->id] = $apibridge->get_block_videos($COURSE->id); } } catch (opencast_connection_exception $e) { $videos[$instance->id] = new stdClass(); diff --git a/classes/local/apibridge.php b/classes/local/apibridge.php index 4d15aeed..0d5e6f5a 100644 --- a/classes/local/apibridge.php +++ b/classes/local/apibridge.php @@ -301,7 +301,7 @@ public function get_upload_xml_file($filename, $filedata) { * @param bool $withmetadata * @return \stdClass */ - public function get_block_videos($courseid, $withmetadata = true) { + public function get_block_videos($courseid, $withmetadata = false) { if (defined('BEHAT_SITE_RUNNING')) { $withmetadata = true; } @@ -410,7 +410,7 @@ public function get_course_videos($courseid, $sortcolumns = null) { * @param bool $withmetadata * @return array */ - public function get_series_videos($series, $sortcolumns = null, $withmetadata = true) { + public function get_series_videos($series, $sortcolumns = null, $withmetadata = false) { if (defined('BEHAT_SITE_RUNNING')) { $withmetadata = true; } diff --git a/index.php b/index.php index 142fb121..dbd1593d 100644 --- a/index.php +++ b/index.php @@ -295,7 +295,7 @@ $errors = 0; foreach ($courseseries as $series) { - $seriesvideodata[$series->series] = $opencast->get_series_videos($series->series, $sortcolumns, false); + $seriesvideodata[$series->series] = $opencast->get_series_videos($series->series, $sortcolumns); if ($seriesvideodata[$series->series]->error) { $errors += 1; } diff --git a/overview_videos.php b/overview_videos.php index 109ef53e..40152229 100644 --- a/overview_videos.php +++ b/overview_videos.php @@ -151,7 +151,7 @@ get_string('heading_actions', 'block_opencast')); $table = $renderer->create_overview_videos_table('ignore', $headers, $columns, $baseurl); -$videos = $apibridge->get_series_videos($series, null, false)->videos; +$videos = $apibridge->get_series_videos($series)->videos; $activityinstalled = \core_plugin_manager::instance()->get_plugin_info('mod_opencast') != null; $showchangeownerlink = has_capability('block/opencast:viewusers', context_system::instance()) && !empty(get_config('block_opencast', 'aclownerrole_' . $ocinstanceid)); diff --git a/tests/helper/apibridge_testable.php b/tests/helper/apibridge_testable.php index 8c3bcfdc..75f7c3ce 100644 --- a/tests/helper/apibridge_testable.php +++ b/tests/helper/apibridge_testable.php @@ -167,7 +167,7 @@ public function get_opencast_video($identifier, bool $withpublications = false, * @param bool $withmetadata * @return stdClass */ - public function get_series_videos($series, $sortcolumns = null, $withmetadata = true) { + public function get_series_videos($series, $sortcolumns = null, $withmetadata = false) { $result = new stdClass(); $result->error = 0; @@ -200,7 +200,7 @@ public function get_series_videos($series, $sortcolumns = null, $withmetadata = * @param bool $withmetadata * @return stdClass */ - public function get_block_videos($courseid, $withmetadata = true) { + public function get_block_videos($courseid, $withmetadata = false) { // Used for behat test. $result = new \stdClass(); $result->count = 0;