openwebwork / webwork2

Course management front end for WeBWorK
http://webwork.maa.org/wiki/Main_Page
Other
145 stars 165 forks source link

Remove the checkboxes for showing correct answers and solutions. #2275

Closed drgrice1 closed 8 months ago

drgrice1 commented 10 months ago

Remove the "Show solutions" checkbox for tests (a.k.a. gateway quizzes) Solutions are just shown when they can be. This is the same as this is for homework problems. There is just no reason for the checkbox in tests either.

The show correct answers checkbox is also removed for both homework and tests. Correct answers are just shown when they "can" be. However, there are two cases in which I don't think that it is appropriate to show the correct answers without any user interaction. This is where the corresponding PG pull request (https://github.com/openwebwork/pg/pull/982) that adds a "Reveal" button for correct answers comes in.

The first case is in "Show Me Another" problems when the course configuration is set to allow correct answers to be shown for these problems. Students should be able to see feedback messages and such without seeing the correct answer. The point of these problems is for students to obtain practice working problems without simply looking at the correct answers, so an additional step should be needed to see the correct answer.

The second case is for instructors viewing problems before answers are available for students. The instructor may be viewing the problem with students present (for example, when working problems in class) and may want to be able to show messages and such without showing the correct answer.

There is a new course configuration option in "Problem Display/Answer Checking". If this option is true, then answer feedback is immediately available in problems after answers are available. Students do not even need to click "Submit Answers" to make this feedback appear. Furthermore, the $showPartialCorrectAnswers variable set in some problems that prevents showing which of the answers are correct is ignored if this option is true. This option is true by default, but if it is believed that the majority won't want this, then it can be switched to false. This option was actually added as an afterthought. It was initially implemented with automatic feedback after answers are available with no option to disable that behavior. I would also be happy reverting to that if we feel that this is something everyone will want.

This automatic feedback is particularly useful for tests that have multiple pages. Currently you need to change the page, click the show correct answers checkbox, then click check test, and that has to be repeated for each page. That is a real pain if each problem is on its own page. The check box is gone, but you still have to click check test after changing pages. With this option the feedback is there with each page change (the same as it was before when the problem grader is enabled).

Also the %must hash has been removed. It was not used at all except in Problem.pm for one permission, and that usage was incorrect. It resulted in recordAnswers always being forced to be true with the default setting of avoid_recording_answers set to "nobody". The %must hash can not force an option to be disabled. It can only force it to be enabled. This permission was done correctly in the GatewayQuiz.pm module, so that approach is now used in Problem.pm also.

Edit: This now takes the automatic feedback option a bit further (as requested by @dlglin). Now the automatic feedback is shown anytime that a student returns to a problem that has been previously answered.

Also there is another new option added. If the $pg{options}{correctRevealBtnAlways} option is true, then the "Reveal" button will be shown instead of the correct answer being immediately visible anytime that correct answers are available in the feedback (except when the problem grader is active and the last time that a student sees a problem before needing to request a new problem version when problem randomization and show correct on randomize are enabled). This option is false by default. This was also requested by @dlglin.