Issue Details (XML | Word | Printable)

Key: MDL-9576
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Eloy Lafuente (stronk7)
Reporter: Patrick Pollet
Votes: 0
Watchers: 4
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

When restoring database , links are not recoded

Created: 25/Apr/07 02:18 PM   Updated: 18/Sep/07 06:19 AM
Component/s: Database activity module
Affects Version/s: 1.7.2, 1.8.2, 1.9
Fix Version/s: 1.7.3, 1.8.3, 1.9

Environment: Moodle 1.7.2, Apavhe 2.0, php 5, Linux
Issue Links:
Relates
 

Participants: Eloy Lafuente (stronk7), Patrick Pollet and Petr Škoda (skodak)
Security Level: None
Resolved date: 18/Sep/07
Affected Branches: MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE
Fixed Branches: MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE


 Description  « Hide
On backup, a link like http://MYSERVER.fr/moodle/mod/resource/view.php?id=831 in the description field
of a database activity is changed to $@RESOURCEVIEWBYID*831@$ in the backup file.

On restore, this is then supposed to be changed back, but using the new id.

This was not being done for a database activity either by backup/restore nor by using the new importation option.

This relates to http://tracker.moodle.org/browse/MDL-9432 where that bug was also reported for quizzes.



 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Eloy Lafuente (stronk7) added a comment - 17/Sep/07 07:29 AM
Wow.

confirmed. Just discovered that the data module hasn't support for encoding and decoding of links at all!

It should have:

1) In backuplib.php:

data_encode_content_links to convert links to data modules to the transportable form. At least support for this should be provided: DATAINDEX, DATAVIEWBYID, DATAVIEWBYD, DATAELEMENTVIEW (forum can be a good reference)

2) In restorelib.php:

data_decode_content_links: To convert the transportable links generated above to their normal appearance, using new ids in the restored course. Must be able to decode all the links above.

data_decode_content_links_caller: The function that selects the contents to be processed in the module and pass them to the restore_decode_content_links_worker (central) function. This function has the responsibility to write decoded contents back to DB.

Martin, if HQ has time, it would be great. Else, just drop one comment here and I'll start it tomorrow.

Ciao


Eloy Lafuente (stronk7) added a comment - 17/Sep/07 07:31 AM
Raising it to Major and adding some versions... to fix.

Petr Škoda (skodak) added a comment - 18/Sep/07 12:33 AM
my +1

Eloy Lafuente (stronk7) added a comment - 18/Sep/07 06:19 AM
Done, now interlinking from/to data module is working in 17_STABLE, 18_STABLE and HEAD.

Closing. Ciao