|
[
Permalink
| « Hide
]
Eloy Lafuente (stronk7) added a comment - 21/Apr/07 04:27 PM
This goes to Tim...
This course includes a quiz that has an audio file/mp3 attached to a quiz question. When this course is restored, the MP3 file will not play even while the file is included in the course files. It will not play because when restored the MP3 is hard-linked back to the original course ID (14) from which the question was created from. You can verify this from view source when you render the quiz page in your browser.
It's my new working theory the reason why this problem occurs is that even when a course backup includes quiz questions and audio/mp3/images, if you are restoring to a Moodle that already has these questions saved in the question bank, the restore of quiz questions is automatically skipped during restore.
Because the restore process is not creating new questions, but recycling questions pre-existing in the database for the newly restored course, the links never get republished, and the original course ID keeps manifesting itself into new courses. Since it is unlikely for the future student to have access to course files from the original course ID, the files will not play. I'm not sure if this issue can be reopened or addressed. Thanks. This is a serious issue for me. A typical chapter question set will have 20 or so questions with figures. And I have 18 or so chapters. This takes forever to update.
Please work on this one soon! I have just been reading the code of question/restorelib.php, and I think the situation is this: (Admittedly, I am sitting in a bar in a San Francisco hotel drinking beer and seeing if anyone else is going to turn up before the MoodleMoot, but I think I am still sober enough to know what I am taking about
OK, so in Moodle 1.9+ the situation is fine. Jamie Pratt thought about this situation when he was re-working the question bank. In 1.8, Nicholas's analysis is right, but only if the category being backed up is 'published'. (If your questions use images or other media files, then publishing them is a bad idea, because they will not work in other courses. That was one fo the fundamental flaws that lead to Jamie re-writing the question bank.) So, it should be the case that if you ensure that all your question categories are not published, then do the backup, then do the restore, then you should get a copy of the questions, and the copies should have the links to the course files rewritten correctly. It would be great if someone could test this and confirm it. Thanks. This problem still exists in 1.9. The workaround is not realistic for an instructor who might have hundreds of such links in their question bank. It ALSO affects internal links to files in Assignment descriptions.
After seeing Roger's report, we retested the the import of a single quiz from one course to another course in Moodle 1.9.2+ (October 1). We found the links were not broken. The sound and image media files were moved to the new course and the links were updated to the new courseID number. The question bank category was set at Course Default for all questions. So for our setup, my conclusion is that this bug has been fixed. Thanks!
For Roger, I suggest you list step-by-step what caused your bug, the exact version/date of Moodle you are working with, the location of your media files, and the question bank categories that the questions are set to. I believe the problem was fixed previously but has come back to haunt us as it was reported last year and we subsequently patched it up to the stable version on 4-Aug-2008. That fixed our issue but it looks as though the problem has returned.
We are running Moodle 1.9.4+ (Build: 20090405) and did not experience the problem last semester but we are now experiencing it. We backup from the course from a previous semester - which then creates a zip file The image link within the quizzes are not updated and still points to the previous year's course which the current students do not have access to. We have hundreds of courses that will need to be fixed and withing each course, there are up to 12 quizes. So it is impractical for us to go through all quizes, in all courses, within all faculties. We really do need a utility to run the fix against existing courses and to have the restorelib.php fixed for future restores. Aha (A good clue for the bug) Moodle 1.92 20080711
The problem is: The image link embedded in the question retains the location from the source class instead of applying the new folder numbered location. In my case the number after the Source:....File.php was 43 the old class, when I update the link it changes to 56. kv I still need more information to be able to reproduce and fix this bug.
Exactly what steps are you performing? That is what question types are there in the quiz? What options do you choose when you do the backup? After the restore, which bit of text has the wrong link? Please can you copy and paste the HTML from the old course, and the new course after the restore. Hi, I have this issue for every <img> tag in backed up courses, regardless of module. My absolute URLs end up like this: src="http://campus.extension.org/file.php/227$@SLASH@$image$@SLASH@$couple.png"
Can supply backup files if needed. But they are large. Attaching moodle.xml. Note how forward slashes are not correct in the backup file. src="http://campus.extension.org/file.php/227$@SLASH@$image$@SLASH@$couple.png"
These image URLs are not broken when I restore locally, but are broken when I restore on another site. Also see the last post in this forum: http://moodle.org/mod/forum/discuss.php?d=123571#p541640 Running LAMP, Moodle 1.9.5+ |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||