Home Question Writer Forum
A support forum for Question Writer quiz software.


Does Collator work without email?

I use the "Publish to the Web" option and serve quizzes from my internal web server. I've also set up Collator 1.3 to store the results on my local database. When "Send results via website" is enabled everything runs fine, email gets sent and database gets updated. But about half of my users don't have internet access. I figured I could just uncheck the "Send results..." option for those quizzes, and rely on the results in the database. However, this doesn't appear to work. I've found that even on those accounts that *do* have 'net access, nothing gets written by Collator unless the "Send results..." option is enabled. Is this the intended behavior? Is there any way I can skip the e-mail and just have the quiz results sent to my database?

DougJ
April 13, 2010 09:48PM


Hi Doug,

A user will usually require internet access in order to send the results to your server, so that it can store the results in the database. The server can then optionally send an email to you with those results too. The thing to understand is that it is the server that sends the e-mail, the client doesn't send it directly.

If the users are on the same network as you, they might be able to reach your server, even if they don't have full internet access, but if they're on another network or accessing the quizzes from home, they'll need internet access to send the results through.

Alexander
April 14, 2010 03:49AM


Hi Alex

The the quiz server, database server, collator and clients are all on the same internal network (same subnet as well, so there are no routers involved). If I understand your comment above, you're saying that the Collator script writes to the database first, then triggers an e-mail. But what I'm seeing appears to be that it tries to send the email first, and will only write to the database if the e-mail succeeds.

In other words, I only get database updates in one of the 4 possible scenarios:

w/ 'net access, Send Results yes: DB Update SUCCESS
w/ 'net access, Send Results no: DB Update FAILS
w/o 'net access, Send Results yes: DB Update FAILS
w/o 'net access, Send Results no: DB Update FAILS

As I said in the first post, I really don't need the e-mail function, all I need is for the results to go to the Collator, then I can query the db. Is there a way I can accomplish this?

DougJ
April 14, 2010 03:10PM


Hi Doug,

You can switch off the email functionality in a file named 'codedprefences.inc.php'

Look for the function 'sendResultsByEmail' and have it return 'false' instead of 'true'.

I'm not 100% this will fix your problem. The quizzes should send the results to your server if they can access the server. The server should send the e-mails if it can access the internet. You might want to tweak the server address so that the local machines can see it (maybe use a local IP address).

Alexander
April 14, 2010 05:35PM


Alex

I got this working by making some inelegant but effective changes to the results.php:

1 - Hard-coded $emailID to quiz@mycompany.com
2 - Commented out the "if(isValidEmail...) section
3 - Commented out the "if(isset...) section
4 - Commented out the "if(SendResultsByEmail...) section

In the quizzes themselves, I kept both of the "Send results..." options enabled, but used a dummy address. Finally, I pointed both results servers to my local database.

Net result: all machines, regardless of internet access, can take a quiz from my local web server and have the results posted to my local database. I set up a simple ODBC connection for the training manager so he can use Excel to query the results, and everyone's happy.

I hope this might help somone else with similar needs. Anyone else trying this (probably) doesn't need to make the first 3 changes, but my php skills are crude, so I erred on the side of caution. They should also note that change 1 will result in *all* new records showing the same email address. You'll need to make sure your quiz prompts for some other unique identifier or you won't know who actually took the quiz. (we use employee clock number here).

DougJ
April 14, 2010 05:54PM


Alex - FYI: I did try setting sendResultByEmail to false in codedpreferences, (seemed like a logical thing to try), but it still failed to poulate the db. I'm not totally sure what combination of my changes got it working, but it is, I'm happy, and I learned a long time ago to stop questioning success. Thanks for your help!

DougJ
April 14, 2010 05:59PM


Doug - I'm glad this worked out for you.

Alexander
April 15, 2010 01:32AM




Your Name:  (Required - Can be a nickname)
Your Email:  (Optional - Won't appear online)
Subject: (Required)
Anti-Spam: Complete this phrase.
"One small step for man; one giant leap for

"