|
| 1 | +<h2>Multiple Choice</h2> |
| 2 | + |
| 3 | + <ul data-component="multiplechoice" data-multipleanswers="true" data-random id="question-1"> |
| 4 | + The Question can go right here. |
| 5 | + |
| 6 | + <li data-component="answer" id="123" >Answer One</li> |
| 7 | + <li data-component="feedback" for="123">Feedback for One</li> |
| 8 | + |
| 9 | + <li data-component="answer" id="456">Answer Two</li> |
| 10 | + <li data-component="feedback" for="456">Feedback for Two</li> |
| 11 | + |
| 12 | + <li data-component="answer" id="789" data-correct>Answer Three</li> |
| 13 | + <li data-component="feedback" for="789">Feedback for Three</li> |
| 14 | + |
| 15 | + <li data-component="answer" id="1011" data-correct>Answer Four</li> |
| 16 | + <li data-component="feedback" for="1011">Feedback for Four</li> |
| 17 | + |
| 18 | + <li data-component="answer" id="1112" data-correct>Answer Five</li> |
| 19 | + <li data-component="feedback" for="1112">Feedback for Five</li> |
| 20 | + </ul> |
| 21 | + |
| 22 | +Here the <code>ul</code> tag represents the entire component to be rendered. |
| 23 | +Each 2 <code>li</code> answer/feedback pair represents a possible answer to the question and the feedback to be provided if that answer is selected. |
| 24 | + |
| 25 | +<ul> |
| 26 | + <li><code>data-component</code> identifies this as a multiple choice component</li> |
| 27 | + <li><code>class</code> Standard CSS class options </li> |
| 28 | + <li><code>id</code> must be unique in the document</li> |
| 29 | + <li><code>data-multipleanswers</code> REQUIRED Attribute. Possible values are true and false. Determines whether the question can take one or more answers on submission (radio vs checkbox).</li> |
| 30 | + <li><code>data-random</code> Randomizes the order that the possible answers are displayed on the page</li> |
| 31 | + <li><code>data-timed</code> Required if this MC question is inside of a timed assessment, will break things if not.</li> |
| 32 | + <br /> |
| 33 | + <p>Attributes of the question tags</p> |
| 34 | + <br /> |
| 35 | + <li><code>id</code> must be unique per MC component</li> |
| 36 | + <li><code>for</code> must match the id of the option that the feedback is for</li> |
| 37 | + <li><code>data-correct</code> indicates that this option is a correct answer. If <code>data-multipleanswers</code> is true, all answers with the attribute will be considered correct, otherwise the first answer with the <code>data-correct></code> attribute will be considered correct.</li> |
| 38 | +</ul> |
| 39 | + |
| 40 | +<h2>Fill In the Blank</h2> |
| 41 | + |
| 42 | + <p data-component="fillintheblank" data-casei="false" id="fill1412" > |
| 43 | + <span data-blank>Without using the activecode infixToPostfix function, convert the following expression to postfix <code>10 + 3 * 5 / (16 - 4)</code> |
| 44 | + <span data-answer id="blank2_answer">\\b10\\s+3\\s+5\\s*\\*\\s*16\\s+4\\s*-\\s*/\\s*\\+</span> |
| 45 | + |
| 46 | + <span data-feedback="regex" id="feedback1">10.*3.*5.*16.*4</span> |
| 47 | + <span data-feedback="text" for="feedback1">The numbers appear to be in the correct order check your operators</span> |
| 48 | + |
| 49 | + <span data-feedback="regex" id="feedback2">.*</span> |
| 50 | + <span data-feedback="text" for="feedback2">Remember the numbers will be in the same order as the original equation</span> |
| 51 | + </span> |
| 52 | + </p> |
| 53 | + |
| 54 | +Here the <code>p</code> tag represents the entire component. |
| 55 | +The <code>data-blank</code><code>span</code>Holds the question text. |
| 56 | +The <code>data-answer</code><code>span</code>Holds the correct regular expression. |
| 57 | +Each regex,text <code>span</code> pair represents a point of feedback for incorrect answers. |
| 58 | + |
| 59 | +Multiple blanks can also be put into the same FITB question as shown here. |
| 60 | + |
| 61 | + <p data-component="fillintheblank" data-casei="false" data-timed id="fill1412" > |
| 62 | + |
| 63 | + <span data-blank>Give me a string that has an 'e' in it. Now.<span data-answer id="blank2_answer">e</span> |
| 64 | + <span data-feedback="regex" id="feedback1">f</span> |
| 65 | + <span data-feedback="text" for="feedback1">Oops</span> |
| 66 | + |
| 67 | + <span data-feedback="regex" id="feedback2">.*</span> |
| 68 | + <span data-feedback="text" for="feedback2">There's no e there!</span> |
| 69 | + </span> |
| 70 | + |
| 71 | + <span data-blank>Gimme an f. Please.<span data-answer id="blank12_answer">f</span> |
| 72 | + <span data-feedback="regex" id="feedback3">e</span> |
| 73 | + <span data-feedback="text" for="feedback3">Wrong.</span> |
| 74 | + |
| 75 | + <span data-feedback="regex" id="feedback4">.*</span> |
| 76 | + <span data-feedback="text" for="feedback4">There's no f in that string!</span> |
| 77 | + </span> |
| 78 | + |
| 79 | + <span data-blank>Show me 44!<span data-answer id="blank3_answer">44</span> |
| 80 | + <span data-feedback="regex" id="feedback5">1</span> |
| 81 | + <span data-feedback="text" for="feedback5">nope</span> |
| 82 | + |
| 83 | + <span data-feedback="regex" id="feedback6">4</span> |
| 84 | + <span data-feedback="text" for="feedback6">close</span> |
| 85 | + |
| 86 | + <span data-feedback="regex" id="feedback7">.*</span> |
| 87 | + <span data-feedback="text" for="feedback7">Sorry bro</span> |
| 88 | + </span> |
| 89 | + </p> |
| 90 | + |
| 91 | +<ul> |
| 92 | + <li><code>data-casei</code> Determines if the answer is case insensitive</li> |
| 93 | + <li><code>id</code> Must be unique in the document</li> |
| 94 | + <li><code>timed</code> Required for a FITB component inside of a timed assessment</li> |
| 95 | + |
| 96 | +</ul> |
| 97 | + |
| 98 | +<h2>Timed</h2> |
| 99 | + |
| 100 | + <ul data-component="timedAssessment" data-time id="timed_1"> |
| 101 | + <ul data-component="multiplechoice" data-multipleanswers="true" data-timed data-random id="question_1"> |
| 102 | + The Question can go right here. |
| 103 | + <li data-component="answer" id="123" >Answer One</li> |
| 104 | + <li data-component="feedback" for="123">Feedback for One</li> |
| 105 | + |
| 106 | + <li data-component="answer" id="456">Answer Two</li> |
| 107 | + <li data-component="feedback" for="456">Feedback for Two</li> |
| 108 | + |
| 109 | + <li data-component="answer" id="789" data-correct>Answer Three</li> |
| 110 | + <li data-component="feedback" for="789">Feedback for Three</li> |
| 111 | + </ul> |
| 112 | + |
| 113 | + <ul data-component="multiplechoice" data-timed id="question_2"> |
| 114 | + The Question can go right here. |
| 115 | + <li data-component="answer" id="123" >Answer One</li> |
| 116 | + <li data-component="feedback" for="123">Feedback for One</li> |
| 117 | + |
| 118 | + <li data-component="answer" id="456">Answer Two</li> |
| 119 | + <li data-component="feedback" for="456">Feedback for Two</li> |
| 120 | + |
| 121 | + <li data-component="answer" id="789" data-correct>Answer Three</li> |
| 122 | + <li data-component="feedback" for="789">Feedback for Three</li> |
| 123 | + </ul> |
| 124 | + |
| 125 | + <p data-component="fillintheblank" data-casei="false" data-timed id="fill1412" > |
| 126 | + |
| 127 | + <span data-blank>Give me a string that has an 'e' in it. Now.<span data-answer id="blank2_answer">e</span> |
| 128 | + |
| 129 | + <span data-feedback="regex" id="feedback1">f</span> |
| 130 | + <span data-feedback="text" for="feedback1">Oops</span> |
| 131 | + |
| 132 | + <span data-feedback="regex" id="feedback2">.*</span> |
| 133 | + <span data-feedback="text" for="feedback2">There's no e there!</span> |
| 134 | + |
| 135 | + </span> |
| 136 | + </p> |
| 137 | + </ul> |
| 138 | + |
| 139 | +Here the outermost <code>ul</code> tag marks the timed element, and the tags inside represent the questions in the timed assessment. |
| 140 | + |
| 141 | +Currently only 1 timed assessment is allowed per page. |
| 142 | + |
| 143 | +<ul> |
| 144 | + <li><code>data-time</code> Can either be set equal to the time limit for the assessment in minutes or left blank, in which case the assessment will keep track of how long it takes to complete the assessment.</li> |
| 145 | + <li><code>id</code> Must be unique in the document</li> |
| 146 | + <li><code>data-no-result</code> If present, it won't display the score to the user after the assessment is finished</li> |
| 147 | + <li><code>data-no-feedback</code> If present, feedback won't be displayed.</li> |
| 148 | + |
| 149 | +</ul> |
0 commit comments