Hide marks while in a quiz attempt

Hide marks while in a quiz attempt

by Richárd Major -
Number of replies: 9

Hey there,

Is there a way to hide quiz question marks while a student is attempting a quiz?


Thanks for the responses in advance!

Average of ratings: -
In reply to Richárd Major

Re: Hide marks while in a quiz attempt

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Short answer: no.

Longer answer: internally, the question system is capable of doing that, but there is no way to set that particular option within the quiz, because the the quiz review options setting is only an on-off setting, and that toggles between two of the three options. If you are in a position to change the Moodle code, you can change this line: https://github.com/moodle/moodle/blob/5e5e12e0634f176302462f923af02ab5751683d6/mod/quiz/locallib.php#L2112
Average of ratings: Useful (2)
In reply to Tim Hunt

Tárgy: Re: Hide marks while in a quiz attempt

by Richárd Major -
Thank you very much for the quick reply and thank you for the exact code link! We have no intent on changing this globally so we'll stick to your "short answer". smile
In reply to Richárd Major

Re: Hide marks while in a quiz attempt

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

Interstingly, unrelated to this forum thread, this issue came up yesterday in a discussion with my colleauge Chris, and what is more, Crist had an idea how we could do it:

In the review options part of the quiz settings, we could add a new checkbox for 'Max marks':

(And, if you turn off 'Max marks', then you won't be able to select 'Marks'.) That then lets quiz users select between all three options which the core system supports.

What do people think? (other than the obvious "Oh, no! not another quiz setting? Don't we have enough of those?" 😉)

Average of ratings: Useful (4)
In reply to Tim Hunt

Re: Hide marks while in a quiz attempt

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
"Don't we have enough of those?" We can never have enough...
In reply to Tim Hunt

Re: Hide marks while in a quiz attempt

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

Just to note that we may acutally be getting around to develop this now. I have created tracker issue MDL-77564.

Average of ratings: Useful (3)
In reply to Tim Hunt

Re: Hide marks while in a quiz attempt

by Mich Ere -
Hi Tim,

We've been using your previous Code change to Hide Marks, but it doesn't appear to be available any longer in Moodle 4.2.  Is there a workaround we could implement for Moodle 4.2 while your wonderful tracker issue is being developed?

Thanks,
Mich
In reply to Mich Ere

Re: Hide marks while in a quiz attempt

by S G -
1. Just add the CSS below to the 'Raw SCSS' field of the theme through the admin login. (you can also add it to the 'Additional HTML Footer' field by enclosing it in style tags.

#page-mod-quiz-attempt .grade {
display: none;
}

2. Purge cache

3. The info box will look like below during quiz attempt. (The edit question link will not be visible if you are logged in as a student.)

Screenshot of info box with marks hidden.
Edit: If you want to declutter it a little more and remove the 'Not answered yet' also during the quiz attempt. You can use this CSS instead :

#page-mod-quiz-attempt .grade, #page-mod-quiz-attempt .state {
display: none;
}

And the info box will look like this :

Info box image

Average of ratings: Useful (2)