Opencast-Moodle / moodle-mod_opencast

Opencast Activity that can display series and episodes from Opencast. The authentication is fully handled by Moodle.
Other
4 stars 7 forks source link

Fix: null value for array_key_first #44

Closed ferishili closed 6 months ago

ferishili commented 7 months ago

This PR fixes #43

ferishili commented 7 months ago

Hi @slaudel That would be great if you could test this PR and write your feedback here. I am just wondering, what happen in that course if there is no sources in the streams

NinaHerrmann commented 7 months ago

In case of empty($data['streams'][0]['sources']) shouldn't we rather display a more meaningful message? Because it is not possible to display a video without source right?

ferishili commented 7 months ago

You are 100% right, and after a brief investigation, the problem comes from the fact that the api publication has no media. And that is why, there is nothing to show! I will add that scenario as an info/erro message later.

NinaHerrmann commented 7 months ago

That would be beautiful, thank you! :)

ferishili commented 7 months ago

Hi @NinaHerrmann, I've added the notification, please take a look and adjust the text. Thanks in advance

NinaHerrmann commented 6 months ago

Thank you so much @ferishili, looks good to me!