Skip to content

Instantly share code, notes, and snippets.

@yunyu
Created February 11, 2019 04:35
Show Gist options
  • Save yunyu/b8e5bc2a24aaa91812b9c34e8f931094 to your computer and use it in GitHub Desktop.
Save yunyu/b8e5bc2a24aaa91812b9c34e8f931094 to your computer and use it in GitHub Desktop.
// Paste in Chrome dev console when you are on the quiz page
const click = (q, i) =>
document
.getElementsByClassName('samigo-question-callout')
[q].getElementsByTagName('input')
[i].click();
const [A, B, C, D, E, F] = [1, 2, 3, 4, 5, 6];
// Not the real answers
const answers = [
[1, [A]],
[2, [B]],
[3, [C]],
[4, [D]],
[5, [A]],
[6, [B]],
[7, [C]],
[8, [D]],
[9, [A, B]],
[10, [C]]
];
answers.forEach(([q, is]) => is.forEach(i => click(q - 1, i - 1)));
setTimeout(() => document.getElementById('takeAssessmentForm:submitForGrade').click(), 100);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment