open-lms-open-source / moodle-mod_collaborate

6 stars 13 forks source link

Are user moodle download capabilities ignored when displaying the recording download link? #20

Open monrom opened 3 years ago

monrom commented 3 years ago

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 the if statement, if check ((! empty ($ recording-> downloadurl) && $ showdownload), prevent this behavior. Changing the if statement to if ($showdownload) or even if ((!empty($recording->downloadurl) && $showdownload)|| $downloadcap) would correct it.

spibullock commented 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.