Project

General

Profile

Actions

Bug #4643

closed

Images missing from a re-opened assessment when the images are the choices of a multiple-choice question

Added by Sandeep Namilikonda almost 15 years ago. Updated over 14 years ago.

Status:
Resolved
Priority:
Normal
Category:
parser
Target version:
Start date:
12/22/2009
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
4643

Description

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.


Files

960.1 (1.22 KB) 960.1 Sandeep Namilikonda, 01/07/2010 08:41 PM
959.1 (2.37 KB) 959.1 Sandeep Namilikonda, 01/08/2010 07:59 PM
Actions #1

Updated by Ryan McFall almost 15 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).

Actions #3

Updated by Sandeep Namilikonda almost 15 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!

Actions #4

Updated by Sandeep Namilikonda almost 15 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>

Actions #5

Updated by ben leinfelder almost 15 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:
MultipleChoiceResponseItem.choices.get(index).getImageList()

I think we need to process any items that implement TextAndImage interface. Seems that only MultipleChoiceResponseItem needs special processing here.

Actions #6

Updated by Ryan McFall almost 15 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
processed:
MultipleChoiceResponseItem.choices.get(index).getImageList()

I think we need to process any items that implement TextAndImage interface.
Seems that only MultipleChoiceResponseItem needs special processing here.

Sandeep:

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.

Actions #7

Updated by ben leinfelder almost 15 years ago

i'm almost done putting in the code changes.
But I'd appreciate someone testing/making sure it works!

Actions #8

Updated by ben leinfelder almost 15 years ago

code is committed to SVN - would appreciate it if you (Sandeep) tried it on the test case you have.

Actions #9

Updated by Sandeep Namilikonda over 14 years ago

The changes made to choice.java by Ryan seemed to have fixed this bug.
Ryan confirmed it and I have personally tested the fix too.

So, I am closing this bug.

Actions #10

Updated by Redmine Admin over 11 years ago

Original Bugzilla ID was 4643

Actions

Also available in: Atom PDF