From 5dc2aeda9a0eeb3ef60de4b62964c097e01bb453 Mon Sep 17 00:00:00 2001 From: Marina Glancy Date: Tue, 29 Nov 2016 14:11:46 +0800 Subject: [PATCH] MDL-57616 label: allow to drag and drop video/audio files --- mod/label/lang/en/label.php | 2 +- mod/label/lib.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mod/label/lang/en/label.php b/mod/label/lang/en/label.php index 65c12a0ac57..cf465047e4f 100644 --- a/mod/label/lang/en/label.php +++ b/mod/label/lang/en/label.php @@ -29,7 +29,7 @@ $string['configdndresizewidth'] = 'When a label is created from a dragged & drop $string['dndmedia'] = 'Media drag and drop'; $string['dndresizeheight'] = 'Resize drag and drop height'; $string['dndresizewidth'] = 'Resize drag and drop width'; -$string['dnduploadlabel'] = 'Add image to course page'; +$string['dnduploadlabel'] = 'Add media to course page'; $string['dnduploadlabeltext'] = 'Add a label to the course page'; $string['label:addinstance'] = 'Add a new label'; $string['labeltext'] = 'Label text'; diff --git a/mod/label/lib.php b/mod/label/lib.php index 49837b9ea6a..a3612d6c58f 100644 --- a/mod/label/lib.php +++ b/mod/label/lib.php @@ -192,7 +192,7 @@ function label_supports($feature) { function label_dndupload_register() { $strdnd = get_string('dnduploadlabel', 'mod_label'); if (get_config('label', 'dndmedia')) { - $mediaextensions = file_get_typegroup('extension', 'web_image'); + $mediaextensions = file_get_typegroup('extension', ['web_image', 'web_video', 'web_audio']); $files = array(); foreach ($mediaextensions as $extn) { $extn = trim($extn, '.');