The 'diff' module improves the Revisions tab to let you pick any two revisions and see their differences. http://drupal.org/project/diff

It accomplishes this with hook_diff() and has a node_diff() default hook for all nodes. That gets us the question prompt, but to see differences in the answers we'll need to implement the hook for each question type.

We could go OO with this by added a method to the QuizQuestion interface, perhaps "getDifferencesForm()". Then the main quiz_question module could make one hook that delegated appropriately.

Thoughts?

Comments

mbutcher’s picture

I would support adding this to QuizQuestion either as an abstract method or with a default implementation that provides some very generic answer.

turadg’s picture

Ok. I think I'll do it then. Next question, since you wrote the OO system, what do you think of making an AbstractQuizQuestion to go along with the QuizQuestion interface? Currently none of the quiz questions have parent classes, so they could all inherit the new abstract one.

mbutcher’s picture

I would like to have an abstract class. The original design was, in fact, an abstract class. (The explanation as to why it is not is boring and irrelevant.)

So, yes, adding an abstract class would be good. I encouraged falcon to use his multichoice object as a base class for further refinements of multiple choice question types, too.

I just noticed that in Quiz 3, AbstractQuizQuestionResponse does not appear to indicate that it implements QuizQuestionResponse.... I'd better check on that in Quiz 4.

turadg’s picture

FYI, setting AbstractQuizQuestionResponse to implement QuizQuestionResponse required two other changes so the signatures of the interface methods and implementation methods matched. e.g.,

  public function formatReport($showpoints, $showfeedback);

-->

  public function formatReport($showpoints = TRUE, $showfeedback = TRUE);
falcon’s picture

Version: 6.x-4.x-dev » 6.x-5.x-dev
Status: Active » Postponed
djdevin’s picture

Component: Code » Code - Quiz core
Issue summary: View changes
Status: Postponed » Closed (outdated)

This issue is being closed because it was filed against a version that is no longer supported. If the issue still persists in the latest version of Quiz, please open a new issue.