Hi,
This is a great module. Thanks for all your work.
I have trouble in collecting comments about a Quiz from users. This is mainly due to Quiz starting When a user views a Quiz Node. Prior to 2.0 version, The 1.0 quiz used to have a tab called "Take Quiz". The Quiz will start only when the user clicks the tab.

However, In 2.0 version, The Quiz starts when the user just views the node. This has the following Drawbacks
1. We don't have a page where we show the description of a Quiz along with comments from user (probably from those who have taken it)
2. The users can still get to the comment form from the quiz teaser display. This page will have both the first Quiz question and the comment form.
3. If the user enters a comment, This gets displayed under all the questions while taking the Quiz
4. Also it is hard to override the access to take a Quiz. For example, I would like to control access to quiz only for users who have sufficient user points. If the starting of quiz is triggered by a menu item, i can alter the access control function easily to suit my needs.

In light of the above points, can we restore the start quiz functionality as found in version 1 and leave the node view as usual. The changes for this in the code may be simple, as we have a "quiz_take_quiz" function. Hence i guess we just need to define an appropriate menu item.

Thanks

Comments

mbutcher’s picture

We will not be going back to the menu-triggered start event for Quiz. The main Quiz node will continue to be the controller for the quiz.

However, we are looking at ways of adding a step before the first question. This will be used for adding instructions, confirming that the user wants to take the quiz, and so on.

The access system in version 3 has undergone some changes, though I doubt any will give you exactly what you want out of the box. Feel free to post patches to the access system.

greylogic’s picture

Hi,

I checked quiz 3.0 and the new features are really great :-). thanks. I am still stuck with this issue and the only way i could implement comments and access control is by hacking the quiz modules source. I know you told in your previous post that you don't want to change this.

Just curious to know, is there any requirement or specific reason for this way of implementation.

Because, not having user comments is a major draw back for quiz. If you enable comment it will get displayed under all the questions in the quiz unless you override it or disable comments for quiz altogether.

mbutcher’s picture

Version: 6.x-2.1 » 6.x-3.0

First, you can basically emulate some of the desired functionality by beginning the quiz with a Quiz Directions slide. When this slide appears first, the quiz timer is started (technically it is re-started) when the user clicks the submit button on the directions slide. But it's not going to solve your problem.

Here's a better solution:

Why not add a new node type that is displayed before a quiz node -- something like a quiz intro type that uses a node reference to associate with the quiz? This would give you a place to put any old arbitrary content and also have comments. Displaying the node reference as a "Start Quiz" link would essentially achieve all that you are asking for here, would it not? And you would have all of the usual access to the menu access system.

greylogic’s picture

Hi,
Thanks for your quick reply.

Yes, Having a new node type will help to have user comments for the quiz. The new node type will act like a proxy node for quiz. However I am not sure how to control access to view the quiz (in this case take quiz). With a menu, i can use drupal hooks to override the function that controls access on a per user level. I could not find a similar overriding mechanism for the access control implemented by a module for a node type using hook_access.

mbutcher’s picture

You could also hook_menu_alter() the node view menu item and modify the access callback, wrapping the standard user_access functions in your own custom access handler. I'd imagine that the function would do something like this:

my_access($node, $user) { // Not sure of the exact args for user_access()
  if ($node->type == 'quiz') {
    // Do your own stuff
  }
  else {
    user_access(); 
  }
}

This is probably the least intrusive way of doing things.

You could also check out Node Access.... That *might* work.

Feel free to hop onto #drupal-quiz in IRC and we can chat about various alternatives.

greylogic’s picture

I think your last solution will work for access control. Thanks.

Sivaji_Ganesh_Jojodae’s picture

Title: Quiz and Comments » collecting comments about a Quiz from users
Issue tags: +ToDo

Changing title and adding to quiz "ToDo" list.

joz14’s picture

I am Teddy. Once you read this you cannot get out. Finish reading this until it is done! As I said, I am Teddy. I am 13 years old and have no eyes and blood all over my face. I am dead. If you don't post this in 12 quizzes, I will come to ur house at midnight and hide under ur bed. When ur asleep I'll kill you. Don't believe me? Case 1: Patty Buckles got this email. She doesn't believe in chain letters. Well, foolish Patty. She was sleeping when her TV started flickering on and off. Now she's not with us anymore. Haha Patty, haha. You don't wanna be like Patty, do you? Case 2: George M Simon hates chain mail, but he didn't wanna die that night. He put it in 4 quizzes. Not good enough George. Now George is in a coma we don't know if he'll ever wake up. Haha George haha! Now, you don't wanna be like George do you? Case 3: Valarie Tyler got this letter. Another chain letter she thought. She only put this in 7 quizzes. Well, that night when she was having a shower she saw Bloody me

djdevin’s picture

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

This issue is being closed because it is filed against a version that is no longer supported.