Is that what you would expect if you restored a deleted file from a backup?
Tim Hunt
Posts made by Tim Hunt
The Moodle question bank tracks the time when each question was last created or modified.
The Moodle backup and restore system has a feature where, during the restore process, you can choose to change the course start date, and then all the other dates in the course are adjusted by the same amount. This is helpful if, for example, you always want a given quiz to open 10 days after the start of the course, in any copy of the course that you make.
The question is, does it make sense to apply this logic to the question timecreated and timemodified fields? My colleages at the OU and I think that these fields are more metadata, which should be left alone; rather than course settings, which should be update. That is, however, just one opinion, and before I change anything I would like to hear everyone else's opinion, so please tell me what you think the right behaviour is here. Thanks.
(The tracker issue is MDL-36650.)
De you have Debugging set to DEVELOPER level?
If you did, it would probably tell you that you need to make the first column something unique in your call to get_records.
That is, change 'contextid,filename,filesize' to 'id,contextid,filename,filesize'. That first column is used as the array keys in the $records array.
Thanks. That points to exatly where the problem is - or rather it doesn't. Even knowing exactly what the problem is, I cannot reproduce this.
And I don't remember fixing a bug like this before.
Can you try upgrading to 2.3.3?