Bug #4315
closedImages repeating when editing assessment items
0%
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
Related issues
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".
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>
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>
<body>
2) Which molecule can function as a base?
</body>
</html>
]]></mattext>
<matimage imagtype="image/1" uri="ecogrid://knb/jlee.1423.1"> </matimage>
</material>
<response_str ident="Q2" rcardinality="Ordered" rtiming="No"> <material> <mattext><![CDATA[
<head>
</head>
<body>
2) Which molecule can function as a base?
</body>
</html>
]]></mattext>
</material>
<material><matimage imagtype="image/1" uri="ecogrid://knb/jlee.1423.1"> </matimage>
</material>
<render_fib columns="80" fibtype="String" prompt="Box" rows="20"> <response_label ident="A"></response_label>
</render_fib>
</response_str>
</flow>
</presentation>
</item>
</section>
</assessment>
</qti:questestinterop>
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.
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()