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

Version Description

(April 22, 2015) = * Minor Bug Fixes

Download this release

Release Info

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

Code changes from version 4.3.0 to 4.3.1

js/qmn_pagination.js CHANGED
@@ -1,18 +1,75 @@
1
- setTimeout(function(){
2
- var $j = jQuery.noConflict();
3
- $j( ".quiz_section" ).hide();
4
- $j( ".quiz_section" ).append( "<br />" );
5
- $j( ".mlw_qmn_quiz" ).append( "<a class=\"mlw_qmn_quiz_link mlw_previous\" href=\"javascript:prevSlide("+qmn_pagination+", 1);\">"+qmn_pagination_previous_text+"</a>" );
6
- $j( ".mlw_qmn_quiz" ).append( "<a class=\"mlw_qmn_quiz_link mlw_next\" href=\"javascript:nextSlide("+qmn_pagination+", 1);\">"+qmn_pagination_next_text+"</a>" );
7
- window.mlw_quiz_slide = 0;
8
- window.mlw_previous = 0;
9
- window.mlw_quiz_total_slides = qmn_section_limit;
10
- nextSlide(1, 0);
11
- }, 100);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  function nextSlide(mlw_pagination, mlw_goto_top)
13
  {
14
  jQuery( ".quiz_section" ).hide();
15
- for (var i = 0; i < mlw_pagination; i++)
16
  {
17
  if (i == 0 && window.mlw_previous == 1 && window.mlw_quiz_slide > 1)
18
  {
@@ -37,11 +94,11 @@ function nextSlide(mlw_pagination, mlw_goto_top)
37
  if (window.mlw_quiz_slide == window.mlw_quiz_total_slides)
38
  {
39
  jQuery( ".mlw_qmn_quiz_link.mlw_next" ).hide();
40
- }
41
  if (window.mlw_quiz_slide < window.mlw_quiz_total_slides)
42
  {
43
  jQuery( ".mlw_qmn_quiz_link.mlw_next" ).show();
44
- }
45
  jQuery( ".quiz_section.slide"+window.mlw_quiz_slide ).show();
46
  }
47
  window.mlw_previous = 0;
@@ -54,8 +111,8 @@ function nextSlide(mlw_pagination, mlw_goto_top)
54
  function prevSlide(mlw_pagination, mlw_goto_top)
55
  {
56
  jQuery( ".quiz_section" ).hide();
57
- for (var i = 0; i < mlw_pagination; i++)
58
- {
59
  if (i == 0 && window.mlw_previous == 0)
60
  {
61
  window.mlw_quiz_slide = window.mlw_quiz_slide - mlw_pagination;
@@ -79,12 +136,12 @@ function prevSlide(mlw_pagination, mlw_goto_top)
79
  if (window.mlw_quiz_slide == window.mlw_quiz_total_slides)
80
  {
81
  jQuery( ".mlw_qmn_quiz_link.mlw_next" ).hide();
82
- }
83
  if (window.mlw_quiz_slide < window.mlw_quiz_total_slides)
84
  {
85
  jQuery( ".mlw_qmn_quiz_link.mlw_next" ).show();
86
  }
87
- jQuery( ".quiz_section.slide"+window.mlw_quiz_slide ).show();
88
  }
89
  window.mlw_previous = 1;
90
  if (mlw_goto_top == 1)
@@ -93,3 +150,26 @@ function prevSlide(mlw_pagination, mlw_goto_top)
93
  window.location.hash = "mlw_top_of_quiz";
94
  }
95
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function qmnValidatePage() {
2
+ var validated = true;
3
+ jQuery(".quiz_section.slide"+window.mlw_quiz_slide+' *').each(function(){
4
+ jQuery(this).css("outline", "");
5
+ if (jQuery(this).attr('class'))
6
+ {
7
+ if(jQuery(this).attr('class').indexOf('mlwEmail') > -1 && this.value != "")
8
+ {
9
+ var x=this.value;
10
+ var atpos=x.indexOf('@');
11
+ var dotpos=x.lastIndexOf('.');
12
+ if (atpos<1 || dotpos<atpos+2 || dotpos+2>=x.length)
13
+ {
14
+ jQuery('.qmn_page_error_message').text('**'+email_error+'**');
15
+ validated = false;
16
+ jQuery(this).css("outline", "2px solid red");
17
+ }
18
+ }
19
+ if(jQuery(this).attr('class').indexOf('mlwRequiredNumber') > -1 && this.value == "" && +this.value != NaN)
20
+ {
21
+ jQuery('.qmn_page_error_message').text('**'+number_error+'**');
22
+ jQuery(this).css("outline", "2px solid red");
23
+ validated = false;
24
+ }
25
+ if(jQuery(this).attr('class').indexOf('mlwRequiredText') > -1 && this.value == "")
26
+ {
27
+ jQuery('.qmn_page_error_message').text('**'+empty_error+'**');
28
+ jQuery(this).css("outline", "2px solid red");
29
+ validated = false;
30
+ }
31
+ if(jQuery(this).attr('class').indexOf('mlwRequiredCaptcha') > -1 && this.value != mlw_code)
32
+ {
33
+ jQuery('.qmn_page_error_message').text('**'+incorrect_error+'**');
34
+ jQuery(this).css("outline", "2px solid red");
35
+ validated = false;
36
+ }
37
+ if(jQuery(this).attr('class').indexOf('mlwRequiredAccept') > -1 && !this.checked)
38
+ {
39
+ jQuery('.qmn_page_error_message').text('**'+empty_error+'**');
40
+ jQuery(this).css("outline", "2px solid red");
41
+ validated = false;
42
+ }
43
+ if(jQuery(this).attr('class').indexOf('mlwRequiredRadio') > -1)
44
+ {
45
+ check_val = jQuery(this).find('input:checked').val();
46
+ if (check_val == "No Answer Provided")
47
+ {
48
+ jQuery('.qmn_page_error_message').text('**'+empty_error+'**');
49
+ jQuery(this).css("outline", "2px solid red");
50
+ validated = false;
51
+ }
52
+ }
53
+ if(jQuery(this).attr('class').indexOf('mlwRequiredCheck') > -1)
54
+ {
55
+ if (!jQuery(this).find('input:checked').length)
56
+ {
57
+ jQuery('.qmn_page_error_message').text('**'+empty_error+'**');
58
+ jQuery(this).css("outline", "2px solid red");
59
+ validated = false;
60
+ }
61
+ }
62
+ }
63
+ });
64
+ if (validated) {
65
+ jQuery('.qmn_page_error_message').text(' ');
66
+ }
67
+ return validated;
68
+ }
69
  function nextSlide(mlw_pagination, mlw_goto_top)
70
  {
71
  jQuery( ".quiz_section" ).hide();
72
+ for (var i = 0; i < mlw_pagination; i++)
73
  {
74
  if (i == 0 && window.mlw_previous == 1 && window.mlw_quiz_slide > 1)
75
  {
94
  if (window.mlw_quiz_slide == window.mlw_quiz_total_slides)
95
  {
96
  jQuery( ".mlw_qmn_quiz_link.mlw_next" ).hide();
97
+ }
98
  if (window.mlw_quiz_slide < window.mlw_quiz_total_slides)
99
  {
100
  jQuery( ".mlw_qmn_quiz_link.mlw_next" ).show();
101
+ }
102
  jQuery( ".quiz_section.slide"+window.mlw_quiz_slide ).show();
103
  }
104
  window.mlw_previous = 0;
111
  function prevSlide(mlw_pagination, mlw_goto_top)
112
  {
113
  jQuery( ".quiz_section" ).hide();
114
+ for (var i = 0; i < mlw_pagination; i++)
115
+ {
116
  if (i == 0 && window.mlw_previous == 0)
117
  {
118
  window.mlw_quiz_slide = window.mlw_quiz_slide - mlw_pagination;
136
  if (window.mlw_quiz_slide == window.mlw_quiz_total_slides)
137
  {
138
  jQuery( ".mlw_qmn_quiz_link.mlw_next" ).hide();
139
+ }
140
  if (window.mlw_quiz_slide < window.mlw_quiz_total_slides)
141
  {
142
  jQuery( ".mlw_qmn_quiz_link.mlw_next" ).show();
143
  }
144
+ jQuery( ".quiz_section.slide"+window.mlw_quiz_slide ).show();
145
  }
146
  window.mlw_previous = 1;
147
  if (mlw_goto_top == 1)
150
  window.location.hash = "mlw_top_of_quiz";
151
  }
152
  }
153
+
154
+ jQuery( ".quiz_section" ).hide();
155
+ jQuery( ".quiz_section" ).append( "<br />" );
156
+ jQuery( ".mlw_qmn_quiz" ).append( '<a class="mlw_qmn_quiz_link mlw_previous" href="#">'+qmn_pagination_previous_text+'</a>' );
157
+ jQuery( ".mlw_qmn_quiz" ).append( '<span class="qmn_page_message"></span>' );
158
+ jQuery( ".mlw_qmn_quiz" ).append( '<span class="qmn_page_error_message"></span>' );
159
+ jQuery( ".mlw_qmn_quiz" ).append( '<a class="mlw_qmn_quiz_link mlw_next" href="#">'+qmn_pagination_next_text+'</a>' );
160
+ window.mlw_quiz_slide = 0;
161
+ window.mlw_previous = 0;
162
+ window.mlw_quiz_total_slides = qmn_section_limit;
163
+ nextSlide(1, 0);
164
+
165
+ jQuery(".mlw_next").click(function(event) {
166
+ event.preventDefault();
167
+ if ( qmnValidatePage() ) {
168
+ nextSlide(qmn_pagination, 0);
169
+ }
170
+ });
171
+
172
+ jQuery(".mlw_previous").click(function(event) {
173
+ event.preventDefault();
174
+ prevSlide(qmn_pagination, 0);
175
+ });
mlw_quizmaster2.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Plugin Name: Quiz Master Next
4
  * Description: Use this plugin to add multiple quizzes, tests, or surveys to your website.
5
- * Version: 4.3.0
6
  * Author: Frank Corso
7
  * Author URI: http://www.mylocalwebstop.com/
8
  * Plugin URI: http://www.quizmasternext.com/
@@ -16,7 +16,7 @@
16
  * You understand that you install, operate, and unistall the plugin at your own discretion and risk.
17
  *
18
  * @author Frank Corso
19
- * @version 4.3.0
20
  */
21
  if ( ! defined( 'ABSPATH' ) ) exit;
22
  /**
@@ -34,7 +34,7 @@ class MLWQuizMasterNext
34
  * @var string
35
  * @since 4.0.0
36
  */
37
- public $version = '4.3.0';
38
 
39
  /**
40
  * QMN Alert Manager Object
2
  /**
3
  * Plugin Name: Quiz Master Next
4
  * Description: Use this plugin to add multiple quizzes, tests, or surveys to your website.
5
+ * Version: 4.3.1
6
  * Author: Frank Corso
7
  * Author URI: http://www.mylocalwebstop.com/
8
  * Plugin URI: http://www.quizmasternext.com/
16
  * You understand that you install, operate, and unistall the plugin at your own discretion and risk.
17
  *
18
  * @author Frank Corso
19
+ * @version 4.3.1
20
  */
21
  if ( ! defined( 'ABSPATH' ) ) exit;
22
  /**
34
  * @var string
35
  * @since 4.0.0
36
  */
37
+ public $version = '4.3.1';
38
 
39
  /**
40
  * QMN Alert Manager Object
php/qmn_credits.php CHANGED
@@ -57,15 +57,8 @@ function mlw_generate_about_page()
57
  <br />
58
  </div>
59
  <div id="mlw_quiz_changelog" style="display: none;">
60
- <h3><?php echo $mlw_quiz_version; ?> (April 20, 2015)</h3>
61
  <ul>
62
- <li>* Redesigned Stats Page <a target="_blank" href='https://github.com/fpcorso/quiz_master_next/issues/177'>GitHub Issue #177</a></li>
63
- <li>* Added Ability To Have Shortcodes In Questions <a target="_blank" href='https://github.com/fpcorso/quiz_master_next/issues/175'>GitHub Issue #175</a></li>
64
- <li>* Added Editor To Questions <a target="_blank" href='https://github.com/fpcorso/quiz_master_next/issues/36'>GitHub Issue #36</a></li>
65
- <li>* Added Ability To Edit Quiz Post <a target="_blank" href='https://github.com/fpcorso/quiz_master_next/issues/176'>GitHub Issue #176</a></li>
66
- <li>* Added Ability To Search Questions <a target="_blank" href='https://github.com/fpcorso/quiz_master_next/issues/151'>GitHub Issue #151</a></li>
67
- <li>* Design Changes To Questions Tab</li>
68
- <li>* Minor Design Changes</li>
69
  <li>* Minor Bug Fixes</li>
70
  </ul>
71
  </div>
57
  <br />
58
  </div>
59
  <div id="mlw_quiz_changelog" style="display: none;">
60
+ <h3><?php echo $mlw_quiz_version; ?> (April 22, 2015)</h3>
61
  <ul>
 
 
 
 
 
 
 
62
  <li>* Minor Bug Fixes</li>
63
  </ul>
64
  </div>
php/qmn_quiz.php CHANGED
@@ -836,9 +836,8 @@ EOC;
836
  $mlw_qmn_certificate_file.=$mlw_certificate_options[2] != '' ? '$pdf->Image("'.$mlw_certificate_options[2].'",110,130);' : '';
837
  $mlw_qmn_certificate_file.=<<<EOC
838
  \$pdf->Output('mlw_qmn_certificate.pdf','D');
839
- unlink(__FILE__);
840
  EOC;
841
- $mlw_qmn_certificate_filename = str_replace(home_url()."/", '', plugin_dir_url( __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>";
836
  $mlw_qmn_certificate_file.=$mlw_certificate_options[2] != '' ? '$pdf->Image("'.$mlw_certificate_options[2].'",110,130);' : '';
837
  $mlw_qmn_certificate_file.=<<<EOC
838
  \$pdf->Output('mlw_qmn_certificate.pdf','D');
 
839
  EOC;
840
+ $mlw_qmn_certificate_filename = str_replace(site_url()."/", '', plugin_dir_url( __FILE__ ))."certificates/mlw_qmn_quiz".date("YmdHis").$qmn_array_for_variables['timer'].".php";
841
  file_put_contents($mlw_qmn_certificate_filename, $mlw_qmn_certificate_file);
842
  $mlw_qmn_certificate_filename = plugin_dir_url( __FILE__ )."certificates/mlw_qmn_quiz".date("YmdHis").$qmn_array_for_variables['timer'].".php";
843
  $mlw_certificate_link = "<a href='".$mlw_qmn_certificate_filename."' class='qmn_certificate_link'>Download Certificate</a>";
php/qmn_quiz_creator.php CHANGED
@@ -238,6 +238,9 @@ class QMNQuizCreator
238
  -webkit-box-shadow: inset 0 3px 3px rgba(0,0,0,.075);
239
  box-shadow: inset 0 3px 3px rgba(0,0,0,.075);
240
  border: 1px solid #ccc;
 
 
 
241
  }";
242
  $mlw_question_answer_default = "%QUESTION%<br /> Answer Provided: %USER_ANSWER%<br /> Correct Answer: %CORRECT_ANSWER%<br /> Comments Entered: %USER_COMMENTS%<br />";
243
  $results = $wpdb->insert(
238
  -webkit-box-shadow: inset 0 3px 3px rgba(0,0,0,.075);
239
  box-shadow: inset 0 3px 3px rgba(0,0,0,.075);
240
  border: 1px solid #ccc;
241
+ }
242
+ .qmn_page_error_message {
243
+ color: red;
244
  }";
245
  $mlw_question_answer_default = "%QUESTION%<br /> Answer Provided: %USER_ANSWER%<br /> Correct Answer: %CORRECT_ANSWER%<br /> Comments Entered: %USER_COMMENTS%<br />";
246
  $results = $wpdb->insert(
php/qmn_results_details.php CHANGED
@@ -184,9 +184,8 @@ EOC;
184
  $mlw_qmn_certificate_file.=$mlw_certificate_options[2] != '' ? '$pdf->Image("'.$mlw_certificate_options[2].'",110,130);' : '';
185
  $mlw_qmn_certificate_file.=<<<EOC
186
  \$pdf->Output('mlw_qmn_certificate.pdf','D');
187
- unlink(__FILE__);
188
  EOC;
189
- $mlw_qmn_certificate_filename = "../".str_replace(home_url()."/", '', plugin_dir_url( __FILE__ ))."certificates/mlw_qmn_quiz".date("YmdHis")."admin.php";
190
  file_put_contents($mlw_qmn_certificate_filename, $mlw_qmn_certificate_file);
191
  $mlw_qmn_certificate_filename = plugin_dir_url( __FILE__ )."certificates/mlw_qmn_quiz".date("YmdHis")."admin.php";
192
  }
184
  $mlw_qmn_certificate_file.=$mlw_certificate_options[2] != '' ? '$pdf->Image("'.$mlw_certificate_options[2].'",110,130);' : '';
185
  $mlw_qmn_certificate_file.=<<<EOC
186
  \$pdf->Output('mlw_qmn_certificate.pdf','D');
 
187
  EOC;
188
+ $mlw_qmn_certificate_filename = "../".str_replace(site_url()."/", '', plugin_dir_url( __FILE__ ))."certificates/mlw_qmn_quiz".date("YmdHis")."admin.php";
189
  file_put_contents($mlw_qmn_certificate_filename, $mlw_qmn_certificate_file);
190
  $mlw_qmn_certificate_filename = plugin_dir_url( __FILE__ )."certificates/mlw_qmn_quiz".date("YmdHis")."admin.php";
191
  }
php/qmn_usage_tracking.php CHANGED
@@ -187,8 +187,8 @@ class QMNTracking
187
  }
188
  else
189
  {
190
- $optin_url = add_query_arg( 'qmn_track_check', 'opt_into_tracking' );
191
- $optout_url = add_query_arg( 'qmn_track_check', 'opt_out_of_tracking' );
192
  echo '<div class="updated"><p>';
193
  echo __( "Allow Quiz Master Next to anonymously track this plugin's usage and help us make this plugin better? No sensitive data is tracked.", 'quiz-master-next' );
194
  echo '&nbsp;<a href="' . esc_url( $optin_url ) . '" class="button-secondary">' . __( 'Allow', 'quiz-master-next' ) . '</a>';
187
  }
188
  else
189
  {
190
+ $optin_url = esc_url( add_query_arg( 'qmn_track_check', 'opt_into_tracking' ) );
191
+ $optout_url = esc_url( add_query_arg( 'qmn_track_check', 'opt_out_of_tracking' ) );
192
  echo '<div class="updated"><p>';
193
  echo __( "Allow Quiz Master Next to anonymously track this plugin's usage and help us make this plugin better? No sensitive data is tracked.", 'quiz-master-next' );
194
  echo '&nbsp;<a href="' . esc_url( $optin_url ) . '" class="button-secondary">' . __( 'Allow', 'quiz-master-next' ) . '</a>';
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: fpcorso
3
  Donate link: http://mylocalwebstop.com/downloads/donation-service-payment/
4
  Tags: quiz, test, score, exam, survey, contact, form, email, answer, question, certificate, points, results, math
5
  Requires at least: 3.8.1
6
- Tested up to: 4.1.1
7
- Stable tag: 4.3.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -122,6 +122,9 @@ Feel free to use the widget on the help page within the plugin or from our [cont
122
 
123
  == Changelog ==
124
 
 
 
 
125
  = 4.3.0 (April 20, 2015) =
126
  * Redesigned Stats Page ([GitHub Issue #177](https://github.com/fpcorso/quiz_master_next/issues/177))
127
  * Added Ability To Have Shortcodes In Questions ([GitHub Issue #175](https://github.com/fpcorso/quiz_master_next/issues/175))
3
  Donate link: http://mylocalwebstop.com/downloads/donation-service-payment/
4
  Tags: quiz, test, score, exam, survey, contact, form, email, answer, question, certificate, points, results, math
5
  Requires at least: 3.8.1
6
+ Tested up to: 4.2
7
+ Stable tag: 4.3.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
122
 
123
  == Changelog ==
124
 
125
+ = 4.3.1 (April 22, 2015) =
126
+ * Minor Bug Fixes
127
+
128
  = 4.3.0 (April 20, 2015) =
129
  * Redesigned Stats Page ([GitHub Issue #177](https://github.com/fpcorso/quiz_master_next/issues/177))
130
  * Added Ability To Have Shortcodes In Questions ([GitHub Issue #175](https://github.com/fpcorso/quiz_master_next/issues/175))