Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit aeb790c

Browse files
authored
Merge branch 'master' into login-fix
2 parents 57e682a + 6c69e8a commit aeb790c

4 files changed

Lines changed: 162 additions & 134 deletions

File tree

runestone/fitb/fitb.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ class FillInTheBlank(RunestoneIdDirective):
144144
option_spec = RunestoneIdDirective.option_spec.copy()
145145
option_spec.update(
146146
{
147-
"blankid": directives.unchanged,
148147
"casei": directives.flag, # case insensitive matching
149148
}
150149
)

runestone/timed/js/timed.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -147,27 +147,27 @@ export default class Timed extends RunestoneBase {
147147
this.renderContainer();
148148
this.renderTimer();
149149
await this.renderControlButtons();
150-
this.assessDiv.appendChild(this.timedDiv); // This can't be appended in renderContainer because then it renders above the timer and control buttons.
150+
this.containerDiv.appendChild(this.timedDiv); // This can't be appended in renderContainer because then it renders above the timer and control buttons.
151151
if (this.renderedQuestionArray.length > 1) this.renderNavControls();
152152
this.renderSubmitButton();
153153
this.renderFeedbackContainer();
154154
this.useRunestoneServices = eBookConfig.useRunestoneServices;
155155
// Replace intermediate HTML with rendered HTML
156-
$(this.origElem).replaceWith(this.assessDiv);
156+
$(this.origElem).replaceWith(this.containerDiv);
157157
// check if already taken and if so show results
158158
this.styleExamElements(); // rename to renderPossibleResults
159-
this.checkServer("timedExam");
159+
this.checkServer("timedExam", true);
160160
}
161161

162162
renderContainer() {
163-
this.assessDiv = document.createElement("div"); // container for the entire Timed Component
163+
this.containerDiv = document.createElement("div"); // container for the entire Timed Component
164164
if (this.fullwidth) {
165165
// allow the container to fill the width - barb
166-
$(this.assessDiv).attr({
166+
$(this.containerDiv).attr({
167167
style: "max-width:none",
168168
});
169169
}
170-
this.assessDiv.id = this.divid;
170+
this.containerDiv.id = this.divid;
171171
this.timedDiv = document.createElement("div"); // div that will hold the questions for the timed assessment
172172
this.navDiv = document.createElement("div"); // For navigation control
173173
$(this.navDiv).attr({
@@ -244,8 +244,8 @@ export default class Timed extends RunestoneBase {
244244
if (!this.nopause) {
245245
this.controlDiv.appendChild(this.pauseBtn);
246246
}
247-
this.assessDiv.appendChild(this.wrapperDiv);
248-
this.assessDiv.appendChild(this.controlDiv);
247+
this.containerDiv.appendChild(this.wrapperDiv);
248+
this.containerDiv.appendChild(this.controlDiv);
249249
}
250250

251251
renderNavControls() {
@@ -471,7 +471,7 @@ export default class Timed extends RunestoneBase {
471471
this.scoreDiv = document.createElement("P");
472472
this.scoreDiv.id = this.divid + "results";
473473
this.scoreDiv.style.display = "none";
474-
this.assessDiv.appendChild(this.scoreDiv);
474+
this.containerDiv.appendChild(this.scoreDiv);
475475
}
476476

477477
createRenderedQuestionArray() {
@@ -906,8 +906,8 @@ export default class Timed extends RunestoneBase {
906906
}
907907
}
908908

909-
// restoreAnswerdQuestions
910-
// -----------------------
909+
// restoreAnsweredQuestions
910+
// ------------------------
911911
restoreAnsweredQuestions() {
912912
for (var i = 0; i < this.renderedQuestionArray.length; i++) {
913913
var currentQuestion = this.renderedQuestionArray[i];
Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
A Multi Question Exam
22
=====================
33

4-
.. timed:: timed1
4+
.. timed:: test_timed_1
55
:timelimit: 10
66

7-
.. mchoice:: questiontimed1_1
7+
.. mchoice:: test_timed_mchoice_1
88
:answer_a: The value you are searching for is the first element in the array.
99
:answer_b: The value you are searching for is the last element in the array
1010
:answer_c: The value you are searching for is in the middle of the array.
@@ -19,7 +19,7 @@ A Multi Question Exam
1919

2020
Under which of these conditions will a sequential search be faster than a binary search?
2121

22-
.. clickablearea:: clicktimed1
22+
.. clickablearea:: test_timed_clickablearea_1
2323
:question: Click on the correct cells.
2424
:feedback: Remember, the operator '=' is used for assignment.
2525
:table:
@@ -34,15 +34,15 @@ A Multi Question Exam
3434
| This row is incorrect | ... | ... | ... |
3535
+------------------------+------------+----------+----------+
3636

37-
.. dragndrop:: dnd2
37+
.. dragndrop:: test_timed_dnd_1
3838
:feedback: This is feedback.
39-
:match_1: Drag to Answer A|||Answer A
40-
:match_2: Drag me Answer B|||Answer B
41-
:match_3: Drag to Answer C|||Answer C
39+
:match_1: Drag to A|||Answer A
40+
:match_2: Drag to B|||Answer B
41+
:match_3: Drag to C|||Answer C
4242

4343
This is a drag n drop question.
4444

45-
.. fillintheblank:: fill1412
45+
.. fillintheblank:: test_timed_fitb_1
4646

4747
Fill in the blanks to make the following sentence: "The red car drove away" The |blank| car drove |blank|.
4848

@@ -52,28 +52,28 @@ A Multi Question Exam
5252
:.*: where did we say the red car was going?
5353

5454

55-
.. activecode:: units2
55+
.. activecode:: test_timed_activecode_1
5656
:nocodelens:
57-
57+
5858
Fix the following code so that it always correctly adds two numbers.
5959
~~~~
6060
def add(a,b):
6161
return 4
62-
62+
6363
====
6464
from unittest.gui import TestCaseGui
65-
65+
6666
class myTests(TestCaseGui):
67-
67+
6868
def testOne(self):
6969
self.assertEqual(add(2,2),4,"A feedback string when the test fails")
7070
self.assertAlmostEqual(add(2.0,3.0), 5.0, 5, "Try adding your parameters")
71-
71+
7272
myTests().main()
7373

7474

75-
.. parsonsprob:: morning
76-
75+
.. parsonsprob:: test_timed_parsons_1
76+
7777
Put the blocks in order to describe a morning routine.
7878
-----
7979
get up
@@ -83,11 +83,9 @@ A Multi Question Exam
8383
brush your teeth
8484

8585

86-
.. shortanswer:: question2
86+
.. shortanswer:: test_timed_shortanswer_1
8787
:optional:
8888
:mathjax:
89-
89+
9090
What are the colors in the rainbow?
9191
What is meaning of :math:`\pi r^2`
92-
93-

0 commit comments

Comments
 (0)