Bug #3923
closedException can be thrown trying to ignore question number in question text
0%
Description
Start with doc10.pdf, and when selecting vector images, select each image as an individual image, and don't select the letters as part of the image (not sure if the letter part matters).
When Finish is clicked, then the following exception is thrown:
Exception in thread "AWT-EventQueue-0" java.lang.StringIndexOutOfBoundsException: String index out of range: 77
at java.lang.String.charAt(Unknown Source)
at edu.msu.first.parser.question.ShortAnswerResponseItem.parse(ShortAnswerResponseItem.java:43)
at edu.msu.first.parser.question.Question.parse(Question.java:315)
Updated by Sandeep Namilikonda over 15 years ago
The Assessment parser routine assumes that image tags will always precede
question text, which creates a problem when the choices of a question are
images!
When choices of a question are images, the parser requires the user to explicitly choose those images. In such an instance, the separateQuestions(), associateImages() and combineSplitQuestions() routines seem to misconstrue the images to be a part of next question or worse, consider an image tag (for individual choices) as a separate question! These deviant cases can wrongly be labeled as SHORT_ANSWER due to the current logic of classifying questions in PDFAssessment2_4.java!!!
For example, consider the question 28 from doc10.pdf. Here is some debug info
that shows the sequence of steps and the defect of the process:
----------------- SAMPLE ---------------------
INITIAL TEXT
28. You can inject a small dye into cells and by light
microscopy observe the dye. Which of the
following illustrates cells from a tissue that forms
gap junctions?
<img src="C:\DOCUME~1\sandeep\LOCALS~1\Temp\doc10_combined_image_1.jpg">
<img src="C:\DOCUME~1\sandeep\LOCALS~1\Temp\doc10_combined_image_2.jpg">
<img src="C:\DOCUME~1\sandeep\LOCALS~1\Temp\doc10_combined_image_3.jpg">
<img src="C:\DOCUME~1\sandeep\LOCALS~1\Temp\doc10_combined_image_4.jpg">
29. Which of the following is CORRECTLY matched?
A. nucleolus : protein synthesis
AFTER SEPARATE QUESTIONS
28. You can inject a small dye into cells and by light
microscopy observe the dye. Which of the
following illustrates cells from a tissue that forms
gap junctions?
<img src="C:\DOCUME~1\sandeep\LOCALS~1\Temp\doc10_combined_image_1.jpg">
<img src="C:\DOCUME~1\sandeep\LOCALS~1\Temp\doc10_combined_image_2.jpg">
<img src="C:\DOCUME~1\sandeep\LOCALS~1\Temp\doc10_combined_image_3.jpg">
<img src="C:\DOCUME~1\sandeep\LOCALS~1\Temp\doc10_combined_image_4.jpg">
29. Which of the following is CORRECTLY matched?
A. nucleolus : protein synthesis
AFTER ASSOCIATE IMAGES
28. You can inject a small dye into cells and by light
microscopy observe the dye. Which of the
following illustrates cells from a tissue that forms
gap junctions?
<img src="C:\DOCUME~1\sandeep\LOCALS~1\Temp\doc10_combined_image_1.jpg">
<img src="C:\DOCUME~1\sandeep\LOCALS~1\Temp\doc10_combined_image_2.jpg">
<img src="C:\DOCUME~1\sandeep\LOCALS~1\Temp\doc10_combined_image_3.jpg">
<img src="C:\DOCUME~1\sandeep\LOCALS~1\Temp\doc10_combined_image_4.jpg">29. Which of the following is CORRECTLY matched?
A. nucleolus : protein synthesis
AFTER COMBINE AND SPLIT
28. You can inject a small dye into cells and by light
microscopy observe the dye. Which of the
following illustrates cells from a tissue that forms
gap junctions?
<img src="C:\DOCUME~1\sandeep\LOCALS~1\Temp\doc10_combined_image_1.jpg">
<img src="C:\DOCUME~1\sandeep\LOCALS~1\Temp\doc10_combined_image_2.jpg">
<img src="C:\DOCUME~1\sandeep\LOCALS~1\Temp\doc10_combined_image_3.jpg">
<img src="C:\DOCUME~1\sandeep\LOCALS~1\Temp\doc10_combined_image_4.jpg">29. Which of the following is CORRECTLY matched?
A. nucleolus : protein synthesis
----------------- END OF SAMPLE ---------------------
Updated by Sandeep Namilikonda over 15 years ago
Handling images being a part of the choices of a mutiple-choice question type has been problematic as is the case with doc10.pdf. But, I do not seem to get the exception that this bug was reported for. Hence, I am updating the status on this one to "Works for me".
This bug is related to 3924 as the cause of the two bugs boils down to incorrect association of vector images selected by the user when those images are choices!