mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
MDL-41125 course: Only require dndupload library when necessary
This commit is contained in:
parent
d3fb29877e
commit
5297336942
@ -28,7 +28,6 @@ defined('MOODLE_INTERNAL') || die;
|
||||
|
||||
require_once($CFG->libdir.'/completionlib.php');
|
||||
require_once($CFG->libdir.'/filelib.php');
|
||||
require_once($CFG->dirroot.'/course/dnduploadlib.php');
|
||||
require_once($CFG->dirroot.'/course/format/lib.php');
|
||||
|
||||
define('COURSE_MAX_LOGS_PER_PAGE', 1000); // records
|
||||
@ -2886,7 +2885,7 @@ function course_ajax_enabled($course) {
|
||||
* @return bool
|
||||
*/
|
||||
function include_course_ajax($course, $usedmodules = array(), $enabledmodules = null, $config = null) {
|
||||
global $PAGE, $SITE;
|
||||
global $CFG, $PAGE, $SITE;
|
||||
|
||||
// Ensure that ajax should be included
|
||||
if (!course_ajax_enabled($course)) {
|
||||
@ -2981,6 +2980,7 @@ function include_course_ajax($course, $usedmodules = array(), $enabledmodules =
|
||||
}
|
||||
|
||||
// Load drag and drop upload AJAX.
|
||||
require_once($CFG->dirroot.'/course/dnduploadlib.php');
|
||||
dndupload_add_to_course($course, $enabledmodules);
|
||||
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user