Skip to content

Commit

Permalink
Minor fixes:
Browse files Browse the repository at this point in the history
- Fix layout issues, particularly on mobiles (columns, model answer, text video)
- Make several properties on gap fill page conditional so they only appear when relevant
  • Loading branch information
FayCross committed Nov 16, 2022
1 parent 0378b3d commit 12e2558
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 14 deletions.
Expand Up @@ -23,7 +23,7 @@
border-top: 0px;
}

#columnHolder.mobile .column {
#columnHolder.mobile .column:not(:first-of-type) {
margin-top: 10px;
border-top: 1px solid gray;
}
Expand Down
Expand Up @@ -28,7 +28,8 @@

#answerTxt {
display: block;
width: 95%;
width: 100%;
box-sizing: border-box;
resize: vertical;
margin: 0.5em auto;
}
Expand Down
Expand Up @@ -26,4 +26,9 @@
width: 100%;
height: 100%;
}

.x_mobile .mobileAlign .panel.inline {
margin-left: 0;
margin-right: 0;
}

Expand Up @@ -48,6 +48,10 @@
maxH = $x_pageHolder.height() - ($x_pageDiv.outerHeight() - $x_pageDiv.height()) - ($('.x_floatRight').outerHeight() - $('.x_floatRight').height());

var width = $x_pageDiv.width() * maxW;
// make sure width of video isn't more than screen width when padding & margin on panel are accounted for
if (width > $x_pageDiv.width() - ($pageVideo.parent('.panel').outerWidth(true) - $pageVideo.parent('.panel').width())) {
width -= ($pageVideo.parent('.panel').outerWidth(true) - $pageVideo.parent('.panel').width());
}
var height = (width / ratio);

if (x_browserInfo.mobile != true && height > maxH) {
Expand Down
Expand Up @@ -3566,7 +3566,7 @@
<name label="Page Title" type="TextInput" wysiwyg="true"/>
<text label="Introductory Text" type="TextArea" height="100"/>
<passage label="Gap Fill Text" type="TextArea" height="150"/>
<interactivity label="Interactivity" options="Drag Drop,Fill in Blank,Drop Down Menu" type="ComboBox" data="Drag Drop,Fill in Blank,Drop Down Menu" defaultValue="Drag Drop" width="100"/>
<interactivity label="Interactivity" options="Drag Drop,Fill in Blank,Drop Down Menu" type="ComboBox" data="Drag Drop,Fill in Blank,Drop Down Menu" defaultValue="Drag Drop" width="100" conditionTrigger="true"/>
<feedback label="Feedback" type="TextArea" height="50"/>
<panelWidth label="Panel Width" options="Small,Medium,Large,Full" type="ComboBox" data="Small,Medium,Large,Full" defaultValue="Medium" width="100"/>

Expand All @@ -3584,10 +3584,10 @@
<mainDelimiter label="Marked Word" type="textInput" defaultValue="|" optional="true" tooltip="The character used to mark words for the exercise"/>
<answerDelimiter label="Correct Answer" type="textInput" defaultValue="," optional="true" tooltip="The character separating each correct answer, where there is more than one correct answer for a gap, e.g. |Doctor,Dr|"/>
<noiseDelimiter label="Distractor" type="textInput" defaultValue=" " optional="true" tooltip="The character used to separate distractors"/>
<dropDownDelimiter label="Drop Down Menu Option" type="textInput" defaultValue="/" optional="true" tooltip="The character separating the options that will appear within a drop down menu, e.g. |England/Scotland/Wales|, where the first in the list is the correct answer"/>
<dropDownDelimiter label="Drop Down Menu Option" type="textInput" defaultValue="/" condition="interactivity=='Drop Down Menu'" optional="true" tooltip="The character separating the options that will appear within a drop down menu, e.g. |England/Scotland/Wales|, where the first in the list is the correct answer"/>
</delimiters>

<dropDownSort label="Drop Down Menu Option Sort" options="Alphabetic,Random" type="ComboBox" data="alphabetic,random" defaultValue="alphabetic" width="100" optional="true"/>
<dropDownSort label="Drop Down Menu Option Sort" options="Alphabetic,Random" type="ComboBox" data="alphabetic,random" defaultValue="alphabetic" condition="interactivity=='Drop Down Menu'" width="100" optional="true"/>

<trackingWeight label="Tracking Score Weight (0=Off)" optional="true" type="textInput" width="120" defaultValue="1.0"/>
<noise label="Distractors" type="TextInput" height="50" optional="true" wysiwyg="false" defaultValue="Add list of distractor words separated by spaces" tooltip="A list of incorrect words to be used in Drop Down Menu or Drag Drop exercises"/>
Expand All @@ -3605,7 +3605,7 @@
<attemptsBeforeHint label="Attempts Before Hint" defaultValue="2" type="NumericStepper" min="0" max="10" step="1" width="100" optional="true"/>
</hints>

<casesensitive label="Case Sensitive" defaultValue="false" type="CheckBox" optional="true" tooltip="Treat fill in the gap exercise answers as case sensitive"/>
<casesensitive label="Case Sensitive" defaultValue="false" type="CheckBox" condition="interactivity=='Fill in Blank'" optional="true" tooltip="Treat fill in the gap exercise answers as case sensitive"/>

<narrate type="group" label="Narration" optional="true" tooltip="Add an audio player to the bottom of the page" common="true">
<narration label="Audio File" type="media" defaultValue="Select an Audio File" optional="true"/>
Expand Down
8 changes: 4 additions & 4 deletions src/Nottingham/wizards/en-GB/gapFill.xwd
Expand Up @@ -11,7 +11,7 @@
<name label="Page Title" type="TextInput" wysiwyg="true"/>
<text label="Introductory Text" type="TextArea" height="100"/>
<passage label="Gap Fill Text" type="TextArea" height="150"/>
<interactivity label="Interactivity" options="Drag Drop,Fill in Blank,Drop Down Menu" type="ComboBox" data="Drag Drop,Fill in Blank,Drop Down Menu" defaultValue="Drag Drop" width="100"/>
<interactivity label="Interactivity" options="Drag Drop,Fill in Blank,Drop Down Menu" type="ComboBox" data="Drag Drop,Fill in Blank,Drop Down Menu" defaultValue="Drag Drop" width="100" conditionTrigger="true"/>
<feedback label="Feedback" type="TextArea" height="50"/>
<panelWidth label="Panel Width" options="Small,Medium,Large,Full" type="ComboBox" data="Small,Medium,Large,Full" defaultValue="Medium" width="100"/>

Expand All @@ -29,10 +29,10 @@
<mainDelimiter label="Marked Word" type="textInput" defaultValue="|" optional="true" tooltip="The character used to mark words for the exercise"/>
<answerDelimiter label="Correct Answer" type="textInput" defaultValue="," optional="true" tooltip="The character separating each correct answer, where there is more than one correct answer for a gap, e.g. |Doctor,Dr|"/>
<noiseDelimiter label="Distractor" type="textInput" defaultValue=" " optional="true" tooltip="The character used to separate distractors"/>
<dropDownDelimiter label="Drop Down Menu Option" type="textInput" defaultValue="/" optional="true" tooltip="The character separating the options that will appear within a drop down menu, e.g. |England/Scotland/Wales|, where the first in the list is the correct answer"/>
<dropDownDelimiter label="Drop Down Menu Option" type="textInput" defaultValue="/" condition="interactivity=='Drop Down Menu'" optional="true" tooltip="The character separating the options that will appear within a drop down menu, e.g. |England/Scotland/Wales|, where the first in the list is the correct answer"/>
</delimiters>

<dropDownSort label="Drop Down Menu Option Sort" options="Alphabetic,Random" type="ComboBox" data="alphabetic,random" defaultValue="alphabetic" width="100" optional="true" />
<dropDownSort label="Drop Down Menu Option Sort" options="Alphabetic,Random" type="ComboBox" data="alphabetic,random" defaultValue="alphabetic" condition="interactivity=='Drop Down Menu'" width="100" optional="true" />

<trackingWeight label="Tracking Score Weight (0=Off)" optional="true" type="textInput" width="120" defaultValue="1.0" />
<noise label="Distractors" type="TextInput" height="50" optional="true" wysiwyg="false" defaultValue="Add list of distractor words separated by spaces" tooltip="A list of incorrect words to be used in Drop Down Menu or Drag Drop exercises"/>
Expand All @@ -50,7 +50,7 @@
<attemptsBeforeHint label="Attempts Before Hint" defaultValue="2" type="NumericStepper" min="0" max="10" step="1" width="100" optional="true" />
</hints>

<casesensitive label="Case Sensitive" defaultValue="false" type="CheckBox" optional="true" tooltip="Treat fill in the gap exercise answers as case sensitive"/>
<casesensitive label="Case Sensitive" defaultValue="false" type="CheckBox" condition="interactivity=='Fill in Blank'" optional="true" tooltip="Treat fill in the gap exercise answers as case sensitive"/>

</gapFill>

Expand Down
8 changes: 4 additions & 4 deletions src/Nottingham/wizards/en-GB/template.xwd
Expand Up @@ -3566,7 +3566,7 @@
<name label="Page Title" type="TextInput" wysiwyg="true"/>
<text label="Introductory Text" type="TextArea" height="100"/>
<passage label="Gap Fill Text" type="TextArea" height="150"/>
<interactivity label="Interactivity" options="Drag Drop,Fill in Blank,Drop Down Menu" type="ComboBox" data="Drag Drop,Fill in Blank,Drop Down Menu" defaultValue="Drag Drop" width="100"/>
<interactivity label="Interactivity" options="Drag Drop,Fill in Blank,Drop Down Menu" type="ComboBox" data="Drag Drop,Fill in Blank,Drop Down Menu" defaultValue="Drag Drop" width="100" conditionTrigger="true"/>
<feedback label="Feedback" type="TextArea" height="50"/>
<panelWidth label="Panel Width" options="Small,Medium,Large,Full" type="ComboBox" data="Small,Medium,Large,Full" defaultValue="Medium" width="100"/>

Expand All @@ -3584,10 +3584,10 @@
<mainDelimiter label="Marked Word" type="textInput" defaultValue="|" optional="true" tooltip="The character used to mark words for the exercise"/>
<answerDelimiter label="Correct Answer" type="textInput" defaultValue="," optional="true" tooltip="The character separating each correct answer, where there is more than one correct answer for a gap, e.g. |Doctor,Dr|"/>
<noiseDelimiter label="Distractor" type="textInput" defaultValue=" " optional="true" tooltip="The character used to separate distractors"/>
<dropDownDelimiter label="Drop Down Menu Option" type="textInput" defaultValue="/" optional="true" tooltip="The character separating the options that will appear within a drop down menu, e.g. |England/Scotland/Wales|, where the first in the list is the correct answer"/>
<dropDownDelimiter label="Drop Down Menu Option" type="textInput" defaultValue="/" condition="interactivity=='Drop Down Menu'" optional="true" tooltip="The character separating the options that will appear within a drop down menu, e.g. |England/Scotland/Wales|, where the first in the list is the correct answer"/>
</delimiters>

<dropDownSort label="Drop Down Menu Option Sort" options="Alphabetic,Random" type="ComboBox" data="alphabetic,random" defaultValue="alphabetic" width="100" optional="true"/>
<dropDownSort label="Drop Down Menu Option Sort" options="Alphabetic,Random" type="ComboBox" data="alphabetic,random" defaultValue="alphabetic" condition="interactivity=='Drop Down Menu'" width="100" optional="true"/>

<trackingWeight label="Tracking Score Weight (0=Off)" optional="true" type="textInput" width="120" defaultValue="1.0"/>
<noise label="Distractors" type="TextInput" height="50" optional="true" wysiwyg="false" defaultValue="Add list of distractor words separated by spaces" tooltip="A list of incorrect words to be used in Drop Down Menu or Drag Drop exercises"/>
Expand All @@ -3605,7 +3605,7 @@
<attemptsBeforeHint label="Attempts Before Hint" defaultValue="2" type="NumericStepper" min="0" max="10" step="1" width="100" optional="true"/>
</hints>

<casesensitive label="Case Sensitive" defaultValue="false" type="CheckBox" optional="true" tooltip="Treat fill in the gap exercise answers as case sensitive"/>
<casesensitive label="Case Sensitive" defaultValue="false" type="CheckBox" condition="interactivity=='Fill in Blank'" optional="true" tooltip="Treat fill in the gap exercise answers as case sensitive"/>

<narrate type="group" label="Narration" optional="true" tooltip="Add an audio player to the bottom of the page" common="true">
<narration label="Audio File" type="media" defaultValue="Select an Audio File" optional="true"/>
Expand Down

0 comments on commit 12e2558

Please sign in to comment.