Issue Details (XML | Word | Printable)

Key: MDL-6338
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Critical Critical
Assignee: Tim Hunt
Reporter: Joseph Rézeau
Votes: 0
Watchers: 0
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

Apostrophe problem in short answer questions

Created: 24/Aug/06 01:20 AM   Updated: 20/Sep/06 03:45 AM
Return to search
Component/s: Questions
Affects Version/s: 1.6
Fix Version/s: 1.6.2, 1.7

Participants: Joseph Rézeau, Nicolas Martignoni and Tim Hunt
Security Level: None
QA Assignee: Nicolas Martignoni
Resolved date: 29/Aug/06
Affected Branches: MOODLE_16_STABLE
Fixed Branches: MOODLE_16_STABLE, MOODLE_17_STABLE


 Description  « Hide
Question type = short answer. Expected student answer contains an apostrophe.
If student types expected answer correctly, when pressing Submit, the apostrophe is escaped; however, the answer is considered correct. When student further submits page, the apostrophe is again escaped, resulting in 3 backslashes added, and ... the answer is considered Incorrect.

Joseph



 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Tim Hunt made changes - 24/Aug/06 01:31 AM
Field Original Value New Value
Assignee Martin Dougiamas [ dougiamas ] Tim Hunt [ timhunt ]
Tim Hunt made changes - 24/Aug/06 01:31 AM
Status Open [ 1 ] In Progress [ 3 ]
tjhunt committed 1 file to 'Moodle CVS' - 24/Aug/06 03:04 AM
MDL-6338 - Short answer questions with ' in the answer don't work. Merged from MOODLE_16_STABLE.

Yet another unpleasant quiz bug caused by the current broken way we do things with addslashes.
MODIFY question/type/shortanswer/questiontype.php   Rev. 1.6    (+6 -6 lines)
Tim Hunt made changes - 24/Aug/06 03:05 AM
Status In Progress [ 3 ] Resolved [ 5 ]
Fix Version/s 1.7 [ 10120 ]
Fix Version/s 1.6.2 [ 10119 ]
Resolution Fixed [ 1 ]
Joseph Rézeau added a comment - 28/Aug/06 05:16 PM
The issue is indeed solved for the SHORTANSWER question type. Thanks.
Unfortunately the problem persists in a SHORTANSWER which is embedded in a CLOZE question, e.g.

Rewrite "the book of John" using a genitive {1:SHORTANSWER:~%100%John's book#ok}

When student enters "John's book", the displayed output is "John\'s book", with an added unwanted backslash. And each subsequent click on the Submit page button adds more backslashes...


Joseph Rézeau made changes - 28/Aug/06 05:16 PM
Status Resolved [ 5 ] Reopened [ 4 ]
Resolution Fixed [ 1 ]
Tim Hunt added a comment - 29/Aug/06 01:23 AM
If there are problems in CLOSE, then that is a separate bug. This report describes a problem with shortanswer that was entirely self-contained, and I fixed.

Let us keep it to one bug report per issue, so please can you create a new bug report for the CLOZE issue. Thanks, Tim.


Tim Hunt made changes - 29/Aug/06 01:23 AM
Resolution Fixed [ 1 ]
Status Reopened [ 4 ] Resolved [ 5 ]
Joseph Rézeau added a comment - 29/Aug/06 01:34 AM
OK, Tim, I've opened new bug MDL-6386

Joseph


Nicolas Martignoni added a comment - 20/Sep/06 03:45 AM
Works for short answer questions, closing

Nicolas Martignoni made changes - 20/Sep/06 03:45 AM
Status Resolved [ 5 ] Closed [ 6 ]
QA Assignee mina