moodleou / moodle-quiz_answersheets

A Moodle quiz report to allow quiz attempts to be exported
8 stars 15 forks source link

Instruction for all question types in Attempt sheet screen #8

Closed HuongNV13 closed 4 years ago

HuongNV13 commented 4 years ago

Hi @timhunt, Please help me to review it

Including in this branch:

The code was tested done by our tester

Thanks,

HuongNV13 commented 4 years ago

I can see that Pull #6 already merged to master, so I rebased with latest master branch

timhunt commented 4 years ago

Thanks Huong. This looks good. Some discussion follows, but nothing to stop me merging this.

1) The renderer-wrangling you did to get the instructions to display is clever, and probably the best way. However, it is also a little scary. For the record, here is some discussion of other possible options and why they are less good:

Also, this is just the first requirement like this we have here. We need to do things like displya options for Matching questions, etc. And your technique should extend to cover that.

So, overall, I think you chose the best way to handle this. Just outlining my thoughts here.

2) I am not sure it is good to test every single case in get_question_instruction_cases. In a sense, you have just written a unit tests for get_string. here ;-). Howver, I will not delay merging this. If we ever need to cahnge the instruction text, we can decide then whether to update the tests too, or remove some of the cases. (It is good to have some test that get_question_instruction works.)