Posted by Summit on December 1, 2008 at 7:39pm
Jump to:
| Project: | Quiz |
| Version: | 6.x-3.x-dev |
| Component: | User interface |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
Hi,
As asked a start for actions. I could think of the following actions:
- action to go from question X to question Y on checking asnwer A on question X
this action off course every X,Y and A should be able to set.
- action to go from page a to page b on answer A on question X
this action to have a break or pause. Off course then the quiz-results until then should be saved
- action to go from quiz I to quiz 2 (to have flexible quizzes which could be mixed).
Please follow this thread with probably other actions. I brainstormed above 3 :)
Greetings,
Martijn
Comments
#1
Email the user the results.
#2
Workflow actions:
One- if the quiz are only multiple choice questions, they got immediate answer of how they did it
Two if there are open questions in the quiz, they get a message that the quiz is under review and they hear about it soon
Two: The open questions are put in a workflow and when they are answered, the answer is published, when every question is answered, so all answers are published, then a message goes out to the user what his/her results are.
Greetings,
Martijn
#3
I'm using Quiz for an online test, and trying to get actions to work to email someone once the quiz is complete. However, while the email action is generally working, it's not replacing tokens ([user] etc.) -- is this something that could be easily added? If somebody could point me in more-or-less the right direction I might be able to have a go at coding this in if it's not there already.
Thanks,
George
#4
Hi,
I´m using a quiz for finding out what kind of houses people are intending to build - detached familiy houses.
The Quiz askes "How many rooms?", "How much are you able to pay?" and so on.
They get their result at the end - together with the opportunity to take a look at certain houses as possible solutions depending on their answers (eg. "how many rooms?")
And they can fill out a certain webform depending on the score
(eg. "Get your first consulting as a bonus ")
I produced this by using HTML including shadowbox-links in the feedback of the quiz-scores and the answers of the question type.
The point is that this quiz is for anonymous users as quiz-takers.
It would be great if I could send the result + IP Address of the anonymous user via email to the quiz manager.
Thanks
4kant
#5
quiz module has a hook called hook_quiz_finished() which gets called at the end of quiz. To achieve the above mentioned thing you need to add the following code to quiz.module file.
1. function quiz_quiz_finished in quiz.module line no 1321.
if ($user->uid == 0) {$quiz_manager = user_load($quiz->uid);
drupal_mail('quiz', 'notice', $quiz_manager->mail, NULL, array($quiz, $score, $rid));
}
The above code will send mail to user who created the quiz node.
2. function function quiz_mail in quiz.module line no 1358
$message['subject'] = '[ ' . $_SERVER['REMOTE_ADDR'] . ' ]'. $subject;This line will send the IP address of client along the subject of the mail. I have no bandwidth to test this code now, use it on your own risk.
#6
Sivaji,
after one month of hard working on several projects and some beautyful days on the Italian beach: Thanks for your lines of code.
They of course do work as expected.
Is it possible to send the questions and given answers of this certain user (with this certain IP) together with that mail to the quiz manager?
Again thanks a lot and greetings to South India!
4kant
#7
I am trying to use passing a quiz to change roles. In this case the trainee role is given on account creation. upon passing the quiz, the trainee role is then revoked and the actual role is then delegated. At this time I am tring to write a PHP drupal action to do this. The only two objects that are exposed are the &$object and $context objects. I have no idea what is in them or how they are structured and since they seem to only exsist in the Actions scope, I cant use a devel-exec-php window to experiment either. Perhpas what is required is a rules hook?
#8
Role changing would be helpful for me as well - have you solved this?