Open monrom opened 3 years ago
Thanks for posting this. I thought I was crazy when students still had the download recordings option, even though globally students were "prohibited" from that capability. Glad someone else sees this same issue, and it looks like you may have identified where the error occurs.
https://github.com/open-lms-open-source/moodle-mod_collaborate/blob/bbf0fa94e293698e486f4efc97a997b9aa6dd1d6/renderer.php#L294
The intention in the code seems to be (i could be wrong) that the user with the capability in moodle to download the recording ('mod/collaborate:downloadrecordings'), can download it always, even if configuration option
$ collaborate-> candownloadrecordings
is set to false, but theif
statement,if check ((! empty ($ recording-> downloadurl) && $ showdownload)
, prevent this behavior. Changing the if statement toif ($showdownload)
or evenif ((!empty($recording->downloadurl) && $showdownload)|| $downloadcap)
would correct it.