T&Q: Importing an exported quiz which had images inserted in the question fails

Description

I had thought the problem was if an image was added to a question if it came from a hidden folder in resources, but it also happens when using an image from a visible folder.

I have 2 folders in resources:

  • Hidden - but allow access to its contents

  • Visible - members 

I created a quiz with 2 short answer/essay questions and inserted an image from the hidden folder in one, and an image from the visible folder for the other.

I verified the student could view the images.

I created another quiz that has 1 question and an image from the visible folder.

I exported both quizzes and tried to import into another site. I received an error "There was an error importing this assessment. Ensure that the file is correctly formatted IMS QTI." and there is a stack trace in the server logs.

This happened for both quizzes. I'm attaching the exports (and you can see the folders and images are there), and the stacktraces.

21x:

https://trunk-mysql.nightly.sakaiproject.org/portal/site/5bf5ab7b-b9fc-4345-9368-d43bc2680e2d

  • Visible_vs_Hidden_Quiz

  • Only Visible - quiz

20x (since the site on trunk will be gone by tomorrow):

https://qa20-mysql.nightly.sakaiproject.org/portal/site/NGNJ_536V_8465

Hidden-Images-Quiz
Short answer question with image from Hidden Folder: salada maki.png
Short answer question with image from Not Hidden: coffee_machine-32.png

The first error that displays in the logs on import (example from the Only visible - quiz):

15-Apr-2020 19:02:43.933 ERROR [http-nio-20013-exec-17] org.sakaiproject.tool.assessment.qti.helper.AttachmentHelper.createContentResource FileNotFoundException:/var/trunk-mysql/sakai/samigo/answerUploadRepositoryPath/jsf/upload_tmp/qti_imports/a2504b8b-78dc-4c1a-a2b0-5f8cf24eef92/unzip_files/1586991763704/group/5bf5ab7b-b9fc-4345-9368-d43bc2680e2d/Visible Folder/Pen-128x128.png (No such file or directory)

This is then followed by the stack trace.

Attachments

4

Activity

Andrea Schmidt June 13, 2021 at 9:17 AM

Am going to resolve this as a duplicate of  because the issue is spaces - in the folder or the image name. As long as there are no folders with spaces in them, or pictures with spaces in them, the images export/import without issue.

Tiffany Stull June 8, 2021 at 10:42 AM

I would call this a blocker. We have a large number of instructors who rely on import/export for large placement exams with images in every question.

Andrea Schmidt November 15, 2020 at 7:05 PM
Edited

Andrea Schmidt November 15, 2020 at 1:17 PM
Edited

Retesting images: the export from 21 has an extra folder inside the group > id folder called QuizImages. Quiz Images is the folder I created in resources to hold the quiz images since I have to upload images used to a folder in resources. There was a time when the instructor could just upload images through the rich text editor and they were automatically placed for T&Q. The instructor does not have permissions to upload anything to the assessments folder, only has read access.

Tested an older import from 20x which only has one folder under group which contains the ID. That quiz imports without a problem and the images display in the quiz.

Also tested on trunk. When I imported the 20x export, and looked copied the image URL when editing the quiz, the URL is 

https://trunk-mysql.nightly.sakaiproject.org/access/content/attachment/c72310e3-ba94-40c8-88d1-2409a47e4684/Tests%20_%20Quizzes/ccbf8441-63f9-424c-8e47-df6f22bd8af9/ with the image (ginger.png) appended to the end. (If I add the image name it automatically appends it.)

Since my site on trunk will be gone after midnight, you can see this in 21x:

https://qa21-mysql.nightly.sakaiproject.org/portal/site/3954d9fb-df6f-4fe5-9d30-0c82cea2319d

The quiz imported: 20x-Image-Test

 

Andrea Schmidt May 24, 2020 at 9:27 PM

I have a doc with versions from 12x - 21x listed, along with quizzes created on each server, exported and attempted import:

https://docs.google.com/document/d/1UljJDXyGxxsjSDMj_qUCl68K3e3ITbqyRcPeWKXaFmc/edit

Today (5/24) the export/import fails for 19x and 21x. I didn't get around to testing 20.1, but 20.0 and 20x work. The exported quizzes are in that doc so hopefully that helps.

Duplicate

Details

Priority

Affects versions

Components

Assignee

Reporter

Labels

Environment

21x: https://trunk-mysql.nightly.sakaiproject.org/, build: 1c69544d 20x: https://qa20-mysql.nightly.sakaiproject.org/, build: 97bcf48f Win10: Chrome

Created April 15, 2020 at 6:17 PM
Updated June 13, 2021 at 9:18 AM
Resolved June 13, 2021 at 9:17 AM