Hiding "finish review" links on quiz review page

Hiding "finish review" links on quiz review page

by Kevin Bleier -
Number of replies: 4

Hey all, currently using Moodle 2.9

Probably a very strange sounding question, but wondering if there was an easy way to hide the "finish review" link while a student is reviewing their answers to a submitted quiz.  

I think I see the code for this in /mod/quiz/renderer.php around line 232, but don't know how to think about going about altering the code to hide the links (I see it in both the navigation block and at the end of the questions) without breaking other functionality

If you're wondering why in the world I'd want to do that, I'm trying to force students to use a "close" button outside Moodle once they finish a quiz (and perhaps this button would only pop up as an option while students are in the review.php page which they can only access right after they take the quiz (not afterwards ... students take assessments at different times from each other)

I'm trying to run a Safe Exam Browser-like environment in a kiosk app for Chromebooks (which cannot run Safe Exam Browser)

Hope that is clear, thanks for the help!

Average of ratings: -
In reply to Kevin Bleier

Re: Hiding "finish review" links on quiz review page

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

A safer option is to just hide the link using CSS.

#mod_quiz_navblock .othernav a {
display: none;
}

You can do that using this technique: http://www.moodlenews.com/2014/adding-css-to-modify-your-theme-in-moodle-through-the-administration-settings/

In reply to Tim Hunt

Re: Hiding "finish review" links on quiz review page

by Kevin Bleier -

Thanks Tim, was able to find the custom CSS page in my theme and paste that code in there.  

It did take care of the "finish review" in the block to the left, but there's another one at the end of all the questions on the review page too.  Any suggestions for hiding that too?

And that coding also gets rid of the "submit all and finish" link during the attempt itself ... anyway to keep that (or am I trying to have my cake and eat it too?)?

In reply to Kevin Bleier

Re: Hiding "finish review" links on quiz review page

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

That should be possible. Moodle puts a lot of helpful CSS class names on the body tag which helps. Try this:

body#page-mod-quiz-review #mod_quiz_navblock .othernav a,
body#page-mod-quiz-review .submitbtns a {
    display: none;
}
body#page-mod-quiz-review .submitbtns a.arrow_link {
    display: inline;
}

Pity about the need for that second rule. Here is another approach:

body#page-mod-quiz-review a[href=*/mod/quiz/view.php] {
    display: none;
}
In reply to Tim Hunt

Re: Hiding "finish review" links on quiz review page

by Kevin Bleier -

Yes sir, first set of code does the trick beautifully.  Thanks so much for the help ... makes it easier for me in making sure students exit out of the app the way I want.