Images missing from a re-opened assessment when the images are the choices of a multiple-choice question
Reopening an assessment can result in missing images when those images are the choices of a question and if they had to be hand-picked by the user during the initial steps of parsing (i.e., selection of vector images).
A potential cause for the problem might be the lack of proper (pointer) information in the XML file about the location of the images corresponding to a question when those images themselves are the choices.
#1 Updated by Ryan McFall over 9 years ago
I haven't had a chance to take a look at this problem since we discussed it a couple of weeks ago.
As I was thinking about it this morning, however, it seems that this is the problem that we fixed when I edited all of Jay's parsed assessments. So I'm a bit worried about that, because if I recall correctly, the problem was a somewhat strange interpretation of the appropriate XML path for the images. I was fairly confident that we had modified the code and fixed that bug, so I'm wondering why it has cropped up again.
Sandeep, do you have time to take a look at this and determine if an incorrect path is being specified? I'm sorry that I don't remember exactly where this would be, although I think it might be MultipleChoiceResponseItemComponent or something like that (I don't have the code accessible to me at the moment).
#3 Updated by Sandeep Namilikonda over 9 years ago
In my latest test on doc10.pdf using morpho-1.8.0beta2.exe,
I selected the images corresponding to Q28 as
separate images first during the parsing process (image identification stage). Then, in the parser's MainWindow, I associated those images (four of them) with
Q28 and saved the assessment. I found that in the folder that contains XML files
corresponding to the individual items, four dummy/garbage non-XML files were
created right after the XML file corresponding to Q28 (an example file attached).
Questions 29 and beyond had their XML files intact but the additional files
do alter the numerical order of the serial numbers assigned to these files.
The reason I think these files are worth mentioning is that when I try to re-open
the assessment, the images are missing. Note that when user (I) creates choices
for a question so as to incorporate the images in them, the images are not
treated as the choices really because each choice is created with an associated
empty text box! In fact, I added dummy text to these text boxes and found that
when I re-open the assessment, the text (and hence, the choices) are still intact!
It is only the images associated with those choices that go missing.
Further, apart from the missing images (that are choices), Q32-Q34 are missing
too! This behavior is due to how the "common instructions" have been specified
and the choices are specified as common too. But, this behavior is not a result
of the images being answer choices.
Another issue I noticed is that when the parser's exit menu item is selected,
it exits the entire morpho app!
#4 Updated by Sandeep Namilikonda over 9 years ago
In spite of the URI being present in the first XML version created by the parser
subsequent versions do not have it in them. I notice that for the images chosen
by a user, the URIs are local addresses as opposed to automatically detected
(vector) images, which have a URI that corresponds to an address on ecogrid.
e.g., <matimage imagtype="image/1" uri="ecogrid://knb/namilikonda.927.1"> </matimage>
#5 Updated by ben leinfelder over 9 years ago
during the save, only images returned in by ResponseItem.getImageList() are being saved with ecogrid URIs. It sounds like there are other images that need this same treatment.
For multiple choice items, these images (from the choices) are not being processed:
I think we need to process any items that implement TextAndImage interface. Seems that only MultipleChoiceResponseItem needs special processing here.
#6 Updated by Ryan McFall over 9 years ago
(In reply to comment #5)
during the save, only images returned in by ResponseItem.getImageList() are
being saved with ecogrid URIs. It sounds like there are other images that need
this same treatment.
For multiple choice items, these images (from the choices) are not being
I think we need to process any items that implement TextAndImage interface.
Seems that only MultipleChoiceResponseItem needs special processing here.
Can you look into this and make a proposal for how to handle? If you don't know for sure what's going on, I can assist if necessary.