Lectora X to 11 - quiz problems

A course created in Lectora X contains 15 questions, passing score is 100. After completing, it goes to a summary page, which displays score (text box -> modify contents -> Test_1_Score).


When I opened it in Lectora 11 and tested in Preview, it worked perfectly. However, when published to HTML, it shows only 93 out of 100 when all questions are answered correctly.


I even added 15 text boxes with actions that indicate questions status (on show -> modify contents -> "ok" IF question1 is correct), and it clearly displays that 15 out of 15 questions are graded as correct. All questions have 1 point value. And still, only 93% score in the test.


When creating an similar 15-question test from scratch in Lectora 11, it works fine in preview and in html.


What could be the problem? Thank you...

Discussion (12)

@adb 51011 wrote:

This problem seems to be caused by Lectora corrupting parts of questions and answers when the RTF text of a question or answer contains certain character. Below is the technical info on what's going on.


In the AWT file, there are 2 XML elements that represent a question and each of the answers. e.g. there is a element which contains just the text of the question and an element that contains an answer. However, the data that is shown in the UI comes from the element and there is one of these per text element.


I found a bug with Lectora's handling of non-breaking spaces in RTF (~). I wrote a program to automate quiz creation, which builds the quiz automatically in the AWT file from an external file. We have certain rules for preventing wrapping of text, so I add non breaking spaces in the element according to these rules and just a simple space in the or elements. Everything is fine, unless you edit and save the course in the Lectora UI. Lectora will then reconvert the RTF to text and overwrite the and elements. Unfortunately, it does not cope with these RTF non breaking space characters and creates a 'note' character instead of a space.


The very odd thing is that it DOES handle the nbsp character in the question text and as a result puts into the element, however, when doing the same thing in the answer text it does not do it, instead it puts  into the element. This happens to be an invalid XML sequence too. Anyway, it's this character that then shows up as the note character in the question editor in the Lectora UI.


I raised a bug about this in Feb 2013, but was basically told that there was nothing that [w]could be done. I gave all the evidence to demonstrate the simple problem, but no fix and was told there is no timescale to fix it. I only found out today that this is causing score problems.



Thanks for the technical description. Very helpful.

I had a similar problem to this yesterday. Even tried a similar approach to check each question was scoring correctly. the problem I had was that I identified that each question was scoring correctly, but the test was including a question from earlier in the course as being part of the test. As it happens I wanted to remove the offending a article anyway so deleting it resolved the issue.


Is it possible that a question is being included from elsewhere? if your 15 questions are scoring correctly but it is giving 93% is it possible it is scoring 15 out of 16 and rounding score down to 93? I discovered the error on my course by turning on the Show Test Results in the results tab and taking the test.


Your issue is slightly different to the one I faced but the solution may be similar?


Good luck with it!

Thanks Rhys, adding 'Display results' window was a good idea.


Unfortunately, everything shows up normal - 15 questions as expected (of course this type of mistake would manifest itself in preview mode as well). What puzzles me is that my bug only shows up in html publish, not preview. This obviously points to a bug.


More ideas are really welcome.


:(

I once had a similar problem: on a customized results page, that was set to display only incorrectly answered questions, some questions were displayed although all answers were correct. Test score was <100%. I could solve that by removing all double quotes " from question text and from all answers.


Tim

I had a similar issue when I had a line break (Shirft+Enter) in question answer.

Hello everyone,

first of all, I really appreciate everyone's support.


It turns out that Tim and Ummakumma were almost right. One of the answer choices had a strange character in it. It can only be seen in the "Edit question" dialog, nowhere else (not in Preview, not in HTML). See screenshot (the damn forum won't allow to attach a perfectly good 5Kb PNG file, why???) -- https://dl.dropboxusercontent.com/u/11433463/trivantis/bugg.png


I removed it and it works fine. Yay! :cool: (Boo Trivantis! Didn't you learn about sanitizing input?)

Thanks, I checked for both double-quotes and shift-enter breaks... None. We'll probably just rebuild the test in Lectora 11 from scratch.

Just another thought...


Is it worth building a brandnew course and copying just the test over into it to see if it behaves in the same way.


It could also be worth going through the questions and deleting one question at a time and running the test seeing if it performs correctly, then reintroducing that question and try deleting another question to see that identifies the offending article.

@ssneg 50390 wrote:

One of the answer choices had a strange character in it. It can only be seen in the "Edit question" dialog, nowhere else (not in Preview, not in HTML). See screenshot (the damn forum won't allow to attach a perfectly good 5Kb PNG file, why???) -- https://dl.dropboxusercontent.com/u/11433463/trivantis/bugg.png


I removed it and it works fine. Yay! :cool: (Boo Trivantis! Didn't you learn about sanitizing input?)



This problem seems to be caused by Lectora corrupting parts of questions and answers when the RTF text of a question or answer contains certain character. Below is the technical info on what's going on.


In the AWT file, there are 2 XML elements that represent a question and each of the answers. e.g. there is a element which contains just the text of the question and an element that contains an answer. However, the data that is shown in the UI comes from the element and there is one of these per text element.


I found a bug with Lectora's handling of non-breaking spaces in RTF (~). I wrote a program to automate quiz creation, which builds the quiz automatically in the AWT file from an external file. We have certain rules for preventing wrapping of text, so I add non breaking spaces in the element according to these rules and just a simple space in the or elements. Everything is fine, unless you edit and save the course in the Lectora UI. Lectora will then reconvert the RTF to text and overwrite the and elements. Unfortunately, it does not cope with these RTF non breaking space characters and creates a 'note' character instead of a space.


The very odd thing is that it DOES handle the nbsp character in the question text and as a result puts into the element, however, when doing the same thing in the answer text it does not do it, instead it puts  into the element. This happens to be an invalid XML sequence too. Anyway, it's this character that then shows up as the note character in the question editor in the Lectora UI.


I raised a bug about this in Feb 2013, but was basically told that there was nothing that [w]could be done. I gave all the evidence to demonstrate the simple problem, but no fix and was told there is no timescale to fix it. I only found out today that this is causing score problems.

@ssneg 50390 wrote:

One of the answer choices had a strange character in it. It can only be seen in the "Edit question" dialog, nowhere else (not in Preview, not in HTML). See screenshot (the damn forum won't allow to attach a perfectly good 5Kb PNG file, why???) -- https://dl.dropboxusercontent.com/u/11433463/trivantis/bugg.png


I removed it and it works fine. Yay! :cool: (Boo Trivantis! Didn't you learn about sanitizing input?)


This problem seems to be caused by Lectora corrupting parts of questions and answers when the RTF text of a question or answer contains certain character. Below is the technical info on what's going on.


In the AWT file, there are 2 XML elements that represent a question and each of the answers. e.g. there is a element which contains just the text of the question and an element that contains an answer. However, the data that is shown in the UI comes from the element and there is one of these per text element.


I found a bug with Lectora's handling of non-breaking spaces in RTF (~). I wrote a program to automate quiz creation, which builds the quiz automatically in the AWT file from an external file. We have certain rules for preventing wrapping of text, so I add non breaking spaces in the element according to these rules and just a simple space in the or elements. Everything is fine, unless you edit and save the course in the Lectora UI. Lectora will then reconvert the RTF to text and overwrite the and elements. Unfortunately, it does not cope with these RTF non breaking space characters and creates a 'note' character instead of a space.


The very odd thing is that it DOES handle the nbsp character in the question text and as a result puts into the element, however, when doing the same thing in the answer text it does not do it, instead it puts  into the element. This happens to be an invalid XML sequence too. Anyway, it's this character that then shows up as the note character in the question editor in the Lectora UI.


I raised a bug about this in Feb 2013, but was basically told that there was nothing that [w]could be done. I gave all the evidence to demonstrate the simple problem, but no fix and was told there is no timescale to fix it. I only found out today that this is causing score problems.

It's also been my experience that test results don't include all the questions when a module is published to HTML. This is giving me fits in one project, trying to get the proper results to display. Needs fixing!

An update with 11.3.2


Although this version contains a fix for


"Questions will now score properly when soft returns are used in the answer text.


it is now worse for any other character it doesn't like. Although the HTML answers are published correctly from the RTF, the values used to match the correct answers are based on the corrupted XML elements that have not converted the RTF correctly.


In the HTML page for the question, the Javascript for testing whether the match is correct is done from the functions


function Update_qu7766( upd )[/CODE]

where it contains the text as converted correctly to HTML from the RTF

and

[CODE]function action7793(fn){

if(VarQuestion_0010.isCorr('u0044u006F...'))[/CODE]

where it contains the text incorrectly converted from the RTF

NB: The above number 7766, 7793 are just internal object ID numbers, so will change.[CODE]function Update_qu7766( upd )[/CODE]


where it contains the text as converted correctly to HTML from the RTF


and


function action7793(fn){

if(VarQuestion_0010.isCorr('u0044u006F...'))[/CODE]

where it contains the text incorrectly converted from the RTF

NB: The above number 7766, 7793 are just internal object ID numbers, so will change.[CODE]function action7793(fn){

if(VarQuestion_0010.isCorr('u0044u006F...'))[/CODE]


where it contains the text incorrectly converted from the RTF


NB: The above number 7766, 7793 are just internal object ID numbers, so will change.

Discussions have been disabled for this post