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

Version Description

(November 4, 2015) = * Fixes certificate bug that was preventing quiz/survey submissions * Fixes undefined quiz id bug that was affecting some addons * Fixes tooltip bug that was affecting required question validation on a few sites

Download this release

Release Info

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

Code changes from version 4.6.2 to 4.6.3

CHANGELOG.md CHANGED
@@ -1,3 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  = 4.5.2 (August 14, 2015) =
2
  * Ensured compatibility with Wordpress version 4.3
3
  * Fixed an issue when Contact details are set to Required and the user leaves the fields blank the quiz is still allowed to gets submitted in IE. ([Github Issue #270](https://github.com/fpcorso/quiz_master_next/issues/270))
1
+ = 4.5.5 (October 1, 2015) =
2
+ * Adds 4 new style templates to choose from
3
+ * Fixes Dutch translation ([Github Issue #285](https://github.com/fpcorso/quiz_master_next/issues/285))
4
+ * Fixes quiz results losing search filters after first page ([Github Issue #293](https://github.com/fpcorso/quiz_master_next/issues/293))
5
+ * Fixes question drag and drop not working on certain installs ([Github Issue #295](https://github.com/fpcorso/quiz_master_next/issues/295))
6
+ * Fixes Required? question setting where the Yes or No value did not show when editing ([Github Issue #296](https://github.com/fpcorso/quiz_master_next/issues/296))
7
+
8
+ = 4.5.4 (September 3, 2015) =
9
+ * Rebrand as Quiz And Survey Master
10
+ * Fixes scroll to top pagination bug
11
+ * Fixes leaderboard widget bug
12
+
13
+ = 4.5.3 (August 21, 2015) =
14
+ * Fixed an issue where Quiz Views and Quiz Taken stats in the Quizzes screen was reseting to 1 instead of 0. ([Github Issue #277](https://github.com/fpcorso/quiz_master_next/issues/277))
15
+
16
  = 4.5.2 (August 14, 2015) =
17
  * Ensured compatibility with Wordpress version 4.3
18
  * Fixed an issue when Contact details are set to Required and the user leaves the fields blank the quiz is still allowed to gets submitted in IE. ([Github Issue #270](https://github.com/fpcorso/quiz_master_next/issues/270))
README.md CHANGED
@@ -4,3 +4,9 @@ Quiz And Survey Master (Formerly Quiz Master Next)
4
  Easily and quickly add quizzes, tests, and surveys to your WordPress site.
5
 
6
  Feel free to browse the code and make suggestions/requests. Thanks!
 
 
 
 
 
 
4
  Easily and quickly add quizzes, tests, and surveys to your WordPress site.
5
 
6
  Feel free to browse the code and make suggestions/requests. Thanks!
7
+
8
+ ## Bugs ##
9
+ If you find an issue, let us know [here](https://github.com/fpcorso/quiz_master_next/issues?q=is%3Aopen)!
10
+
11
+ ## Support ##
12
+ This is a developer's portal for Easy Digital Downloads and should _not_ be used for support. Please create a support ticket [here](http://quizandsurveymaster.com/contact-us/).
assets/icon-128x128.png CHANGED
Binary file
mlw_quizmaster2.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Plugin Name: Quiz And Survey Master
4
  * Description: Easily and quickly add quizzes and surveys to your website.
5
- * Version: 4.6.2
6
  * Author: Frank Corso
7
  * Author URI: http://www.mylocalwebstop.com/
8
  * Plugin URI: http://www.quizandsurveymaster.com/
@@ -10,7 +10,7 @@
10
  * Domain Path: /languages
11
  *
12
  * @author Frank Corso
13
- * @version 4.6.2
14
  */
15
  if ( ! defined( 'ABSPATH' ) ) exit;
16
  /**
@@ -28,7 +28,7 @@ class MLWQuizMasterNext
28
  * @var string
29
  * @since 4.0.0
30
  */
31
- public $version = '4.6.2';
32
 
33
  /**
34
  * QMN Alert Manager Object
2
  /**
3
  * Plugin Name: Quiz And Survey Master
4
  * Description: Easily and quickly add quizzes and surveys to your website.
5
+ * Version: 4.6.3
6
  * Author: Frank Corso
7
  * Author URI: http://www.mylocalwebstop.com/
8
  * Plugin URI: http://www.quizandsurveymaster.com/
10
  * Domain Path: /languages
11
  *
12
  * @author Frank Corso
13
+ * @version 4.6.3
14
  */
15
  if ( ! defined( 'ABSPATH' ) ) exit;
16
  /**
28
  * @var string
29
  * @since 4.0.0
30
  */
31
+ public $version = '4.6.3';
32
 
33
  /**
34
  * QMN Alert Manager Object
php/about-page.php CHANGED
@@ -60,21 +60,16 @@ function mlw_generate_about_page()
60
  </div>
61
  <div id="mlw_quiz_changelog" class="qmn_tab" style="display: none;">
62
  <h2>Changelog</h2>
63
- <h3><?php echo $mlw_quiz_version; ?> (October 20, 2015)</h3>
64
  <ul class="changelog">
65
  <!--
66
  Examples:
67
  <li class="add"><div class="two">Add</div>Some feature was added</li>
68
  <li class="fixed"><div class="two">Fixed</div>Fixed some bug</li>
69
  -->
70
- <li class="add"><div class="two">Add</div>* Adds new dynamic form submission</li>
71
- <li class="add"><div class="two">Add</div>* Adds new From email address option</li>
72
- <li class="add"><div class="two">Add</div>* Adds new Reply-To admin email option</li>
73
- <li class="fixed"><div class="two">Fixed</div>* Fixed timer issue that started timer but prevent access to next page</li>
74
- <li class="fixed"><div class="two">Fixed</div>* Fixes redirect bug that prevented submissions from saving</li>
75
- <li class="fixed"><div class="two">Fixed</div>* Fixes required question bug that prevented multiple quizzes/surveys on one page</li>
76
- <li class="fixed"><div class="two">Fixed</div>* Re-wrote front-end JavaScript to fix a variety of smaller bugs</li>
77
- <li class="fixed"><div class="two">Fixed</div>* Renamed several file names and functions to align more with WordPress coding standards</li>
78
  </ul>
79
  </div>
80
  <div id="qmn_contributors" class="qmn_tab" style="display:none;">
60
  </div>
61
  <div id="mlw_quiz_changelog" class="qmn_tab" style="display: none;">
62
  <h2>Changelog</h2>
63
+ <h3><?php echo $mlw_quiz_version; ?> (November 4, 2015)</h3>
64
  <ul class="changelog">
65
  <!--
66
  Examples:
67
  <li class="add"><div class="two">Add</div>Some feature was added</li>
68
  <li class="fixed"><div class="two">Fixed</div>Fixed some bug</li>
69
  -->
70
+ <li class="fixed"><div class="two">Fixed</div>* Fixes certificate bug that was preventing quiz/survey submissions</li>
71
+ <li class="fixed"><div class="two">Fixed</div>* Fixes undefined quiz id bug that was affecting some addons</li>
72
+ <li class="fixed"><div class="two">Fixed</div>* Fixes tooltip bug that was affecting required question validation on a few sites</li>
 
 
 
 
 
73
  </ul>
74
  </div>
75
  <div id="qmn_contributors" class="qmn_tab" style="display:none;">
php/certificates/helvetica.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $type = 'Core';
3
+ $name = 'Helvetica';
4
+ $up = -100;
5
+ $ut = 50;
6
+ $cw = array(
7
+ chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
8
+ chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
9
+ ','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
10
+ 'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
11
+ 'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833,
12
+ 'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>222,chr(131)=>556,
13
+ chr(132)=>333,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>222,chr(146)=>222,chr(147)=>333,chr(148)=>333,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
14
+ chr(154)=>500,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>260,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
15
+ chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>556,chr(182)=>537,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667,
16
+ chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
17
+ chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>500,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>556,chr(241)=>556,
18
+ chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>584,chr(248)=>611,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500);
19
+ ?>
php/certificates/helveticab.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $type = 'Core';
3
+ $name = 'Helvetica-Bold';
4
+ $up = -100;
5
+ $ut = 50;
6
+ $cw = array(
7
+ chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
8
+ chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584,
9
+ ','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722,
10
+ 'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
11
+ 'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889,
12
+ 'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>278,chr(131)=>556,
13
+ chr(132)=>500,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>278,chr(146)=>278,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
14
+ chr(154)=>556,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>280,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
15
+ chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>611,chr(182)=>556,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
16
+ chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
17
+ chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>611,chr(241)=>611,
18
+ chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>584,chr(248)=>611,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>611,chr(255)=>556);
19
+ ?>
php/class-qmn-quiz-manager.php CHANGED
@@ -278,7 +278,7 @@ class QMNQuizManager
278
  'empty' => __('Please complete all required fields!', 'quiz-master-next')
279
  );
280
 
281
- wp_enqueue_script( 'qmn_quiz', plugins_url( '../js/qmn_quiz.js' , __FILE__ ), array('jquery') );
282
  wp_localize_script( 'qmn_quiz', 'qmn_ajax_object', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ) ) ); // setting ajaxurl
283
  wp_enqueue_script( 'math_jax', '//cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' );
284
 
@@ -494,9 +494,11 @@ class QMNQuizManager
494
  */
495
  public function ajax_submit_results() {
496
  global $qmn_allowed_visit;
 
497
  parse_str( $_POST["quizData"], $_POST );
498
  $qmn_allowed_visit = true;
499
  $quiz = intval( $_POST["qmn_quiz_id"] );
 
500
  $qmn_quiz_options = $this->load_quiz_options( $quiz );
501
  $qmn_quiz_questions = $this->load_questions( $quiz, $qmn_quiz_options, false );
502
  $qmn_quiz_answers = $this->create_answer_array( $qmn_quiz_questions, true );
@@ -836,7 +838,7 @@ EOC;
836
  $mlw_qmn_certificate_file.=<<<EOC
837
  \$pdf->Output('mlw_qmn_certificate.pdf','D');
838
  EOC;
839
- $mlw_qmn_certificate_filename = str_replace(home_url()."/", '', plugin_dir_url( __FILE__ ))."certificates/mlw_qmn_quiz".date("YmdHis").$qmn_array_for_variables['timer'].".php";
840
  file_put_contents($mlw_qmn_certificate_filename, $mlw_qmn_certificate_file);
841
  $mlw_qmn_certificate_filename = plugin_dir_url( __FILE__ )."certificates/mlw_qmn_quiz".date("YmdHis").$qmn_array_for_variables['timer'].".php";
842
  $mlw_certificate_link = "<a href='".$mlw_qmn_certificate_filename."' class='qmn_certificate_link'>Download Certificate</a>";
@@ -961,10 +963,14 @@ EOC;
961
  {
962
  add_filter( 'wp_mail_content_type', 'mlw_qmn_set_html_content_type' );
963
  $mlw_message = "";
964
- if ($qmn_quiz_options->send_user_email == "0")
965
- {
966
- if ($qmn_array_for_variables['user_email'] != "")
967
- {
 
 
 
 
968
  $from_email_array = maybe_unserialize( $qmn_quiz_options->email_from_text );
969
  if ( ! isset( $from_email_array["from_email"] ) ) {
970
  $from_email_array = array(
@@ -973,71 +979,71 @@ EOC;
973
  'reply_to' => 1
974
  );
975
  }
976
- if (is_serialized($qmn_quiz_options->user_email_template) && is_array(@unserialize($qmn_quiz_options->user_email_template)))
977
- {
978
- $mlw_user_email_array = @unserialize($qmn_quiz_options->user_email_template);
979
 
980
- //Cycle through landing pages
981
- foreach($mlw_user_email_array as $mlw_each)
982
- {
 
 
 
 
 
 
 
983
 
984
  //Generate Email Subject
985
- if (!isset($mlw_each[3]))
986
- {
987
  $mlw_each[3] = "Quiz Results For %QUIZ_NAME";
988
  }
989
- $mlw_each[3] = apply_filters( 'mlw_qmn_template_variable_results_page', $mlw_each[3], $qmn_array_for_variables);
990
 
991
  //Check to see if default
992
- if ($mlw_each[0] == 0 && $mlw_each[1] == 0)
993
- {
994
- $mlw_message = htmlspecialchars_decode($mlw_each[2], ENT_QUOTES);
995
- $mlw_message = apply_filters( 'mlw_qmn_template_variable_results_page', $mlw_message, $qmn_array_for_variables);
996
- $mlw_message = str_replace( "\n" , "<br>", $mlw_message);
997
- $mlw_message = str_replace( "<br/>" , "<br>", $mlw_message);
998
- $mlw_message = str_replace( "<br />" , "<br>", $mlw_message);
999
  $mlw_headers = 'From: '.$from_email_array["from_name"].' <'.$from_email_array["from_email"].'>' . "\r\n";
1000
- wp_mail($qmn_array_for_variables['user_email'], $mlw_each[3], $mlw_message, $mlw_headers);
1001
  break;
1002
- }
1003
- else
1004
- {
1005
- if ($qmn_quiz_options->system == 1 && $qmn_array_for_variables['total_points'] >= $mlw_each[0] && $qmn_array_for_variables['total_points'] <= $mlw_each[1])
1006
- {
1007
- $mlw_message = htmlspecialchars_decode($mlw_each[2], ENT_QUOTES);
1008
- $mlw_message = apply_filters( 'mlw_qmn_template_variable_results_page', $mlw_message, $qmn_array_for_variables);
1009
- $mlw_message = str_replace( "\n" , "<br>", $mlw_message);
1010
- $mlw_message = str_replace( "<br/>" , "<br>", $mlw_message);
1011
- $mlw_message = str_replace( "<br />" , "<br>", $mlw_message);
1012
  $mlw_headers = 'From: '.$from_email_array["from_name"].' <'.$from_email_array["from_email"].'>' . "\r\n";
1013
- wp_mail($qmn_array_for_variables['user_email'], $mlw_each[3], $mlw_message, $mlw_headers);
1014
  break;
1015
  }
1016
 
1017
  //Check to see if score fall in correct range
1018
- if ($qmn_quiz_options->system == 0 && $qmn_array_for_variables['total_score'] >= $mlw_each[0] && $qmn_array_for_variables['total_score'] <= $mlw_each[1])
1019
- {
1020
- $mlw_message = htmlspecialchars_decode($mlw_each[2], ENT_QUOTES);
1021
- $mlw_message = apply_filters( 'mlw_qmn_template_variable_results_page', $mlw_message, $qmn_array_for_variables);
1022
- $mlw_message = str_replace( "\n" , "<br>", $mlw_message);
1023
- $mlw_message = str_replace( "<br/>" , "<br>", $mlw_message);
1024
- $mlw_message = str_replace( "<br />" , "<br>", $mlw_message);
1025
  $mlw_headers = 'From: '.$from_email_array["from_name"].' <'.$from_email_array["from_email"].'>' . "\r\n";
1026
- wp_mail($qmn_array_for_variables['user_email'], $mlw_each[3], $mlw_message, $mlw_headers);
1027
  break;
1028
  }
1029
  }
1030
  }
1031
- }
1032
- else
1033
- {
1034
- $mlw_message = htmlspecialchars_decode($qmn_quiz_options->user_email_template, ENT_QUOTES);
1035
- $mlw_message = apply_filters( 'mlw_qmn_template_variable_results_page', $mlw_message, $qmn_array_for_variables);
1036
- $mlw_message = str_replace( "\n" , "<br>", $mlw_message);
1037
- $mlw_message = str_replace( "<br/>" , "<br>", $mlw_message);
1038
- $mlw_message = str_replace( "<br />" , "<br>", $mlw_message);
1039
  $mlw_headers = 'From: '.$from_email_array["from_name"].' <'.$from_email_array["from_email"].'>' . "\r\n";
1040
- wp_mail($qmn_array_for_variables['user_email'], "Quiz Results For ".$qmn_quiz_options->quiz_name, $mlw_message, $mlw_headers);
1041
  }
1042
  }
1043
  }
278
  'empty' => __('Please complete all required fields!', 'quiz-master-next')
279
  );
280
 
281
+ wp_enqueue_script( 'qmn_quiz', plugins_url( '../js/qmn_quiz.js' , __FILE__ ), array( 'jquery', 'jquery-ui-tooltip' ) );
282
  wp_localize_script( 'qmn_quiz', 'qmn_ajax_object', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ) ) ); // setting ajaxurl
283
  wp_enqueue_script( 'math_jax', '//cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' );
284
 
494
  */
495
  public function ajax_submit_results() {
496
  global $qmn_allowed_visit;
497
+ global $mlwQuizMasterNext;
498
  parse_str( $_POST["quizData"], $_POST );
499
  $qmn_allowed_visit = true;
500
  $quiz = intval( $_POST["qmn_quiz_id"] );
501
+ $mlwQuizMasterNext->quizCreator->set_id($quiz);
502
  $qmn_quiz_options = $this->load_quiz_options( $quiz );
503
  $qmn_quiz_questions = $this->load_questions( $quiz, $qmn_quiz_options, false );
504
  $qmn_quiz_answers = $this->create_answer_array( $qmn_quiz_questions, true );
838
  $mlw_qmn_certificate_file.=<<<EOC
839
  \$pdf->Output('mlw_qmn_certificate.pdf','D');
840
  EOC;
841
+ $mlw_qmn_certificate_filename = plugin_dir_path( __FILE__ )."certificates/mlw_qmn_quiz".date("YmdHis").$qmn_array_for_variables['timer'].".php";
842
  file_put_contents($mlw_qmn_certificate_filename, $mlw_qmn_certificate_file);
843
  $mlw_qmn_certificate_filename = plugin_dir_url( __FILE__ )."certificates/mlw_qmn_quiz".date("YmdHis").$qmn_array_for_variables['timer'].".php";
844
  $mlw_certificate_link = "<a href='".$mlw_qmn_certificate_filename."' class='qmn_certificate_link'>Download Certificate</a>";
963
  {
964
  add_filter( 'wp_mail_content_type', 'mlw_qmn_set_html_content_type' );
965
  $mlw_message = "";
966
+
967
+ //Check if this quiz has user emails turned on
968
+ if ( $qmn_quiz_options->send_user_email == "0" ) {
969
+
970
+ //Make sure that the user filled in the email field
971
+ if ( $qmn_array_for_variables['user_email'] != "" ) {
972
+
973
+ //Prepare from email and name
974
  $from_email_array = maybe_unserialize( $qmn_quiz_options->email_from_text );
975
  if ( ! isset( $from_email_array["from_email"] ) ) {
976
  $from_email_array = array(
979
  'reply_to' => 1
980
  );
981
  }
 
 
 
982
 
983
+ //Prepare email attachments
984
+ $attachments = array();
985
+ $attachments = apply_filters( 'qsm_user_email_attachments', $attachments, $qmn_array_for_variables );
986
+
987
+ if ( is_serialized( $qmn_quiz_options->user_email_template ) && is_array( @unserialize( $qmn_quiz_options->user_email_template ) ) ) {
988
+
989
+ $mlw_user_email_array = @unserialize( $qmn_quiz_options->user_email_template );
990
+
991
+ //Cycle through emails
992
+ foreach( $mlw_user_email_array as $mlw_each ) {
993
 
994
  //Generate Email Subject
995
+ if ( !isset( $mlw_each[3] ) ) {
 
996
  $mlw_each[3] = "Quiz Results For %QUIZ_NAME";
997
  }
998
+ $mlw_each[3] = apply_filters( 'mlw_qmn_template_variable_results_page', $mlw_each[3], $qmn_array_for_variables );
999
 
1000
  //Check to see if default
1001
+ if ( $mlw_each[0] == 0 && $mlw_each[1] == 0 ) {
1002
+ $mlw_message = htmlspecialchars_decode( $mlw_each[2], ENT_QUOTES );
1003
+ $mlw_message = apply_filters( 'mlw_qmn_template_variable_results_page', $mlw_message, $qmn_array_for_variables );
1004
+ $mlw_message = str_replace( "\n" , "<br>", $mlw_message );
1005
+ $mlw_message = str_replace( "<br/>" , "<br>", $mlw_message );
1006
+ $mlw_message = str_replace( "<br />" , "<br>", $mlw_message );
 
1007
  $mlw_headers = 'From: '.$from_email_array["from_name"].' <'.$from_email_array["from_email"].'>' . "\r\n";
1008
+ wp_mail( $qmn_array_for_variables['user_email'], $mlw_each[3], $mlw_message, $mlw_headers, $attachments );
1009
  break;
1010
+ } else {
1011
+
1012
+ //Check to see if this quiz uses points and check if the points earned falls in the point range for this email
1013
+ if ( $qmn_quiz_options->system == 1 && $qmn_array_for_variables['total_points'] >= $mlw_each[0] && $qmn_array_for_variables['total_points'] <= $mlw_each[1] ) {
1014
+ $mlw_message = htmlspecialchars_decode( $mlw_each[2], ENT_QUOTES );
1015
+ $mlw_message = apply_filters( 'mlw_qmn_template_variable_results_page', $mlw_message, $qmn_array_for_variables );
1016
+ $mlw_message = str_replace( "\n" , "<br>", $mlw_message );
1017
+ $mlw_message = str_replace( "<br/>" , "<br>", $mlw_message );
1018
+ $mlw_message = str_replace( "<br />" , "<br>", $mlw_message );
 
1019
  $mlw_headers = 'From: '.$from_email_array["from_name"].' <'.$from_email_array["from_email"].'>' . "\r\n";
1020
+ wp_mail( $qmn_array_for_variables['user_email'], $mlw_each[3], $mlw_message, $mlw_headers, $attachments );
1021
  break;
1022
  }
1023
 
1024
  //Check to see if score fall in correct range
1025
+ if ( $qmn_quiz_options->system == 0 && $qmn_array_for_variables['total_score'] >= $mlw_each[0] && $qmn_array_for_variables['total_score'] <= $mlw_each[1] ) {
1026
+ $mlw_message = htmlspecialchars_decode( $mlw_each[2], ENT_QUOTES );
1027
+ $mlw_message = apply_filters( 'mlw_qmn_template_variable_results_page', $mlw_message, $qmn_array_for_variables );
1028
+ $mlw_message = str_replace( "\n" , "<br>", $mlw_message );
1029
+ $mlw_message = str_replace( "<br/>" , "<br>", $mlw_message );
1030
+ $mlw_message = str_replace( "<br />" , "<br>", $mlw_message );
 
1031
  $mlw_headers = 'From: '.$from_email_array["from_name"].' <'.$from_email_array["from_email"].'>' . "\r\n";
1032
+ wp_mail( $qmn_array_for_variables['user_email'], $mlw_each[3], $mlw_message, $mlw_headers, $attachments );
1033
  break;
1034
  }
1035
  }
1036
  }
1037
+ } else {
1038
+
1039
+ //Uses older email system still which was before different emails were created.
1040
+ $mlw_message = htmlspecialchars_decode( $qmn_quiz_options->user_email_template, ENT_QUOTES );
1041
+ $mlw_message = apply_filters( 'mlw_qmn_template_variable_results_page', $mlw_message, $qmn_array_for_variables );
1042
+ $mlw_message = str_replace( "\n" , "<br>", $mlw_message );
1043
+ $mlw_message = str_replace( "<br/>" , "<br>", $mlw_message );
1044
+ $mlw_message = str_replace( "<br />" , "<br>", $mlw_message );
1045
  $mlw_headers = 'From: '.$from_email_array["from_name"].' <'.$from_email_array["from_email"].'>' . "\r\n";
1046
+ wp_mail( $qmn_array_for_variables['user_email'], "Quiz Results For ".$qmn_quiz_options->quiz_name, $mlw_message, $mlw_headers, $attachments );
1047
  }
1048
  }
1049
  }
php/quiz-options-page.php CHANGED
@@ -51,10 +51,10 @@ function mlw_generate_quiz_options()
51
  </style>
52
  <div class="wrap">
53
  <div class='mlw_quiz_options'>
54
- <h2><?php
55
  /* translators: The %s corresponds to the name of the quiz */
56
  echo sprintf(__('Quiz Settings For %s', 'quiz-master-next'), $mlw_quiz_options->quiz_name);
57
- ?></h2>
58
  <?php
59
  ob_start();
60
  if ($quiz_id != "")
@@ -74,8 +74,6 @@ function mlw_generate_quiz_options()
74
  ?>
75
  </h2>
76
  <div>
77
- <br />
78
- <br />
79
  <?php
80
  foreach($tab_array as $tab)
81
  {
51
  </style>
52
  <div class="wrap">
53
  <div class='mlw_quiz_options'>
54
+ <h1><?php
55
  /* translators: The %s corresponds to the name of the quiz */
56
  echo sprintf(__('Quiz Settings For %s', 'quiz-master-next'), $mlw_quiz_options->quiz_name);
57
+ ?></h1>
58
  <?php
59
  ob_start();
60
  if ($quiz_id != "")
74
  ?>
75
  </h2>
76
  <div>
 
 
77
  <?php
78
  foreach($tab_array as $tab)
79
  {
php/quizzes-page.php CHANGED
@@ -168,7 +168,7 @@ function mlw_generate_quiz_admin()
168
  }
169
  </script>
170
  <div class="wrap qsm-quizes-page">
171
- <h2><?php _e('Quizzes/Surveys', 'quiz-master-next'); ?><a id="new_quiz_button" href="javascript:();" class="add-new-h2"><?php _e('Add New', 'quiz-master-next'); ?></a></h2>
172
  <?php $mlwQuizMasterNext->alertManager->showAlerts(); ?>
173
  <div class="<?php if ( get_option( 'mlw_advert_shows' ) ) { echo 'qsm-quiz-page-wrapper-with-ads'; } else { echo 'qsm-quiz-page-wrapper'; } ?>">
174
  <div class="tablenav top">
168
  }
169
  </script>
170
  <div class="wrap qsm-quizes-page">
171
+ <h1><?php _e('Quizzes/Surveys', 'quiz-master-next'); ?><a id="new_quiz_button" href="javascript:();" class="add-new-h2"><?php _e('Add New', 'quiz-master-next'); ?></a></h1>
172
  <?php $mlwQuizMasterNext->alertManager->showAlerts(); ?>
173
  <div class="<?php if ( get_option( 'mlw_advert_shows' ) ) { echo 'qsm-quiz-page-wrapper-with-ads'; } else { echo 'qsm-quiz-page-wrapper'; } ?>">
174
  <div class="tablenav top">
readme.txt CHANGED
@@ -1,14 +1,14 @@
1
  === Quiz And Survey Master (Formerly Quiz Master Next) ===
2
  Contributors: mylocalwebstop, fpcorso, elrath
3
  Donate link: http://mylocalwebstop.com/downloads/donation-service-payment/
4
- Tags: quiz, survey, test, score, exam, questionnaire, email, answer, question, certificate, points, results, math
5
  Requires at least: 3.8.1
6
  Tested up to: 4.3
7
- Stable tag: 4.6.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
- Easily and quickly add quizzes and surveys to your website.
12
 
13
  == Description ==
14
 
@@ -16,11 +16,6 @@ Easily and quickly add quizzes and surveys to your website.
16
  You can check out the sample quiz with various questions types here: [Sample Quiz](http://quizandsurveymaster.com/quiz/sample-quiz/)!
17
  You can check out the sample survey with pagination here: [Sample Survey](http://quizandsurveymaster.com/quiz/sample-survey/)!
18
 
19
- = Features =
20
-
21
- = Have Unlimited Quizzes, Tests, Surveys, etc.. =
22
- Each of your quizzes and surveys can have **unlimited** questions and each of those questions can have **unlimited** answers! Your questions can contain **HTML** to show images, Youtube videos and more.
23
-
24
  = Customize Your Text =
25
  All the text your users see can be **customized**. Everything from the text blocks throughout the quiz or survey to the submit button.
26
 
@@ -77,7 +72,7 @@ Quiz And Survey Master is now on [GitHub](https://github.com/fpcorso/quiz_master
77
  While Quiz And Survey Master is fully functional and is packed full of features that will meet the needs of most, we do offer various extra features including:
78
 
79
  * [Export Results](http://quizandsurveymaster.com/downloads/export-results/)
80
- * [Results Analysis](http://quizandsurveymaster.com/downloads/results-analysis/)
81
  * [Aweber Integration](http://quizandsurveymaster.com/downloads/aweber-integration/)
82
  * [Daily Limits](http://quizandsurveymaster.com/downloads/daily-limit/)
83
  * And **many** more available in our [Quiz And Survey Master Addon Store](http://quizandsurveymaster.com/addons/)
@@ -89,7 +84,6 @@ While Quiz And Survey Master is fully functional and is packed full of features
89
  * Click Install Now link on the plugin and follow the prompts
90
  * Activate the plugin through the 'Plugins' menu in WordPress
91
 
92
-
93
  == Frequently Asked Questions ==
94
 
95
  = How do you use that feature? =
@@ -119,6 +113,11 @@ This is usually a theme conflict. You can [checkout out our common conflict solu
119
 
120
  == Changelog ==
121
 
 
 
 
 
 
122
  = 4.6.2 (October 21, 2015) =
123
  * Bug fix for browsers with JavaScript turned off
124
 
@@ -135,30 +134,9 @@ This is usually a theme conflict. You can [checkout out our common conflict solu
135
  * Re-wrote front-end JavaScript to fix a variety of smaller bugs
136
  * Renamed several file names and functions to align more with WordPress coding standards
137
 
138
- = 4.5.5 (October 1, 2015) =
139
- * Adds 4 new style templates to choose from
140
- * Fixes Dutch translation ([Github Issue #285](https://github.com/fpcorso/quiz_master_next/issues/285))
141
- * Fixes quiz results losing search filters after first page ([Github Issue #293](https://github.com/fpcorso/quiz_master_next/issues/293))
142
- * Fixes question drag and drop not working on certain installs ([Github Issue #295](https://github.com/fpcorso/quiz_master_next/issues/295))
143
- * Fixes Required? question setting where the Yes or No value did not show when editing ([Github Issue #296](https://github.com/fpcorso/quiz_master_next/issues/296))
144
-
145
- = 4.5.4 (September 3, 2015) =
146
- * Rebrand as Quiz And Survey Master
147
- * Fixes scroll to top pagination bug
148
- * Fixes leaderboard widget bug
149
-
150
- = 4.5.3 (August 21, 2015) =
151
- * Fixed an issue where Quiz Views and Quiz Taken stats in the Quizzes screen was reseting to 1 instead of 0. ([Github Issue #277](https://github.com/fpcorso/quiz_master_next/issues/277))
152
-
153
  ([Read Full Changelog](https://github.com/fpcorso/quiz_master_next/blob/master/CHANGELOG.md))
154
 
155
  == Upgrade Notice ==
156
 
157
  = 4.6.1 =
158
  Upgrade to fix rare bug preventing IE usage on a small number of sites.
159
-
160
- = 4.6.0 =
161
- Upgrade to use new dynamic form submission, from email addresses, reply-to options as well as bug fixes including redirect bug, timer bug, and more.
162
-
163
- = 4.5.5 =
164
- Upgrade to use 5 new style templates as well as a variety of bug fixes
1
  === Quiz And Survey Master (Formerly Quiz Master Next) ===
2
  Contributors: mylocalwebstop, fpcorso, elrath
3
  Donate link: http://mylocalwebstop.com/downloads/donation-service-payment/
4
+ Tags: quiz, survey, quizzes, surveys, test, score, exam, questionnaire, email, answer, question, certificate, points, results, math
5
  Requires at least: 3.8.1
6
  Tested up to: 4.3
7
+ Stable tag: 4.6.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
+ Easily and quickly add unlimited quizzes and surveys to your website.
12
 
13
  == Description ==
14
 
16
  You can check out the sample quiz with various questions types here: [Sample Quiz](http://quizandsurveymaster.com/quiz/sample-quiz/)!
17
  You can check out the sample survey with pagination here: [Sample Survey](http://quizandsurveymaster.com/quiz/sample-survey/)!
18
 
 
 
 
 
 
19
  = Customize Your Text =
20
  All the text your users see can be **customized**. Everything from the text blocks throughout the quiz or survey to the submit button.
21
 
72
  While Quiz And Survey Master is fully functional and is packed full of features that will meet the needs of most, we do offer various extra features including:
73
 
74
  * [Export Results](http://quizandsurveymaster.com/downloads/export-results/)
75
+ * [Reporting & Analysis](http://quizandsurveymaster.com/downloads/results-analysis/)
76
  * [Aweber Integration](http://quizandsurveymaster.com/downloads/aweber-integration/)
77
  * [Daily Limits](http://quizandsurveymaster.com/downloads/daily-limit/)
78
  * And **many** more available in our [Quiz And Survey Master Addon Store](http://quizandsurveymaster.com/addons/)
84
  * Click Install Now link on the plugin and follow the prompts
85
  * Activate the plugin through the 'Plugins' menu in WordPress
86
 
 
87
  == Frequently Asked Questions ==
88
 
89
  = How do you use that feature? =
113
 
114
  == Changelog ==
115
 
116
+ = 4.6.3 (November 4, 2015) =
117
+ * Fixes certificate bug that was preventing quiz/survey submissions
118
+ * Fixes undefined quiz id bug that was affecting some addons
119
+ * Fixes tooltip bug that was affecting required question validation on a few sites
120
+
121
  = 4.6.2 (October 21, 2015) =
122
  * Bug fix for browsers with JavaScript turned off
123
 
134
  * Re-wrote front-end JavaScript to fix a variety of smaller bugs
135
  * Renamed several file names and functions to align more with WordPress coding standards
136
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
137
  ([Read Full Changelog](https://github.com/fpcorso/quiz_master_next/blob/master/CHANGELOG.md))
138
 
139
  == Upgrade Notice ==
140
 
141
  = 4.6.1 =
142
  Upgrade to fix rare bug preventing IE usage on a small number of sites.