Project

General

Profile

Bug #4046

Tasks without dir lost on upgrade to 1.8

Added by Yannick Warnier over 9 years ago. Updated over 8 years ago.

Status:
Bug resolved
Priority:
Low
Category:
Assignments / Work
Target version:
Start date:
14/11/2011
Due date:
% Done:

70%

Estimated time:
Spent time:
Complexity:
Challenging
SCRUM pts - complexity:
?

Description

When upgrading from 1.8.6 to 1.8.8.4, the tasks which are not included in a task directory do not appear.
They should be migrated by the upgrade script.

Solution:
  • 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.

Associated revisions

Revision 266c82b0 (diff)
Added by Julio Montoya about 9 years ago

Fixing work upload dir location see #4046

Revision 6fa5e178 (diff)
Added by Julio Montoya about 9 years ago

Adding migration script to fix the assignments in a subfolder and orphan "tasks" see #4046 tested with chamilo 1.8.7

History

#1

Updated by Yannick Warnier over 9 years ago

Ref BT#3191 (contains script)

#2

Updated by Yannick Warnier over 9 years ago

  • Target version set to 1.9 Beta
#3

Updated by Julio Montoya about 9 years ago

  • Status changed from New to Assigned
  • Assignee set to Julio Montoya
#4

Updated by Hubert Borderiou about 9 years ago

Can you check if works uploaded in sub-folders or sub-sub-folders in older version are migrated ?

#5

Updated by Julio Montoya about 9 years ago

  • Status changed from Assigned to Needs more info
  • Assignee deleted (Julio Montoya)
  • % 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 ...

#6

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.

#7

Updated by Yannick Warnier about 9 years ago

  • Target version changed from 1.9 Beta to 1.9 RC1

There we go: moved out of the way!

#8

Updated by Yannick Warnier about 9 years ago

  • Target version changed from 1.9 RC1 to 1.9.2

Moving to 1.9.2 just in case we would have more reports by that time, but otherwise considering it closed.

#9

Updated by Julio Montoya almost 9 years ago

  • Target version changed from 1.9.2 to 1.9.4

No news/feedback after the Chamilo 1.9 released. Seems that this issued was solved moving to 1.9.4 (just in case)

#10

Updated by Yannick Warnier over 8 years ago

  • Category set to Assignments / Work
  • Status changed from Needs more info to Bug resolved
  • Assignee set to Hubert Borderiou

Also available in: Atom PDF