Skip to content

Commit d9c3125

Browse files
committed
Writing exercises and mcq pages updates
1 parent 15c7e30 commit d9c3125

8 files changed

Lines changed: 199 additions & 294 deletions

File tree

assets/Figures/createMCQ.png

63.9 KB
Loading
66.8 KB
Loading
126 KB
Loading

assets/Figures/exerciseTypes.png

125 KB
Loading

assets/Figures/mcqOptions.png

86.1 KB
Loading

assets/Figures/mcqSettings.png

87.7 KB
Loading
Lines changed: 59 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,104 +1,91 @@
11
<?xml version="1.0"?>
22
<section xml:id="writing-exercises_multiple-choice-questions">
33
<title>Multiple Choice Questions</title>
4-
<p>Another common question type is the multiple choice question.</p>
5-
<program language="rst">
6-
<input>
7-
.. mchoice:: uniqueid
8-
:multiple_answers: boolean [optional]
9-
:random: boolean [optional]
10-
:answer_a: possible answer -- what follows _ is label
11-
:answer_b: possible answer
12-
:answer_c: possible answer
13-
:answer_d: possible answer
14-
:answer_e: possible answer
15-
:correct: letter of correct answer or list of correct answer letters (in case of multiple answe
16-
rs)
17-
:feedback_a: displayed if a is picked
18-
:feedback_b: displayed if b is picked
19-
:feedback_c: displayed if c is picked
20-
:feedback_d: displayed if d is picked
21-
:feedback_e: displayed if e is picked
22-
23-
Question text ...
24-
</input>
25-
</program>
26-
<p>Here is an example from a Data Structures class:</p>
27-
<exercise label="stack_2">
4+
<p>A common question type is the multiple choice question like below.</p>
5+
6+
<exercise label="java_mcq_2">
287
<statement>
29-
<p>3-1-1: Given the following sequence of stack operations, what is the top item on the stack when the sequence is complete?</p>
30-
<program language="python">
31-
<input>
32-
m = Stack()
33-
m.push('x')
34-
m.push('y')
35-
m.push('z')
36-
while not m.isEmpty():
37-
m.pop()
38-
m.pop()
39-
</input>
8+
<p>What does the following code print?</p>
9+
<program language="java">
10+
<code>
11+
System.out.println(2 + 3 * 5 - 1);
12+
</code>
4013
</program>
4114
</statement>
15+
4216
<choices>
4317
<choice>
4418
<statement>
45-
<p>'x'</p>
19+
<p>24</p>
4620
</statement>
21+
4722
<feedback>
48-
<p>You may want to check out the docs for isEmpty</p>
23+
<p>
24+
This would be true if it was System.out.println(((2 + 3) * 5) - 1),
25+
but without the parentheses the multiplication is done first.
26+
</p>
4927
</feedback>
5028
</choice>
29+
5130
<choice>
5231
<statement>
53-
<p>the stack is empty</p>
32+
<p>14</p>
5433
</statement>
34+
5535
<feedback>
56-
<p>There is an odd number of things on the stack but each time through the loop 2 things are popped.</p>
36+
<p>
37+
This would be true if it was System.out.println(2 + (3 * (5 - 1))),
38+
but without the parentheses the multiplication is done first and the
39+
addition and subtraction are handled from left to right.
40+
</p>
5741
</feedback>
5842
</choice>
59-
<choice correct="yes">
43+
44+
<choice>
6045
<statement>
61-
<p>an error will occur</p>
46+
<p>This will give a compile time error.</p>
6247
</statement>
48+
6349
<feedback>
64-
<p>Good Job.</p>
50+
<p>
51+
This will compile and run. Try it in DrJava. Look up operator
52+
precedence in Java.
53+
</p>
6554
</feedback>
6655
</choice>
67-
<choice>
56+
57+
<choice correct="yes">
6858
<statement>
69-
<p>'z'</p>
59+
<p>16</p>
7060
</statement>
61+
7162
<feedback>
72-
<p>You may want to check out the docs for isEmpty</p>
63+
<p>
64+
Correct! Remember PEMDAS. The multiplication is done first (3 * 5 = 15) and then the addition (2 + 15 = 17) and finally the subtraction (17 - 1 = 16).
65+
</p>
7366
</feedback>
7467
</choice>
7568
</choices>
7669
</exercise>
77-
<p>The source code is here:</p>
78-
<program language="rst">
79-
<input>
80-
.. mchoice:: stack_2
81-
:answer_a: 'x'
82-
:answer_b: the stack is empty
83-
:answer_c: an error will occur
84-
:answer_d: 'z'
85-
:correct: c
86-
:feedback_a: You may want to check out the docs for isEmpty
87-
:feedback_b: There is an odd number of things on the stack but each time through the loop 2 things are popped.
88-
:feedback_c: Good Job.
89-
:feedback_d: You may want to check out the docs for isEmpty
90-
91-
Given the following sequence of stack operations, what is the top item on the stack when the sequence is complete?
92-
93-
.. code-block:: python
94-
95-
m = Stack()
96-
m.push('x')
97-
m.push('y')
98-
m.push('z')
99-
while not m.isEmpty():
100-
m.pop()
101-
m.pop()
102-
</input>
103-
</program>
70+
<p>To create multiple choice questions, start or go to any assignment in the Instructor Dashboard "Assignment Builder". In the Exercises section of the assignment, click on "Add Exercise" and select "+ Create New Exercise" and then select "Multiple Choice".</p>
71+
<figure align="center" xml:id="mcq_fig">
72+
<caption>Choose Multiple Choice Exercise</caption>
73+
<image source="Figures/exerciseMultipleChoice.png" width="100%" alt="Choose Multiple Choice Question"/>
74+
</figure>
75+
<p>Enter the question. Type in / and press enter to see the menu to format the text and add in images, tables, code blocks, etc. You can also just use Markdown syntax directly (<url href="https://www.markdownguide.org/cheat-sheet/">Markdown Cheat Sheet</url>) and put code in between backticks (`) for inline code or triple backticks (```) for code blocks.</p>
76+
<figure align="center" xml:id="mcq_edit_fig">
77+
<caption>Create a Multiple Choice Question</caption>
78+
<image source="Figures/createMCQ.png" width="100%" alt="Create a Multiple Choice Question"/>
79+
</figure>
80+
<p>Click on Next or 2 to move to the Options tab and enter the multiple choice options. Click on Add Option to add more options. Click on the checkmark next to "Correct" to mark a correct option. You can mark more than one answer as correct. You can also add feedback for each choice that will be shown to the student after they answer the question. Do / and enter to see the format menu or use markdown for each option.</p>
81+
<figure align="center" xml:id="mcq_options_fig">
82+
<caption>Enter Multiple Choice Options</caption>
83+
<image source="Figures/mcqOptions.png" width="100%" alt="Enter Multiple Choice Options"/>
84+
</figure>
85+
<p>Click on Next or 3 to move to the Settings tab. Here you can set the chapter and section where you want the exercise stored in the assignment builder (where it will show when browsing chapters in the assignment builder), the author, the topic, the number of points for the question, and add tags to help you find the question later. If you change the name of the exercise, make sure it is unique! Some authors put their author names in the exercise name too to make them easier to find. You can also choose to make the exercise private or contribute it to the question bank for other teachers to use. Please make experimental questions private. </p>
86+
<figure align="center" xml:id="mcq_settings_fig">
87+
<caption>Set Multiple Choice Question Settings</caption>
88+
<image source="Figures/mcqSettings.png" width="100%" alt="Set Multiple Choice Question Settings"/>
89+
</figure>
90+
<p>Make sure that you Preview the exercise in step 4 and test it before saving it. Although there is no way to delete an exercise once it is saved, you can always edit it later to fix mistakes, make it private, or flag it for the volunteers to fix or delete.</p>
10491
</section>

0 commit comments

Comments
 (0)