Adding email notification

Rosamunda - June 25, 2007 - 00:14
Project:Quiz
Version:6.x-2.x-dev
Component:User interface
Category:feature request
Priority:normal
Assigned:Unassigned
Status:won't fix
Description

Hello there!
I´ve readed that there is no further maintaining for this project in its 4.7 version, but I think my question here must be something already supported by it, but that I just cannot find how to manage with.
If I click on "my results" I cannot see the student´s points, or the student´s score. It shows just the ID of the quiz. If I want to see the scores, I need to click the "view" link on each quiz.
How can those scores show up?

My other questions (maybe feature requests ... for 5.0?) are just this little two:
1. Does (or can) the system send an email to the admin each time a student completes a quiz?
2. Does (or can) the system insert the student in a new role each time he passes correctely a quiz?

This is the first time that I´ve testing this EXCELLENT module! Gee, I really needed this, it´s terrific!
Thanks!!!

Rosamunda

#1

Rosamunda - June 25, 2007 - 20:11
Title:Showing score?» QUIZ MODULE: Showing score?

Just changing the title so everyone can address the issue better...

#2

skeftomai - July 10, 2007 - 21:38

Hi! I need #1 myself, so I will very likely be writing a module for that today. However, I am going to be writing this for Drupal 5, so you or someone may have to do some modding for 4.7.

I think I'll hook into the exam create/edit form's Exam Summary Options fieldset and add some fields. I'm thinking it will look like this:

-- Email Options --
* No emailing
* Email quiz taker
* Email the following address: __________________

Email body:
_________________________________________________________
_________________________________________________________
_________________________________________________________
_________________________________________________________

Mail Format:
* Plain text
* HTML

Do you have any ideas/suggestions?

#3

add1sun - July 11, 2007 - 01:51
Title:QUIZ MODULE: Showing score?» Adding email notification
Category:support request» feature request

@ Rosamunda, actually you are right that the Quiz Results page does not show you the score and you do have to go into the view link. This seems like a reasonable feature request to me but I won't have time to work on it any time soon.

@ skeftomai, cool that you are doing work on the email stuff. I do hope that when you say you are writing a module, you mean that you are writing a patch for Quiz and not creating a whole new module. One thing that might work instead of writing it all from scratch just for Quiz module would be to look at using Actions module. If you do add this email configuration to the quiz edit page, instead of putting it in the Summary Options fieldset, you really should put it in its own new fieldset of Email Options. You should probably also have settings that allow the site admin to set the default values for these fields so they don't have to fill it out every time they create a quiz when the info is the same most or all of the time.

These are just some of my initial thoughts. I'll need to think about it a bit more in terms of the best approach and UI but please feel free to discuss ideas and submit any patches you come up with.

I'm also changing this issue to reflect this particular feature request and will make new issues for the other two so we can keep the conversations on each of them focused and this issue seems to has the most substantive discussion here of the three.

Add score to Quiz Results table is here now http://drupal.org/node/158335 and
Add quiz taker to role upon passing is now http://drupal.org/node/158338

#4

add1sun - July 11, 2007 - 01:54
Version:4.7.x-1.x-dev» 6.x-2.x-dev

Whoops, also meant to move this to HEAD since new features will go in there.

#5

skeftomai - July 11, 2007 - 16:00

add1sun:

Thanks, I will look at the Actions module after writing this.

I had considered making a patch, but I was neither sure whether that was best nor whether that was what you all, the developers, wanted. Are you sure you want this as a patch and not as a module? What if the server does not have email enabled? I have some code written for a module, but it's not a problem to just make a patch. If you really do think a patch is better, let me know and I'll make a patch for the Quiz module.

#6

skeftomai - July 12, 2007 - 21:44
Status:active» patch (code needs review)

And here's the patch. Let me know if anything's wrong. Not sure I'll have time to fix it, but I'd like to know.

AttachmentSize
quiz_email.patch11.73 KB

#7

nisguy - June 6, 2008 - 18:13

Works for me, Skeftomai. Thanks for the patch. It was even easy to do by hand, since I'm not technically inclined.

And here's the workflow-ng mail message i used, in case anyone else needs to do the same (requires token module),


Hello,

This email is to inform you that [quiz:user-name] has just taken the [quiz:title] quiz. View the results at the following link:

[quiz:site-url]/admin/quiz

cheers,

[quiz:site-name]

#8

westwesterson - August 5, 2008 - 11:40
Status:patch (code needs review)» won't fix

If you need this please help test the patch for workflow-ng. This has been the proposed solution for dealing with email for a long time.

 
 

Drupal is a registered trademark of Dries Buytaert.