Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 30... Línea 30...
30
require_once($CFG->dirroot.'/course/lib.php');
30
require_once($CFG->dirroot.'/course/lib.php');
Línea 31... Línea 31...
31
 
31
 
32
/**
32
/**
33
 * Add the Javascript to enable drag and drop upload to a course page
33
 * Add the Javascript to enable drag and drop upload to a course page
-
 
34
 *
-
 
35
 * @deprecated since Moodle 5.0
34
 *
36
 * @todo Remove this method in Moodle 6.0 (MDL-83627).
35
 * @param object $course The currently displayed course
37
 * @param object $course The currently displayed course
36
 * @param array $modnames The list of enabled (visible) modules on this site
38
 * @param array $modnames The list of enabled (visible) modules on this site
37
 * @return void
39
 * @return void
-
 
40
 */
-
 
41
#[\core\attribute\deprecated(
-
 
42
    replacement: 'core_courformat::base\\use_component returning true',
-
 
43
    since: '5.0',
-
 
44
    mdl: 'MDL-82341',
-
 
45
    reason: 'Moodle 3.9 course editor is deprecated. Make your format compatible to 4.0 editor.',
38
 */
46
)]
39
function dndupload_add_to_course($course, $modnames) {
47
function dndupload_add_to_course($course, $modnames) {
Línea -... Línea 48...
-
 
48
    global $CFG, $PAGE;
-
 
49
 
40
    global $CFG, $PAGE;
50
    \core\deprecation::emit_deprecation(__FUNCTION__);
Línea 41... Línea 51...
41
 
51
 
42
    $showstatus = optional_param('notifyeditingon', false, PARAM_BOOL);
52
    $showstatus = optional_param('notifyeditingon', false, PARAM_BOOL);
43
 
53
 
Línea 619... Línea 629...
619
 
629
 
620
        \course_modinfo::purge_course_module_cache($this->course->id, $this->cm->id);
630
        \course_modinfo::purge_course_module_cache($this->course->id, $this->cm->id);
621
        // Rebuild the course cache after update action
631
        // Rebuild the course cache after update action
Línea 622... Línea 632...
622
        rebuild_course_cache($this->course->id, true, true);
632
        rebuild_course_cache($this->course->id, true, true);
Línea 623... Línea 633...
623
 
633
 
624
        $sectionid = course_add_cm_to_section($this->course, $this->cm->id, $this->section);
634
        $sectionid = course_add_cm_to_section($this->course, $this->cm->id, $this->section, modname: $this->module->name);
625
 
635
 
626
        set_coursemodule_visible($this->cm->id, $visible);
636
        set_coursemodule_visible($this->cm->id, $visible);