Remove the text block 'restricted' in quiz

Remove the text block 'restricted' in quiz

by Inter Jos -
Number of replies: 6

Hi,


I want to remove the blue block with the text 'Restricted'  in a quiz. The text 'not available unless...'  should stay visible!


see attachement.


How can I do that?


thanks,

jos


Moodle 3.3

Attachment restricted.png
రేటింగుల సగటు: -
In reply to Inter Jos

Re: Remove the text block 'restricted' in quiz

by Emma Richardson -
Documentation writers బొమ్మ Particularly helpful Moodlers బొమ్మ Plugin developers బొమ్మ

You would have to either change the core code or maybe use a css fix to hide it but it would be a universal action not per quiz.

In reply to Emma Richardson

Re: Remove the text block 'restricted' in quiz

by Inter Jos -

I just upgraded from Moodle 2.9 to Moodle 3.3. This block wasn't present in Moodle 2.9...

I guess a solution with css or a core change, would be fine for me. I never want it to appear in a quiz.

Question is how?


thanks,

jos

In reply to Inter Jos

Re: Remove the text block 'restricted' in quiz

by Emma Richardson -
Documentation writers బొమ్మ Particularly helpful Moodlers బొమ్మ Plugin developers బొమ్మ

I am going to move this over to the theme forum - I think they could help you better.  Do you want to be hidden for every activity as well though?

In reply to Inter Jos

Re: Remove the text block 'restricted' in quiz

by Tim Hunt -
Core developers బొమ్మ Documentation writers బొమ్మ Particularly helpful Moodlers బొమ్మ Peer reviewers బొమ్మ Plugin developers బొమ్మ
I think you can do it with a bit of minor hackery. You basically just need the CSS

.availabilityinfo.isrestricted .tag-info {
    display: none;
}

If you have a custom theme, then you could and this CSS there.

Otherwise, go to Admin -> Appearance -> Additional HTML, and put

<style type="text/css">
.availabilityinfo.isrestricted .tag-info {
    display: none;
}
</style>
in the 'Within HEAD' section.
In reply to Tim Hunt

Re: Remove the text block 'restricted' in quiz

by Inter Jos -

Hi Tim,

thanks for your response!

I added the css you stated in my custom theme but that did not do it. But.. with a little adjustment this works:

.availabilityinfo.isrestricted .label-info {

    display: none;

}


thanks again!!

Jos