Skip to content

Instantly share code, notes, and snippets.

@kylekyle
Created March 28, 2019 15:07
Show Gist options
  • Save kylekyle/68a08dc09f4f89ccb57fb4f93a2dd0f5 to your computer and use it in GitHub Desktop.
Save kylekyle/68a08dc09f4f89ccb57fb4f93a2dd0f5 to your computer and use it in GitHub Desktop.
Tampermonkey UserScript to Grade Section by Question
// ==UserScript==
// @name BB Filter to Section
// @namespace https://usma.blackboard.com/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://usma.blackboard.com/webapps/assessment/do/gradeQuestions*
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js
// ==/UserScript==
(function() {
'use strict';
$(function() {
// get this from the Grade Report.xlsx Tampermonkey column
var users = ["Your", "Users", "Here"]
$('#userSelect option').each(function(){
if($.inArray($(this).text(), users) == -1) {
$(this).remove()
}
});
$('#userSelect').change(function() {
this.form.submit();
});
$('#scoreField').keydown(function (event) {
if (event.keyCode == 13) {
$('#userSelect option:selected').next().attr('selected', 'selected');
$('#userSelect').closest('form').submit();
}
});
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment