Version Description
(April 3, 2018) = * Closed Bug: Cannot save question on certain servers - (Issue #651) * Closed Bug: Questions/Answers Template Not Loaded In Admin Results Page - (Issue #636)
Download this release
Release Info
Developer | fpcorso |
Plugin | Quiz And Survey Master (Formerly Quiz Master Next) |
Version | 5.2.3 |
Comparing to | |
See all releases |
Code changes from version 5.2.2 to 5.2.3
- js/qsm-admin-question.js +2 -1
- mlw_quizmaster2.php +3 -3
- php/admin/about-page.php +1 -0
- php/admin/admin-results-details-page.php +26 -18
- php/admin/quizzes-page.php +3 -6
- php/rest-api.php +4 -4
- readme.txt +5 -1
js/qsm-admin-question.js
CHANGED
@@ -253,7 +253,8 @@ var QSMQuestion;
|
|
253 |
{
|
254 |
headers: { 'X-WP-Nonce': qsmQuestionSettings.nonce },
|
255 |
success: QSMQuestion.saveSuccess,
|
256 |
-
error: QSMQuestion.displayError
|
|
|
257 |
}
|
258 |
);
|
259 |
MicroModal.close('modal-1');
|
253 |
{
|
254 |
headers: { 'X-WP-Nonce': qsmQuestionSettings.nonce },
|
255 |
success: QSMQuestion.saveSuccess,
|
256 |
+
error: QSMQuestion.displayError,
|
257 |
+
type: 'POST'
|
258 |
}
|
259 |
);
|
260 |
MicroModal.close('modal-1');
|
mlw_quizmaster2.php
CHANGED
@@ -2,14 +2,14 @@
|
|
2 |
/**
|
3 |
* Plugin Name: Quiz And Survey Master
|
4 |
* Description: Easily and quickly add quizzes and surveys to your website.
|
5 |
-
* Version: 5.2.
|
6 |
* Author: Frank Corso
|
7 |
* Author URI: https://www.quizandsurveymaster.com/
|
8 |
* Plugin URI: https://www.quizandsurveymaster.com/
|
9 |
* Text Domain: quiz-master-next
|
10 |
*
|
11 |
* @author Frank Corso
|
12 |
-
* @version 5.2.
|
13 |
* @package QSM
|
14 |
*/
|
15 |
|
@@ -33,7 +33,7 @@ class MLWQuizMasterNext {
|
|
33 |
* @var string
|
34 |
* @since 4.0.0
|
35 |
*/
|
36 |
-
public $version = '5.2.
|
37 |
|
38 |
/**
|
39 |
* 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.2.3
|
6 |
* Author: Frank Corso
|
7 |
* Author URI: https://www.quizandsurveymaster.com/
|
8 |
* Plugin URI: https://www.quizandsurveymaster.com/
|
9 |
* Text Domain: quiz-master-next
|
10 |
*
|
11 |
* @author Frank Corso
|
12 |
+
* @version 5.2.3
|
13 |
* @package QSM
|
14 |
*/
|
15 |
|
33 |
* @var string
|
34 |
* @since 4.0.0
|
35 |
*/
|
36 |
+
public $version = '5.2.3';
|
37 |
|
38 |
/**
|
39 |
* QSM Alert Manager Object
|
php/admin/about-page.php
CHANGED
@@ -49,6 +49,7 @@ function mlw_generate_about_page() {
|
|
49 |
</div>
|
50 |
<div class="qsm-tab-content tab-2" style="display: none;">
|
51 |
<h2>Changelog</h2>
|
|
|
52 |
<?php QSM_Changelog_Generator::get_changelog_list( 'fpcorso/quiz_master_next', 32 ); ?>
|
53 |
</div>
|
54 |
<div class="qsm-tab-content tab-3" style="display:none;">
|
49 |
</div>
|
50 |
<div class="qsm-tab-content tab-2" style="display: none;">
|
51 |
<h2>Changelog</h2>
|
52 |
+
<?php QSM_Changelog_Generator::get_changelog_list( 'fpcorso/quiz_master_next', 48 ); ?>
|
53 |
<?php QSM_Changelog_Generator::get_changelog_list( 'fpcorso/quiz_master_next', 32 ); ?>
|
54 |
</div>
|
55 |
<div class="qsm-tab-content tab-3" style="display:none;">
|
php/admin/admin-results-details-page.php
CHANGED
@@ -51,9 +51,16 @@ function qsm_generate_result_details() {
|
|
51 |
function qsm_generate_results_details_tab() {
|
52 |
|
53 |
global $wpdb;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
|
55 |
-
$result_id = intval( $_GET["result_id"] );
|
56 |
-
$results_data = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}mlw_results WHERE result_id = %d", $result_id ) );
|
57 |
$previous_results = $wpdb->get_var( "SELECT result_id FROM {$wpdb->prefix}mlw_results WHERE result_id = (SELECT MAX(result_id) FROM {$wpdb->prefix}mlw_results WHERE deleted = 0 AND result_id < $result_id)" );
|
58 |
$next_results = $wpdb->get_var( "SELECT result_id FROM {$wpdb->prefix}mlw_results WHERE result_id = (SELECT MIN(result_id) FROM {$wpdb->prefix}mlw_results WHERE deleted = 0 AND result_id > $result_id)" );
|
59 |
|
@@ -104,23 +111,24 @@ function qsm_generate_results_details_tab() {
|
|
104 |
|
105 |
// Prepare full results array.
|
106 |
$results_array = array(
|
107 |
-
'quiz_id'
|
108 |
-
'quiz_name'
|
109 |
-
'quiz_system'
|
110 |
-
'user_name'
|
111 |
-
'user_business'
|
112 |
-
'user_email'
|
113 |
-
'user_phone'
|
114 |
-
'user_id'
|
115 |
-
'timer'
|
116 |
-
'time_taken'
|
117 |
-
'total_points'
|
118 |
-
'total_score'
|
119 |
-
'total_correct'
|
120 |
-
'total_questions'
|
121 |
-
'comments'
|
122 |
'question_answers_array' => $results[1],
|
123 |
-
'contact'
|
|
|
124 |
);
|
125 |
|
126 |
// Pass through template variable filter
|
51 |
function qsm_generate_results_details_tab() {
|
52 |
|
53 |
global $wpdb;
|
54 |
+
global $mlwQuizMasterNext;
|
55 |
+
|
56 |
+
// Gets results data.
|
57 |
+
$result_id = intval( $_GET["result_id"] );
|
58 |
+
$results_data = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}mlw_results WHERE result_id = %d", $result_id ) );
|
59 |
+
|
60 |
+
// Prepare plugin helper.
|
61 |
+
$quiz_id = intval( $results_data->quiz_id );
|
62 |
+
$mlwQuizMasterNext->pluginHelper->prepare_quiz( $quiz_id );
|
63 |
|
|
|
|
|
64 |
$previous_results = $wpdb->get_var( "SELECT result_id FROM {$wpdb->prefix}mlw_results WHERE result_id = (SELECT MAX(result_id) FROM {$wpdb->prefix}mlw_results WHERE deleted = 0 AND result_id < $result_id)" );
|
65 |
$next_results = $wpdb->get_var( "SELECT result_id FROM {$wpdb->prefix}mlw_results WHERE result_id = (SELECT MIN(result_id) FROM {$wpdb->prefix}mlw_results WHERE deleted = 0 AND result_id > $result_id)" );
|
66 |
|
111 |
|
112 |
// Prepare full results array.
|
113 |
$results_array = array(
|
114 |
+
'quiz_id' => $results_data->quiz_id,
|
115 |
+
'quiz_name' => $results_data->quiz_name,
|
116 |
+
'quiz_system' => $results_data->quiz_system,
|
117 |
+
'user_name' => $results_data->name,
|
118 |
+
'user_business' => $results_data->business,
|
119 |
+
'user_email' => $results_data->email,
|
120 |
+
'user_phone' => $results_data->phone,
|
121 |
+
'user_id' => $results_data->user,
|
122 |
+
'timer' => $results[0],
|
123 |
+
'time_taken' => $results_data->time_taken,
|
124 |
+
'total_points' => $results_data->point_score,
|
125 |
+
'total_score' => $results_data->correct_score,
|
126 |
+
'total_correct' => $results_data->correct,
|
127 |
+
'total_questions' => $results_data->total,
|
128 |
+
'comments' => $results[2],
|
129 |
'question_answers_array' => $results[1],
|
130 |
+
'contact' => $results["contact"],
|
131 |
+
'results' => $results,
|
132 |
);
|
133 |
|
134 |
// Pass through template variable filter
|
php/admin/quizzes-page.php
CHANGED
@@ -142,8 +142,7 @@ function qsm_generate_quizzes_surveys_page() {
|
|
142 |
<th><?php _e( 'URL', 'quiz-master-next' ); ?></th>
|
143 |
<th><?php _e( 'Shortcode', 'quiz-master-next' ); ?></th>
|
144 |
<th><?php _e( 'Link Shortcode', 'quiz-master-next' ); ?></th>
|
145 |
-
<th><?php _e( 'Views', 'quiz-master-next' ); ?></th>
|
146 |
-
<th><?php _e( 'Taken', 'quiz-master-next' ); ?></th>
|
147 |
<th><?php _e( 'Last Modified', 'quiz-master-next' ); ?></th>
|
148 |
</tr>
|
149 |
</thead>
|
@@ -156,8 +155,7 @@ function qsm_generate_quizzes_surveys_page() {
|
|
156 |
<th><?php _e( 'URL', 'quiz-master-next' ); ?></th>
|
157 |
<th><?php _e( 'Shortcode', 'quiz-master-next' ); ?></th>
|
158 |
<th><?php _e( 'Link Shortcode', 'quiz-master-next' ); ?></th>
|
159 |
-
<th><?php _e( 'Views', 'quiz-master-next' ); ?></th>
|
160 |
-
<th><?php _e( 'Taken', 'quiz-master-next' ); ?></th>
|
161 |
<th><?php _e( 'Last Modified', 'quiz-master-next' ); ?></th>
|
162 |
</tr>
|
163 |
</tfoot>
|
@@ -277,8 +275,7 @@ function qsm_generate_quizzes_surveys_page() {
|
|
277 |
</td>
|
278 |
<td>[qsm quiz={{ data.id }}]</td>
|
279 |
<td>[qsm_link id={{ data.id }}]<?php _e( 'Click here', 'quiz-master-next' ); ?>[/qsm_link]</td>
|
280 |
-
<td>{{ data.views }}</td>
|
281 |
-
<td>{{ data.taken }}</td>
|
282 |
<td>{{ data.lastActivity }}</td>
|
283 |
</tr>
|
284 |
</script>
|
142 |
<th><?php _e( 'URL', 'quiz-master-next' ); ?></th>
|
143 |
<th><?php _e( 'Shortcode', 'quiz-master-next' ); ?></th>
|
144 |
<th><?php _e( 'Link Shortcode', 'quiz-master-next' ); ?></th>
|
145 |
+
<th><?php _e( 'Views/Taken', 'quiz-master-next' ); ?></th>
|
|
|
146 |
<th><?php _e( 'Last Modified', 'quiz-master-next' ); ?></th>
|
147 |
</tr>
|
148 |
</thead>
|
155 |
<th><?php _e( 'URL', 'quiz-master-next' ); ?></th>
|
156 |
<th><?php _e( 'Shortcode', 'quiz-master-next' ); ?></th>
|
157 |
<th><?php _e( 'Link Shortcode', 'quiz-master-next' ); ?></th>
|
158 |
+
<th><?php _e( 'Views/Taken', 'quiz-master-next' ); ?></th>
|
|
|
159 |
<th><?php _e( 'Last Modified', 'quiz-master-next' ); ?></th>
|
160 |
</tr>
|
161 |
</tfoot>
|
275 |
</td>
|
276 |
<td>[qsm quiz={{ data.id }}]</td>
|
277 |
<td>[qsm_link id={{ data.id }}]<?php _e( 'Click here', 'quiz-master-next' ); ?>[/qsm_link]</td>
|
278 |
+
<td>{{ data.views }}/{{ data.taken }}</td>
|
|
|
279 |
<td>{{ data.lastActivity }}</td>
|
280 |
</tr>
|
281 |
</script>
|
php/rest-api.php
CHANGED
@@ -15,19 +15,19 @@ add_action( 'rest_api_init', 'qsm_register_rest_routes' );
|
|
15 |
*/
|
16 |
function qsm_register_rest_routes() {
|
17 |
register_rest_route( 'quiz-survey-master/v1', '/questions/', array(
|
18 |
-
'methods' =>
|
19 |
'callback' => 'qsm_rest_get_questions',
|
20 |
) );
|
21 |
register_rest_route( 'quiz-survey-master/v1', '/questions/', array(
|
22 |
-
'methods' =>
|
23 |
'callback' => 'qsm_rest_create_question',
|
24 |
) );
|
25 |
register_rest_route( 'quiz-survey-master/v1', '/questions/(?P<id>\d+)', array(
|
26 |
-
'methods' =>
|
27 |
'callback' => 'qsm_rest_save_question',
|
28 |
) );
|
29 |
register_rest_route( 'quiz-survey-master/v1', '/questions/(?P<id>\d+)', array(
|
30 |
-
'methods' =>
|
31 |
'callback' => 'qsm_rest_get_question',
|
32 |
) );
|
33 |
}
|
15 |
*/
|
16 |
function qsm_register_rest_routes() {
|
17 |
register_rest_route( 'quiz-survey-master/v1', '/questions/', array(
|
18 |
+
'methods' => WP_REST_Server::READABLE,
|
19 |
'callback' => 'qsm_rest_get_questions',
|
20 |
) );
|
21 |
register_rest_route( 'quiz-survey-master/v1', '/questions/', array(
|
22 |
+
'methods' => WP_REST_Server::CREATABLE,
|
23 |
'callback' => 'qsm_rest_create_question',
|
24 |
) );
|
25 |
register_rest_route( 'quiz-survey-master/v1', '/questions/(?P<id>\d+)', array(
|
26 |
+
'methods' => WP_REST_Server::EDITABLE,
|
27 |
'callback' => 'qsm_rest_save_question',
|
28 |
) );
|
29 |
register_rest_route( 'quiz-survey-master/v1', '/questions/(?P<id>\d+)', array(
|
30 |
+
'methods' => WP_REST_Server::READABLE,
|
31 |
'callback' => 'qsm_rest_get_question',
|
32 |
) );
|
33 |
}
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: quiz, survey, lead, test, score, exam, questionnaire, question
|
|
4 |
Requires at least: 4.8
|
5 |
Tested up to: 4.9
|
6 |
Requires PHP: 5.2
|
7 |
-
Stable tag: 5.2.
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -110,6 +110,10 @@ This is usually a theme conflict. You can [checkout out our common conflict solu
|
|
110 |
|
111 |
== Changelog ==
|
112 |
|
|
|
|
|
|
|
|
|
113 |
= 5.2.2 (April 1, 2018) =
|
114 |
* Makes minor style adjustments
|
115 |
* Adds additional hook to admin results details page
|
4 |
Requires at least: 4.8
|
5 |
Tested up to: 4.9
|
6 |
Requires PHP: 5.2
|
7 |
+
Stable tag: 5.2.3
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
110 |
|
111 |
== Changelog ==
|
112 |
|
113 |
+
= 5.2.3 (April 3, 2018) =
|
114 |
+
* Closed Bug: Cannot save question on certain servers - ([Issue #651](https://github.com/fpcorso/quiz_master_next/issues/651))
|
115 |
+
* Closed Bug: Questions/Answers Template Not Loaded In Admin Results Page - ([Issue #636](https://github.com/fpcorso/quiz_master_next/issues/636))
|
116 |
+
|
117 |
= 5.2.2 (April 1, 2018) =
|
118 |
* Makes minor style adjustments
|
119 |
* Adds additional hook to admin results details page
|