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

  1. Build framework in Quiz mirrored after review_options
  2. Convert question types
  3. Investigate short/long answer manual feedback process
  4. Make the generic "score" box part of FAPI, and themeable
  5. UI and icon cleanup
  6. Allow 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 ?

Comments

djdevin’s picture

Issue summary: View changes
djdevin’s picture

Issue summary: View changes
djdevin’s picture

Issue summary: View changes
djdevin’s picture

Issue summary: View changes
djdevin’s picture

Issue summary: View changes
djdevin’s picture

Issue summary: View changes
djdevin’s picture

Issue summary: View changes
djdevin’s picture

StatusFileSize
new4.68 KB

POC attached

djdevin’s picture

StatusFileSize
new32.15 KB
djdevin’s picture

Status: Active » Needs review
StatusFileSize
new17.31 KB

Status: Needs review » Needs work

The last submitted patch, 10: uniform_quiz_question-2328657-10.patch, failed testing.

djdevin’s picture

StatusFileSize
new29.97 KB
djdevin’s picture

Status: Needs work » Needs review

The last submitted patch, 8: uniform_quiz_question-2328657-8.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 12: uniform_quiz_question-2328657-12.patch, failed testing.

djdevin’s picture

Title: Uniform Quiz question results/feedback » Uniform Quiz question result, feedback, icons
Issue summary: View changes
djdevin’s picture

StatusFileSize
new50.38 KB
djdevin’s picture

Status: Needs work » Needs review
djdevin’s picture

StatusFileSize
new24.27 KB

Status: Needs review » Needs work

The last submitted patch, 17: uniform_quiz_question-2328657-17.patch, failed testing.

djdevin’s picture

Status: Needs work » Needs review
StatusFileSize
new79.64 KB

  • djdevin committed 9d99e84 on 7.x-5.x
    Issue #2328657 by djdevin: Massive refactoring of Quiz question feedback...
djdevin’s picture

Status: Needs review » Fixed
djdevin’s picture

Issue summary: View changes

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

nithinkolekar’s picture

Status: Closed (fixed) » Active

still generating 404 in the log for sites/all/modules/quiz/images/question_808080_64.png.

This image is not present in code repository too.

djdevin’s picture

Status: Active » Closed (fixed)