File tree 3 files changed +6
-4
lines changed
3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,9 @@ public function execute(): void {
61
61
* @return csv_export_writer The CSV export writer containing the results of the task.
62
62
*/
63
63
private static function update_contexts (?int $ courseid , bool $ dryrun ): csv_export_writer {
64
- global $ DB ;
64
+ global $ CFG , $ DB ;
65
+
66
+ require_once ($ CFG ->libdir . '/csvlib.class.php ' );
65
67
66
68
$ sql = "SELECT f.*, ctx.id AS ctxid, cms.course AS courseid
67
69
FROM {files} f
Original file line number Diff line number Diff line change @@ -413,12 +413,12 @@ function xmldb_cms_upgrade($oldversion) {
413
413
upgrade_mod_savepoint (true , 2024090303 , 'cms ' );
414
414
}
415
415
416
- if ($ oldversion < 2024090304 ) {
416
+ if ($ oldversion < 2024090305 ) {
417
417
// Run ad hoc task for updating contextid in the files table.
418
418
$ task = \mod_cms \task \update_files_context::instance (null , false );
419
419
manager::queue_adhoc_task ($ task );
420
420
421
- upgrade_mod_savepoint (true , 2024090304 , 'cms ' );
421
+ upgrade_mod_savepoint (true , 2024090305 , 'cms ' );
422
422
}
423
423
424
424
return true ;
Original file line number Diff line number Diff line change 25
25
26
26
defined ('MOODLE_INTERNAL ' ) || die ();
27
27
28
- $ plugin ->version = 2024090303 ;
28
+ $ plugin ->version = 2024090305 ;
29
29
$ plugin ->requires = 2022112800 ; // Moodle 4.1 and above.
30
30
$ plugin ->supported = [401 , 401 ]; // Moodle 4.1.
31
31
$ plugin ->component = 'mod_cms ' ;
You can’t perform that action at this time.
0 commit comments