Different colour for "Not answered" in Quiz Navigation

Re: Different colour for "Not answered" in Quiz Navigation

de Jon Bolton -
Número de respuestas: 4
Foto de Particularly helpful Moodlers Foto de Testers

One too many # in the first hex code 🤦🏻‍♂️

En respuesta a Jon Bolton

Re: Different colour for "Not answered" in Quiz Navigation

de Aditya Dubay -

Hi Jon,

I am using Fordson theme and I just used:

#mod_quiz_navblock .qnbutton.notanswered .trafficlight
{background-color: #808080;}
En respuesta a Aditya Dubay

Re: Different colour for "Not answered" in Quiz Navigation

de Jon Bolton -
Foto de Particularly helpful Moodlers Foto de Testers

And did that work? If not, try adding !important before the semi-colon. I wouldn’t normally advocate using !important in CSS as it forces an override and makes for messy and hard to maintain CSS - but it might help in this situation.

So try

#mod_quiz_navblock .qnbutton.notanswered .trafficlight {background-color: #808080 !important;}
En respuesta a Jon Bolton

Re: Different colour for "Not answered" in Quiz Navigation

de Aditya Dubay -

Excellent Jon sonrisa

Thanks for the help..

I hope one day moodle implement this kind of feature in core code too where we can change color without hacking code like this sonrisa

 

Thanks a lot sonrisa

En respuesta a Aditya Dubay

Re: Different colour for "Not answered" in Quiz Navigation

de Tim Hunt -
Foto de Core developers Foto de Documentation writers Foto de Particularly helpful Moodlers Foto de Peer reviewers Foto de Plugin developers

You don't need to hack core code for this.

If you have a custom theme, that is the natural place to put your CSS rules.

Otherwise, you can use Admin -> Appearance -> Additional HTML