WordPress.org

Ready to get started?Download WordPress

Forums

WP Survey And Quiz Tool
Error on submission of survey (38 posts)

  1. kylen20
    Member
    Posted 2 years ago #

    Hi

    I've just installed the plugin and set up my first survey http://www.movebeyond.net/business-coaching/cm-connected-business-development-survey/, but I get the following error message at the end:

    Warning: Invalid argument supplied for foreach() in /home/kylenewm/movebeyond/wp-content/plugins/wp-survey-and-quiz-tool/lib/Wpsqt/Shortcode.php on line 226

    Fatal error: Call to a member function get_results() on a non-object in /home/kylenewm/movebeyond/wp-content/plugins/wp-survey-and-quiz-tool/lib/Wpsqt/Mail.php on line 62

    As far as I can tell I've set everything up correctly. I've added email addresses to the options page, set up and enabled the quiz, entered two sections and put one question in each section.

    Please can you tell me what I need to do to fix this. Thanks,

    Kyle

  2. Ollie Armstrong
    Member
    Plugin Author

    Posted 2 years ago #

    Just taken your quiz (under the name of Ollie Armstrong in case you want to delete that result) and I see the error. Looking into it now.

    Can you just tell me the options you have set in the quiz edit page? I need to try to reproduce this.

    If you don't mind providing me access to your dashboard then that would make it easier. If you want to email the username/password to M8R-pe0wo21@mailinator.com and I'll take a look.

    Ollie

  3. kylen20
    Member
    Posted 2 years ago #

    Hi Ollie,

    Thanks for the update. The results aren't currently saving so no need to delete it. I assume as a result of the error.

    Let me know if you need a login to access my dashboard or any further info.

    Kyle

  4. Ollie Armstrong
    Member
    Plugin Author

    Posted 2 years ago #

    If you don't mind providing me access to your dashboard then that would make it easier. If you want to email the username/password to M8R-pe0wo21@mailinator.com and I'll take a look.

    Ollie

  5. kylen20
    Member
    Posted 2 years ago #

    Did you get my email Ollie? Any progress?

  6. aceofjames
    Member
    Posted 2 years ago #

    Hi Ollie,
    I am getting the same Fatal Error as Kyle but not the shortcode error.

    Fatal error: Call to a member function get_results() on a non-object in /home/socialm/public_html/wp-content/plugins/wp-survey-and-quiz-tool/lib/Wpsqt/Mail.php on line 62

    Do you need to login to my Dashboard too or is there an update to address this?

    This is the perfect solution for my needs just cant get past the Fatal Error above!

    Thanks!

    AceOfJames

  7. kylen20
    Member
    Posted 2 years ago #

    Good to hear I'm not the only one James. I too hope there's a solution coming soon as I really need to launch my survey this week and don't want to have to resort to switching to another plugin.

    Kyle

  8. aceofjames
    Member
    Posted 2 years ago #

    Hi Kyle,
    I have a similar situation and need it working asap! It is one of the better survey, quiz scripts I have found though! Let's cross our fingers!

    AceOfJames

  9. Ollie Armstrong
    Member
    Plugin Author

    Posted 2 years ago #

    Hi guys, I am taking a look at this now. It would seem that the wpdb global is not being declared so if you can open the file that the fatal error is referencing and then add the line: global $wpdb; just under line 19 hopefully that will fix it.

    Cheers,
    Ollie

  10. aceofjames
    Member
    Posted 2 years ago #

    Hi Ollie,
    Thanks worked and I got:

    Thank you for completing our survey!

    However, it is not saving to the database and the REQUIRED fields selected during setup of the questions failed. There were red asterix's by the required questions but you could leave them blank and the test would go through and not save.

    Thanks for the first fix! What about this one? ;)

    Thanks for the help!

    AceOfJames

  11. Ollie Armstrong
    Member
    Plugin Author

    Posted 2 years ago #

    Are you sure its not saving? I don't see why it shouldn't as it does on my test server. Could you open up your wp-config.php file and at the bottom change the wp_debug from false to true and tell me any errors you get at any point during the quiz.

    Cheers

  12. kylen20
    Member
    Posted 2 years ago #

    Didn't work for me Ollie, actually I now get the first error also appear on the second question of the quiz.

    Kyle

  13. Ollie Armstrong
    Member
    Plugin Author

    Posted 2 years ago #

    Kylen,

    You say you added email addresses to the options page? Could you try with just one email address? I think I may have forgotten to test multiple email addresses and it would explain the errors.

    Update: I just added a second email address and it still won't give me the errors you get. Could you grab a screenshot of the quiz options page for me please?

    Cheers,
    Ollie

  14. kylen20
    Member
    Posted 2 years ago #

    Apologies, I separated the errors in the wrong place on the previous post. This is correct.

    Debug errors after question 1:

    Notice: Undefined index: questions in /home/kylenewm/movebeyond/wp-content/plugins/wp-survey-and-quiz-tool/lib/Wpsqt/Shortcode.php on line 226
    Warning: Invalid argument supplied for foreach() in /home/kylenewm/movebeyond/wp-content/plugins/wp-survey-and-quiz-tool/lib/Wpsqt/Shortcode.php on line 226
    Notice: Undefined index: id in /home/kylenewm/movebeyond/wp-content/plugins/wp-survey-and-quiz-tool/lib/Wpsqt/Shortcode.php on line 235
    Notice: Undefined index: type in /home/kylenewm/movebeyond/wp-content/plugins/wp-survey-and-quiz-tool/lib/Wpsqt/Shortcode.php on line 237
    Notice: Undefined index: type in /home/kylenewm/movebeyond/wp-content/plugins/wp-survey-and-quiz-tool/lib/Wpsqt/Shortcode.php on line 238

    Debug errors after question 2 (last question, so I assume completion of survey:

    Notice: Undefined index: questions in /home/kylenewm/movebeyond/wp-content/plugins/wp-survey-and-quiz-tool/lib/Wpsqt/Shortcode.php on line 226

    Warning: Invalid argument supplied for foreach() in /home/kylenewm/movebeyond/wp-content/plugins/wp-survey-and-quiz-tool/lib/Wpsqt/Shortcode.php on line 226

    Notice: Undefined index: id in /home/kylenewm/movebeyond/wp-content/plugins/wp-survey-and-quiz-tool/lib/Wpsqt/Shortcode.php on line 235

    Notice: Undefined index: type in /home/kylenewm/movebeyond/wp-content/plugins/wp-survey-and-quiz-tool/lib/Wpsqt/Shortcode.php on line 237

    Notice: Undefined index: type in /home/kylenewm/movebeyond/wp-content/plugins/wp-survey-and-quiz-tool/lib/Wpsqt/Shortcode.php on line 238

    Notice: Undefined variable: wpdb in /home/kylenewm/movebeyond/wp-content/plugins/wp-survey-and-quiz-tool/lib/Wpsqt/Mail.php on line 54

    Notice: Trying to get property of non-object in /home/kylenewm/movebeyond/wp-content/plugins/wp-survey-and-quiz-tool/lib/Wpsqt/Mail.php on line 54

    Notice: Undefined variable: wpdb in /home/kylenewm/movebeyond/wp-content/plugins/wp-survey-and-quiz-tool/lib/Wpsqt/Mail.php on line 58

    Notice: Trying to get property of non-object in /home/kylenewm/movebeyond/wp-content/plugins/wp-survey-and-quiz-tool/lib/Wpsqt/Mail.php on line 58

    Notice: Undefined variable: wpdb in /home/kylenewm/movebeyond/wp-content/plugins/wp-survey-and-quiz-tool/lib/Wpsqt/Mail.php on line 63

    Fatal error: Call to a member function get_results() on a non-object in /home/kylenewm/movebeyond/wp-content/plugins/wp-survey-and-quiz-tool/lib/Wpsqt/Mail.php on line 63

  15. Ollie Armstrong
    Member
    Plugin Author

    Posted 2 years ago #

    Right, did you definitely place the global $wpdb; line in the correct place? The lib/Wpsqt/Mail.php file should look exactly like this http://pastebin.com/ewEuux1S.

    Can you double check this please? It should have solved this issues.

    Ollie

  16. aceofjames
    Member
    Posted 2 years ago #

    I went through the whole quiz without selecting anything and was not stopped then on the final page this is the error:

    WordPress database error: [Unknown column 'datetaken' in 'field list']
    INSERT INTO wp_wpsqt_all_results (datetaken,timetaken,person,sections,item_id,person_name,ipaddress,score,total,percentage,status,pass) VALUES ('1313398090.8',20,'a:0:{}','a:3:{i:0;a:8:{s:2:\"id\";s:1:\"1\";s:7:\"item_id\";s:1:\"1\";s:4:\"name\";s:11:\"Section - A\";s:5:\"limit\";s:1:\"0\";s:5:\"order\";s:6:\"random\";s:10:\"difficulty\";s:4:\"easy\";s:9:\"timestamp\";s:19:\"2011-08-12 21:25:54\";s:9:\"questions\";a:1:{i:0;a:16:{s:2:\"id\";s:1:\"1\";s:4:\"name\";s:34:\"What is the Capitol of California?\";s:4:\"type\";s:6:\"Single\";s:7:\"item_id\";s:1:\"1\";s:10:\"section_id\";s:1:\"1\";s:10:\"difficulty\";s:4:\"Easy\";s:9:\"timestamp\";s:19:\"2011-08-07 03:47:23\";s:7:\"answers\";a:3:{i:0;a:3:{s:4:\"text\";s:10:\"Santa Cruz\";s:7:\"correct\";s:2:\"no\";s:7:\"default\";s:2:\"no\";}i:1;a:3:{s:4:\"text\";s:10:\"Sacramento\";s:7:\"correct\";s:3:\"yes\";s:7:\"default\";s:2:\"no\";}i:2;a:3:{s:4:\"text\";s:13:\"San Francisco\";s:7:\"correct\";s:2:\"no\";s:7:\"default\";s:2:\"no\";}}s:6:\"points\";s:1:\"1\";s:8:\"required\";s:3:\"yes\";s:8:\"add_text\";s:0:\"\";s:5:\"image\";s:312:\"<img src=\\\"http://santacruzsocialmedia.com/facepress/wp-content/uploads/2011/08/California-Map.png\\\" alt=\\\"\\\" title=\\\"California Map\\\" width=\\\"250\\\" height=\\\"225\\\" class=\\\"alignnone size-full wp-image-12\\\" />\";s:13:\"multiple_name\";a:3:{i:0;s:10:\"Santa Cruz\";i:1;s:10:\"Sacramento\";i:2;s:13:\"San Francisco\";}s:16:\"multiple_correct\";a:1:{i:1;s:3:\"yes\";}s:4:\"hint\";s:0:\"\";s:4:\"Save\";s:13:\"Save Question\";}}}i:1;a:8:{s:2:\"id\";s:1:\"2\";s:7:\"item_id\";s:1:\"1\";s:4:\"name\";s:11:\"Section - B\";s:5:\"limit\";s:1:\"0\";s:5:\"order\";s:6:\"random\";s:10:\"difficulty\";s:6:\"medium\";s:9:\"timestamp\";s:19:\"2011-08-12 21:25:54\";s:9:\"questions\";a:2:{i:0;a:16:{s:2:\"id\";s:1:\"2\";s:4:\"name\";s:65:\"What California Governor won the Presidency of The United States?\";s:4:\"type\";s:6:\"Single\";s:7:\"item_id\";s:1:\"1\";s:10:\"section_id\";s:1:\"2\";s:10:\"difficulty\";s:4:\"Easy\";s:9:\"timestamp\";s:19:\"2011-08-07 03:28:41\";s:7:\"answers\";a:3:{i:0;a:3:{s:4:\"text\";s:13:\"Ronald Reagan\";s:7:\"correct\";s:3:\"yes\";s:7:\"default\";s:2:\"no\";}i:1;a:3:{s:4:\"text\";s:11:\"Jerry Brown\";s:7:\"correct\";s:2:\"no\";s:7:\"default\";s:2:\"no\";}i:2;a:3:{s:4:\"text\";s:22:\"Arnold Schwartzenegger\";s:7:\"correct\";s:2:\"no\";s:7:\"default\";s:2:\"no\";}}s:6:\"points\";s:1:\"2\";s:8:\"required\";s:3:\"yes\";s:8:\"add_text\";s:0:\"\";s:5:\"image\";s:0:\"\";s:13:\"multiple_name\";a:3:{i:0;s:13:\"Ronald Reagan\";i:1;s:11:\"Jerry Brown\";i:2;s:22:\"Arnold Schwartzenegger\";}s:16:\"multiple_correct\";a:1:{i:0;s:3:\"yes\";}s:4:\"hint\";s:0:\"\";s:4:\"Save\";s:13:\"Save Question\";}i:1;a:16:{s:2:\"id\";s:1:\"3\";s:4:\"name\";s:71:\"Where was the epicenter for the 1989 earthquake in Northern California?\";s:4:\"type\";s:6:\"Single\";s:7:\"item_id\";s:1:\"1\";s:10:\"section_id\";s:1:\"2\";s:10:\"difficulty\";s:6:\"Medium\";s:9:\"timestamp\";s:19:\"2011-08-07 03:28:52\";s:7:\"answers\";a:3:{i:0;a:3:{s:4:\"text\";s:22:\"San Andreas Fault Line\";s:7:\"correct\";s:2:\"no\";s:7:\"default\";s:2:\"no\";}i:1;a:3:{s:4:\"text\";s:10:\"San Ysidro\";s:7:\"correct\";s:2:\"no\";s:7:\"default\";s:2:\"no\";}i:2;a:3:{s:4:\"text\";s:11:\"Loma Prieta\";s:7:\"correct\";s:3:\"yes\";s:7:\"default\";s:2:\"no\";}}s:6:\"points\";s:1:\"1\";s:8:\"required\";s:3:\"yes\";s:8:\"add_text\";s:0:\"\";s:5:\"image\";s:0:\"\";s:13:\"multiple_name\";a:3:{i:0;s:22:\"San Andreas Fault Line\";i:1;s:10:\"San Ysidro\";i:2;s:11:\"Loma Prieta\";}s:16:\"multiple_correct\";a:1:{i:2;s:3:\"yes\";}s:4:\"hint\";s:0:\"\";s:4:\"Save\";s:13:\"Save Question\";}}}i:2;a:8:{s:2:\"id\";s:1:\"3\";s:7:\"item_id\";s:1:\"1\";s:4:\"name\";s:11:\"Section - C\";s:5:\"limit\";s:1:\"0\";s:5:\"order\";s:6:\"random\";s:10:\"difficulty\";s:6:\"medium\";s:9:\"timestamp\";s:19:\"2011-08-12 21:25:54\";s:9:\"questions\";a:3:{i:0;a:16:{s:2:\"id\";s:1:\"4\";s:4:\"name\";s:46:\"Who is the 2nd President of The United States?\";s:4:\"type\";s:6:\"Single\";s:7:\"item_id\";s:1:\"1\";s:10:\"section_id\";s:1:\"3\";s:10:\"difficulty\";s:6:\"Medium\";s:9:\"timestamp\";s:19:\"2011-08-07 03:30:50\";s:7:\"answers\";a:4:{i:0;a:3:{s:4:\"text\";s:12:\"Barack Obama\";s:7:\"correct\";s:2:\"no\";s:7:\"default\";s:2:\"no\";}i:1;a:3:{s:4:\"text\";s:17:\"George Washington\";s:7:\"correct\";s:2:\"no\";s:7:\"default\";s:2:\"no\";}i:2;a:3:{s:4:\"text\";s:10:\"John Adams\";s:7:\"correct\";s:3:\"yes\";s:7:\"default\";s:2:\"no\";}i:3;a:3:{s:4:\"text\";s:11:\"Angus Young\";s:7:\"correct\";s:2:\"no\";s:7:\"default\";s:2:\"no\";}}s:6:\"points\";s:1:\"1\";s:8:\"required\";s:3:\"yes\";s:8:\"add_text\";s:0:\"\";s:5:\"image\";s:0:\"\";s:13:\"multiple_name\";a:4:{i:0;s:12:\"Barack Obama\";i:1;s:17:\"George Washington\";i:2;s:10:\"John Adams\";i:3;s:11:\"Angus Young\";}s:16:\"multiple_correct\";a:1:{i:2;s:3:\"yes\";}s:4:\"hint\";s:0:\"\";s:4:\"Save\";s:13:\"Save Question\";}i:1;a:16:{s:2:\"id\";s:1:\"5\";s:4:\"name\";s:54:\"What bands drummer is dead but his name is Keith Moon?\";s:4:\"type\";s:6:\"Single\";s:7:\"item_id\";s:1:\"1\";s:10:\"section_id\";s:1:\"3\";s:10:\"difficulty\";s:6:\"Medium\";s:9:\"timestamp\";s:19:\"2011-08-07 03:32:36\";s:7:\"answers\";a:4:{i:0;a:3:{s:4:\"text\";s:4:\"Rush\";s:7:\"correct\";s:2:\"no\";s:7:\"default\";s:2:\"no\";}i:1;a:3:{s:4:\"text\";s:12:\"Led Zeppelin\";s:7:\"correct\";s:2:\"no\";s:7:\"default\";s:2:\"no\";}i:2;a:3:{s:4:\"text\";s:7:\"The Who\";s:7:\"correct\";s:3:\"yes\";s:7:\"default\";s:2:\"no\";}i:3;a:3:{s:4:\"text\";s:10:\"Thin Lizzy\";s:7:\"correct\";s:2:\"no\";s:7:\"default\";s:2:\"no\";}}s:6:\"points\";s:1:\"4\";s:8:\"required\";s:3:\"yes\";s:8:\"add_text\";s:0:\"\";s:5:\"image\";s:0:\"\";s:13:\"multiple_name\";a:4:{i:0;s:4:\"Rush\";i:1;s:12:\"Led Zeppelin\";i:2;s:7:\"The Who\";i:3;s:10:\"Thin Lizzy\";}s:16:\"multiple_correct\";a:1:{i:2;s:3:\"yes\";}s:4:\"hint\";s:0:\"\";s:4:\"Save\";s:13:\"Save Question\";}i:2;a:16:{s:2:\"id\";s:1:\"6\";s:4:\"name\";s:58:\"What two teams played in the 1989 Word Series of Baseball?\";s:4:\"type\";s:6:\"Single\";s:7:\"item_id\";s:1:\"1\";s:10:\"section_id\";s:1:\"3\";s:10:\"difficulty\";s:6:\"Medium\";s:9:\"timestamp\";s:19:\"2011-08-07 03:39:45\";s:7:\"answers\";a:4:{i:0;a:3:{s:4:\"text\";s:12:\"A\'s and Cubs\";s:7:\"correct\";s:2:\"no\";s:7:\"default\";s:2:\"no\";}i:1;a:3:{s:4:\"text\";s:19:\"Giant\'s and Dodgers\";s:7:\"correct\";s:2:\"no\";s:7:\"default\";s:2:\"no\";}i:2;a:3:{s:4:\"text\";s:19:\"Yankees and Red Sox\";s:7:\"correct\";s:2:\"no\";s:7:\"default\";s:2:\"no\";}i:3;a:3:{s:4:\"text\";s:15:\"Giant\'s and A\'s\";s:7:\"correct\";s:3:\"yes\";s:7:\"default\";s:2:\"no\";}}s:6:\"points\";s:1:\"2\";s:8:\"required\";s:3:\"yes\";s:8:\"add_text\";s:0:\"\";s:5:\"image\";s:0:\"\";s:13:\"multiple_name\";a:4:{i:0;s:13:\"A\\\'s and Cubs\";i:1;s:20:\"Giant\\\'s and Dodgers\";i:2;s:19:\"Yankees and Red Sox\";i:3;s:17:\"Giant\\\'s and A\\\'s\";}s:16:\"multiple_correct\";a:1:{i:3;s:3:\"yes\";}s:4:\"hint\";s:0:\"\";s:4:\"Save\";s:13:\"Save Question\";}}}}',1,'Anonymous','99.173.25.168',0,0,0,'unviewed',0)

    Notice: Undefined index: email in /home/socialm/public_html/facepress/wp-content/plugins/wp-survey-and-quiz-tool/lib/Wpsqt/Mail.php on line 73

  17. aceofjames
    Member
    Posted 2 years ago #

    I did add global $wpdb; as directed.

  18. kylen20
    Member
    Posted 2 years ago #

    I had it in the wrong place. That has now fixed the mail.php error and produced two new errors in addition to the original error in Shortcode.php:

    Warning: Invalid argument supplied for foreach() in /home/kylenewm/movebeyond/wp-content/plugins/wp-survey-and-quiz-tool/lib/Wpsqt/Shortcode.php on line 503
    Warning: Invalid argument supplied for foreach() in /home/kylenewm/movebeyond/wp-content/plugins/wp-survey-and-quiz-tool/lib/Wpsqt/Shortcode.php on line 503

    Options page screen dump here: http://www.movebeyond.net/images/wpsqt.jpg

    I did send you a login so you can access the dashboard Ollie.

  19. Ollie Armstrong
    Member
    Plugin Author

    Posted 2 years ago #

    AceofJames,

    If you could try running this SQL query on your database it may fix the problem.

    ALTER TABLE wp_wpsqt_all_results ADD datetaken VARCHAR(255) NOT NULL AFTER item_id

  20. aceofjames
    Member
    Posted 2 years ago #

    I ran the sql query successfully and it still chokes sorry...

    WordPress database error: [Unknown column 'pass' in 'field list']
    INSERT INTO wp_wpsqt_all_results (datetaken,timetaken,person,sections,item_id,person_name,ipaddress,score,total,percentage,status,pass) VALUES ('1313399247.63',50,'a:0:{}','a:3:{i:0;a:11:{s:2:\"id\";s:1:\"1\";s:7:\"item_id\";s:1:\"1\";s:4:\"name\";s:11:\"Section - A\";s:5:\"limit\";s:1:\"0\";s:5:\"order\";s:6:\"random\";s:10:\"difficulty\";s:4:\"easy\";s:9:\"timestamp\";s:19:\"2011-08-12 21:25:54\";s:9:\"questions\";a:1:{i:0;a:16:{s:2:\"id\";s:1:\"1\";s:4:\"name\";s:34:\"What is the Capitol of California?\";s:4:\"type\";s:6:\"Single\";s:7:\"item_id\";s:1:\"1\";s:10:\"section_id\";s:1:\"1\";s:10:\"difficulty\";s:4:\"Easy\";s:9:\"timestamp\";s:19:\"2011-08-07 03:47:23\";s:7:\"answers\";a:3:{i:0;a:3:{s:4:\"text\";s:10:\"Santa Cruz\";s:7:\"correct\";s:2:\"no\";s:7:\"default\";s:2:\"no\";}i:1;a:3:{s:4:\"text\";s:10:\"Sacramento\";s:7:\"correct\";s:3:\"yes\";s:7:\"default\";s:2:\"no\";}i:2;a:3:{s:4:\"text\";s:13:\"San Francisco\";s:7:\"correct\";s:2:\"no\";s:7:\"default\";s:2:\"no\";}}s:6:\"points\";s:1:\"1\";s:8:\"required\";s:3:\"yes\";s:8:\"add_text\";s:0:\"\";s:5:\"image\";s:312:\"<img src=\\\"http://santacruzsocialmedia.com/facepress/wp-content/uploads/2011/08/California-Map.png\\\" alt=\\\"\\\" title=\\\"California Map\\\" width=\\\"250\\\" height=\\\"225\\\" class=\\\"alignnone size-full wp-image-12\\\" />\";s:13:\"multiple_name\";a:3:{i:0;s:10:\"Santa Cruz\";i:1;s:10:\"Sacramento\";i:2;s:13:\"San Francisco\";}s:16:\"multiple_correct\";a:1:{i:1;s:3:\"yes\";}s:4:\"hint\";s:0:\"\";s:4:\"Save\";s:13:\"Save Question\";}}s:7:\"answers\";a:1:{i:1;a:2:{s:4:\"mark\";s:7:\"correct\";s:5:\"given\";a:1:{i:0;s:1:\"1\";}}}s:5:\"stats\";a:2:{s:7:\"correct\";i:1;s:9:\"incorrect\";i:0;}s:12:\"can_automark\";b:1;}i:1;a:11:{s:2:\"id\";s:1:\"2\";s:7:\"item_id\";s:1:\"1\";s:4:\"name\";s:11:\"Section - B\";s:5:\"limit\";s:1:\"0\";s:5:\"order\";s:6:\"random\";s:10:\"difficulty\";s:6:\"medium\";s:9:\"timestamp\";s:19:\"2011-08-12 21:25:54\";s:9:\"questions\";a:2:{i:0;a:16:{s:2:\"id\";s:1:\"3\";s:4:\"name\";s:71:\"Where was the epicenter for the 1989 earthquake in Northern California?\";s:4:\"type\";s:6:\"Single\";s:7:\"item_id\";s:1:\"1\";s:10:\"section_id\";s:1:\"2\";s:10:\"difficulty\";s:6:\"Medium\";s:9:\"timestamp\";s:19:\"2011-08-07 03:28:52\";s:7:\"answers\";a:3:{i:0;a:3:{s:4:\"text\";s:22:\"San Andreas Fault Line\";s:7:\"correct\";s:2:\"no\";s:7:\"default\";s:2:\"no\";}i:1;a:3:{s:4:\"text\";s:10:\"San Ysidro\";s:7:\"correct\";s:2:\"no\";s:7:\"default\";s:2:\"no\";}i:2;a:3:{s:4:\"text\";s:11:\"Loma Prieta\";s:7:\"correct\";s:3:\"yes\";s:7:\"default\";s:2:\"no\";}}s:6:\"points\";s:1:\"1\";s:8:\"required\";s:3:\"yes\";s:8:\"add_text\";s:0:\"\";s:5:\"image\";s:0:\"\";s:13:\"multiple_name\";a:3:{i:0;s:22:\"San Andreas Fault Line\";i:1;s:10:\"San Ysidro\";i:2;s:11:\"Loma Prieta\";}s:16:\"multiple_correct\";a:1:{i:2;s:3:\"yes\";}s:4:\"hint\";s:0:\"\";s:4:\"Save\";s:13:\"Save Question\";}i:1;a:16:{s:2:\"id\";s:1:\"2\";s:4:\"name\";s:65:\"What California Governor won the Presidency of The United States?\";s:4:\"type\";s:6:\"Single\";s:7:\"item_id\";s:1:\"1\";s:10:\"section_id\";s:1:\"2\";s:10:\"difficulty\";s:4:\"Easy\";s:9:\"timestamp\";s:19:\"2011-08-07 03:28:41\";s:7:\"answers\";a:3:{i:0;a:3:{s:4:\"text\";s:13:\"Ronald Reagan\";s:7:\"correct\";s:3:\"yes\";s:7:\"default\";s:2:\"no\";}i:1;a:3:{s:4:\"text\";s:11:\"Jerry Brown\";s:7:\"correct\";s:2:\"no\";s:7:\"default\";s:2:\"no\";}i:2;a:3:{s:4:\"text\";s:22:\"Arnold Schwartzenegger\";s:7:\"correct\";s:2:\"no\";s:7:\"default\";s:2:\"no\";}}s:6:\"points\";s:1:\"2\";s:8:\"required\";s:3:\"yes\";s:8:\"add_text\";s:0:\"\";s:5:\"image\";s:0:\"\";s:13:\"multiple_name\";a:3:{i:0;s:13:\"Ronald Reagan\";i:1;s:11:\"Jerry Brown\";i:2;s:22:\"Arnold Schwartzenegger\";}s:16:\"multiple_correct\";a:1:{i:0;s:3:\"yes\";}s:4:\"hint\";s:0:\"\";s:4:\"Save\";s:13:\"Save Question\";}}s:7:\"answers\";a:2:{i:3;a:2:{s:4:\"mark\";s:7:\"correct\";s:5:\"given\";a:1:{i:0;s:1:\"2\";}}i:2;a:2:{s:4:\"mark\";s:7:\"correct\";s:5:\"given\";a:1:{i:0;s:1:\"0\";}}}s:5:\"stats\";a:2:{s:7:\"correct\";i:3;s:9:\"incorrect\";i:0;}s:12:\"can_automark\";b:1;}i:2;a:11:{s:2:\"id\";s:1:\"3\";s:7:\"item_id\";s:1:\"1\";s:4:\"name\";s:11:\"Section - C\";s:5:\"limit\";s:1:\"0\";s:5:\"order\";s:6:\"random\";s:10:\"difficulty\";s:6:\"medium\";s:9:\"timestamp\";s:19:\"2011-08-12 21:25:54\";s:9:\"questions\";a:3:{i:0;a:16:{s:2:\"id\";s:1:\"4\";s:4:\"name\";s:46:\"Who is the 2nd President of The United States?\";s:4:\"type\";s:6:\"Single\";s:7:\"item_id\";s:1:\"1\";s:10:\"section_id\";s:1:\"3\";s:10:\"difficulty\";s:6:\"Medium\";s:9:\"timestamp\";s:19:\"2011-08-07 03:30:50\";s:7:\"answers\";a:4:{i:0;a:3:{s:4:\"text\";s:12:\"Barack Obama\";s:7:\"correct\";s:2:\"no\";s:7:\"default\";s:2:\"no\";}i:1;a:3:{s:4:\"text\";s:17:\"George Washington\";s:7:\"correct\";s:2:\"no\";s:7:\"default\";s:2:\"no\";}i:2;a:3:{s:4:\"text\";s:10:\"John Adams\";s:7:\"correct\";s:3:\"yes\";s:7:\"default\";s:2:\"no\";}i:3;a:3:{s:4:\"text\";s:11:\"Angus Young\";s:7:\"correct\";s:2:\"no\";s:7:\"default\";s:2:\"no\";}}s:6:\"points\";s:1:\"1\";s:8:\"required\";s:3:\"yes\";s:8:\"add_text\";s:0:\"\";s:5:\"image\";s:0:\"\";s:13:\"multiple_name\";a:4:{i:0;s:12:\"Barack Obama\";i:1;s:17:\"George Washington\";i:2;s:10:\"John Adams\";i:3;s:11:\"Angus Young\";}s:16:\"multiple_correct\";a:1:{i:2;s:3:\"yes\";}s:4:\"hint\";s:0:\"\";s:4:\"Save\";s:13:\"Save Question\";}i:1;a:16:{s:2:\"id\";s:1:\"5\";s:4:\"name\";s:54:\"What bands drummer is dead but his name is Keith Moon?\";s:4:\"type\";s:6:\"Single\";s:7:\"item_id\";s:1:\"1\";s:10:\"section_id\";s:1:\"3\";s:10:\"difficulty\";s:6:\"Medium\";s:9:\"timestamp\";s:19:\"2011-08-07 03:32:36\";s:7:\"answers\";a:4:{i:0;a:3:{s:4:\"text\";s:4:\"Rush\";s:7:\"correct\";s:2:\"no\";s:7:\"default\";s:2:\"no\";}i:1;a:3:{s:4:\"text\";s:12:\"Led Zeppelin\";s:7:\"correct\";s:2:\"no\";s:7:\"default\";s:2:\"no\";}i:2;a:3:{s:4:\"text\";s:7:\"The Who\";s:7:\"correct\";s:3:\"yes\";s:7:\"default\";s:2:\"no\";}i:3;a:3:{s:4:\"text\";s:10:\"Thin Lizzy\";s:7:\"correct\";s:2:\"no\";s:7:\"default\";s:2:\"no\";}}s:6:\"points\";s:1:\"4\";s:8:\"required\";s:3:\"yes\";s:8:\"add_text\";s:0:\"\";s:5:\"image\";s:0:\"\";s:13:\"multiple_name\";a:4:{i:0;s:4:\"Rush\";i:1;s:12:\"Led Zeppelin\";i:2;s:7:\"The Who\";i:3;s:10:\"Thin Lizzy\";}s:16:\"multiple_correct\";a:1:{i:2;s:3:\"yes\";}s:4:\"hint\";s:0:\"\";s:4:\"Save\";s:13:\"Save Question\";}i:2;a:16:{s:2:\"id\";s:1:\"6\";s:4:\"name\";s:58:\"What two teams played in the 1989 Word Series of Baseball?\";s:4:\"type\";s:6:\"Single\";s:7:\"item_id\";s:1:\"1\";s:10:\"section_id\";s:1:\"3\";s:10:\"difficulty\";s:6:\"Medium\";s:9:\"timestamp\";s:19:\"2011-08-07 03:39:45\";s:7:\"answers\";a:4:{i:0;a:3:{s:4:\"text\";s:12:\"A\'s and Cubs\";s:7:\"correct\";s:2:\"no\";s:7:\"default\";s:2:\"no\";}i:1;a:3:{s:4:\"text\";s:19:\"Giant\'s and Dodgers\";s:7:\"correct\";s:2:\"no\";s:7:\"default\";s:2:\"no\";}i:2;a:3:{s:4:\"text\";s:19:\"Yankees and Red Sox\";s:7:\"correct\";s:2:\"no\";s:7:\"default\";s:2:\"no\";}i:3;a:3:{s:4:\"text\";s:15:\"Giant\'s and A\'s\";s:7:\"correct\";s:3:\"yes\";s:7:\"default\";s:2:\"no\";}}s:6:\"points\";s:1:\"2\";s:8:\"required\";s:3:\"yes\";s:8:\"add_text\";s:0:\"\";s:5:\"image\";s:0:\"\";s:13:\"multiple_name\";a:4:{i:0;s:13:\"A\\\'s and Cubs\";i:1;s:20:\"Giant\\\'s and Dodgers\";i:2;s:19:\"Yankees and Red Sox\";i:3;s:17:\"Giant\\\'s and A\\\'s\";}s:16:\"multiple_correct\";a:1:{i:3;s:3:\"yes\";}s:4:\"hint\";s:0:\"\";s:4:\"Save\";s:13:\"Save Question\";}}s:7:\"answers\";a:3:{i:4;a:2:{s:4:\"mark\";s:7:\"correct\";s:5:\"given\";a:1:{i:0;s:1:\"2\";}}i:5;a:2:{s:4:\"mark\";s:7:\"correct\";s:5:\"given\";a:1:{i:0;s:1:\"2\";}}i:6;a:2:{s:4:\"mark\";s:7:\"correct\";s:5:\"given\";a:1:{i:0;s:1:\"3\";}}}s:5:\"stats\";a:2:{s:7:\"correct\";i:7;s:9:\"incorrect\";i:0;}s:12:\"can_automark\";b:1;}}',1,'Anonymous','99.173.25.168',0,0,0,'unviewed',0)

    Notice: Undefined index: email in /home/socialm/public_html/facepress/wp-content/plugins/wp-survey-and-quiz-tool/lib/Wpsqt/Mail.php on line 73

  21. Ollie Armstrong
    Member
    Plugin Author

    Posted 2 years ago #

    Okay, I have a feeling that either you didn't run the upgrade page when it told you to or otherwise it just wasn't working for you. Now could you run the query:

    ALTER TABLE wp_wpsqt_all_results ADD pass BOOLEAN NOT NULL

    Should now work for you.

    Ollie

  22. aceofjames
    Member
    Posted 2 years ago #

    Sorry to hijack your thread here Kyle. Some same issues and some not...

    I am telling the quiz to "Take contact details" so a form appears but it does not. I see that Kyles form appears fine. Did you have to do custom fields or does it show up automagically?

    Also, still does not validate REQUIRED FIELDS.

    Do I need to make a new quiz nd not test on an existing quiz?

    Thanks for the help Ollie!

    AceOfJames

  23. kylen20
    Member
    Posted 2 years ago #

    Hi James,

    I had to create custom fields, nothing showed up when I didn't do that. Half my problem is fixed now.

    Just the error in from Shortcodes.php outstanding which you didn't seem to have?

  24. aceofjames
    Member
    Posted 2 years ago #

    Didnt see you say to run an upgrade sorry. Ran the second query though and now just get this:

    Notice: Undefined index: email in /home/socialm/public_html/facepress/wp-content/plugins/wp-survey-and-quiz-tool/lib/Wpsqt/Mail.php on line 73

  25. aceofjames
    Member
    Posted 2 years ago #

    It did insert results though. It however said I failed when I got 100%...

    Sorry to bombard you here. Just trying to get it squared away!

    Thanks!

  26. Ollie Armstrong
    Member
    Plugin Author

    Posted 2 years ago #

    Yeah, ignore that notice, not fatal and will put a check in for that eventually.

    Okay, what did you set the pass mark as?

  27. aceofjames
    Member
    Posted 2 years ago #

    Can we get the error message to go away?

    I set the pass mark at 80...

  28. aceofjames
    Member
    Posted 2 years ago #

    Kylen,
    No. I didnt get the Shortcode.php error you are getting....

  29. kylen20
    Member
    Posted 2 years ago #

    OK, I just tried it on a different PC. I got the same errors as before in Google Chrome, and a different error set in Firefox. Haven't tried IE9 yet:

    Warning: current() expects parameter 1 to be array, string given in /home/kylenewm/movebeyond/wp-content/plugins/wp-survey-and-quiz-tool/lib/Wpsqt/Shortcode.php on line 539

    Warning: current() expects parameter 1 to be array, string given in /home/kylenewm/movebeyond/wp-content/plugins/wp-survey-and-quiz-tool/lib/Wpsqt/Shortcode.php on line 539

  30. aceofjames
    Member
    Posted 2 years ago #

    Score, Percentage and Pass/Fail results say: Unable to auto mark

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic