diff --git a/classes/local/apibridge.php b/classes/local/apibridge.php index 59ada7ea..34484510 100644 --- a/classes/local/apibridge.php +++ b/classes/local/apibridge.php @@ -298,9 +298,10 @@ public function get_upload_xml_file($filename, $filedata) { * to display a "more videos" link. * * @param int $courseid + * @param bool $withmetada * @return \stdClass */ - public function get_block_videos($courseid) { + public function get_block_videos($courseid, $withmetada = true) { $result = new \stdClass(); $result->count = 0; @@ -321,7 +322,7 @@ public function get_block_videos($courseid) { $params = [ 'sign' => true, 'withacl' => true, - 'withmetadata' => true, + 'withmetadata' => $withmetada === true, 'withpublications' => true, 'sort' => [ 'start_date' => 'DESC' @@ -403,9 +404,10 @@ public function get_course_videos($courseid, $sortcolumns = null) { * * @param string $series * @param string $sortcolumns + * @param bool $withmetada * @return array */ - public function get_series_videos($series, $sortcolumns = null) { + public function get_series_videos($series, $sortcolumns = null, $withmetadata = true) { $result = new \stdClass(); $result->videos = array(); @@ -414,7 +416,7 @@ public function get_series_videos($series, $sortcolumns = null) { $params = [ 'sign' => true, 'withacl' => true, - 'withmetadata' => true, + 'withmetadata' => $withmetadata === true, 'withpublications' => true, ]; diff --git a/index.php b/index.php index dbd1593d..142fb121 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); + $seriesvideodata[$series->series] = $opencast->get_series_videos($series->series, $sortcolumns, false); if ($seriesvideodata[$series->series]->error) { $errors += 1; } diff --git a/overview_videos.php b/overview_videos.php index 40152229..109ef53e 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)->videos; +$videos = $apibridge->get_series_videos($series, null, false)->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));