Skip to content

Instantly share code, notes, and snippets.

@PaeP3nguin
Last active November 27, 2016 01:56
Show Gist options
  • Save PaeP3nguin/22089e4abfa6f8bf84e4 to your computer and use it in GitHub Desktop.
Save PaeP3nguin/22089e4abfa6f8bf84e4 to your computer and use it in GitHub Desktop.
Script to find the average class grade for a class on Canvas. To use: copy and run in the Chrome console while on the "Grades" page
(() => {
$("tr.student_assignment.assignment_graded.editable").each(function() {
var mean = $(this).next().find("tbody td").first().text().replace("Mean:","");
$(this).find(".what_if_score").text(mean);
$(this).find(".assignment_score .tooltip").trigger("score_change");
});
})()
@anderoonies
Copy link

what's the motivation behind wrapping this in an IIFE? just to suppress the jQuery objects it returns?

@PaeP3nguin
Copy link
Author

@anderoonies Yup, otherwise it prints all the annoying scores and looks scary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment