Project

General

Profile

Actions

Bug #3969

closed

Choices may be deleted due to indentation! (parser issue)

Added by Sandeep Namilikonda about 15 years ago. Updated about 15 years ago.

Status:
Resolved
Priority:
Normal
Category:
client
Target version:
Start date:
04/10/2009
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
3969

Description

While parsing "Fall 02-Exam2.pdf", I noticed that q44 was being misclassified as a short-answer question when it is actually a true/false question. During my debugging process I discovered that one of the choices was being deleted in
separateQuestions() function due to some logic that checks for the indentation between the a line of text (say, a question) and the subsequent line (may be a new line of the same question or a choice or a new question). The specific case I encountered was:

line 219:

44. The unique contribution of Rosiland Franklin to the structure of DNA was that the diameter of DNA

line 220:

was not uniform throughout the length of the molecule.

line 221:

A. True

line 222:

B. False

In this example, line 221 was just being removed by the following piece of code:

if(indented && current.getBbox().x < question.getBbox().x){
// it's indented to the left, so probably a new question
doc.remove(i);
i--;

Actions #1

Updated by Sandeep Namilikonda about 15 years ago

Previously, the logic of condition check was based on the assumption that only a new question would satisfy the condition. Since I found a case of a line of text (answer choice with bounding box starting at an X coordinate less than that of the question text) that fails the test, I updated the test to check if the content corresponds to a choice and if so, append it to the question text!

Actions #2

Updated by Redmine Admin about 11 years ago

Original Bugzilla ID was 3969

Actions

Also available in: Atom PDF