Quiz And Survey Master (Formerly Quiz Master Next) - Version 2.4.1

Version Description

Upgrade to be able to send different emails based on user's score. Also, minor bug fixes included.

Download this release

Release Info

Developer fpcorso
Plugin Icon 128x128 Quiz And Survey Master (Formerly Quiz Master Next)
Version 2.4.1
Comparing to
See all releases

Code changes from version 2.3.1 to 2.4.1

includes/mlw_qmn_credits.php CHANGED
@@ -87,16 +87,18 @@ function mlw_generate_about_page()
87
  <a href="#" class="nav-tab nav-tab-active">
88
  What&#8217;s New In <?php echo $mlw_quiz_version; ?> </a>
89
  </h2>
90
- <h2 style="margin: 1.1em 0 .2em;font-size: 2.4em;font-weight: 300;line-height: 1.3;text-align: center;">Now you can have graded open answer questions!</h2>
91
- <p>This new version brings the ability to have open answer questions. When adding or editing a question, you will see that the question type option has a new option "Open Answer" Selecting this will show the user a blank field to enter their answer into. Enter the correct answers into the answer fields.</p>
92
  <br />
93
  <h2 style="margin: 1.1em 0 .2em;font-size: 2.4em;font-weight: 300;line-height: 1.3;text-align: center;">New Premium Add-Ons!</h2>
94
- <p>We have recently added 3 new premium add-ons into our plugin store! Export Results (exports your quiz results), Extra Shortcodes (gives you extra shortcodes to use), and Advertisement Be Gone (gets rid of blue-border ads). Visit our <a href=\"http://mylocalwebstop.com/shop/\">Plugin Add-On Store</a> for details! </p>
95
  <br />
96
  <h3>Changelog For <?php echo $mlw_quiz_version; ?></h3>
97
  <ul>
98
- <li>Added Ability To Have Graded Open Answer Questions</li>
99
- <li>Minor Design Changes</li>
 
 
100
  </ul>
101
  <h3>What's Coming Soon</h3>
102
  <ul>
87
  <a href="#" class="nav-tab nav-tab-active">
88
  What&#8217;s New In <?php echo $mlw_quiz_version; ?> </a>
89
  </h2>
90
+ <h2 style="margin: 1.1em 0 .2em;font-size: 2.4em;font-weight: 300;line-height: 1.3;text-align: center;">Now you can have send different emails based on score!</h2>
91
+ <p>This new version adds the ability to send the user different emails based on the score earned. Simply go to the new Quiz Emails tab and fill in your default email. Click the Add New Email button to add a different email template.</p>
92
  <br />
93
  <h2 style="margin: 1.1em 0 .2em;font-size: 2.4em;font-weight: 300;line-height: 1.3;text-align: center;">New Premium Add-Ons!</h2>
94
+ <p>We have recently added 3 new premium add-ons into our plugin store! Export Results (exports your quiz results), Extra Shortcodes (gives you extra shortcodes to use), and Advertisement Be Gone (gets rid of blue-border ads). Visit our <a href="http://mylocalwebstop.com/shop/">Plugin Add-On Store</a> for details! </p>
95
  <br />
96
  <h3>Changelog For <?php echo $mlw_quiz_version; ?></h3>
97
  <ul>
98
+ <li>Added Ability To Send Different Emails To Users Based On Score</li>
99
+ <li>Added New Quiz Emails Tab</li>
100
+ <li>Fixed Required Question Bug</li>
101
+ <li>Fixed Landing Page Bug</li>
102
  </ul>
103
  <h3>What's Coming Soon</h3>
104
  <ul>
includes/mlw_quiz.php CHANGED
@@ -347,32 +347,32 @@ function mlw_quiz_shortcode($atts)
347
  {
348
  if ($mlw_question->answer_one != "")
349
  {
350
- $mlw_display .= "<input type='radio' required name='question".$mlw_question->question_id."' id='question".$mlw_question->question_id."_one' value='1' /> <label for='question".$mlw_question->question_id."_one'>".htmlspecialchars_decode($mlw_question->answer_one, ENT_QUOTES)."</label>";
351
  $mlw_display .= "<br />";
352
  }
353
  if ($mlw_question->answer_two != "")
354
  {
355
- $mlw_display .= "<input type='radio' required name='question".$mlw_question->question_id."' id='question".$mlw_question->question_id."_two' value='2' /> <label for='question".$mlw_question->question_id."_two'>".htmlspecialchars_decode($mlw_question->answer_two, ENT_QUOTES)."</label>";
356
  $mlw_display .= "<br />";
357
  }
358
  if ($mlw_question->answer_three != "")
359
  {
360
- $mlw_display .= "<input type='radio' required name='question".$mlw_question->question_id."' id='question".$mlw_question->question_id."_three' value='3' /> <label for='question".$mlw_question->question_id."_three'>".htmlspecialchars_decode($mlw_question->answer_three, ENT_QUOTES)."</label>";
361
  $mlw_display .= "<br />";
362
  }
363
  if ($mlw_question->answer_four != "")
364
  {
365
- $mlw_display .= "<input type='radio' required name='question".$mlw_question->question_id."' id='question".$mlw_question->question_id."_four' value='4' /> <label for='question".$mlw_question->question_id."_four'>".htmlspecialchars_decode($mlw_question->answer_four, ENT_QUOTES)."</label>";
366
  $mlw_display .= "<br />";
367
  }
368
  if ($mlw_question->answer_five != "")
369
  {
370
- $mlw_display .= "<input type='radio' required name='question".$mlw_question->question_id."' id='question".$mlw_question->question_id."_five' value='5' /> <label for='question".$mlw_question->question_id."_five'>".htmlspecialchars_decode($mlw_question->answer_five, ENT_QUOTES)."</label>";
371
  $mlw_display .= "<br />";
372
  }
373
  if ($mlw_question->answer_six != "")
374
  {
375
- $mlw_display .= "<input type='radio' required name='question".$mlw_question->question_id."' id='question".$mlw_question->question_id."_six' value='6' /> <label for='question".$mlw_question->question_id."_six'>".htmlspecialchars_decode($mlw_question->answer_six, ENT_QUOTES)."</label>";
376
  $mlw_display .= "<br />";
377
  }
378
  }
@@ -380,33 +380,33 @@ function mlw_quiz_shortcode($atts)
380
  {
381
  if ($mlw_question->answer_one != "")
382
  {
383
- $mlw_display .= "<input type='radio' required name='question".$mlw_question->question_id."' value='1' />".htmlspecialchars_decode($mlw_question->answer_one, ENT_QUOTES);
384
  }
385
  if ($mlw_question->answer_two != "")
386
  {
387
- $mlw_display .= "<input type='radio' required name='question".$mlw_question->question_id."' value='2' />".htmlspecialchars_decode($mlw_question->answer_two, ENT_QUOTES);
388
  }
389
  if ($mlw_question->answer_three != "")
390
  {
391
- $mlw_display .= "<input type='radio' required name='question".$mlw_question->question_id."' value='3' />".htmlspecialchars_decode($mlw_question->answer_three, ENT_QUOTES);
392
  }
393
  if ($mlw_question->answer_four != "")
394
  {
395
- $mlw_display .= "<input type='radio' required name='question".$mlw_question->question_id."' value='4' />".htmlspecialchars_decode($mlw_question->answer_four, ENT_QUOTES);
396
  }
397
  if ($mlw_question->answer_five != "")
398
  {
399
- $mlw_display .= "<input type='radio' required name='question".$mlw_question->question_id."' value='5' />".htmlspecialchars_decode($mlw_question->answer_five, ENT_QUOTES);
400
  }
401
  if ($mlw_question->answer_six != "")
402
  {
403
- $mlw_display .= "<input type='radio' required name='question".$mlw_question->question_id."' value='6' />".htmlspecialchars_decode($mlw_question->answer_six, ENT_QUOTES);
404
  }
405
  $mlw_display .= "<br />";
406
  }
407
  elseif ($mlw_question->question_type == 2)
408
  {
409
- $mlw_display .= "<select required name='question".$mlw_question->question_id."'>";
410
  if ($mlw_question->answer_one != "")
411
  {
412
  $mlw_display .= "<option value='1'>".htmlspecialchars_decode($mlw_question->answer_one, ENT_QUOTES)."</option>";
@@ -763,7 +763,7 @@ EOC;
763
  else
764
  {
765
  //Check to see if points fall in correct range
766
- if ($mlw_points >= $mlw_each[0] && $mlw_points <= $mlw_each[1])
767
  {
768
  $mlw_message_after = htmlspecialchars_decode($mlw_each[2], ENT_QUOTES);
769
  $mlw_message_after = str_replace( "%POINT_SCORE%" , $mlw_points, $mlw_message_after);
@@ -786,7 +786,7 @@ EOC;
786
  break;
787
  }
788
  //Check to see if score fall in correct range
789
- if ($mlw_total_score >= $mlw_each[0] && $mlw_total_score <= $mlw_each[1])
790
  {
791
  $mlw_message_after = htmlspecialchars_decode($mlw_each[2], ENT_QUOTES);
792
  $mlw_message_after = str_replace( "%POINT_SCORE%" , $mlw_points, $mlw_message_after);
@@ -853,33 +853,130 @@ EOC;
853
  //Switch email type to HTML
854
  add_filter( 'wp_mail_content_type', 'mlw_qmn_set_html_content_type' );
855
 
856
- //Prepare and send the user email
 
 
 
 
857
  $mlw_message = "";
858
  if ($mlw_quiz_options->send_user_email == "0")
859
  {
860
  if ($mlw_user_email != "")
861
  {
862
- $mlw_message = htmlspecialchars_decode($mlw_quiz_options->user_email_template, ENT_QUOTES);
863
- $mlw_message = str_replace( "%POINT_SCORE%" , $mlw_points, $mlw_message);
864
- $mlw_message = str_replace( "%AVERAGE_POINT%" , $mlw_average_points, $mlw_message);
865
- $mlw_message = str_replace( "%AMOUNT_CORRECT%" , $mlw_correct, $mlw_message);
866
- $mlw_message = str_replace( "%TOTAL_QUESTIONS%" , $mlw_total_questions, $mlw_message);
867
- $mlw_message = str_replace( "%CORRECT_SCORE%" , $mlw_total_score, $mlw_message);
868
- $mlw_message = str_replace( "%QUIZ_NAME%" , $mlw_quiz_options->quiz_name, $mlw_message);
869
- $mlw_message = str_replace( "%USER_NAME%" , $mlw_user_name, $mlw_message);
870
- $mlw_message = str_replace( "%USER_BUSINESS%" , $mlw_user_comp, $mlw_message);
871
- $mlw_message = str_replace( "%USER_PHONE%" , $mlw_user_phone, $mlw_message);
872
- $mlw_message = str_replace( "%USER_EMAIL%" , $mlw_user_email, $mlw_message);
873
- $mlw_message = str_replace( "%QUESTIONS_ANSWERS%" , $mlw_question_answers, $mlw_message);
874
- $mlw_message = str_replace( "%COMMENT_SECTION%" , $mlw_qm_quiz_comments, $mlw_message);
875
- $mlw_message = str_replace( "%TIMER%" , $mlw_qmn_timer, $mlw_message);
876
- $mlw_message = str_replace( "%CERTIFICATE_LINK%" , $mlw_certificate_link, $mlw_message);
877
- $mlw_message = str_replace( "%CURRENT_DATE%" , date("F jS Y"), $mlw_message);
878
- $mlw_message = str_replace( "\n" , "<br>", $mlw_message);
879
- $mlw_message = str_replace( "<br/>" , "<br>", $mlw_message);
880
- $mlw_message = str_replace( "<br />" , "<br>", $mlw_message);
881
- $mlw_headers = 'From: '.$mlw_quiz_options->email_from_text.' <'.$mlw_quiz_options->admin_email.'>' . "\r\n";
882
- wp_mail($mlw_user_email, "Quiz Results For ".$mlw_quiz_options->quiz_name, $mlw_message, $mlw_headers);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
883
  }
884
  }
885
 
347
  {
348
  if ($mlw_question->answer_one != "")
349
  {
350
+ $mlw_display .= "<input type='radio' name='question".$mlw_question->question_id."' id='question".$mlw_question->question_id."_one' value='1' /> <label for='question".$mlw_question->question_id."_one'>".htmlspecialchars_decode($mlw_question->answer_one, ENT_QUOTES)."</label>";
351
  $mlw_display .= "<br />";
352
  }
353
  if ($mlw_question->answer_two != "")
354
  {
355
+ $mlw_display .= "<input type='radio' name='question".$mlw_question->question_id."' id='question".$mlw_question->question_id."_two' value='2' /> <label for='question".$mlw_question->question_id."_two'>".htmlspecialchars_decode($mlw_question->answer_two, ENT_QUOTES)."</label>";
356
  $mlw_display .= "<br />";
357
  }
358
  if ($mlw_question->answer_three != "")
359
  {
360
+ $mlw_display .= "<input type='radio' name='question".$mlw_question->question_id."' id='question".$mlw_question->question_id."_three' value='3' /> <label for='question".$mlw_question->question_id."_three'>".htmlspecialchars_decode($mlw_question->answer_three, ENT_QUOTES)."</label>";
361
  $mlw_display .= "<br />";
362
  }
363
  if ($mlw_question->answer_four != "")
364
  {
365
+ $mlw_display .= "<input type='radio' name='question".$mlw_question->question_id."' id='question".$mlw_question->question_id."_four' value='4' /> <label for='question".$mlw_question->question_id."_four'>".htmlspecialchars_decode($mlw_question->answer_four, ENT_QUOTES)."</label>";
366
  $mlw_display .= "<br />";
367
  }
368
  if ($mlw_question->answer_five != "")
369
  {
370
+ $mlw_display .= "<input type='radio' name='question".$mlw_question->question_id."' id='question".$mlw_question->question_id."_five' value='5' /> <label for='question".$mlw_question->question_id."_five'>".htmlspecialchars_decode($mlw_question->answer_five, ENT_QUOTES)."</label>";
371
  $mlw_display .= "<br />";
372
  }
373
  if ($mlw_question->answer_six != "")
374
  {
375
+ $mlw_display .= "<input type='radio' name='question".$mlw_question->question_id."' id='question".$mlw_question->question_id."_six' value='6' /> <label for='question".$mlw_question->question_id."_six'>".htmlspecialchars_decode($mlw_question->answer_six, ENT_QUOTES)."</label>";
376
  $mlw_display .= "<br />";
377
  }
378
  }
380
  {
381
  if ($mlw_question->answer_one != "")
382
  {
383
+ $mlw_display .= "<input type='radio' name='question".$mlw_question->question_id."' value='1' />".htmlspecialchars_decode($mlw_question->answer_one, ENT_QUOTES);
384
  }
385
  if ($mlw_question->answer_two != "")
386
  {
387
+ $mlw_display .= "<input type='radio' name='question".$mlw_question->question_id."' value='2' />".htmlspecialchars_decode($mlw_question->answer_two, ENT_QUOTES);
388
  }
389
  if ($mlw_question->answer_three != "")
390
  {
391
+ $mlw_display .= "<input type='radio' name='question".$mlw_question->question_id."' value='3' />".htmlspecialchars_decode($mlw_question->answer_three, ENT_QUOTES);
392
  }
393
  if ($mlw_question->answer_four != "")
394
  {
395
+ $mlw_display .= "<input type='radio' name='question".$mlw_question->question_id."' value='4' />".htmlspecialchars_decode($mlw_question->answer_four, ENT_QUOTES);
396
  }
397
  if ($mlw_question->answer_five != "")
398
  {
399
+ $mlw_display .= "<input type='radio' name='question".$mlw_question->question_id."' value='5' />".htmlspecialchars_decode($mlw_question->answer_five, ENT_QUOTES);
400
  }
401
  if ($mlw_question->answer_six != "")
402
  {
403
+ $mlw_display .= "<input type='radio' name='question".$mlw_question->question_id."' value='6' />".htmlspecialchars_decode($mlw_question->answer_six, ENT_QUOTES);
404
  }
405
  $mlw_display .= "<br />";
406
  }
407
  elseif ($mlw_question->question_type == 2)
408
  {
409
+ $mlw_display .= "<select name='question".$mlw_question->question_id."'>";
410
  if ($mlw_question->answer_one != "")
411
  {
412
  $mlw_display .= "<option value='1'>".htmlspecialchars_decode($mlw_question->answer_one, ENT_QUOTES)."</option>";
763
  else
764
  {
765
  //Check to see if points fall in correct range
766
+ if ($mlw_quiz_options->system == 1 && $mlw_points >= $mlw_each[0] && $mlw_points <= $mlw_each[1])
767
  {
768
  $mlw_message_after = htmlspecialchars_decode($mlw_each[2], ENT_QUOTES);
769
  $mlw_message_after = str_replace( "%POINT_SCORE%" , $mlw_points, $mlw_message_after);
786
  break;
787
  }
788
  //Check to see if score fall in correct range
789
+ if ($mlw_quiz_options->system == 0 && $mlw_total_score >= $mlw_each[0] && $mlw_total_score <= $mlw_each[1])
790
  {
791
  $mlw_message_after = htmlspecialchars_decode($mlw_each[2], ENT_QUOTES);
792
  $mlw_message_after = str_replace( "%POINT_SCORE%" , $mlw_points, $mlw_message_after);
853
  //Switch email type to HTML
854
  add_filter( 'wp_mail_content_type', 'mlw_qmn_set_html_content_type' );
855
 
856
+ /*
857
+ Prepare and send the user email
858
+ - First, check to see if user_email_template is the newer array format, if not use it as the template
859
+ - If it is an array, check to see if the score meets the parameter of one of the templates. If, not send the default
860
+ */
861
  $mlw_message = "";
862
  if ($mlw_quiz_options->send_user_email == "0")
863
  {
864
  if ($mlw_user_email != "")
865
  {
866
+ $mlw_user_email_array = @unserialize($mlw_quiz_options->user_email_template);
867
+ if (is_array($mlw_user_email_array))
868
+ {
869
+ //Cycle through landing pages
870
+ foreach($mlw_user_email_array as $mlw_each)
871
+ {
872
+ //Check to see if default
873
+ if ($mlw_each[0] == 0 && $mlw_each[1] == 0)
874
+ {
875
+ $mlw_message = htmlspecialchars_decode($mlw_each[2], ENT_QUOTES);
876
+ $mlw_message = str_replace( "%POINT_SCORE%" , $mlw_points, $mlw_message);
877
+ $mlw_message = str_replace( "%AVERAGE_POINT%" , $mlw_average_points, $mlw_message);
878
+ $mlw_message = str_replace( "%AMOUNT_CORRECT%" , $mlw_correct, $mlw_message);
879
+ $mlw_message = str_replace( "%TOTAL_QUESTIONS%" , $mlw_total_questions, $mlw_message);
880
+ $mlw_message = str_replace( "%CORRECT_SCORE%" , $mlw_total_score, $mlw_message);
881
+ $mlw_message = str_replace( "%QUIZ_NAME%" , $mlw_quiz_options->quiz_name, $mlw_message);
882
+ $mlw_message = str_replace( "%USER_NAME%" , $mlw_user_name, $mlw_message);
883
+ $mlw_message = str_replace( "%USER_BUSINESS%" , $mlw_user_comp, $mlw_message);
884
+ $mlw_message = str_replace( "%USER_PHONE%" , $mlw_user_phone, $mlw_message);
885
+ $mlw_message = str_replace( "%USER_EMAIL%" , $mlw_user_email, $mlw_message);
886
+ $mlw_message = str_replace( "%QUESTIONS_ANSWERS%" , $mlw_question_answers, $mlw_message);
887
+ $mlw_message = str_replace( "%COMMENT_SECTION%" , $mlw_qm_quiz_comments, $mlw_message);
888
+ $mlw_message = str_replace( "%TIMER%" , $mlw_qmn_timer, $mlw_message);
889
+ $mlw_message = str_replace( "%CERTIFICATE_LINK%" , $mlw_certificate_link, $mlw_message);
890
+ $mlw_message = str_replace( "%CURRENT_DATE%" , date("F jS Y"), $mlw_message);
891
+ $mlw_message = str_replace( "\n" , "<br>", $mlw_message);
892
+ $mlw_message = str_replace( "<br/>" , "<br>", $mlw_message);
893
+ $mlw_message = str_replace( "<br />" , "<br>", $mlw_message);
894
+ $mlw_headers = 'From: '.$mlw_quiz_options->email_from_text.' <'.$mlw_quiz_options->admin_email.'>' . "\r\n";
895
+ wp_mail($mlw_user_email, "Quiz Results For ".$mlw_quiz_options->quiz_name, $mlw_message, $mlw_headers);
896
+ break;
897
+ }
898
+ else
899
+ {
900
+ //Check to see if points fall in correct range
901
+ if ($mlw_quiz_options->system == 1 && $mlw_points >= $mlw_each[0] && $mlw_points <= $mlw_each[1])
902
+ {
903
+ $mlw_message = htmlspecialchars_decode($mlw_each[2], ENT_QUOTES);
904
+ $mlw_message = str_replace( "%POINT_SCORE%" , $mlw_points, $mlw_message);
905
+ $mlw_message = str_replace( "%AVERAGE_POINT%" , $mlw_average_points, $mlw_message);
906
+ $mlw_message = str_replace( "%AMOUNT_CORRECT%" , $mlw_correct, $mlw_message);
907
+ $mlw_message = str_replace( "%TOTAL_QUESTIONS%" , $mlw_total_questions, $mlw_message);
908
+ $mlw_message = str_replace( "%CORRECT_SCORE%" , $mlw_total_score, $mlw_message);
909
+ $mlw_message = str_replace( "%QUIZ_NAME%" , $mlw_quiz_options->quiz_name, $mlw_message);
910
+ $mlw_message = str_replace( "%USER_NAME%" , $mlw_user_name, $mlw_message);
911
+ $mlw_message = str_replace( "%USER_BUSINESS%" , $mlw_user_comp, $mlw_message);
912
+ $mlw_message = str_replace( "%USER_PHONE%" , $mlw_user_phone, $mlw_message);
913
+ $mlw_message = str_replace( "%USER_EMAIL%" , $mlw_user_email, $mlw_message);
914
+ $mlw_message = str_replace( "%QUESTIONS_ANSWERS%" , $mlw_question_answers, $mlw_message);
915
+ $mlw_message = str_replace( "%COMMENT_SECTION%" , $mlw_qm_quiz_comments, $mlw_message);
916
+ $mlw_message = str_replace( "%TIMER%" , $mlw_qmn_timer, $mlw_message);
917
+ $mlw_message = str_replace( "%CERTIFICATE_LINK%" , $mlw_certificate_link, $mlw_message);
918
+ $mlw_message = str_replace( "%CURRENT_DATE%" , date("F jS Y"), $mlw_message);
919
+ $mlw_message = str_replace( "\n" , "<br>", $mlw_message);
920
+ $mlw_message = str_replace( "<br/>" , "<br>", $mlw_message);
921
+ $mlw_message = str_replace( "<br />" , "<br>", $mlw_message);
922
+ $mlw_headers = 'From: '.$mlw_quiz_options->email_from_text.' <'.$mlw_quiz_options->admin_email.'>' . "\r\n";
923
+ wp_mail($mlw_user_email, "Quiz Results For ".$mlw_quiz_options->quiz_name, $mlw_message, $mlw_headers);
924
+ break;
925
+ }
926
+
927
+ //Check to see if score fall in correct range
928
+ if ($mlw_quiz_options->system == 0 && $mlw_total_score >= $mlw_each[0] && $mlw_total_score <= $mlw_each[1])
929
+ {
930
+ $mlw_message = htmlspecialchars_decode($mlw_each[2], ENT_QUOTES);
931
+ $mlw_message = str_replace( "%POINT_SCORE%" , $mlw_points, $mlw_message);
932
+ $mlw_message = str_replace( "%AVERAGE_POINT%" , $mlw_average_points, $mlw_message);
933
+ $mlw_message = str_replace( "%AMOUNT_CORRECT%" , $mlw_correct, $mlw_message);
934
+ $mlw_message = str_replace( "%TOTAL_QUESTIONS%" , $mlw_total_questions, $mlw_message);
935
+ $mlw_message = str_replace( "%CORRECT_SCORE%" , $mlw_total_score, $mlw_message);
936
+ $mlw_message = str_replace( "%QUIZ_NAME%" , $mlw_quiz_options->quiz_name, $mlw_message);
937
+ $mlw_message = str_replace( "%USER_NAME%" , $mlw_user_name, $mlw_message);
938
+ $mlw_message = str_replace( "%USER_BUSINESS%" , $mlw_user_comp, $mlw_message);
939
+ $mlw_message = str_replace( "%USER_PHONE%" , $mlw_user_phone, $mlw_message);
940
+ $mlw_message = str_replace( "%USER_EMAIL%" , $mlw_user_email, $mlw_message);
941
+ $mlw_message = str_replace( "%QUESTIONS_ANSWERS%" , $mlw_question_answers, $mlw_message);
942
+ $mlw_message = str_replace( "%COMMENT_SECTION%" , $mlw_qm_quiz_comments, $mlw_message);
943
+ $mlw_message = str_replace( "%TIMER%" , $mlw_qmn_timer, $mlw_message);
944
+ $mlw_message = str_replace( "%CERTIFICATE_LINK%" , $mlw_certificate_link, $mlw_message);
945
+ $mlw_message = str_replace( "%CURRENT_DATE%" , date("F jS Y"), $mlw_message);
946
+ $mlw_message = str_replace( "\n" , "<br>", $mlw_message);
947
+ $mlw_message = str_replace( "<br/>" , "<br>", $mlw_message);
948
+ $mlw_message = str_replace( "<br />" , "<br>", $mlw_message);
949
+ $mlw_headers = 'From: '.$mlw_quiz_options->email_from_text.' <'.$mlw_quiz_options->admin_email.'>' . "\r\n";
950
+ wp_mail($mlw_user_email, "Quiz Results For ".$mlw_quiz_options->quiz_name, $mlw_message, $mlw_headers);
951
+ break;
952
+ }
953
+ }
954
+ }
955
+ }
956
+ else
957
+ {
958
+ $mlw_message = htmlspecialchars_decode($mlw_quiz_options->user_email_template, ENT_QUOTES);
959
+ $mlw_message = str_replace( "%POINT_SCORE%" , $mlw_points, $mlw_message);
960
+ $mlw_message = str_replace( "%AVERAGE_POINT%" , $mlw_average_points, $mlw_message);
961
+ $mlw_message = str_replace( "%AMOUNT_CORRECT%" , $mlw_correct, $mlw_message);
962
+ $mlw_message = str_replace( "%TOTAL_QUESTIONS%" , $mlw_total_questions, $mlw_message);
963
+ $mlw_message = str_replace( "%CORRECT_SCORE%" , $mlw_total_score, $mlw_message);
964
+ $mlw_message = str_replace( "%QUIZ_NAME%" , $mlw_quiz_options->quiz_name, $mlw_message);
965
+ $mlw_message = str_replace( "%USER_NAME%" , $mlw_user_name, $mlw_message);
966
+ $mlw_message = str_replace( "%USER_BUSINESS%" , $mlw_user_comp, $mlw_message);
967
+ $mlw_message = str_replace( "%USER_PHONE%" , $mlw_user_phone, $mlw_message);
968
+ $mlw_message = str_replace( "%USER_EMAIL%" , $mlw_user_email, $mlw_message);
969
+ $mlw_message = str_replace( "%QUESTIONS_ANSWERS%" , $mlw_question_answers, $mlw_message);
970
+ $mlw_message = str_replace( "%COMMENT_SECTION%" , $mlw_qm_quiz_comments, $mlw_message);
971
+ $mlw_message = str_replace( "%TIMER%" , $mlw_qmn_timer, $mlw_message);
972
+ $mlw_message = str_replace( "%CERTIFICATE_LINK%" , $mlw_certificate_link, $mlw_message);
973
+ $mlw_message = str_replace( "%CURRENT_DATE%" , date("F jS Y"), $mlw_message);
974
+ $mlw_message = str_replace( "\n" , "<br>", $mlw_message);
975
+ $mlw_message = str_replace( "<br/>" , "<br>", $mlw_message);
976
+ $mlw_message = str_replace( "<br />" , "<br>", $mlw_message);
977
+ $mlw_headers = 'From: '.$mlw_quiz_options->email_from_text.' <'.$mlw_quiz_options->admin_email.'>' . "\r\n";
978
+ wp_mail($mlw_user_email, "Quiz Results For ".$mlw_quiz_options->quiz_name, $mlw_message, $mlw_headers);
979
+ }
980
  }
981
  }
982
 
includes/mlw_quiz_options.php CHANGED
@@ -22,6 +22,8 @@ function mlw_generate_quiz_options()
22
  $mlw_hasResetQuizStats = false;
23
  $mlw_hasAddedLanding = false;
24
  $mlw_hasSavedLanding = false;
 
 
25
  $mlw_hasSavedStyle = false;
26
  $mlw_qmn_isQueryError = false;
27
  $mlw_qmn_error_code = '0000';
@@ -191,8 +193,6 @@ function mlw_generate_quiz_options()
191
  $mlw_qmn_message_end = htmlspecialchars($_POST["message_end_template"], ENT_QUOTES);
192
  $mlw_qmn_social_medi_text = htmlspecialchars($_POST["mlw_quiz_social_media_text_template"], ENT_QUOTES);
193
  $mlw_user_tries_text = htmlspecialchars($_POST["mlw_quiz_total_user_tries_text"], ENT_QUOTES);
194
- $mlw_user_email_template = htmlspecialchars($_POST["mlw_quiz_user_email_template"], ENT_QUOTES);
195
- $mlw_admin_email_template = htmlspecialchars($_POST["mlw_quiz_admin_email_template"], ENT_QUOTES);
196
  $mlw_submit_button_text = htmlspecialchars($_POST["mlw_submitText"], ENT_QUOTES);
197
  $mlw_name_field_text = htmlspecialchars($_POST["mlw_nameText"], ENT_QUOTES);
198
  $mlw_business_field_text = htmlspecialchars($_POST["mlw_businessText"], ENT_QUOTES);
@@ -205,7 +205,7 @@ function mlw_generate_quiz_options()
205
  $mlw_question_answer_template = htmlspecialchars($_POST["mlw_quiz_question_answer_template"], ENT_QUOTES);
206
  $quiz_id = $_POST["quiz_id"];
207
 
208
- $update = "UPDATE " . $wpdb->prefix . "mlw_quizzes" . " SET message_before='".$mlw_before_message."', message_comment='".$mlw_before_comments."', message_end_template='".$mlw_qmn_message_end."', comment_field_text='".$mlw_comment_field_text."', email_from_text='".$mlw_email_from_text."', question_answer_template='".$mlw_question_answer_template."', submit_button_text='".$mlw_submit_button_text."', name_field_text='".$mlw_name_field_text."', business_field_text='".$mlw_business_field_text."', email_field_text='".$mlw_email_field_text."', phone_field_text='".$mlw_phone_field_text."', user_email_template='".$mlw_user_email_template."', admin_email_template='".$mlw_admin_email_template."', total_user_tries_text='".$mlw_user_tries_text."', social_media_text='".$mlw_qmn_social_medi_text."', pagination_text='".$mlw_qmn_pagination_field."' WHERE quiz_id=".$quiz_id;
209
  $results = $wpdb->query( $update );
210
  if ($results != false)
211
  {
@@ -349,6 +349,97 @@ function mlw_generate_quiz_options()
349
  }
350
  }
351
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
352
  /*
353
  Code For Quiz Landing Page Tab
354
  */
@@ -461,7 +552,7 @@ function mlw_generate_quiz_options()
461
  $table_name = $wpdb->prefix . "mlw_qm_audit_trail";
462
  $insert = "INSERT INTO " . $table_name .
463
  "(trail_id, action_user, action, time) " .
464
- "VALUES (NULL , '" . $current_user->display_name . "' , 'Styles Have Been Saved For Quiz Number ".$mlw_qmn_landing_id."' , '" . date("h:i:s A m/d/Y") . "')";
465
  $results = $wpdb->query( $insert );
466
  }
467
  else
@@ -527,6 +618,14 @@ function mlw_generate_quiz_options()
527
  $mlw_certificate_options = array('Enter title here', 'Enter text here', '', '', 1);
528
  }
529
 
 
 
 
 
 
 
 
 
530
  //Load Landing Pages
531
  $mlw_message_after_array = @unserialize($mlw_quiz_options->message_after);
532
  if (!is_array($mlw_message_after_array)) {
@@ -666,6 +765,25 @@ function mlw_generate_quiz_options()
666
  $j('#landing_page_help_dialog').dialog('open');
667
  return false;
668
  } );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
669
  });
670
 
671
  $j(function() {
@@ -696,7 +814,9 @@ function mlw_generate_quiz_options()
696
  $j("#accordion").accordion({
697
  heightStyle: "content"
698
  });
699
-
 
 
700
  });
701
  $j(function() {
702
  $j( "#system" ).buttonset();
@@ -754,7 +874,7 @@ function mlw_generate_quiz_options()
754
  $j( "#edit_comments" ).buttonset();
755
  });
756
  $j(function() {
757
- $j("button, #prev_page, #next_page").button();
758
 
759
  });
760
  $j(function() {
@@ -848,6 +968,11 @@ function mlw_generate_quiz_options()
848
  document.getElementById('message_after_'+id).value = "Delete";
849
  document.mlw_quiz_save_landing_form.submit();
850
  }
 
 
 
 
 
851
  </script>
852
  <div class="wrap">
853
  <div class='mlw_quiz_options'>
@@ -950,6 +1075,24 @@ function mlw_generate_quiz_options()
950
  <p><span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>
951
  <strong>Success!</strong> The landing pages have been saved successfully!</p>
952
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
953
  <?php
954
  }
955
  if ($mlw_UpdatedCertificate)
@@ -978,6 +1121,7 @@ function mlw_generate_quiz_options()
978
  <li><a href="#tabs-3">Quiz Options</a></li>
979
  <li><a href="#tabs-4">Quiz Leaderboard</a></li>
980
  <li><a href="#tabs-5">Quiz Certificate (Beta)</a></li>
 
981
  <li><a href="#tabs-6">Quiz Landing Page</a></li>
982
  <li><a href="#tabs-7">Quiz Styling</a></li>
983
  <li><a href="#tabs-8">Quiz Tools</a></li>
@@ -1001,23 +1145,23 @@ function mlw_generate_quiz_options()
1001
  if( $mlw_qmn_question_page > 0 )
1002
  {
1003
  $mlw_qmn_previous_page = $mlw_qmn_question_page - 2;
1004
- $display .= "<a id=\"prev_page\" href=\"$_PHP_SELF?page=mlw_quiz_options&&mlw_question_page=$mlw_qmn_previous_page&&quiz_id=$quiz_id\">Previous 10 Questions</a>";
1005
  if( $mlw_qmn_question_left > $mlw_qmn_table_limit )
1006
  {
1007
- $display .= "<a id=\"next_page\" href=\"$_PHP_SELF?page=mlw_quiz_options&&mlw_question_page=$mlw_qmn_question_page&&quiz_id=$quiz_id\">Next 10 Questions</a>";
1008
  }
1009
  }
1010
  else if( $mlw_qmn_question_page == 0 )
1011
  {
1012
  if( $mlw_qmn_question_left > $mlw_qmn_table_limit )
1013
  {
1014
- $display .= "<a id=\"next_page\" href=\"$_PHP_SELF?page=mlw_quiz_options&&mlw_question_page=$mlw_qmn_question_page&&quiz_id=$quiz_id\">Next 10 Questions</a>";
1015
  }
1016
  }
1017
  else if( $mlw_qmn_question_left < $mlw_qmn_table_limit )
1018
  {
1019
  $mlw_qmn_previous_page = $mlw_qmn_question_page - 2;
1020
- $display .= "<a id=\"prev_page\" href=\"$_PHP_SELF?page=mlw_quiz_options&&mlw_question_page=$mlw_qmn_previous_page&&quiz_id=$quiz_id\">Previous 10 Questions</a>";
1021
  }
1022
 
1023
  $display .= "<table class=\"widefat\">";
@@ -1500,55 +1644,7 @@ function mlw_generate_quiz_options()
1500
  </div>
1501
  <h3><a href="#">Email Template</a></h3>
1502
  <div>
1503
- <table class="form-table">
1504
- <tr>
1505
- <td width="30%">
1506
- <strong>Email sent to user after completion (If turned on in options)</strong>
1507
- <br />
1508
- <p>Allowed Variables: </p>
1509
- <p style="margin: 2px 0">- %POINT_SCORE%</p>
1510
- <p style="margin: 2px 0">- %AVERAGE_POINT%</p>
1511
- <p style="margin: 2px 0">- %AMOUNT_CORRECT%</p>
1512
- <p style="margin: 2px 0">- %TOTAL_QUESTIONS%</p>
1513
- <p style="margin: 2px 0">- %CORRECT_SCORE%</p>
1514
- <p style="margin: 2px 0">- %QUIZ_NAME%</p>
1515
- <p style="margin: 2px 0">- %USER_NAME%</p>
1516
- <p style="margin: 2px 0">- %USER_BUSINESS%</p>
1517
- <p style="margin: 2px 0">- %USER_PHONE%</p>
1518
- <p style="margin: 2px 0">- %USER_EMAIL%</p>
1519
- <p style="margin: 2px 0">- %COMMENT_SECTION%</p>
1520
- <p style="margin: 2px 0">- %QUESTIONS_ANSWERS%</p>
1521
- <p style="margin: 2px 0">- %TIMER%</p>
1522
- <p style="margin: 2px 0">- %CURRENT_DATE%</p>
1523
- </td>
1524
- <td><textarea cols="80" rows="15" id="mlw_quiz_user_email_template" name="mlw_quiz_user_email_template"><?php echo $mlw_quiz_options->user_email_template; ?></textarea>
1525
- </td>
1526
- </tr>
1527
- <tr>
1528
- <td width="30%">
1529
- <strong>Email sent to admin after completion (If turned on in options)</strong>
1530
- <br />
1531
- <p>Allowed Variables: </p>
1532
- <p style="margin: 2px 0">- %POINT_SCORE%</p>
1533
- <p style="margin: 2px 0">- %AVERAGE_POINT%</p>
1534
- <p style="margin: 2px 0">- %AMOUNT_CORRECT%</p>
1535
- <p style="margin: 2px 0">- %TOTAL_QUESTIONS%</p>
1536
- <p style="margin: 2px 0">- %CORRECT_SCORE%</p>
1537
- <p style="margin: 2px 0">- %USER_NAME%</p>
1538
- <p style="margin: 2px 0">- %USER_BUSINESS%</p>
1539
- <p style="margin: 2px 0">- %USER_PHONE%</p>
1540
- <p style="margin: 2px 0">- %USER_EMAIL%</p>
1541
- <p style="margin: 2px 0">- %QUIZ_NAME%</p>
1542
- <p style="margin: 2px 0">- %COMMENT_SECTION%</p>
1543
- <p style="margin: 2px 0">- %QUESTIONS_ANSWERS%</p>
1544
- <p style="margin: 2px 0">- %TIMER%</p>
1545
- <p style="margin: 2px 0">- %CURRENT_DATE%</p>
1546
- </td>
1547
- <td><textarea cols="80" rows="15" id="mlw_quiz_admin_email_template" name="mlw_quiz_admin_email_template"><?php echo $mlw_quiz_options->admin_email_template; ?></textarea>
1548
- </td>
1549
- </tr>
1550
- </table>
1551
-
1552
  </div>
1553
  <h3><a href="#">Other Template</a></h3>
1554
  <div>
@@ -1892,6 +1988,156 @@ function mlw_generate_quiz_options()
1892
  <button id="save_certificate_button" onclick="javascript: document.quiz_certificate_options_form.submit();">Save Certificate Options</button>
1893
  </form>
1894
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1895
  <div id="tabs-6">
1896
  <h3>Template Variables</h3>
1897
  <table class="form-table">
@@ -2016,13 +2262,13 @@ function mlw_generate_quiz_options()
2016
  <div id="tabs-7">
2017
  <h3>Quiz CSS</h3>
2018
  <p>This page allows you to edit the css styles for the quiz.</p>
2019
- <p>Entire quiz is wrapped in class 'mlw_qmn_quiz'</p>
2020
- <p>Each page of the quiz is wrapped in class 'quiz_section'</p>
2021
- <p>Message before quiz text is wrapped in class 'mlw_qmn_message_before'</p>
2022
  <p>The text for each question is wrapped in class 'mlw_qmn_question'</p>
2023
  <p>Each comment field for the questions is wrapped in class 'mlw_qmn_question_comment'</p>
2024
  <p>Label text for comment section is wrapped in class 'mlw_qmn_comment_section_text'</p>
2025
- <p>The message displayed at end of quiz is wrapped in class 'mlw_qmn_message_end'</p>
2026
  <p>Each button shown for pagination (i.e Next/Previous) is wrapped in class 'mlw_qmn_quiz_link'</p>
2027
  <p>Timer is wrapped in class 'mlw_qmn_timer'</p>
2028
  <button id="save_styles_button" onclick="javascript: document.quiz_style_form.submit();">Save Quiz Style</button>
@@ -2171,6 +2417,16 @@ function mlw_generate_quiz_options()
2171
  <p>For your extra pages, you must designate what score the user must be above and what score the user must be below to see the page. If the user does not fall into any, the default page will be show.</p>
2172
  <p>Be sure to save after any changes are made!</p>
2173
  </div>
 
 
 
 
 
 
 
 
 
 
2174
 
2175
  <?php
2176
  }
22
  $mlw_hasResetQuizStats = false;
23
  $mlw_hasAddedLanding = false;
24
  $mlw_hasSavedLanding = false;
25
+ $mlw_hasAddedEmail = false;
26
+ $mlw_hasSavedEmail = false;
27
  $mlw_hasSavedStyle = false;
28
  $mlw_qmn_isQueryError = false;
29
  $mlw_qmn_error_code = '0000';
193
  $mlw_qmn_message_end = htmlspecialchars($_POST["message_end_template"], ENT_QUOTES);
194
  $mlw_qmn_social_medi_text = htmlspecialchars($_POST["mlw_quiz_social_media_text_template"], ENT_QUOTES);
195
  $mlw_user_tries_text = htmlspecialchars($_POST["mlw_quiz_total_user_tries_text"], ENT_QUOTES);
 
 
196
  $mlw_submit_button_text = htmlspecialchars($_POST["mlw_submitText"], ENT_QUOTES);
197
  $mlw_name_field_text = htmlspecialchars($_POST["mlw_nameText"], ENT_QUOTES);
198
  $mlw_business_field_text = htmlspecialchars($_POST["mlw_businessText"], ENT_QUOTES);
205
  $mlw_question_answer_template = htmlspecialchars($_POST["mlw_quiz_question_answer_template"], ENT_QUOTES);
206
  $quiz_id = $_POST["quiz_id"];
207
 
208
+ $update = "UPDATE " . $wpdb->prefix . "mlw_quizzes" . " SET message_before='".$mlw_before_message."', message_comment='".$mlw_before_comments."', message_end_template='".$mlw_qmn_message_end."', comment_field_text='".$mlw_comment_field_text."', email_from_text='".$mlw_email_from_text."', question_answer_template='".$mlw_question_answer_template."', submit_button_text='".$mlw_submit_button_text."', name_field_text='".$mlw_name_field_text."', business_field_text='".$mlw_business_field_text."', email_field_text='".$mlw_email_field_text."', phone_field_text='".$mlw_phone_field_text."', total_user_tries_text='".$mlw_user_tries_text."', social_media_text='".$mlw_qmn_social_medi_text."', pagination_text='".$mlw_qmn_pagination_field."' WHERE quiz_id=".$quiz_id;
209
  $results = $wpdb->query( $update );
210
  if ($results != false)
211
  {
349
  }
350
  }
351
 
352
+ /*
353
+ Code For Quiz Emails Tab
354
+ */
355
+
356
+ //Check to add new user email template
357
+ if (isset($_POST["mlw_add_email_page"]) && $_POST["mlw_add_email_page"] == "confirmation")
358
+ {
359
+ //Function variables
360
+ $mlw_qmn_add_email_id = intval($_POST["mlw_add_email_quiz_id"]);
361
+ $mlw_qmn_user_email = $wpdb->get_var( $wpdb->prepare( "SELECT user_email_template FROM ".$wpdb->prefix."mlw_quizzes WHERE quiz_id=%d", $mlw_qmn_add_email_id ) );
362
+
363
+ //Load user email and check if it is array already. If not, turn it into one
364
+ $mlw_qmn_email_array = @unserialize($mlw_qmn_user_email);
365
+ if (is_array($mlw_qmn_email_array))
366
+ {
367
+ $mlw_new_landing_array = array(0, 100, 'Enter Your Text Here');
368
+ array_unshift($mlw_qmn_email_array , $mlw_new_landing_array);
369
+ $mlw_qmn_email_array = serialize($mlw_qmn_email_array);
370
+
371
+ }
372
+ else
373
+ {
374
+ $mlw_qmn_email_array = array(array(0, 0, $mlw_qmn_user_email));
375
+ $mlw_new_landing_array = array(0, 100, 'Enter Your Text Here');
376
+ array_unshift($mlw_qmn_email_array , $mlw_new_landing_array);
377
+ $mlw_qmn_email_array = serialize($mlw_qmn_email_array);
378
+ }
379
+ //Update message_after with new array then check to see if worked
380
+ $mlw_new_email_results = $wpdb->query( $wpdb->prepare( "UPDATE ".$wpdb->prefix."mlw_quizzes SET user_email_template='%s' WHERE quiz_id=%d", $mlw_qmn_email_array, $mlw_qmn_add_email_id ) );
381
+ if ($mlw_new_email_results != false)
382
+ {
383
+ $mlw_hasAddedEmail = true;
384
+
385
+ //Insert Action Into Audit Trail
386
+ global $current_user;
387
+ get_currentuserinfo();
388
+ $table_name = $wpdb->prefix . "mlw_qm_audit_trail";
389
+ $insert = "INSERT INTO " . $table_name .
390
+ "(trail_id, action_user, action, time) " .
391
+ "VALUES (NULL , '" . $current_user->display_name . "' , 'New User Email Has Been Created For Quiz Number ".$mlw_qmn_add_email_id."' , '" . date("h:i:s A m/d/Y") . "')";
392
+ $results = $wpdb->query( $insert );
393
+ }
394
+ else
395
+ {
396
+ $mlw_qmn_isQueryError = true;
397
+ $mlw_qmn_error_code = '0016';
398
+ }
399
+ }
400
+
401
+ //Check to save email templates
402
+ if (isset($_POST["mlw_save_email_template"]) && $_POST["mlw_save_email_template"] == "confirmation")
403
+ {
404
+ //Function Variables
405
+ $mlw_qmn_email_id = intval($_POST["mlw_email_quiz_id"]);
406
+ $mlw_qmn_email_template_total = intval($_POST["mlw_email_template_total"]);
407
+ $mlw_qmn_admin_email = htmlspecialchars(stripslashes($_POST["mlw_quiz_admin_email_template"]), ENT_QUOTES);
408
+
409
+ //Create new array
410
+ $i = 1;
411
+ $mlw_qmn_new_email_array = array();
412
+ while ($i <= $mlw_qmn_email_template_total)
413
+ {
414
+ if ($_POST["user_email_".$i] != "Delete")
415
+ {
416
+ $mlw_qmn_email_each = array(intval($_POST["user_email_begin_".$i]), intval($_POST["user_email_end_".$i]), htmlspecialchars(stripslashes($_POST["user_email_".$i]), ENT_QUOTES));
417
+ $mlw_qmn_new_email_array[] = $mlw_qmn_email_each;
418
+ }
419
+ $i++;
420
+ }
421
+ $mlw_qmn_new_email_array = serialize($mlw_qmn_new_email_array);
422
+ $mlw_new_email_results = $wpdb->query( $wpdb->prepare( "UPDATE ".$wpdb->prefix."mlw_quizzes SET user_email_template='%s', admin_email_template='%s' WHERE quiz_id=%d", $mlw_qmn_new_email_array, $mlw_qmn_admin_email, $mlw_qmn_email_id ) );
423
+ if ($mlw_new_email_results != false)
424
+ {
425
+ $mlw_hasSavedEmail = true;
426
+
427
+ //Insert Action Into Audit Trail
428
+ global $current_user;
429
+ get_currentuserinfo();
430
+ $table_name = $wpdb->prefix . "mlw_qm_audit_trail";
431
+ $insert = "INSERT INTO " . $table_name .
432
+ "(trail_id, action_user, action, time) " .
433
+ "VALUES (NULL , '" . $current_user->display_name . "' , 'Email Templates Have Been Saved For Quiz Number ".$mlw_qmn_email_id."' , '" . date("h:i:s A m/d/Y") . "')";
434
+ $results = $wpdb->query( $insert );
435
+ }
436
+ else
437
+ {
438
+ $mlw_qmn_isQueryError = true;
439
+ $mlw_qmn_error_code = '0017';
440
+ }
441
+ }
442
+
443
  /*
444
  Code For Quiz Landing Page Tab
445
  */
552
  $table_name = $wpdb->prefix . "mlw_qm_audit_trail";
553
  $insert = "INSERT INTO " . $table_name .
554
  "(trail_id, action_user, action, time) " .
555
+ "VALUES (NULL , '" . $current_user->display_name . "' , 'Styles Have Been Saved For Quiz Number ".$mlw_qmn_style_id."' , '" . date("h:i:s A m/d/Y") . "')";
556
  $results = $wpdb->query( $insert );
557
  }
558
  else
618
  $mlw_certificate_options = array('Enter title here', 'Enter text here', '', '', 1);
619
  }
620
 
621
+
622
+ //Load Email Templates
623
+ $mlw_qmn_user_email_array = @unserialize($mlw_quiz_options->user_email_template);
624
+ if (!is_array($mlw_qmn_user_email_array)) {
625
+ // something went wrong, initialize to empty array
626
+ $mlw_qmn_user_email_array = array(array(0, 0, $mlw_quiz_options->user_email_template));
627
+ }
628
+
629
  //Load Landing Pages
630
  $mlw_message_after_array = @unserialize($mlw_quiz_options->message_after);
631
  if (!is_array($mlw_message_after_array)) {
765
  $j('#landing_page_help_dialog').dialog('open');
766
  return false;
767
  } );
768
+ });
769
+
770
+ $j(function() {
771
+ $j('#email_template_help_dialog').dialog({
772
+ autoOpen: false,
773
+ show: 'blind',
774
+ width:700,
775
+ hide: 'explode',
776
+ buttons: {
777
+ Ok: function() {
778
+ $j(this).dialog('close');
779
+ }
780
+ }
781
+ });
782
+
783
+ $j('#email_tab_help').click(function() {
784
+ $j('#email_template_help_dialog').dialog('open');
785
+ return false;
786
+ } );
787
  });
788
 
789
  $j(function() {
814
  $j("#accordion").accordion({
815
  heightStyle: "content"
816
  });
817
+ $j("#email_accordion").accordion({
818
+ heightStyle: "content"
819
+ });
820
  });
821
  $j(function() {
822
  $j( "#system" ).buttonset();
874
  $j( "#edit_comments" ).buttonset();
875
  });
876
  $j(function() {
877
+ $j("button, #prev_page, #next_page, #new_email_button_top, #new_email_button_bottom").button();
878
 
879
  });
880
  $j(function() {
968
  document.getElementById('message_after_'+id).value = "Delete";
969
  document.mlw_quiz_save_landing_form.submit();
970
  }
971
+ function delete_email(id)
972
+ {
973
+ document.getElementById('user_email_'+id).value = "Delete";
974
+ document.mlw_quiz_save_email_form.submit();
975
+ }
976
  </script>
977
  <div class="wrap">
978
  <div class='mlw_quiz_options'>
1075
  <p><span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>
1076
  <strong>Success!</strong> The landing pages have been saved successfully!</p>
1077
  </div>
1078
+ <?php
1079
+ }
1080
+ if ($mlw_hasAddedEmail)
1081
+ {
1082
+ ?>
1083
+ <div class="ui-state-highlight ui-corner-all" style="margin-top: 20px; padding: 0 .7em;">
1084
+ <p><span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>
1085
+ <strong>Success!</strong> A new email has been added successfully!</p>
1086
+ </div>
1087
+ <?php
1088
+ }
1089
+ if ($mlw_hasSavedEmail)
1090
+ {
1091
+ ?>
1092
+ <div class="ui-state-highlight ui-corner-all" style="margin-top: 20px; padding: 0 .7em;">
1093
+ <p><span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>
1094
+ <strong>Success!</strong> The email templates have been saved successfully!</p>
1095
+ </div>
1096
  <?php
1097
  }
1098
  if ($mlw_UpdatedCertificate)
1121
  <li><a href="#tabs-3">Quiz Options</a></li>
1122
  <li><a href="#tabs-4">Quiz Leaderboard</a></li>
1123
  <li><a href="#tabs-5">Quiz Certificate (Beta)</a></li>
1124
+ <li><a href="#tabs-9">Quiz Emails</a></li>
1125
  <li><a href="#tabs-6">Quiz Landing Page</a></li>
1126
  <li><a href="#tabs-7">Quiz Styling</a></li>
1127
  <li><a href="#tabs-8">Quiz Tools</a></li>
1145
  if( $mlw_qmn_question_page > 0 )
1146
  {
1147
  $mlw_qmn_previous_page = $mlw_qmn_question_page - 2;
1148
+ $display .= "<a id=\"prev_page\" href=\"?page=mlw_quiz_options&&mlw_question_page=$mlw_qmn_previous_page&&quiz_id=$quiz_id\">Previous 10 Questions</a>";
1149
  if( $mlw_qmn_question_left > $mlw_qmn_table_limit )
1150
  {
1151
+ $display .= "<a id=\"next_page\" href=\"?page=mlw_quiz_options&&mlw_question_page=$mlw_qmn_question_page&&quiz_id=$quiz_id\">Next 10 Questions</a>";
1152
  }
1153
  }
1154
  else if( $mlw_qmn_question_page == 0 )
1155
  {
1156
  if( $mlw_qmn_question_left > $mlw_qmn_table_limit )
1157
  {
1158
+ $display .= "<a id=\"next_page\" href=\"?page=mlw_quiz_options&&mlw_question_page=$mlw_qmn_question_page&&quiz_id=$quiz_id\">Next 10 Questions</a>";
1159
  }
1160
  }
1161
  else if( $mlw_qmn_question_left < $mlw_qmn_table_limit )
1162
  {
1163
  $mlw_qmn_previous_page = $mlw_qmn_question_page - 2;
1164
+ $display .= "<a id=\"prev_page\" href=\"?page=mlw_quiz_options&&mlw_question_page=$mlw_qmn_previous_page&&quiz_id=$quiz_id\">Previous 10 Questions</a>";
1165
  }
1166
 
1167
  $display .= "<table class=\"widefat\">";
1644
  </div>
1645
  <h3><a href="#">Email Template</a></h3>
1646
  <div>
1647
+ <h3>You can now send differnt emails based on score! Edit your email templates from the new Quiz Emails tab.</h3>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1648
  </div>
1649
  <h3><a href="#">Other Template</a></h3>
1650
  <div>
1988
  <button id="save_certificate_button" onclick="javascript: document.quiz_certificate_options_form.submit();">Save Certificate Options</button>
1989
  </form>
1990
  </div>
1991
+ <div id="tabs-9">
1992
+ <h3>Template Variables</h3>
1993
+ <table class="form-table">
1994
+ <tr>
1995
+ <td><strong>%POINT_SCORE%</strong> - Score for the quiz when using points</td>
1996
+ <td><strong>%AVERAGE_POINT%</strong> - The average amount of points user had per question</td>
1997
+ </tr>
1998
+
1999
+ <tr>
2000
+ <td><strong>%AMOUNT_CORRECT%</strong> - The number of correct answers the user had</td>
2001
+ <td><strong>%TOTAL_QUESTIONS%</strong> - The total number of questions in the quiz</td>
2002
+ </tr>
2003
+
2004
+ <tr>
2005
+ <td><strong>%CORRECT_SCORE%</strong> - Score for the quiz when using correct answers</td>
2006
+ </tr>
2007
+
2008
+ <tr>
2009
+ <td><strong>%USER_NAME%</strong> - The name the user entered before the quiz</td>
2010
+ <td><strong>%USER_BUSINESS%</strong> - The business the user entered before the quiz</td>
2011
+ </tr>
2012
+
2013
+ <tr>
2014
+ <td><strong>%USER_PHONE%</strong> - The phone number the user entered before the quiz</td>
2015
+ <td><strong>%USER_EMAIL%</strong> - The email the user entered before the quiz</td>
2016
+ </tr>
2017
+
2018
+ <tr>
2019
+ <td><strong>%QUIZ_NAME%</strong> - The name of the quiz</td>
2020
+ <td><strong>%QUESTIONS_ANSWERS%</strong> - Shows the question, the answer the user provided, and the correct answer</td>
2021
+ </tr>
2022
+
2023
+ <tr>
2024
+ <td><strong>%COMMENT_SECTION%</strong> - The comments the user entered into comment box if enabled</td>
2025
+ <td><strong>%TIMER%</strong> - The amount of time user spent of quiz</td>
2026
+ </tr>
2027
+ </table>
2028
+ <form method="post" action="" name="mlw_quiz_add_email_form">
2029
+ <input type='hidden' name='mlw_add_email_page' value='confirmation' />
2030
+ <input type='hidden' name='mlw_add_email_quiz_id' value='<?php echo $quiz_id; ?>' />
2031
+ </form>
2032
+ <button id="save_email_button" onclick="javascript: document.mlw_quiz_save_email_form.submit();">Save Email Templates</button>
2033
+ <button id="email_tab_help">Help</button>
2034
+ <form method="post" action="" name="mlw_quiz_save_email_form">
2035
+ <div id="email_accordion">
2036
+ <h3><a href="#">Email Sent To User</a></h3>
2037
+ <div>
2038
+ <a id="new_email_button_top" href="#" onclick="javascript: document.mlw_quiz_add_email_form.submit();">Add New Email</a>
2039
+ <table class="widefat">
2040
+ <thead>
2041
+ <tr>
2042
+ <th>ID</th>
2043
+ <th>Score Greater Than</th>
2044
+ <th>Score Less Than</th>
2045
+ <th>Email To Send</th>
2046
+ </tr>
2047
+ </thead>
2048
+ <tbody>
2049
+ <?php
2050
+ $mlw_each_count = 0;
2051
+ $alternate = "";
2052
+ foreach($mlw_qmn_user_email_array as $mlw_each)
2053
+ {
2054
+ if($alternate) $alternate = "";
2055
+ else $alternate = " class=\"alternate\"";
2056
+ $mlw_each_count += 1;
2057
+ if ($mlw_each[0] == 0 && $mlw_each[1] == 0)
2058
+ {
2059
+ echo "<tr{$alternate}>";
2060
+ echo "<td>";
2061
+ echo "Default";
2062
+ echo "</td>";
2063
+ echo "<td>";
2064
+ echo "<input type='hidden' id='user_email_begin_".$mlw_each_count."' name='user_email_begin_".$mlw_each_count."' value='0'/>-";
2065
+ echo "</td>";
2066
+ echo "<td>";
2067
+ echo "<input type='hidden' id='user_email_end_".$mlw_each_count."' name='user_email_end_".$mlw_each_count."' value='0'/>-";
2068
+ echo "</td>";
2069
+ echo "<td>";
2070
+ echo "<textarea cols='80' rows='15' id='user_email_".$mlw_each_count."' name='user_email_".$mlw_each_count."'>".$mlw_each[2]."</textarea>";
2071
+ echo "</td>";
2072
+ echo "</tr>";
2073
+ break;
2074
+ }
2075
+ else
2076
+ {
2077
+ echo "<tr{$alternate}>";
2078
+ echo "<td>";
2079
+ echo $mlw_each_count."<div><span style='color:green;font-size:12px;'><a onclick=\"\$j('#trying_delete_email_".$mlw_each_count."').show();\">Delete</a></span></div><div style=\"display: none;\" id='trying_delete_email_".$mlw_each_count."'>Are you sure?<br /><a onclick=\"delete_email(".$mlw_each_count.")\">Yes</a>|<a onclick=\"\$j('#trying_delete_email_".$mlw_each_count."').hide();\">No</a></div>";
2080
+ echo "</td>";
2081
+ echo "<td>";
2082
+ echo "<input type='text' id='user_email_begin_".$mlw_each_count."' name='user_email_begin_".$mlw_each_count."' title='What score must the user score better than to see this page' value='".$mlw_each[0]."'/>";
2083
+ echo "</td>";
2084
+ echo "<td>";
2085
+ echo "<input type='text' id='user_email_end_".$mlw_each_count."' name='user_email_end_".$mlw_each_count."' title='What score must the user score worse than to see this page' value='".$mlw_each[1]."' />";
2086
+ echo "</td>";
2087
+ echo "<td>";
2088
+ echo "<textarea cols='80' rows='15' id='user_email_".$mlw_each_count."' title='What email will the user be sent' name='user_email_".$mlw_each_count."'>".$mlw_each[2]."</textarea>";
2089
+ echo "</td>";
2090
+ echo "</tr>";
2091
+ }
2092
+ }
2093
+ ?>
2094
+ </tbody>
2095
+ <tfoot>
2096
+ <tr>
2097
+ <th>ID</th>
2098
+ <th>Score Greater Than</th>
2099
+ <th>Score Less Than</th>
2100
+ <th>Email To Send</th>
2101
+ </tr>
2102
+ </tfoot>
2103
+ </table>
2104
+ <a id="new_email_button_bottom" href="#" onclick="javascript: document.mlw_quiz_add_email_form.submit();">Add New Email</a>
2105
+ <input type='hidden' name='mlw_save_email_template' value='confirmation' />
2106
+ <input type='hidden' name='mlw_email_quiz_id' value='<?php echo $quiz_id; ?>' />
2107
+ <input type='hidden' name='mlw_email_template_total' value='<?php echo $mlw_each_count; ?>' />
2108
+ </div>
2109
+ <h3><a href="#">Email Sent To Admin</a></h3>
2110
+ <div>
2111
+ <table class="form-table">
2112
+ <tr>
2113
+ <td width="30%">
2114
+ <strong>Email sent to admin after completion (If turned on in options)</strong>
2115
+ <br />
2116
+ <p>Allowed Variables: </p>
2117
+ <p style="margin: 2px 0">- %POINT_SCORE%</p>
2118
+ <p style="margin: 2px 0">- %AVERAGE_POINT%</p>
2119
+ <p style="margin: 2px 0">- %AMOUNT_CORRECT%</p>
2120
+ <p style="margin: 2px 0">- %TOTAL_QUESTIONS%</p>
2121
+ <p style="margin: 2px 0">- %CORRECT_SCORE%</p>
2122
+ <p style="margin: 2px 0">- %USER_NAME%</p>
2123
+ <p style="margin: 2px 0">- %USER_BUSINESS%</p>
2124
+ <p style="margin: 2px 0">- %USER_PHONE%</p>
2125
+ <p style="margin: 2px 0">- %USER_EMAIL%</p>
2126
+ <p style="margin: 2px 0">- %QUIZ_NAME%</p>
2127
+ <p style="margin: 2px 0">- %COMMENT_SECTION%</p>
2128
+ <p style="margin: 2px 0">- %QUESTIONS_ANSWERS%</p>
2129
+ <p style="margin: 2px 0">- %TIMER%</p>
2130
+ <p style="margin: 2px 0">- %CURRENT_DATE%</p>
2131
+ </td>
2132
+ <td><textarea cols="80" rows="15" id="mlw_quiz_admin_email_template" name="mlw_quiz_admin_email_template"><?php echo $mlw_quiz_options->admin_email_template; ?></textarea>
2133
+ </td>
2134
+ </tr>
2135
+ </table>
2136
+ </div>
2137
+ </div>
2138
+ </form>
2139
+ <button id="save_email_button" onclick="javascript: document.mlw_quiz_save_email_form.submit();">Save Email Templates</button>
2140
+ </div>
2141
  <div id="tabs-6">
2142
  <h3>Template Variables</h3>
2143
  <table class="form-table">
2262
  <div id="tabs-7">
2263
  <h3>Quiz CSS</h3>
2264
  <p>This page allows you to edit the css styles for the quiz.</p>
2265
+ <p>Entire quiz is a div with class 'mlw_qmn_quiz'</p>
2266
+ <p>Each page of the quiz is div with class 'quiz_section'</p>
2267
+ <p>Message before quiz text is a span with class 'mlw_qmn_message_before'</p>
2268
  <p>The text for each question is wrapped in class 'mlw_qmn_question'</p>
2269
  <p>Each comment field for the questions is wrapped in class 'mlw_qmn_question_comment'</p>
2270
  <p>Label text for comment section is wrapped in class 'mlw_qmn_comment_section_text'</p>
2271
+ <p>The message displayed at end of quiz is a span with class 'mlw_qmn_message_end'</p>
2272
  <p>Each button shown for pagination (i.e Next/Previous) is wrapped in class 'mlw_qmn_quiz_link'</p>
2273
  <p>Timer is wrapped in class 'mlw_qmn_timer'</p>
2274
  <button id="save_styles_button" onclick="javascript: document.quiz_style_form.submit();">Save Quiz Style</button>
2417
  <p>For your extra pages, you must designate what score the user must be above and what score the user must be below to see the page. If the user does not fall into any, the default page will be show.</p>
2418
  <p>Be sure to save after any changes are made!</p>
2419
  </div>
2420
+
2421
+ <div id="email_template_help_dialog" title="Help" style="display: none;">
2422
+ <h3><b>Help</b></h3>
2423
+ <p>This page allows you to add, edit, and delete email templates for your quiz!</p>
2424
+ <p>You can have unlimited different emails to send the user after he or she takes the quiz. For example, you can have an email sent if they pass, and then send the default if they fail.</p>
2425
+ <p>If you only need the one email, leave just the default and edit it and then click the Save button.</p>
2426
+ <p>To add a new email, click Add New Email. A new section will appear with the email.</p>
2427
+ <p>For your extra emails, you must designate what score the user must be above and what score the user must be below to receive the email. If the user does not fall into any, the default email will be sent.</p>
2428
+ <p>Be sure to save after any changes are made!</p>
2429
+ </div>
2430
 
2431
  <?php
2432
  }
includes/mlw_update.php CHANGED
@@ -6,7 +6,7 @@ function mlw_quiz_update()
6
  {
7
 
8
  //Update this variable each update. This is what is checked when the plugin is deciding to run the upgrade script or not.
9
- $data = "2.3.1";
10
  if ( ! get_option('mlw_quiz_master_version'))
11
  {
12
  add_option('mlw_quiz_master_version' , $data);
6
  {
7
 
8
  //Update this variable each update. This is what is checked when the plugin is deciding to run the upgrade script or not.
9
+ $data = "2.4.1";
10
  if ( ! get_option('mlw_quiz_master_version'))
11
  {
12
  add_option('mlw_quiz_master_version' , $data);
mlw_quizmaster2.php CHANGED
@@ -3,7 +3,7 @@
3
  /*
4
  Plugin Name: Quiz Master Next
5
  Description: Use this plugin to add multiple quizzes, tests, or surveys to your website.
6
- Version: 2.3.1
7
  Author: Frank Corso
8
  Author URI: http://www.mylocalwebstop.com/
9
  Plugin URI: http://www.mylocalwebstop.com/
@@ -101,7 +101,7 @@ function mlw_qmn_show_adverts()
101
  $mlw_advert_text = "";
102
  if ( get_option('mlw_advert_shows') == 'true' )
103
  {
104
- $mlw_random_int = rand(0, 4);
105
  switch ($mlw_random_int) {
106
  case 0:
107
  $mlw_advert_text = "Need support or features? Check out our Premium Support options! Visit our <a href=\"http://mylocalwebstop.com/shop/\">Plugin Add-On Store</a> for details!";
@@ -118,6 +118,9 @@ function mlw_qmn_show_adverts()
118
  case 4:
119
  $mlw_advert_text = "Need to be able to export the results of your quizzes? Be sure to check out our new Export Results add-on in our <a href=\"http://mylocalwebstop.com/shop/\">Plugin Add-On Store</a>!";
120
  break;
 
 
 
121
  default:
122
  $mlw_advert_text = "Need support or features? Check out our Premium Support options! Visit our <a href=\"http://mylocalwebstop.com/shop/\">Plugin Add-On Store</a> for details!";
123
  }
3
  /*
4
  Plugin Name: Quiz Master Next
5
  Description: Use this plugin to add multiple quizzes, tests, or surveys to your website.
6
+ Version: 2.4.1
7
  Author: Frank Corso
8
  Author URI: http://www.mylocalwebstop.com/
9
  Plugin URI: http://www.mylocalwebstop.com/
101
  $mlw_advert_text = "";
102
  if ( get_option('mlw_advert_shows') == 'true' )
103
  {
104
+ $mlw_random_int = rand(0, 5);
105
  switch ($mlw_random_int) {
106
  case 0:
107
  $mlw_advert_text = "Need support or features? Check out our Premium Support options! Visit our <a href=\"http://mylocalwebstop.com/shop/\">Plugin Add-On Store</a> for details!";
118
  case 4:
119
  $mlw_advert_text = "Need to be able to export the results of your quizzes? Be sure to check out our new Export Results add-on in our <a href=\"http://mylocalwebstop.com/shop/\">Plugin Add-On Store</a>!";
120
  break;
121
+ case 5:
122
+ $mlw_advert_text = "Need help keeping your plugins, themes, and WordPress up to date? Want around the clock security monitoring and off-site back-ups? How about WordPress training videos, a monthly status report, and support/consultation? Check out our <a href=\"http://mylocalwebstop.com/wordpress-maintenance-services/\">WordPress Maintenance Services</a> for more details!";
123
+ break;
124
  default:
125
  $mlw_advert_text = "Need support or features? Check out our Premium Support options! Visit our <a href=\"http://mylocalwebstop.com/shop/\">Plugin Add-On Store</a> for details!";
126
  }
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: fpcorso
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RTGYAETX36ZQJ
4
  Tags: quiz, test, score, survey, contact, form, email, answer, question
5
  Requires at least: 3.6
6
- Tested up to: 3.8.1
7
- Stable tag: 2.3.1
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
10
  The easiest and most flexible way to add multiple quizzes, tests, and surveys to your website.
@@ -102,6 +102,12 @@ Feel free to use the widget on the quiz dashboard within the plugin or from the
102
 
103
  == Changelog ==
104
 
 
 
 
 
 
 
105
  = 2.3.1 (April 6, 2014) =
106
  * Added Ability To Have Graded Open Answer Questions
107
  * Minor Design Changes
@@ -413,6 +419,9 @@ Feel free to use the widget on the quiz dashboard within the plugin or from the
413
 
414
  == Upgrade Notice ==
415
 
 
 
 
416
  = 2.1.1 =
417
  Upgrade to have the ability to edit the css styles for each quiz! Plus minor bugs fixes.
418
 
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RTGYAETX36ZQJ
4
  Tags: quiz, test, score, survey, contact, form, email, answer, question
5
  Requires at least: 3.6
6
+ Tested up to: 3.9
7
+ Stable tag: 2.4.1
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
10
  The easiest and most flexible way to add multiple quizzes, tests, and surveys to your website.
102
 
103
  == Changelog ==
104
 
105
+ = 2.4.1 (April 20, 2014) =
106
+ * Added New Quiz Emails Tab
107
+ * Added Ability To Send Different Emails To Users Based On Score
108
+ * Fixed Required Question Bug
109
+ * Fixed Landing Page Bug
110
+
111
  = 2.3.1 (April 6, 2014) =
112
  * Added Ability To Have Graded Open Answer Questions
113
  * Minor Design Changes
419
 
420
  == Upgrade Notice ==
421
 
422
+ = 2.4.1 =
423
+ Upgrade to be able to send different emails based on user's score. Also, minor bug fixes included.
424
+
425
  = 2.1.1 =
426
  Upgrade to have the ability to edit the css styles for each quiz! Plus minor bugs fixes.
427