Created
July 7, 2020 11:36
-
-
Save cocoademon/d0d38e1232cfadb9e07a35e58ff7d014 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Cam's Moodle Grading Fix | |
// @version 1 | |
// @grant none | |
// @include https://moodle.federation.edu.au/mod/* | |
// ==/UserScript== | |
let s = ` | |
.path-mod-assign [data-region="review-panel"].collapsed + [data-region="grade-panel"] [data-region="grade"], | |
.path-mod-assign [data-region="grade-panel"].fullwidth [data-region="grade"] | |
{ | |
max-width: none; | |
} | |
.path-mod-assign [data-region="grade-panel"] .gradingform_rubric { | |
width: 100% !important; | |
} | |
.path-mod-assign [data-region="grade-panel"].fullwidth { | |
left: 0 !important; | |
width:100% !important; | |
} | |
.gradingform_rubric .criteria { | |
width: 100%; | |
} | |
.gradingform_rubric .criteria tbody { | |
width: 100%; | |
} | |
.path-mod-assign [data-region="grade-panel"] .gradingform_rubric .criterion .description { | |
min-width: 220px; | |
} | |
.path-mod-assign [data-region="grade-panel"] .gradingform_rubric .criterion .remark textarea { | |
min-width: 22em; | |
} | |
.path-mod-assign [data-region="grade-panel"] .gradingform_rubric .criterion .levels .level.checked { | |
background-color: #99ff99; | |
} | |
.path-mod-assign [data-region="grade-panel"] .gradingform_rubric .criterion .levels { | |
width: 99%; | |
} | |
.submissionstatustable { | |
display: grid; | |
grid-template-columns: repeat(5,auto); | |
justify-items: stretch; | |
align-items: center; | |
margin: 0; | |
gap: 0.5rem; | |
} | |
.submissionstatustable h3 { display: none; } | |
.assignsubmission_comments { | |
grid-column: 1/6; | |
} | |
.assignsubmission_comments > div { | |
padding: 0 !important; | |
} | |
.path-mod-assign [data-region="grade-panel"] div.submissionstatustable { | |
margin-bottom: 0; | |
} | |
/* Quiz review */ | |
.path-mod-quiz #mod_quiz_navblock .qn_buttons a.thispage { | |
font-size: 200%; | |
} | |
.path-mod-quiz .qnbutton.correct .trafficlight { | |
border-bottom: 8px solid #080; | |
} | |
.path-mod-quiz .qnbutton.notanswered .trafficlight, .path-mod-quiz .qnbutton.incorrect .trafficlight { | |
border-top: 8px solid #800; | |
} | |
.path-mod-quiz .qnbutton.partiallycorrect .trafficlight { | |
border-top: 8px solid #ee2; | |
} | |
`; | |
function addGlobalStyle(css) { | |
var head, style; | |
head = document.getElementsByTagName('head')[0]; | |
if (!head) { return; } | |
style = document.createElement('style'); | |
style.type = 'text/css'; | |
style.innerHTML = css; | |
head.appendChild(style); | |
} | |
addGlobalStyle(s); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment