Skip to content

Commit d5bf5a8

Browse files
committed
The minimal version for testing
1 parent 422e9b3 commit d5bf5a8

2 files changed

Lines changed: 0 additions & 86 deletions

File tree

_sources/dictionaries/mc_nested-nt.rst

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,6 @@
11
Practice
22
=============
33

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('posttest'); // 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 posttest 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-
474
.. activecode:: w1-mooc_nested
485
:autograde: unittest
496
:nocodelens:

_sources/dictionaries/mc_nested-wt.rst

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,5 @@
11
Practice
22
=============
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('posttest'); // 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 posttest 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>
463

474

485
.. selectquestion:: t1-mooc_nested

0 commit comments

Comments
 (0)