MDL-69269 contentbank: Fix issues identified in integration

This commit is contained in:
Andrew Nicols 2020-08-31 12:40:38 +08:00
parent 1b577426d9
commit e1f3746112

View file

@ -40,15 +40,16 @@ use moodle_url;
*/ */
abstract class contenttype { abstract class contenttype {
/** Plugin implements uploading feature */ /** @var string Constant representing whether the plugin implements uploading feature */
const CAN_UPLOAD = 'upload'; const CAN_UPLOAD = 'upload';
/** Plugin implements edition feature */ /** @var string Constant representing whether the plugin implements edition feature */
const CAN_EDIT = 'edit'; const CAN_EDIT = 'edit';
/** Plugin implements download feature /**
* @since Moodle 3.10 * @var string Constant representing whether the plugin implements download feature
*/ * @since Moodle 3.10
*/
const CAN_DOWNLOAD = 'download'; const CAN_DOWNLOAD = 'download';
/** @var \context This contenttype's context. **/ /** @var \context This contenttype's context. **/
@ -236,7 +237,7 @@ abstract class contenttype {
$downloadurl = ''; $downloadurl = '';
$file = $content->get_file(); $file = $content->get_file();
if (!empty($file)) { if (!empty($file)) {
$url = \moodle_url::make_pluginfile_url( $url = \moodle_url::make_pluginfile_url(
$file->get_contextid(), $file->get_contextid(),
$file->get_component(), $file->get_component(),
$file->get_filearea(), $file->get_filearea(),