Improve course copy for assignments
- the copy only works the first time: if you copy the task once, then delete the task in the destination course, it is impossible to copy again (must be something to do with the folder still being there)
- the copy of dates is imperfect. For a course with submission dates being 2014-04-17 23:59:00 and 2014-04-24 23:59 in the original, I get a copy with 2014-04-18 04:59 and 2014-04-25 04:59 (I'm at GMT-5, so that's something to do with timezones and not using api_get_utc_datetime() properly)
- somehow, function function restore_student_publication() checks the original table for info about the assignment, which should NEVER be the case for any resource copy, as it might be copied from one portal to another portal, without database link
The current status is not good, but it is already better than not copying the task at all.
Use this commit for reference of what code needs to be looked into: https://github.com/chamilo/chamilo-lms/commit/d1e9a02d74c04dead8c16519366b0f30807194dc
Updated by Yoselyn Castillo almost 7 years ago
- Status changed from Assigned to Needs more info
- Assignee changed from Yoselyn Castillo to Yannick Warnier
I have tried in 1.9.8 I have created a course
Into the course, I have created a new assignment with a deadline time, Later I have copied the course into course2 and course3. Assignment was successfully copied twice and dates are successfully shown.
So, i think this is fixed, is any other bug related to this?