Solution: [Xerte] How to handle wrong text entries
Patrick Lockley
Patrick.Lockley at nottingham.ac.uk
Wed Apr 15 12:50:50 BST 2009
If you’re using the page model method, you could make a new model and distribute?
From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Peter Huppertz
Sent: 15 April 2009 12:34
To: Xerte discussion list
Subject: Solution: [Xerte] How to handle wrong text entries
Just if some else needs this:
I created another event in mainInteraction which listens for onClosePage. If the page is closed a script is called containing the following code:
gapXML=gapInt.XMLElement; //ID of the main interaction
for(i=0; i<gapXML.childNodes.length; i++){
if(gapXML.childNodes[i].attributes.type == "textEntry"){ //check if we have a text entry element
if(gapXML.childNodes[i].attributes.phrase == gapXML.childNodes[i].clip().text){ //check if the text of text entry is equal to the phrase you want
debug("correct"); //do something with this information.
}
}
}
I'm going to add the functionality for case sensitivity and than, hopefully I'm done ... so less code, so much time.
Peter
From:
Patrick Lockley <Patrick.Lockley at nottingham.ac.uk>
To:
"Xerte discussion list" <xerte at lists.nottingham.ac.uk>
Date:
15.04.2009 12:36
Subject:
RE: [Xerte] How to handle wrong text entries
Sent by:
xerte-bounces at lists.nottingham.ac.uk
________________________________
You’ve reached the end of my knowledge at this point.
When xerte creates the textfields when the pages opens, is it possible to store a reference to them in an array – loop over that later?
From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk <mailto:xerte-bounces at lists.nottingham.ac.uk> ] On Behalf Of Peter Huppertz
Sent: 15 April 2009 11:17
To: Xerte discussion list
Subject: RE: [Xerte] How to handle wrong text entries
Yes, I could add an onPageClose event and evaluate the answers than. I can get the correct answers reading the phrase attribute, but how can I get the values of the textfields (gaps).
Peter
From:
Patrick Lockley <Patrick.Lockley at nottingham.ac.uk>
To:
"Xerte discussion list" <xerte at lists.nottingham.ac.uk>
Date:
15.04.2009 11:51
Subject:
RE: [Xerte] How to handle wrong text entries
Sent by:
xerte-bounces at lists.nottingham.ac.uk
________________________________
Maybe change how it works – don’t evaluate the answers until you have to, then check the answers?
From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte-bounces at lists.nottingham.ac.uk <mailto:xerte-bounces at lists.nottingham.ac.uk> ] On Behalf Of Peter Huppertz
Sent: 15 April 2009 10:28
To: Xerte discussion list
Subject: RE: [Xerte] How to handle wrong text entries
Hi Patrick,
see my remarks below:
xerte-bounces at lists.nottingham.ac.uk wrote on 15.04.2009 11:15:03:
> From:
>
> Patrick Lockley <Patrick.Lockley at nottingham.ac.uk>
>
> To:
>
> "Xerte discussion list" <xerte at lists.nottingham.ac.uk>
>
> Date:
>
> 15.04.2009 11:20
>
> Subject:
>
> RE: [Xerte] How to handle wrong text entries
>
> Sent by:
>
> xerte-bounces at lists.nottingham.ac.uk
>
> Why not static the text field once the answer is correct?
I can do that, if there is no other solution. But making the TextField static would already be an (unwanted) feedback.
> Or give it a property called correct and once that is true don’t add
> any more scores?
I can do that, but I have to reset this property, if the user changes his mind and thus changes the content of the gap. How can I detect this?
>
> I’m not that good at xwd stuff so I am not sure how easy that is.
I think the xwd side of things is OK (so I can set the property to disable the feedback and can get the value in Xerte).
Peter
>
> From: xerte-bounces at lists.nottingham.ac.uk [mailto:xerte- <mailto:xerte->
> bounces at lists.nottingham.ac.uk] On Behalf Of Peter Huppertz
> Sent: 15 April 2009 08:35
> To: xerte at lists.nottingham.ac.uk
> Subject: [Xerte] How to handle wrong text entries
>
> Dear List,
>
> I use the Nottingham template as a base for my modifications. The
> template includes a gap fill exercise which uses the textEntry icon.
> I want to expand the template to include scoring for right and wrong
> fills. Also I want to disable the feedback, because the exercise is
> used for a placement test. The only feedback is shown at the end of
> the test like "You answered xx of yy questions correct".
> This is what I did:
> - changed the .xwd to contain a checkbox for "Disable Feedback"
> - modified the gapfill.rml not to change the type of the textfield
> (from input to dynamic) if the above option is enabled (I don't want
> to have the feedback) and disabled the feedback message
> - added a score variable to the script which is played when the
> entered text of the textEntry matches the phrase
> This works all fine but I still have a problem:
> - If the user fills in the correct phrase and than changes the entry
> again it is still considered as correct. Even worse: if the user
> changes the entry again to the correct value the answer is counted again.
> So my question is: How can I detect if the user changes the text
> entry to a wrong value? Or perhaps there is another solution for my
> problem I haven't thought of?
>
> Peter_______________________________________________
> Xerte mailing list
> Xerte at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte <http://lists.nottingham.ac.uk/mailman/listinfo/xerte> _______________________________________________
Xerte mailing list
Xerte at lists.nottingham.ac.uk
http://lists.nottingham.ac.uk/mailman/listinfo/xerte <http://lists.nottingham.ac.uk/mailman/listinfo/xerte>
_______________________________________________
Xerte mailing list
Xerte at lists.nottingham.ac.uk
http://lists.nottingham.ac.uk/mailman/listinfo/xerte <http://lists.nottingham.ac.uk/mailman/listinfo/xerte>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20090415/cb89f3ea/attachment.html
More information about the Xerte
mailing list