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

Version Description

(July 8, 2017) = * Closed Enhancement: Add notice for leaderboard removal - (Issue #562) * Closed Bug: Scheduled timeframe options are not working - (Issue #558)

Download this release

Release Info

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

Code changes from version 5.0.4 to 5.0.5

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: 5.0.4
6
  * Author: Frank Corso
7
  * Author URI: http://www.quizandsurveymaster.com/
8
  * Plugin URI: http://www.quizandsurveymaster.com/
@@ -10,7 +10,7 @@
10
  * Domain Path: /languages
11
  *
12
  * @author Frank Corso
13
- * @version 5.0.4
14
  */
15
  if ( ! defined( 'ABSPATH' ) ) exit;
16
 
@@ -30,7 +30,7 @@ class MLWQuizMasterNext {
30
  * @var string
31
  * @since 4.0.0
32
  */
33
- public $version = '5.0.4';
34
 
35
  /**
36
  * QSM 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: 5.0.5
6
  * Author: Frank Corso
7
  * Author URI: http://www.quizandsurveymaster.com/
8
  * Plugin URI: http://www.quizandsurveymaster.com/
10
  * Domain Path: /languages
11
  *
12
  * @author Frank Corso
13
+ * @version 5.0.5
14
  */
15
  if ( ! defined( 'ABSPATH' ) ) exit;
16
 
30
  * @var string
31
  * @since 4.0.0
32
  */
33
+ public $version = '5.0.5';
34
 
35
  /**
36
  * QSM Alert Manager Object
php/about-page.php CHANGED
@@ -70,6 +70,7 @@ function mlw_generate_about_page() {
70
  </div>
71
  <div class="qsm-tab-content tab-2" style="display: none;">
72
  <h2>Changelog</h2>
 
73
  <?php QSM_Changelog_Generator::get_changelog_list( 'fpcorso/quiz_master_next', 34 ); ?>
74
  <?php QSM_Changelog_Generator::get_changelog_list( 'fpcorso/quiz_master_next', 33 ); ?>
75
  <?php QSM_Changelog_Generator::get_changelog_list( 'fpcorso/quiz_master_next', 26 ); ?>
70
  </div>
71
  <div class="qsm-tab-content tab-2" style="display: none;">
72
  <h2>Changelog</h2>
73
+ <?php QSM_Changelog_Generator::get_changelog_list( 'fpcorso/quiz_master_next', 37 ); ?>
74
  <?php QSM_Changelog_Generator::get_changelog_list( 'fpcorso/quiz_master_next', 34 ); ?>
75
  <?php QSM_Changelog_Generator::get_changelog_list( 'fpcorso/quiz_master_next', 33 ); ?>
76
  <?php QSM_Changelog_Generator::get_changelog_list( 'fpcorso/quiz_master_next', 26 ); ?>
php/class-qmn-quiz-manager.php CHANGED
@@ -1158,25 +1158,21 @@ function qmn_require_login_check($display, $qmn_quiz_options, $qmn_array_for_var
1158
  return $display;
1159
  }
1160
 
1161
- add_filter('qmn_begin_shortcode', 'qmn_scheduled_timeframe_check', 10, 3);
1162
- function qmn_scheduled_timeframe_check($display, $qmn_quiz_options, $qmn_array_for_variables)
1163
- {
1164
  global $qmn_allowed_visit;
1165
- if (is_serialized($qmn_quiz_options->scheduled_timeframe) && is_array(@unserialize($qmn_quiz_options->scheduled_timeframe)))
1166
- {
1167
- $qmn_scheduled_timeframe = @unserialize($qmn_quiz_options->scheduled_timeframe);
1168
- if ($qmn_scheduled_timeframe["start"] != '' && $qmn_scheduled_timeframe["end"] != '')
1169
- {
1170
- $qmn_scheduled_start = strtotime($qmn_scheduled_timeframe["start"]);
1171
- $qmn_scheduled_end = strtotime($qmn_scheduled_timeframe["end"]) + 86399; ///Added seconds to bring time to 11:59:59 PM of given day
1172
- if (time() < $qmn_scheduled_start | time() > $qmn_scheduled_end)
1173
- {
1174
- $qmn_allowed_visit = false;
1175
- $mlw_message = wpautop(htmlspecialchars_decode($qmn_quiz_options->scheduled_timeframe_text, ENT_QUOTES));
1176
- $mlw_message = apply_filters( 'mlw_qmn_template_variable_quiz_page', $mlw_message, $qmn_array_for_variables);
1177
- $mlw_message = str_replace( "\n" , "<br>", $mlw_message);
1178
- $display .= $mlw_message;
1179
- }
1180
  }
1181
  }
1182
  return $display;
1158
  return $display;
1159
  }
1160
 
1161
+ add_filter( 'qmn_begin_shortcode', 'qsm_scheduled_timeframe_check', 10, 3 );
1162
+ function qsm_scheduled_timeframe_check( $display, $options, $variable_data ) {
 
1163
  global $qmn_allowed_visit;
1164
+
1165
+ // Checks if the start and end dates have data
1166
+ if ( ! empty( $options->scheduled_time_start ) && ! empty( $options->scheduled_time_end ) ) {
1167
+ $start = strtotime( $options->scheduled_time_start );
1168
+ $end = strtotime( $options->scheduled_time_end ) + 86399;
1169
+
1170
+ // Checks if the current timestamp is outside of scheduled timeframe
1171
+ if ( time() < $start || time() > $end ) {
1172
+ $qmn_allowed_visit = false;
1173
+ $message = wpautop( htmlspecialchars_decode( $options->scheduled_timeframe_text, ENT_QUOTES ) );
1174
+ $message = apply_filters( 'mlw_qmn_template_variable_quiz_page', $message, $variable_data );
1175
+ $display .= str_replace( "\n" , "<br>", $message );
 
 
 
1176
  }
1177
  }
1178
  return $display;
php/help-page.php CHANGED
@@ -150,7 +150,7 @@ function qsm_support_meta_box_content() {
150
  <input type='text' name='username' value='' /><br />
151
  <label>Email (Required):</label><br />
152
  <input type='text' name='email' value='' /><br />
153
- <label>URL To Quiz (Not Required):</label><br />
154
  <input type='text' name='quiz_url' value='' /><br />
155
  <label>Message (Required):</label><br />
156
  <textarea name="message"></textarea><br />
150
  <input type='text' name='username' value='' /><br />
151
  <label>Email (Required):</label><br />
152
  <input type='text' name='email' value='' /><br />
153
+ <label>URL To Quiz Or Survey (Not Required):</label><br />
154
  <input type='text' name='quiz_url' value='' /><br />
155
  <label>Message (Required):</label><br />
156
  <textarea name="message"></textarea><br />
php/options-page-leaderboard-tab.php CHANGED
@@ -24,6 +24,9 @@ function qsm_options_leaderboard_tab_content() {
24
  global $wpdb;
25
  global $mlwQuizMasterNext;
26
  ?>
 
 
 
27
  <h3><?php _e( 'Template Variables', 'quiz-master-next' ); ?></h3>
28
  <table class="form-table">
29
  <tr>
24
  global $wpdb;
25
  global $mlwQuizMasterNext;
26
  ?>
27
+ <div style="background:#fff;border-left: 4px solid #fff;padding: 1px 12px;margin: 5px 0 15px;border-left-color: #dc3232;">
28
+ <p style="font-weight:bold;">Warning: This feature is being removed from the core version. Please use our new free Leaderboards addon. You can read more about this change in <a href="http://bit.ly/2sPOKxw" target="_blank">our post about the leaderboards being moved.</a></p>
29
+ </div>
30
  <h3><?php _e( 'Template Variables', 'quiz-master-next' ); ?></h3>
31
  <table class="form-table">
32
  <tr>
php/stats-page.php CHANGED
@@ -22,11 +22,11 @@ function qmn_generate_stats_page()
22
  return;
23
  }
24
  global $mlwQuizMasterNext;
25
- $active_tab = isset( $_GET[ 'tab' ] ) ? $_GET[ 'tab' ] : 'quiz-taken-stats';
26
  $tab_array = $mlwQuizMasterNext->pluginHelper->get_stats_tabs();
27
  ?>
28
  <div class="wrap">
29
- <h2><?php _e('Quiz Statistics', 'quiz-master-next'); ?></h2>
30
  <?php echo mlw_qmn_show_adverts(); ?>
31
  <h2 class="nav-tab-wrapper">
32
  <?php
@@ -65,7 +65,7 @@ function qmn_generate_stats_page()
65
  function qmn_stats_overview_tab()
66
  {
67
  global $mlwQuizMasterNext;
68
- $mlwQuizMasterNext->pluginHelper->register_stats_settings_tab(__("Quiz Taken Stats", 'quiz-master-next'), "qmn_stats_overview_content");
69
  }
70
  add_action("plugins_loaded", 'qmn_stats_overview_tab');
71
 
22
  return;
23
  }
24
  global $mlwQuizMasterNext;
25
+ $active_tab = isset( $_GET[ 'tab' ] ) ? $_GET[ 'tab' ] : 'quiz-and-survey-submissions';
26
  $tab_array = $mlwQuizMasterNext->pluginHelper->get_stats_tabs();
27
  ?>
28
  <div class="wrap">
29
+ <h2><?php _e('Quiz/Survey Statistics', 'quiz-master-next'); ?></h2>
30
  <?php echo mlw_qmn_show_adverts(); ?>
31
  <h2 class="nav-tab-wrapper">
32
  <?php
65
  function qmn_stats_overview_tab()
66
  {
67
  global $mlwQuizMasterNext;
68
+ $mlwQuizMasterNext->pluginHelper->register_stats_settings_tab(__("Quiz And Survey Submissions", 'quiz-master-next'), "qmn_stats_overview_content");
69
  }
70
  add_action("plugins_loaded", 'qmn_stats_overview_tab');
71
 
readme.txt CHANGED
@@ -1,11 +1,10 @@
1
  === Quiz And Survey Master (Formerly Quiz Master Next) ===
2
  Contributors: fpcorso
3
- Donate link: http://mylocalwebstop.com/downloads/donation-service-payment/
4
  Tags: quiz, survey, lead, test, score, exam, questionnaire, answer, question, points
5
  Requires at least: 4.7
6
  Tested up to: 4.8
7
- Stable tag: 5.0.4
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.
@@ -108,7 +107,11 @@ This is usually a theme conflict. You can [checkout out our common conflict solu
108
 
109
  == Changelog ==
110
 
111
- = 5.0.2 (June 19, 2017) =
 
 
 
 
112
  * Closed Bug: Required fields are not checked 2nd time user takes quiz when timer is turned on ([Issue #528](https://github.com/fpcorso/quiz_master_next/issues/528))
113
  * Closed Enhancement: Ensure compatibility with WordPress 4.8 ([Issue #554](https://github.com/fpcorso/quiz_master_next/issues/554))
114
 
1
  === Quiz And Survey Master (Formerly Quiz Master Next) ===
2
  Contributors: fpcorso
 
3
  Tags: quiz, survey, lead, test, score, exam, questionnaire, answer, question, points
4
  Requires at least: 4.7
5
  Tested up to: 4.8
6
+ Stable tag: 5.0.5
7
+ License: GPLv2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
10
  Easily and quickly add unlimited quizzes and surveys to your website.
107
 
108
  == Changelog ==
109
 
110
+ = 5.0.5 (July 8, 2017) =
111
+ * Closed Enhancement: Add notice for leaderboard removal - ([Issue #562](https://github.com/fpcorso/quiz_master_next/issues/562))
112
+ * Closed Bug: Scheduled timeframe options are not working - ([Issue #558](https://github.com/fpcorso/quiz_master_next/issues/558))
113
+
114
+ = 5.0.4 (June 19, 2017) =
115
  * Closed Bug: Required fields are not checked 2nd time user takes quiz when timer is turned on ([Issue #528](https://github.com/fpcorso/quiz_master_next/issues/528))
116
  * Closed Enhancement: Ensure compatibility with WordPress 4.8 ([Issue #554](https://github.com/fpcorso/quiz_master_next/issues/554))
117