Skip to content

Commit

Permalink
Fix #895 added tracking score weight to model answer and removed feed…
Browse files Browse the repository at this point in the history
…back text from being tracked as correct answer
  • Loading branch information
FayCross committed Mar 10, 2023
1 parent 016fae2 commit be73fe7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
Expand Up @@ -104,11 +104,9 @@
{
this.weighting = x_currentPageXML.getAttribute("trackingWeight");
}

XTSetPageType(x_currentPage, 'numeric', 1, this.weighting);

var modelAnswerTxt = $('<div>').html(x_currentPageXML.getAttribute("feedback")).text();
XTEnterInteraction(x_currentPage, 0, 'text', label, [], modelAnswerTxt, [], x_currentPageXML.getAttribute("grouping"));
XTEnterInteraction(x_currentPage, 0, 'text', label, [], '-', [], x_currentPageXML.getAttribute("grouping"));

// feedbackBtnWidth attribute not used as button will be sized automatically
var panelWidth = x_currentPageXML.getAttribute("panelWidth"),
Expand Down
Expand Up @@ -6270,6 +6270,8 @@
<feedback label="Feedback" type="TextArea" height="100"/>
<panelWidth label="Panel Width" options="Small,Medium,Large,Full" type="ComboBox" data="Small,Medium,Large,Full" defaultValue="Medium" width="100"/>
<align label="Align Text" options="Left,Right" type="ComboBox" data="Left,Right" defaultValue="Left" width="100"/>

<trackingWeight label="Tracking Score Weight (0=Off)" optional="true" type="textInput" width="120" defaultValue="1.0"/>

<feedbackBtnTxt label="Check Button Label" type="TextInput" wysiwyg="true" divider="true" language="true"/>
<feedbackBtnTip label="Check Button Tip" type="textInput" language="true" deprecated="This property is no longer required"/>
Expand Down
2 changes: 1 addition & 1 deletion src/Nottingham/wizards/en-GB/modelAnswer.xwd
@@ -1 +1 @@
<wizard menus="Interactivity"> <pageWizard remove="true" duplicate="false"> <newNodes> <modelAnswer><![CDATA[<modelAnswer name="Enter Page Title" text="Enter text for the page here" prompt="Enter prompt here" feedback="Enter feedback here" panelWidth="Medium" align="left" feedbackBtnTxt="Feedback" instructHeaderATxt="The instruction and question on page" instructHeaderBTxt="was:" responseHeaderTxt="Your response was:" noAnswerHeaderTxt="You didn't answer this question." exampleHeaderTxt="The example answer was:" copyBtnLabel="Select Text" copyShortcutTxt="Press Ctrl + C to copy" answerFieldLabel="Answer" />]]></modelAnswer> </newNodes> </pageWizard> <!-- MODEL ANSWER INTERACTION========================= --> <modelAnswer menu="Interactivity" menuItem="Model Answer" hint="A text entry interaction, with feedback and the option to paste the response to clipboard." icon="icPageWhiteEdit" thumb="thumbs/modelAnswer.jpg" example="https://xot.xerte.org.uk/play_116?hide=bottom#modelanswer" wiki="https://xerte.org.uk/wiki/doku.php?id=interactivity_model_answer_page" remove="true"> <name label="Page Title" type="TextInput" wysiwyg="true"/> <text label="Page Text" type="TextArea" height="100"/> <prompt label="Prompt" type="TextArea" height="100"/> <feedback label="Feedback" type="TextArea" height="100"/> <panelWidth label="Panel Width" options="Small,Medium,Large,Full" type="ComboBox" data="Small,Medium,Large,Full" defaultValue="Medium" width="100"/> <align label="Align Text" options="Left,Right" type="ComboBox" data="Left,Right" defaultValue="Left" width="100"/> <feedbackBtnTxt label="Check Button Label" type="TextInput" wysiwyg="true" divider="true" language="true"/> <feedbackBtnTip label="Check Button Tip" type="textInput" language="true" deprecated="This property is no longer required"/> <feedbackBtnWidth label="Check Button Width" type="NumericStepper" min="80" max="250" step="10" width="100" defaultValue="100" language="true" deprecated="Width is now set automatically"/> <instructHeaderATxt label="Instruction Header (a)" type="TextInput" wysiwyg="true" language="true"/> <instructHeaderBTxt label="Instruction Header (b)" type="TextInput" wysiwyg="true" language="true"/> <responseHeaderTxt label="Response Header" type="TextInput" wysiwyg="true" language="true"/> <noAnswerHeaderTxt label="No Answer Header" type="TextInput" wysiwyg="true" language="true"/> <exampleHeaderTxt label="Example Header" type="TextInput" wysiwyg="true" language="true"/> <copyBtnLabel label="Select Button Label" type="TextInput" wysiwyg="true" language="true"/> <copyShortcutTxt label="Copy Shortcut Text" type="TextInput" wysiwyg="true" language="true"/> <answerFieldLabel label="Answer Field Hidden Aria-Label" type="TextInput" wysiwyg="false" language="true" mandatory="true" defaultValue="Answer" tooltip="This is a hidden label specifically for screen reader users so that the text field where they should respond is labelled and the label is spoken to the screenreader user. e.g. Answer."/> <copypasteinfo label="Copy and Paste Info (Flash)" defaultValue="Note: the instruction and question, your response and the example answer, have been copied to the clipboard which you can paste (ctrl + v) into another application such as Open Office, Word or an email to save for future reference." type="TextArea" height="50" optional="true" deprecated="This property is no longer required" /> <copypasteinfo2 label="Copy and Paste Info" defaultValue="Note: Click the 'Select Text' button to highlight the instruction, question, your response and the example answer and then Ctrl + C to copy this text to the clipboard. You can then paste (Ctrl + V) into another application such as Open Office, Word or an email to save for future reference." type="TextArea" height="50" optional="true"/> <label label="Button Label" defaultValue="deprecated - for backward compatibility only" type="TextInput" wysiwyg="true" optional="true" deprecated="This property is no longer required"/> <required label="Answer Required Before Feedback" type="CheckBox" optional="true" defaultValue="true" /> <imgInfo type="group" label="Image" optional="true"> <image label="Image" type="media" optional="true" defaultValue="Select an Image"/> <tooltip label="Image Description" type="TextInput" optional="true" defaultValue="" placeholder="Enter a description for accessibility"/> </imgInfo> </modelAnswer></wizard>
<wizard menus="Interactivity"> <pageWizard remove="true" duplicate="false"> <newNodes> <modelAnswer><![CDATA[<modelAnswer name="Enter Page Title" text="Enter text for the page here" prompt="Enter prompt here" feedback="Enter feedback here" panelWidth="Medium" align="left" feedbackBtnTxt="Feedback" instructHeaderATxt="The instruction and question on page" instructHeaderBTxt="was:" responseHeaderTxt="Your response was:" noAnswerHeaderTxt="You didn't answer this question." exampleHeaderTxt="The example answer was:" copyBtnLabel="Select Text" copyShortcutTxt="Press Ctrl + C to copy" answerFieldLabel="Answer" />]]></modelAnswer> </newNodes> </pageWizard> <!-- MODEL ANSWER INTERACTION========================= --> <modelAnswer menu="Interactivity" menuItem="Model Answer" hint="A text entry interaction, with feedback and the option to paste the response to clipboard." icon="icPageWhiteEdit" thumb="thumbs/modelAnswer.jpg" example="https://xot.xerte.org.uk/play_116?hide=bottom#modelanswer" wiki="https://xerte.org.uk/wiki/doku.php?id=interactivity_model_answer_page" remove="true"> <name label="Page Title" type="TextInput" wysiwyg="true"/> <text label="Page Text" type="TextArea" height="100"/> <prompt label="Prompt" type="TextArea" height="100"/> <feedback label="Feedback" type="TextArea" height="100"/> <panelWidth label="Panel Width" options="Small,Medium,Large,Full" type="ComboBox" data="Small,Medium,Large,Full" defaultValue="Medium" width="100"/> <align label="Align Text" options="Left,Right" type="ComboBox" data="Left,Right" defaultValue="Left" width="100"/> <trackingWeight label="Tracking Score Weight (0=Off)" optional="true" type="textInput" width="120" defaultValue="1.0" /> <feedbackBtnTxt label="Check Button Label" type="TextInput" wysiwyg="true" divider="true" language="true"/> <feedbackBtnTip label="Check Button Tip" type="textInput" language="true" deprecated="This property is no longer required"/> <feedbackBtnWidth label="Check Button Width" type="NumericStepper" min="80" max="250" step="10" width="100" defaultValue="100" language="true" deprecated="Width is now set automatically"/> <instructHeaderATxt label="Instruction Header (a)" type="TextInput" wysiwyg="true" language="true"/> <instructHeaderBTxt label="Instruction Header (b)" type="TextInput" wysiwyg="true" language="true"/> <responseHeaderTxt label="Response Header" type="TextInput" wysiwyg="true" language="true"/> <noAnswerHeaderTxt label="No Answer Header" type="TextInput" wysiwyg="true" language="true"/> <exampleHeaderTxt label="Example Header" type="TextInput" wysiwyg="true" language="true"/> <copyBtnLabel label="Select Button Label" type="TextInput" wysiwyg="true" language="true"/> <copyShortcutTxt label="Copy Shortcut Text" type="TextInput" wysiwyg="true" language="true"/> <answerFieldLabel label="Answer Field Hidden Aria-Label" type="TextInput" wysiwyg="false" language="true" mandatory="true" defaultValue="Answer" tooltip="This is a hidden label specifically for screen reader users so that the text field where they should respond is labelled and the label is spoken to the screenreader user. e.g. Answer."/> <copypasteinfo label="Copy and Paste Info (Flash)" defaultValue="Note: the instruction and question, your response and the example answer, have been copied to the clipboard which you can paste (ctrl + v) into another application such as Open Office, Word or an email to save for future reference." type="TextArea" height="50" optional="true" deprecated="This property is no longer required" /> <copypasteinfo2 label="Copy and Paste Info" defaultValue="Note: Click the 'Select Text' button to highlight the instruction, question, your response and the example answer and then Ctrl + C to copy this text to the clipboard. You can then paste (Ctrl + V) into another application such as Open Office, Word or an email to save for future reference." type="TextArea" height="50" optional="true"/> <label label="Button Label" defaultValue="deprecated - for backward compatibility only" type="TextInput" wysiwyg="true" optional="true" deprecated="This property is no longer required"/> <required label="Answer Required Before Feedback" type="CheckBox" optional="true" defaultValue="true" /> <imgInfo type="group" label="Image" optional="true"> <image label="Image" type="media" optional="true" defaultValue="Select an Image"/> <tooltip label="Image Description" type="TextInput" optional="true" defaultValue="" placeholder="Enter a description for accessibility"/> </imgInfo> </modelAnswer></wizard>
Expand Down
2 changes: 2 additions & 0 deletions src/Nottingham/wizards/en-GB/template.xwd
Expand Up @@ -6270,6 +6270,8 @@
<feedback label="Feedback" type="TextArea" height="100"/>
<panelWidth label="Panel Width" options="Small,Medium,Large,Full" type="ComboBox" data="Small,Medium,Large,Full" defaultValue="Medium" width="100"/>
<align label="Align Text" options="Left,Right" type="ComboBox" data="Left,Right" defaultValue="Left" width="100"/>

<trackingWeight label="Tracking Score Weight (0=Off)" optional="true" type="textInput" width="120" defaultValue="1.0"/>

<feedbackBtnTxt label="Check Button Label" type="TextInput" wysiwyg="true" divider="true" language="true"/>
<feedbackBtnTip label="Check Button Tip" type="textInput" language="true" deprecated="This property is no longer required"/>
Expand Down

0 comments on commit be73fe7

Please sign in to comment.