Problem/Motivation
Currently, every Quiz question type provides its own question results and feedback.
It is completely custom per-type and is very hard to override in the theme, as you must override every question type on the system to make a simple change.
Proposed resolution
Let's research forming a default question type feedback/result format, that all question types can use, but still leave the ability to have it be overridden in more complex question types.
In doing this we will have less code in the question types, and the new feedback options introduced in Quiz 5 will be more easily utilized. We can show/hide columns based on the feedback options.
Currently the question types are even responsible for checking the access of feedback, making calls to canReview('answer_feedback'). We can codify this so that the question type returns a column named answer_feedback, and then Quiz will determine the access.
Remaining tasks
Build framework in Quiz mirrored after review_optionsConvert question typesInvestigate short/long answer manual feedback processMake the generic "score" box part of FAPI, and themeableUI and icon cleanupAllow other modules to alter results/feedback (for example, adding a peer comparison)
User interface changes
All question feedback will now be uniform.
All question types now share the same icons using a helper function.
API changes
Removal of getReportForm**() arguments. This will now return an array keyed by the allowed values in review_options. Submit, validate, and feedback functions no longer require arguments. Remove permission checks in question types and instead delegate back to Quiz core.
* = user choice
multichoice/matching
| Choice | Correct? | Answer feedback | Points | |
|---|---|---|---|---|
| * | Answer 1 | Correct | This is the feedback for Answer 1 | 1 |
| Answer 2 | Incorrect | This is the feedback for Answer 2 | 0 | |
| Answer 3 | Incorrect | This is the feedback for Answer 2 | 0 |
truefalse
| Choice | Correct? | Answer feedback | Points | |
|---|---|---|---|---|
| * | True | Correct | This is the feedback for true | 1 |
| False | Incorrect | This is the feedback for false | 0 |
Short/long answer
| Choice | Correct? | Answer feedback | Points | |
|---|---|---|---|---|
| * | My short answer response | This is the feedback for the short answer provided by the administrator | ? |
| Comment | File | Size | Author |
|---|---|---|---|
| #21 | uniform_quiz_question-2328657-21.patch | 79.64 KB | djdevin |
| #19 | lKGbSNz.png | 24.27 KB | djdevin |
| #17 | uniform_quiz_question-2328657-17.patch | 50.38 KB | djdevin |
| #12 | uniform_quiz_question-2328657-12.patch | 29.97 KB | djdevin |
| #10 | uniform_quiz_question-2328657-10.patch | 17.31 KB | djdevin |
Comments
Comment #1
djdevinComment #2
djdevinComment #3
djdevinComment #4
djdevinComment #5
djdevinComment #6
djdevinComment #7
djdevinComment #8
djdevinPOC attached
Comment #9
djdevinComment #10
djdevinComment #12
djdevinComment #13
djdevinComment #16
djdevinComment #17
djdevinComment #18
djdevinComment #19
djdevinComment #21
djdevinComment #23
djdevinComment #24
djdevinComment #26
nithinkolekar commentedstill generating 404 in the log for sites/all/modules/quiz/images/question_808080_64.png.
This image is not present in code repository too.
Comment #27
djdevinImage issue fixed in #2692909: Icons on multiple choice node not working