-
Bug
-
Resolution: Fixed
-
Critical
-
2.0.5, 2.1.2, 2.2
-
MySQL
-
MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
-
MOODLE_20_STABLE, MOODLE_21_STABLE
-
git@github.com:skodak/moodle.git
-
w41_
MDL-29773_m22_filedates -
When migrating to Moodle 2.1, upgrade fails if file have time stamp before 1 January 1970. This problem has been discussed with Petr with enhanced file_storage debug, and the following is the result when dealing with before 1970 files in mod_scorm:
!!! Can not create file "838/mod_scorm/content/0//common//anyElement.xsd" !!!
!! Out of range value for column 'timemodified' at row 1
INSERT INTO mdl_files (contextid,component,filearea,itemid,filepath,filename,timecreated,timemodified,mimetype,userid,source,author,license,sortorder,filesize, contenthash,pathnamehash) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
[array (
0 => '838',
1 => 'mod_scorm',
2 => 'content',
3 => 0,
4 => '/common/',
5 => 'anyElement.xsd',
6 => 1318499551,
7 => -426241696,
8 => 'document/unknown',
9 => NULL,
10 => NULL,
11 => NULL,
12 => NULL,
13 => 0,
14 => 1016,
15 => 'af73428a4d36730ac46eaddd4a4984e8f4c3d6c1',
16 => 'cba7933a180d03bdd509e3538423e9324e21e831',
)] !!
!! Stack trace: * line 826 of /lib/filestorage/file_storage.php: stored_file_creation_exception thrown
- line 93 of /mod/scorm/db/upgradelib.php: call to file_storage->create_file_from_pathname()
- line 105 of /mod/scorm/db/upgradelib.php: call to scorm_migrate_moddata_subdir()
- line 44 of /mod/scorm/db/upgradelib.php: call to scorm_migrate_moddata_subdir()
- line 177 of /mod/scorm/db/upgrade.php: call to scorm_migrate_moddata_files()
- line 541 of /lib/upgradelib.php: call to xmldb_scorm_upgrade()
- line 271 of /lib/upgradelib.php: call to upgrade_plugins_modules()
- line 1466 of /lib/upgradelib.php: call to upgrade_plugins()
- line 146 of /admin/cli/upgrade.php: call to upgrade_noncore()
!!
[Exit 1]