Project

General

Profile

Actions

Bug #4315

closed

Images repeating when editing assessment items

Added by ben leinfelder over 15 years ago. Updated over 15 years ago.

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

0%

Estimated time:
Bugzilla-Id:
4315

Description

I've found that when I go to edit the assessment items I see duplicate images (that cause invalid QTI, actually). It appears that the same image is showing up twice in the model (debug mode) and the XML.
I found this on Jay's test:
'2005 Midterm ver A' - questions 67-70. This does not seem to be affecting all questions with images (see question #60).
You should be able to reproduce this by using Jay's Morpho backup (just copy the 'jlee' folder into the folder:
.first/profiles/<your _profile>/data/jlee


Files

Fall05-Midterm_vA.pdf (115 KB) Fall05-Midterm_vA.pdf Sandeep Namilikonda, 08/20/2009 08:22 PM

Related issues

Blocked by FIRST - Bug #4309: Some of Data packages could not be uploaded to webResolvedben leinfelder08/13/2009

Actions
Actions #2

Updated by Sandeep Namilikonda over 15 years ago

UPDATE:

When the attached document is parsed using just the parser part of the code via Eclipse, apart from the faulty image association issue, there is NO
duplication of images for any of the questions. Even when I create a data package using Morpho and then parse the attached document as a corresponding
exam in the data package, the initial parse does not show any duplicate images.
Its only when I try to re-open the assessment items that the images are
duplicated for Q67-Q70 (e.g., SN-viaEclipse-test2 on Fred).

Another test assessment, SNtest-2005midterm-vA, that I had created using a slightly older version of Morpho had duplicate images for even for questions 39 and 45! With this version, the number of duplicates doubled each time I opened it. I was able to save it to the server but with similar warnings as what Jay had got in his attempts, namely, org.xml.SAXParseException and "Invalid meta data found".

Actions #3

Updated by Sandeep Namilikonda over 15 years ago

The following description is only a comment, intended to maintain continuity
in the process of debugging the issue. No solution is proposed here, yet.

After examining some relevant code to debug this issue, I was led toward
the XML (QTI) documents output corresponding to the assessment items that
result in the duplicate images. The problem does not seem to be in the code
that reads in the XML document and creates a Question object for display.
It must be in the code that writes out those XML documents!

To support this conclusion, I have snippets from the revisions of an
assessment item corresponding to question 70 of the attached examination below.
Note that the accession numbers are in the chronological order of multiple
attempts of re-opening the assessment and editing it. Please focus on how the
number of Image tags get duplicated.

------------------------ Accession ID number: 470.4 ------------------------

<qti:questestinterop xmlns:qti="http://www.imsglobal.org/xsd/ims_qtiasiv1p2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.imsglobal.org/xsd/ims_qtiasiv1p2 ims_qtiasiv1p2.xsd"><assessment ident=" "><section ident=" "><item ident="namilikonda.470.4" title="QuestionTypeImage hotspot"> <itemmetadata> </itemmetadata>
<presentation label="Question namilikonda.470.3"> <flow> <material> <mattext><![CDATA[
This diagram represents the processes of aerobic cellular
respiration as 4 simple boxes. Many of the "inputs" and
"outputs" are shown as arrows. Open arrows represent energy
management molecules, while closed arrows represent other
inputs and outputs such as substrates and products. Use this
diagram to answer the following questions.70) Which arrow in the figure above represents
CO2?]]></mattext>
<matimage imagtype="image/1" uri="ecogrid://knb/namilikonda.483.1"> </matimage>
</material>

------------------------ Accession ID number: 470.5 ------------------------

<qti:questestinterop xmlns:qti="http://www.imsglobal.org/xsd/ims_qtiasiv1p2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.imsglobal.org/xsd/ims_qtiasiv1p2 ims_qtiasiv1p2.xsd"><assessment ident=" "><section ident=" "><item ident="namilikonda.470.5" title="QuestionTypeImage hotspot"> <itemmetadata> </itemmetadata>
<presentation label="Question namilikonda.470.4"> <flow> <material> <mattext><![CDATA[
This diagram represents the processes of aerobic cellular
respiration as 4 simple boxes. Many of the "inputs" and
"outputs" are shown as arrows. Open arrows represent energy
management molecules, while closed arrows represent other
inputs and outputs such as substrates and products. Use this
diagram to answer the following questions.70) Which arrow in the figure above represents
CO2?]]></mattext>
<matimage imagtype="image/1" uri="ecogrid://knb/namilikonda.483.1"> </matimage>
<matimage imagtype="image/1" uri="ecogrid://knb/namilikonda.483.1"> </matimage>
</material>

------------------------ Accession ID number: 470.6 ------------------------

<qti:questestinterop xmlns:qti="http://www.imsglobal.org/xsd/ims_qtiasiv1p2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.imsglobal.org/xsd/ims_qtiasiv1p2 ims_qtiasiv1p2.xsd"><assessment ident=" "><section ident=" "><item ident="namilikonda.470.6" title="QuestionTypeImage hotspot"> <itemmetadata> </itemmetadata>
<presentation label="Question namilikonda.470.5"> <flow> <material> <mattext><![CDATA[
This diagram represents the processes of aerobic cellular
respiration as 4 simple boxes. Many of the "inputs" and
"outputs" are shown as arrows. Open arrows represent energy
management molecules, while closed arrows represent other
inputs and outputs such as substrates and products. Use this
diagram to answer the following questions.70) Which arrow in the figure above represents
CO2?]]></mattext>
<matimage imagtype="image/1" uri="ecogrid://knb/namilikonda.483.1"> </matimage>
<matimage imagtype="image/1" uri="ecogrid://knb/namilikonda.483.1"> </matimage>
<matimage imagtype="image/1" uri="ecogrid://knb/namilikonda.483.1"> </matimage>
<matimage imagtype="image/1" uri="ecogrid://knb/namilikonda.483.1"> </matimage>
</material>

------------------------ Accession ID number: 470.7 ------------------------

<qti:questestinterop xmlns:qti="http://www.imsglobal.org/xsd/ims_qtiasiv1p2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.imsglobal.org/xsd/ims_qtiasiv1p2 ims_qtiasiv1p2.xsd"><assessment ident=" "><section ident=" "><item ident="namilikonda.470.7" title="QuestionTypeImage hotspot"> <itemmetadata> </itemmetadata>
<presentation label="Question namilikonda.470.6"> <flow> <material> <mattext><![CDATA[
This diagram represents the processes of aerobic cellular
respiration as 4 simple boxes. Many of the "inputs" and
"outputs" are shown as arrows. Open arrows represent energy
management molecules, while closed arrows represent other
inputs and outputs such as substrates and products. Use this
diagram to answer the following questions.70) Which arrow in the figure above represents
CO2?]]></mattext>
<matimage imagtype="image/1" uri="ecogrid://knb/namilikonda.483.1"> </matimage>
<matimage imagtype="image/1" uri="ecogrid://knb/namilikonda.483.1"> </matimage>
<matimage imagtype="image/1" uri="ecogrid://knb/namilikonda.483.1"> </matimage>
<matimage imagtype="image/1" uri="ecogrid://knb/namilikonda.483.1"> </matimage>
<matimage imagtype="image/1" uri="ecogrid://knb/namilikonda.483.1"> </matimage>
<matimage imagtype="image/1" uri="ecogrid://knb/namilikonda.483.1"> </matimage>
<matimage imagtype="image/1" uri="ecogrid://knb/namilikonda.483.1"> </matimage>
<matimage imagtype="image/1" uri="ecogrid://knb/namilikonda.483.1"> </matimage>
</material>

Actions #4

Updated by ben leinfelder over 15 years ago

Are you not seeing duplicate images the first time you parse an exam as in:
-------------- jlee.1607.1 ----------------

<qti:questestinterop xmlns:qti="http://www.imsglobal.org/xsd/ims_qtiasiv1p2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.imsglobal.org/xsd/ims_qtiasiv1p2 ims_qtiasiv1p2.xsd"><assessment ident=" "><section ident=" "><item ident="jlee.1607.1" title="QuestionTypeShort answer"> <itemmetadata> </itemmetadata>
<presentation label="Question 2"> <flow> <material> <mattext><![CDATA[ <head>

&lt;/head&gt;
&lt;body&gt;
2) Which molecule can function as a base?
&lt;/body&gt;
&lt;/html&gt;
]]>&lt;/mattext&gt;
&lt;matimage imagtype="image/1" uri="ecogrid://knb/jlee.1423.1"&gt; &lt;/matimage&gt;
&lt;/material&gt;
&lt;response_str ident="Q2" rcardinality="Ordered" rtiming="No"&gt; &lt;material&gt; &lt;mattext&gt;&lt;![CDATA[ &lt;head&gt;
&lt;/head&gt;
&lt;body&gt;
2) Which molecule can function as a base?
&lt;/body&gt;
&lt;/html&gt;
]]>&lt;/mattext&gt;
&lt;/material&gt;
&lt;material&gt;&lt;matimage imagtype="image/1" uri="ecogrid://knb/jlee.1423.1"&gt; &lt;/matimage&gt;
&lt;/material&gt;
&lt;render_fib columns="80" fibtype="String" prompt="Box" rows="20"&gt; &lt;response_label ident="A"&gt;&lt;/response_label&gt;
&lt;/render_fib&gt;
&lt;/response_str&gt;
&lt;/flow&gt;
&lt;/presentation&gt;
&lt;/item&gt;
&lt;/section&gt;
&lt;/assessment&gt;
&lt;/qti:questestinterop&gt;
Actions #5

Updated by Sandeep Namilikonda over 15 years ago

Reply to Ben's question:

Indeed! When I open the parser window for the first time (i.e., while creating
the data package), I do not see any duplicates in the parser window. So, I assumed
that that version of XML representation is alright. But, it turns out that right
from the first copy (470.1) onwards, there are two <material> *** </material>
tags.

Thanks for pointing out, Ben! So, the problem might be with the code that
creates/writes out the XML document.

Actions #6

Updated by Sandeep Namilikonda over 15 years ago

The issue was that the prompt and the images were being added to the XML
document for two kinds of response items (question types) namely, "Image Hot Spot" and "True/False".

Here is a sequence of function calls for reference to help future bug fixing:

MainWindow.java:

save-and-close menu item calls saveDocAction which calls persistParserStateToMorpho!

AssessmentItemUtil.java:

persistParserStateToMorpho calls questionList2DataPackages(QuestionList)

ResponseItem.java:

questionList2DataPackages calls generateQuestionXML() which calls outputPromptAndImageList() and <ResponseItemType>.generateXML()

Actions #7

Updated by Redmine Admin over 11 years ago

Original Bugzilla ID was 4315

Actions

Also available in: Atom PDF