Printing students' quiz responses without the correct answers

Printing students' quiz responses without the correct answers

by Anaïs Lee -
Number of replies: 28

Hello,

My school requires that I submit hard copies of the students' quiz responses on Moodle. I tried the "review attempt" option and the layout looks fine, except that it includes all the correct answers. Is there any way I can hide them? This almost doubles the number of pages and it's a waste of paper.

Thank you for your help in advance.

Average of ratings: -
In reply to Anaïs Lee

Re: Printing students' quiz responses without the correct answers

by Eoin Campbell -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
See https://moodle.org/plugins/quiz_answersheets, https://moodle.org/plugins/quiz_archive and https://moodle.org/plugins/quiz_export for plugins that export quiz attempts in various ways, which might help.
Average of ratings: Useful (2)
In reply to Eoin Campbell

Re: Printing students' quiz responses without the correct answers

by Anaïs Lee -
Thanks very much. I guess only an administrator can do this? Anyway, the school is now asking me to upload a word document on Moodle and have the students type the answers there. 😑
In reply to Anaïs Lee

Re: Printing students' quiz responses without the correct answers

by Shirley Gregorczyk -
Picture of Particularly helpful Moodlers
Maybe this won't be a possible solution for your challenge.

Quiz>Results>Responses Download.
From the Excel workbook, remove each of the Right answer columns, or any others that are deemed unnecessary.

Kind Regards,
Shirley
Average of ratings: Useful (1)
In reply to Shirley Gregorczyk

Re: Printing students' quiz responses without the correct answers

by Anaïs Lee -
Thank you, Shirley, for the suggestion!
In reply to Anaïs Lee

Re: Printing students' quiz responses without the correct answers

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Anaïs "My school requires that I submit hard copies of the students' quiz responses on Moodle."

Next thing they'll require copies of the student's responses on clay tablets.wink

Average of ratings: Useful (1)
In reply to Joseph Rézeau

Re: Printing students' quiz responses without the correct answers

by Anaïs Lee -
Yes, those are real "hard" copies. The school admin often has a strange way of thinking.
In reply to Anaïs Lee

Re: Printing students' quiz responses without the correct answers

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
Hello Anaïs,

For a succinct report of questions and student responses , click on the quiz name, then on the gear icon and select "Results-Responses". Check "question text" and "response", and uncheck "right answer", then click "Show report". The layout will not look as good as with the "review attempt", but it shows what is required.

Also, you can ask your school if it will accept your reports in PDF format (instead of clay tablets).
Average of ratings: Useful (2)
In reply to Dominique Bauer

Re: Printing students' quiz responses without the correct answers

by Anaïs Lee -
Thank you, Dominique. I've tried that option too but I think I prefer the "review attempt". There're way too many columns and I have to use the "transpose" function in Excel and adjust the width of the cells, which is more time-consuming.

The school has just given up on the idea of asking the students to type the answers in a Word document so I still need to print these results on Moodle. Another problem with printing the web pages is that there're unusual page breaks and it requires even more paper to print the results. The Microsoft Edge browser allows us to save the entire web page as an image file, which looks much nicer on the computer. However, the images are very long and I can't find a way to print them properly. I've tried a Chrome extension to make the web pages more printer-friendly. However, while it removes the page breaks, it removes the students' answers too! I really think the external reviewers should allow the submission of digital files. It's 2021!

Hopefully, in future updates, Zoom can allow some printer-friendly options.
In reply to Anaïs Lee

Re: Printing students' quiz responses without the correct answers

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
Hello Anaïs,

I'm assuming you don't have admin access. Please confirm. This will slightly modify my next proposed solution of using a script to hide unnecessary parts in the "review attempt" pages.
In reply to Dominique Bauer

Re: Printing students' quiz responses without the correct answers

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
AnaÏs,

Even if you do not have administrator access, you can install a userscript manager on your browser and switch, with a small css script, between full default information and less information on the "review attempt" pages. I'll give you more info tomorrow.

Review page with full info:




Review page with less info:

Average of ratings: Useful (1)
In reply to Dominique Bauer

Re: Printing students' quiz responses without the correct answers

by Anaïs Lee -
Hi Dominique,

No, I don't have admin access. Your solution looks pretty good to me. Hopefully it's not too complicated. Thank you very much in advance.
In reply to Anaïs Lee

Re: Printing students' quiz responses without the correct answers

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Anaïs,

Please let me know if this works for you: Hide elements from quiz attempt review pages ↗.

I don't think I can make it any easier. smile

Average of ratings: Useful (1)
In reply to Dominique Bauer

Re: Printing students' quiz responses without the correct answers

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Quiz attempt review pages include elements such as feedback, correct answer, comment, response history, quiz navigation block, other blocks if any, gear icon, page header and footer, etc. The display of these elements is not controlled by the review options in the quiz settings. They are always displayed.

To hide these elements, you can do the following. Note that you don't need to have access to the administration of the Moodle site.

  1. Install the Tampermonkey browser extension from https://www.tampermonkey.net/ ↗. Use the stable version and make sure the version matches your browser (Chrome, Microsoft Edge, Safari, etc.). This extension has over 10 million users and a rating of 4.7/5 for 68,000 reviews on the Chrome web store. You can install it with confidence.

    If you are using Chrome, you can also install the Tampermonkey extension ↗ from the Chrome web store.

  2. Click on the following link to get my script*: https://gist.github.com/dbauer-ets/01ba8b1ddd3aa66d1c28fdd773e93b8c/raw/a807860e6436d612d39d821a65cfcdeea0c2bcdc/Moodle-Edit-quiz-attempt-review-page.user.js ↗.
  3. Click on the "Install" button.
  1. Navigate to the review page for the desired quiz attempt.
  2. In the browser extension menu, click the Tampermonkey icon and toggle off the "Moode - Edit quiz attempt review page" userscript and reload the page. Note that this userscript will only appear on the quiz attempt review pages.
  3. For Moodle 3.10 and earlier, select either "Show all questions on one page" (preferred) or "Show one page at a time" in the quiz navigation block. This option was removed in Moodle 3.11 and all questions are always displayed on one page (so it seems).
  4. In the browser's extension menu, click the Tampermonkey icon and toggle on the "Moode - Edit quiz attempt review page" userscript and reload the page. All elements are hidden except info blocks, questions and student answers.
  5. Print the page using the browser's print command.
  6. Click the Tampermonkey icon and toggle off the "Moode - Edit quiz attempt review page" userscript and reload the page. Everything is back to normal.


* The script is as follows:

// ==UserScript==
// @name         Moodle - Edit quiz attempt review page
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Remove all elements except info blocks, questions and student's answers
// @author       © 2021 Dominique Bauer - CC0 1.0 Universal Public Domain Dedication
// @match        */mod/quiz/review.php*
// @grant        none
// ==/UserScript==

var styleSheet = "" +

// Hide fixe top menu band
".fixed-top {display: none;}" +

// Hide block icon (Moodle 3.11)
".drawer-right-toggle {display: none;}" +

// Hide gear icon
"#region-main-settings-menu, .region_main_settings_menu_proxy, .dropdown {display: none;}" +

// Hide feedback, comment, response history
".outcome, .comment, .history {display: none;}" +

// Hide navigation
".activity-navigation {display: none;}" +

// Hide blocks
".block-region {display: none;}" +

// Hide submit button
".submitbtns {display: none;}" +

// Hide header and footer
"header#page-header, footer#page-footer {display: none;}" +

// For some reason, specific feedbacks do not "hide",
// so hide them by placing them in the background.
".specificfeedback {z-index: -10000}" +

// Remove the browser vertical scroll bar
"body {height: 10000px; overflow-y: hidden;}" +

"";

(function() {
    var s = document.createElement('style');
    s.type = "text/css";
    s.innerHTML = styleSheet;
    (document.head || document.documentElement).appendChild(s);
})();
Average of ratings: Useful (1)
In reply to Dominique Bauer

Re: Printing students' quiz responses without the correct answers

by Anaïs Lee -
Thanks very much for your help, Dominique. I really appreciate it.

When I clicked "install", I got a message saying "invalid script header". Then I followed the steps and I can still see those elements. I use Chrome by the way.
In reply to Dominique Bauer

Re: Printing students' quiz responses without the correct answers

by Anaïs Lee -
I tried this with Microsoft Edge and it was the same. After I finished step 7, the scroll bar on the right disappeared and I couldn't scroll down the page. I could manage to turn the page into a pdf file but the elements were still there.
In reply to Anaïs Lee

Re: Printing students' quiz responses without the correct answers

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hello Anaïs,

Don't worry, the userscript should work fine. It's just simple CSS.

A. Click on Chrome's "Extension" icon and pin the Tampermonkey extension, just for ease of use: (You can unpin it later if you want.)




B. Clik on the "Tampermonkey" icon and select "Dachboard":




C. You shoud see the "Moodle - Edit quiz attempt review page" userscript in the "Installed Userscripts" list:

If needed, you can easily delete the script by clicking the recycle bin on the right and then reinstall it by clicking the link in my previous post.




D. To activate the script, you need to toogle the script 'on' and then reload the page (F5):




E. To deactivate the script, you need to toogle the script 'off' and then reload the page (F5). Each time you toggle the script on or off, you need to reload the page (F5 or just Chrome's "Reload this page" icon).
Average of ratings: Useful (3)
In reply to Dominique Bauer

Re: Printing students' quiz responses without the correct answers

by Anaïs Lee -
Thanks very much indeed, Dominique. However, it's still the same. I think the steps are easy enough and I did refresh the page. Can it be my version of Moodle that's the problem? When I toggle the script on and reload the page, the scroll bar on the right disappears.
In reply to Anaïs Lee

Re: Printing students' quiz responses without the correct answers

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
I removed the scroll bar so that it doesn't show on the printed pages. You don't need it for printing. If you really want to keep the scroll bar, you can delete the part of the code that hides it.

What about the other elements (feedback, comment, history and so on). Are they hidden when you activate the script?
In reply to Dominique Bauer

Re: Printing students' quiz responses without the correct answers

by Anaïs Lee -
It's better to remove the scroll bar. The response history is still there when I activiate the script. Other elements are hidden.

I've just found out if I use the "embedded answer (cloze)" question type, the correct answers won't show up with or without the script. But with other question types, the script manages to hide the correct answers. The only thing that still shows up is the response history.

Thank you so much for your help.
In reply to Anaïs Lee

Re: Printing students' quiz responses without the correct answers

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
Anaïs,

Right click on "Response history" and select "Inspect". This will open Chrome's DevTools. In the DOM, you should see something like:

...
<div class="history clearfix...
    <h4 class="responsehistoryheader...
...

What do you see on the line starting with <div?
In reply to Dominique Bauer

Re: Printing students' quiz responses without the correct answers

by Anaïs Lee -

Hi Dominique,

Here's the screenshot:

DOM

In reply to Anaïs Lee

Re: Printing students' quiz responses without the correct answers

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
Anaïs,

Hang on. I'll get back to you in a few hours.
In reply to Dominique Bauer

Re: Printing students' quiz responses without the correct answers

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hello Anaïs,

In your quiz review, the 'Response history' is not hidden because the <div> element that contains it is still in 'flex' display mode. It might depend on what version of Moodle you are using or on something else. It's hard for me to say. Anyway, I added the '!important' rule to the script to force the display to 'none'.

So,

  1. go to the Tampermonkey 'Dashboard',
  2. delete the "Moodle - Edit quiz attempt review page" userscript by clicking the trash can on the right,
  3. then reinstall it by clicking the link in my previous post.

Hope it works this time around.

In reply to Dominique Bauer

Re: Printing students' quiz responses without the correct answers

by Anaïs Lee -

Hi Dominique,

Thank you so much for spending time on this. Unfortunately, it's still the same. My Moodle version is 3.8+ . Maybe it's too old? 😅 

Anyway, even if it may not work for me, I still appreciate your help. I'm sure your script will benefit some other users. Thank you for your help indeed. 🙏

DOM

In reply to Anaïs Lee

Re: Printing students' quiz responses without the correct answers

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
Hi Anaïs,

It's just a matter of finding which element to hide. Often, you just need to add style="display: none;"  to a few elements until the desired result.

If you want, we can do a Zoom session and hopefully we could fix this little problem.
Average of ratings: Useful (1)
In reply to Dominique Bauer

Re: Printing students' quiz responses without the correct answers

by Anaïs Lee -
Hi Dominique,

I've just added ".responsehistoryheader {display: none;}" to the script and it works! Thank you so much for your help! I really appreciate it. 😄🙏😊🙏
Average of ratings: Useful (1)
In reply to Anaïs Lee

Re: Printing students' quiz responses without the correct answers

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
Anaïs,

Great!

Thank you. I added .responsehistoryheader to my userscript on Gist GitHub.

Cheers!
Average of ratings: Useful (1)
In reply to Dominique Bauer

Re: Printing students' quiz responses without the correct answers

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
To save a review page as a PDF file in Google Chrome, see for example wikiHow ↗. In short, select "Print..." from the Chrome menu, or simply press Ctrl+P. Select "Adobe PDF" or "Save as PDF". Adjust the settings (paper size, margins, etc.) and click the Print button.
Average of ratings: Useful (2)