Please vote up this MDL for 4.0 resolution.
https://tracker.moodle.org/browse/MDL-52323
Late to the party with this one. I solved this problem with some JS in the Additional HTML:
<script>
window.addEventListener('load', function() { if(document.getElementById('page-mod-assign-grader')) {
document.querySelectorAll('div[data-region="review-panel"]')[0].classList.add('collapsed');
document.querySelectorAll('button[aria-label="Collapse review panel"]')[0].classList.add('active');
document.querySelectorAll('button[aria-label="Restore default layout"]')[0].classList.remove('active');
}
});
</script>
I did try activating the click event on the Collapse review panel button, so I'd let Moodle's code take care of all of the correct interactions, but I never could get that to work. I have probably missed a couple.
Working on this solution too, I discovered that the "Before BODY is closed" additional HTML doesn't work on any page that doesn't have the ? icon (i.e. the footer area), so put this code in the "Within HEAD" additional HTML. This is why there is an event listener in there as there is some more complex coding to check for the existence of the element before the element has a chance to load with in-line scripts and I wanted something quick and dirty to just make it work
I made a note to myself log this as a bug, but never got back to Moodle 4.x as
I was doing too much of this stuff to make it work for us when 3.x
worked just fine.