Moodle 3.1 - how to use previous assignment grading interface?

Re: Moodle 3.1 - how to use previous assignment grading interface?

by Cris Fuhrman -
Number of replies: 0

It's possible to use Tamper Monkey to do this, without modifying your Moodle site. TamperMonkey is a plug-in for browsers that can run JavaScript on certain pages (the @match configuration). 

Here's the relevant code (I don't have old versions of Moodle to test this on, but it works for me):

// ==UserScript==
// @name         Moodle collapse review panel in grading
// @namespace    https://profs.etsmtl.ca/cfuhrman/
// @version      0.1
// @description  Save many clicks by collapsing the PDF review panel in grading
// @author       Christopher Fuhrman
// @match        https://*/mod/assign/view.php*action=grader*
// @require      https://code.jquery.com/jquery-latest.js
// @grant        none
// ==/UserScript==

// Note: the "action=grader" in the @match above is the 3.x grading interface, so this won't be invoked on older versions of Moodle

(function() {
    'use strict';

    $('button.collapse-none').removeClass('active');
    $('button.collapse-review-panel').addClass('active');
    $('[data-region=review-panel]').addClass('collapsed');
})();