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
Average of ratings: -
In reply to Inter Jos

Re: Remove the text block 'restricted' in quiz

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of 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 -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of 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 Emma Richardson

Re: Remove the text block 'restricted' in quiz

by Inter Jos -

yes, I never want to see that block. See attachement, this is how it was in Moodle 2.9


this layout is perfect for me.


thanks,

jose

Attachment restriction.png
In reply to Inter Jos

Re: Remove the text block 'restricted' in quiz

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of 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.
Average of ratings: Useful (2)
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

Average of ratings: Useful (1)