Skip to content

Commit 7a1ae72

Browse files
authored
Merge pull request barbarer#180 from xinyinghou/master
Fixed some issues detected in the pilot testing
2 parents 7c1bb67 + f3e5fbf commit 7a1ae72

4 files changed

Lines changed: 16 additions & 59 deletions

File tree

_sources/_hidden/mc_posttest.rst

Lines changed: 7 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,5 @@
1-
Posttest
2-
========
3-
4-
.. raw:: html
5-
6-
<script>
7-
8-
function triggerSaveClicks(callback) {
9-
console.log("Triggering all Save and Save & Run clicks...");
10-
11-
let saveButtons = document.querySelectorAll('button');
12-
let saveCount = 0;
13-
14-
saveButtons.forEach(button => {
15-
if (button.innerText.includes('Save') || button.innerText.includes('Save & Run')) {
16-
console.log(`Clicking button: ${button.innerText}`);
17-
button.click(); // Simulate button click
18-
saveCount++;
19-
}
20-
});
21-
22-
// Ensure logging is complete before proceeding
23-
setTimeout(() => {
24-
console.log(`Triggered ${saveCount} Save clicks. Proceeding...`);
25-
if (callback) callback();
26-
}, 1000); // Wait 1 second for logging to process
27-
28-
29-
document.addEventListener("DOMContentLoaded", function() {
30-
let introLink = document.getElementById('thank_you'); // Change ID if needed
31-
if (introLink) {
32-
introLink.addEventListener("click", function(event) {
33-
event.preventDefault(); // Stop immediate navigation
34-
35-
console.log("User clicked the Introduction link. Saving first...");
36-
37-
// Trigger Save clicks, then navigate
38-
triggerSaveClicks(() => {
39-
window.location.href = introLink.href; // Navigate after saving
40-
});
41-
});
42-
}
43-
});
44-
45-
</script>
46-
1+
Wrap-Up Check
2+
==============
473

484
Please answer the following questions.
495
::
@@ -73,7 +29,8 @@ Please answer the following questions.
7329
- Recommended Time: Spend at most 2 minutes - Put "I am not sure" and click "Save" if unsure of the answer.
7430

7531
For the code piece above, fill in the missing two lines to print each employee's name along with their skills using a nested loop.
76-
32+
33+
Note: Be sure to indent the second line correctly.
7734

7835
.. activecode:: posttest-2-mooc_nested
7936
:autograde: unittest
@@ -185,16 +142,16 @@ What to do next
185142
================
186143
.. raw:: html
187144

188-
<p>Click on the following link to the final page: <b><a id="post_survey"> <font size="+1">Thank you!</font></a></b></p>
145+
<p>Click on the following link to the final page: <b><a id="thank_you"> <font size="+1">Thank you!</font></a></b></p>
189146

190147
.. raw:: html
191148

192149
<script type="text/javascript" >
193150
194151
window.onload = function() {
195152
196-
a = document.getElementById("post_survey")
197-
a.href = "mc_post_survey.html"
153+
a = document.getElementById("thank_you")
154+
a.href = "mc_thank_you.html"
198155
};
199156
200157
</script>

_sources/_hidden/mc_puzzle_bank.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@
1010
-----
1111
def table_reservation(reservation_dict, guest_num):
1212
=====
13-
count = 0
13+
count = 0
1414
=====
15-
for time_slot, reservations in reservation_dict.items():
15+
for time_slot, reservations in reservation_dict.items():
1616
=====
17-
for reservation in reservations:
17+
for reservation in reservations:
1818
=====
19-
for reservation_id, guests in reservation.items():
19+
for reservation_id, guests in reservation.items():
2020
=====
21-
if guests == guest_num:
21+
if guests == guest_num:
2222
=====
23-
count += 1
23+
count += 1
2424
=====
25-
return count
25+
return count
2626

2727

2828
.. parsonsprob:: p2-mooc_nested
@@ -33,7 +33,7 @@
3333
Finish the function ``get_average_score(student_information)`` below:
3434
- It takes a dictionary ``student_information`` representing student data, where the keys are student names, and the values are dictionaries containing information about the student, including their age and a list of courses they took and the grade for each course.
3535
- You then need to calculate the average grade for each student.
36-
- Return a dictionary that stores the students whose average grade is higher than or equal to ``80`` in a dictionary. The keys are student names and the values are their average grade. -----
36+
- Return a dictionary that stores the students whose average grade is higher than or equal to ``80`` in a dictionary. The keys are student names and the values are their average grade.
3737
-----
3838
def get_average_score(student_information):
3939
=====

_sources/_hidden/mc_start.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The five parts are:
1717
- Pre survey (3 mins) - a self-efficacy survey for computing (6 questions) and 5 self-evaluation questions about your familiarity with nested dictionaries.
1818
- Introduction to the Practice Types (3 mins) - An introduction to the type of practice problems you may see during practice.
1919
- Practice (32 mins) - Complete 4 write-code practice problems, followed by a survey question if applicable.
20-
- Posttest (12 mins) - Help is not available during the posttest. It includes 1 short answer, and 2 write-code problems.
20+
- Wrap-Up Check (12 mins) - Help is not available during the wrap-up check. It includes 1 short answer, and 2 write-code problems.
2121

2222
Participant Requirements
2323
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File renamed without changes.

0 commit comments

Comments
 (0)