print_error('badcontext', null, $return_course);
}
$allclips = [];
$sc_obj = new mod_opencast_series();
$sc_obj->fetch($opencast->id, true);
$sc_user = new mod_opencast_user();
$arr_filter = [];
$filters = explode('&', urldecode($filterstr));
foreach ($filters as $filter) {
    $parts = explode('=', $filter);
    if (count($parts) == 2) {
        $arr_filter[$parts[0]] = $parts[1];
    }
}
$xml_clips = $sc_obj->getEvents($arr_filter);
$xml_clips_access_allowed = $sc_obj->checkAccess($xml_clips);
$clips = [];
foreach ($xml_clips_access_allowed as $xml_clip) {
    $clips[] = (array) $xml_clip;
}
if (mod_opencast_series::getValueForKey('display_select_columns')) {
    $xml_all_clips = $sc_obj->getEvents();
    $xml_all_clips_access_allowed = $sc_obj->checkAccess($xml_all_clips);
    $all_clips = [];
    foreach ($xml_all_clips_access_allowed as $xml_all_clip) {
        $all_clips[] = (array) $xml_all_clip;
    }
}
$clip_objs = [];
foreach ($clips as $clip) {
    if (!isset($allclips[$clip['identifier']])) {