[ Quiz not available ]
Quiz on subject "A"
You could also keep the quiz 'shown' and 'hide' the quiz icon by covering it with a button. Edit the HTML of the 'Description' in the quiz settings and insert the following code:
<button style="position:absolute;
z-index:10;
top:-6px;
left:22px;
height:40px;
">Quiz not available
</button>
Make sure that 'Display description on course page' (just below the Description's input box) is enabled. Adjust the top and left position as required.
You could also use an image, a 'div' or a 'p' element, etc.:
<a href="url of the quiz" target="_blank" style="cursor:pointer;">
<img style="position:absolute;
z-index:10;
top:-6px;
left:22px;"
width="70" height="70" class="img-responsive"
src="https://moodle.org/brokenfile.php#/1984378/user/draft/754464985/Quiz-Games-256.png"
alt="Author: QuizAnswers, http://www.quizanswers.com License: CC Attribution">
</a>
or
<a href="url of the quiz" target="_blank" style="cursor:pointer;">
<div style="position:absolute;
z-index:10;
top:-6px;
left:22px;
width:70px;
background-color:#d9edf7;
border: 1px solid #93b8e8;
border-radius:4px;
padding:3px;
text-align:center;">Quiz on subject "A"
</div>
</a>
There are other advantages in using this method:
- Simple to use.
- When the quiz is to be taken, the cover (button, image or div element) can be linked to the quiz address which allows opening the quiz in a new tab or new window. Simply remove the link when the quiz is finished.
- In a given course, different icon covers can be used for different subjects.
(see also)