Opencast-Moodle / moodle-filter_opencast

Filter to embed Opencast videos in Moodle content
GNU General Public License v3.0
9 stars 9 forks source link

missing video results in Error #34

Closed NinaHerrmann closed 8 months ago

NinaHerrmann commented 2 years ago

In case a video cannot be found https://github.com/Opencast-Moodle/moodle-filter_opencast/blob/master/filter.php#L136 throws an error temporary fix for our instance was to include an isset($data['streams']) && proposed by @justusdieckmann.

image

Fehler: count(): Argument #1 ($value) must be of type Countable|array, null given

[Weitere Informationen über diesen Fehler](http://docs.moodle.org/400/de/error/moodle/generalexceptionmessage)
Debug-Info: 
Error code: generalexceptionmessage
Stack trace: 

    line 131 of /filter/opencast/filter.php: TypeError thrown
    line 176 of /lib/filterlib.php: call to filter_opencast->filter()
    line 218 of /lib/filterlib.php: call to filter_manager->apply_filter_chain()
    line 372 of /lib/filterlib.php: call to filter_manager->filter_text()
    line 1303 of /lib/weblib.php: call to performance_measuring_filter_manager->filter_text()
    line 95 of /course/format/classes/output/local/content/section/summary.php: call to format_text()
    line 76 of /course/format/classes/output/local/content/section/summary.php: call to core_courseformat\output\local\content\section\summary->format_summary_text()
    line 145 of /course/format/classes/output/local/content/section.php: call to core_courseformat\output\local\content\section\summary->export_for_template()
    line 46 of /course/format/topics/classes/output/courseformat/content/section.php: call to core_courseformat\output\local\content\section->export_for_template()
    line 160 of /course/format/classes/output/local/content.php: call to format_topics\output\courseformat\content\section->export_for_template()
    line 86 of /course/format/classes/output/local/content.php: call to core_courseformat\output\local\content->export_sections()
    line 497 of /lib/outputrenderers.php: call to core_courseformat\output\local\content->export_for_template()
    line 108 of /course/format/classes/output/section_renderer.php: call to plugin_renderer_base->render()
    line 60 of /course/format/topics/format.php: call to core_courseformat\output\section_renderer->render()
    line 270 of /course/view.php: call to require()
justusdieckmann commented 2 years ago

A noteworthy addition might be that, when this happens, nobody can access the course at all