bfh / moodle-quiz_archive

GNU General Public License v3.0
4 stars 3 forks source link

Add options to show/hide the history and the correct answer #13

Closed PhilippImhof closed 1 year ago

PhilippImhof commented 1 year ago

This PR adds two options that allow the teacher to decide whether or not to include the history of saved answers and whether or not to include the correct answer.

I took the liberty to do some major changes to archive_options.php, because using another parent class made much of the existing code redundant.

The PR includes a behat test for the two options.

lucaboesch commented 1 year ago

Thanks so much @PhilippImhof for this improvement, which I'm going to merge. I've looked at the used strings and propose a slight amendment which I will edit in:

☐ Include response history table ☐ Include correct answer banner

Because I was seeing the green ✅ ticks in the questions and thought "Hey, this distinguishes the correct answers, too, doesn't it?".

I noticed an additional thing, which is that if there is no attempt at all, the report just shows those ☐ Include response history table ☐ Include correct answer banner options and the "Show report" button again. You might think the button didn't work. A notice with the string "There are no attempts to show" (quiz|noattemptstoshow) could come in handy. I will create an issue.

Best, Luca