Tasks without dir lost on upgrade to 1.8
When upgrading from 1.8.6 to 126.96.36.199, the tasks which are not included in a task directory do not appear.
They should be migrated by the upgrade script.
- create a new task directory called "task/" and get its ID in the student_publication table
- update parent_id of all items in student_publication to the new directory, except for the new directory itself
- update the "url" field of all items to replace work/ by work/task/
This should fix it.
The update should be set into the migration script corresponding to the versions between which the assignments ceased to appear in the root directory, so there's a little investigation to do before it is placed.
Updated by Julio Montoya about 9 years ago
- Status changed from Assigned to Needs more info
- Assignee deleted (
- % Done changed from 0 to 70
I just added a migration script in update-db-1.8.8-1.9.0.inc.php that should do the job, requires testing.
It moves subfolders in a new path called: for example the old path was "/long/path/my_folder" the new path will be "/my_folder_mv_4fd7743876b3d"
where 4fd7743876b3d is a unique id (generated with uniqid()) in order to avoid doubles.
For orphan tasks the new folder title will be "Tasks" and the url (path) will be "default_task_X_Y" where "X" is the group id and "Y" is the session_id
This is too hacky but at least it will be ready for Chamilo 1.9 and those weird names will be transparent because we show the "title" field ...
Feel free to test and modify the script ...
Updated by Yannick Warnier about 9 years ago
Actually it's not as bad as you seem to describe it: in the end, very few tasks directories will actually need this type of renaming and the admins of the portals who do will probably run a fake upgrade first.
I don't know if Hubert or Laurent want to add something (this concerns them more than anyone else), but for me this task can be closed and moved out of the way of 1.9 Beta.