|
|
|
Environment:
|
Moodle 1.7.2, Apavhe 2.0, php 5, Linux
|
|
Issue Links:
|
Relates
|
|
|
|
This issue has been marked as being related by:
|
|
MDL-9432
When restoring quiz questions, links are not recoded
|
|
|
|
|
|
|
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.
|
|
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