This thread actually belongs in the Quiz module discussion forum.
A famous politician says "Yes you can". The BEST thing about Moodle is you can do virtually anything with it. You, Sir, have come to the right place.
I have exactly the same requirements as you. I am using a "Quiz activity A" to give instructions about the "Quiz activity B" which is placement test (which is the actual quiz activity that I want to test my students on).
The purpose of my "Quiz activity A" is to give students time to read instructions about the real quiz. They only have 1 hour to take the placement test, and I don't want them to waste time reading through 5 screenfuls of information before taking the placement test. Hence the existence of this "Readme" activity - "Quiz activity A" - which itself is a Moodle quiz activity. When my students click on "Read the README" activity, and they see the "Attempt quiz" button, they will get confused because they think that by clicking that "Attempt quiz" button, they will be taking actual placement test. Since they are now accessing "Quiz activity A" - my "Read the README" activity, it is better if they see a button with the text "Read the Instructions" instead of the ubiquitous "Attempt quiz" button.
I am using Moodle 2.7.2. Here's what I did (it's really ugly - crude but effective, but you will get the idea):
Step1. Edit the /mod/quiz/view.php file.
Somewhere around line 206
Here's the code in softcopy:
if ($canattempt) {
$viewobj->preventmessages = $viewobj->accessmanager->prevent_new_attempt(
$viewobj->numattempts, $viewobj->lastfinishedattempt);
if ($viewobj->preventmessages) {
$viewobj->buttontext = '';
} else if ($viewobj->numattempts == 0) {
$viewobj->buttontext = get_string('attemptquiznow', 'quiz');
} else {
$viewobj->buttontext = get_string('reattemptquiz', 'quiz');
}
} else if ($canpreview) {
$viewobj->buttontext = get_string('previewquiznow', 'quiz');
}
Since my "Quiz activity A" name is "Read the README", here's what my modified code looks like:
if ($canattempt) {
$notquiz = "Read the README";
$viewobj->preventmessages = $viewobj->accessmanager->prevent_new_attempt(
$viewobj->numattempts, $viewobj->lastfinishedattempt);
if ($viewobj->preventmessages) {
$viewobj->buttontext = '';
} else if ($viewobj->numattempts == 0) {
if($notquiz ===format_string($quiz->name))
$viewobj->buttontext = get_string('attemptquiznow1', 'quiz');
else
$viewobj->buttontext = get_string('attemptquiznow', 'quiz');
} else {
if($notquiz ===format_string($quiz->name))
$viewobj->buttontext = get_string('reattemptquiz1', 'quiz');
else
$viewobj->buttontext = get_string('reattemptquiz', 'quiz');
}
} else if ($canpreview) {
$viewobj->buttontext = get_string('previewquiznow', 'quiz');
}
What the logic is saying is this. "Moodle, if I am accessing a quiz activity named 'Read the README', then display the text referred to by the identifier (tag) attemptquiznow1 and reattemptquiz1.
Now for this to work, of course I have to create the tags attemptquiznow1 and reattemptquiz1 inside the mod/quiz/lang/en/quiz.php language file. So that's what I did! I added these two lines:
Don't forget to clear your cache with Settings > Site Administration > Development > Purge all caches.
In this way, whenever the student is doing the "Quiz activity A" - my "Read the README" quiz activity, they see the buttons "Read the instructions" and "Re-read the instructions" instead of buttons with the text "Attempt quiz now" and "Re-attempt quiz" on them.
When they take the actual placement test, which is also a Moodle quiz activity, they will see the buttons "Attempt quiz now" and "Re-attempt quiz".
That is the way I avoid confusion and frustration. So if you find this useful and is something that will solve your requirements, then you know what to do. Reward me by clicking the "Useful" link below.
Regards
Frankie Kam