Version Description
(January 7, 2019) = * Closed User Request: Add special character selector to question editor (Issue #750) * Closed User Request: Add total questions and total pages to Questions tab (Issue #749) * Updated getting started video
Download this release
Release Info
Developer | fpcorso |
Plugin | Quiz And Survey Master (Formerly Quiz Master Next) |
Version | 6.1.2 |
Comparing to | |
See all releases |
Code changes from version 6.1.1 to 6.1.2
- css/qsm-admin-question.css +13 -0
- js/qsm-admin-contact.js +2 -2
- js/qsm-admin-question.js +25 -2
- mlw_quizmaster2.php +3 -3
- php/admin/about-page.php +1 -4
- php/admin/options-page-questions-tab.php +23 -15
- php/admin/quizzes-page.php +1 -1
- php/classes/class-qsm-changelog-generator.php +1 -1
- readme.txt +6 -1
css/qsm-admin-question.css
CHANGED
@@ -1,3 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
.page {
|
2 |
width: 100%;
|
3 |
background-color: #0d97d8;
|
1 |
+
.question-controls {
|
2 |
+
display: flex;
|
3 |
+
flex-direction: column;
|
4 |
+
justify-content: space-between;
|
5 |
+
align-items: center;
|
6 |
+
}
|
7 |
+
|
8 |
+
@media screen and (min-width:700px) {
|
9 |
+
.question-controls {
|
10 |
+
flex-direction: row;
|
11 |
+
}
|
12 |
+
}
|
13 |
+
|
14 |
.page {
|
15 |
width: 100%;
|
16 |
background-color: #0d97d8;
|
js/qsm-admin-contact.js
CHANGED
@@ -136,9 +136,9 @@ var QSMContact;
|
|
136 |
},
|
137 |
saved : function( response ) {
|
138 |
if ( response.status ) {
|
139 |
-
QSMContact.displayAlert( '<strong>Success</strong> Your
|
140 |
} else {
|
141 |
-
QSMContact.displayAlert( '<strong>Error</strong> There was an error encountered when saving your
|
142 |
}
|
143 |
},
|
144 |
displayAlert: function( message, type ) {
|
136 |
},
|
137 |
saved : function( response ) {
|
138 |
if ( response.status ) {
|
139 |
+
QSMContact.displayAlert( '<strong>Success</strong> Your contact fields have been saved!', 'success' );
|
140 |
} else {
|
141 |
+
QSMContact.displayAlert( '<strong>Error</strong> There was an error encountered when saving your contact fields. Please try again.', 'error' );
|
142 |
}
|
143 |
},
|
144 |
displayAlert: function( message, type ) {
|
js/qsm-admin-question.js
CHANGED
@@ -23,6 +23,26 @@ var QSMQuestion;
|
|
23 |
questions: null,
|
24 |
questionCollection: null,
|
25 |
categories: [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
openQuestionBank: function( pageID ) {
|
27 |
QSMQuestion.loadQuestionBank();
|
28 |
$( '#add-question-bank-page' ).val( pageID );
|
@@ -113,6 +133,7 @@ var QSMQuestion;
|
|
113 |
} else {
|
114 |
QSMQuestion.questions.each( QSMQuestion.addQuestionToPage );
|
115 |
}
|
|
|
116 |
},
|
117 |
savePages: function() {
|
118 |
QSMQuestion.displayAlert( 'Saving pages and questions...', 'info' );
|
@@ -164,6 +185,7 @@ var QSMQuestion;
|
|
164 |
QSMQuestion.displayAlert( 'Question created!', 'success' );
|
165 |
QSMQuestion.addQuestionToPage( model );
|
166 |
QSMQuestion.openEditPopup( model.id );
|
|
|
167 |
},
|
168 |
addQuestionToPage: function( model ) {
|
169 |
var page = model.get( 'page' ) + 1;
|
@@ -330,8 +352,8 @@ var QSMQuestion;
|
|
330 |
var settings = {
|
331 |
mediaButtons: true,
|
332 |
tinymce: {
|
333 |
-
|
334 |
-
toolbar1: 'formatselect,bold,italic,bullist,numlist,
|
335 |
},
|
336 |
quicktags: true,
|
337 |
};
|
@@ -372,6 +394,7 @@ var QSMQuestion;
|
|
372 |
$( '.questions' ).on( 'click', '.delete-question-button', function( event ) {
|
373 |
event.preventDefault();
|
374 |
$( this ).parents( '.question' ).remove();
|
|
|
375 |
});
|
376 |
$( '.questions' ).on( 'click', '.delete-page-button', function( event ) {
|
377 |
event.preventDefault();
|
23 |
questions: null,
|
24 |
questionCollection: null,
|
25 |
categories: [],
|
26 |
+
/**
|
27 |
+
* Counts the total number of questions and then updates #total-questions span.
|
28 |
+
*/
|
29 |
+
countTotal: function() {
|
30 |
+
var total = 0;
|
31 |
+
|
32 |
+
// Cycles through each page.
|
33 |
+
_.each( jQuery( '.page' ), function( page ) {
|
34 |
+
|
35 |
+
// If page is empty, continue to the next.
|
36 |
+
if( 0 == jQuery( page ).children( '.question' ).length ) {
|
37 |
+
return;
|
38 |
+
}
|
39 |
+
// Cycle through each question and add to our total.
|
40 |
+
_.each( jQuery( page ).children( '.question' ), function( question ){
|
41 |
+
total += 1;
|
42 |
+
});
|
43 |
+
});
|
44 |
+
$( '#total-questions' ).text( total );
|
45 |
+
},
|
46 |
openQuestionBank: function( pageID ) {
|
47 |
QSMQuestion.loadQuestionBank();
|
48 |
$( '#add-question-bank-page' ).val( pageID );
|
133 |
} else {
|
134 |
QSMQuestion.questions.each( QSMQuestion.addQuestionToPage );
|
135 |
}
|
136 |
+
QSMQuestion.countTotal();
|
137 |
},
|
138 |
savePages: function() {
|
139 |
QSMQuestion.displayAlert( 'Saving pages and questions...', 'info' );
|
185 |
QSMQuestion.displayAlert( 'Question created!', 'success' );
|
186 |
QSMQuestion.addQuestionToPage( model );
|
187 |
QSMQuestion.openEditPopup( model.id );
|
188 |
+
QSMQuestion.countTotal();
|
189 |
},
|
190 |
addQuestionToPage: function( model ) {
|
191 |
var page = model.get( 'page' ) + 1;
|
352 |
var settings = {
|
353 |
mediaButtons: true,
|
354 |
tinymce: {
|
355 |
+
forced_root_block : '',
|
356 |
+
toolbar1: 'formatselect,bold,italic,bullist,numlist,blockquote,alignleft,aligncenter,alignright,link,strikethrough,hr,forecolor,pastetext,removeformat,codeformat,charmap,undo,redo'
|
357 |
},
|
358 |
quicktags: true,
|
359 |
};
|
394 |
$( '.questions' ).on( 'click', '.delete-question-button', function( event ) {
|
395 |
event.preventDefault();
|
396 |
$( this ).parents( '.question' ).remove();
|
397 |
+
QSMQuestion.countTotal();
|
398 |
});
|
399 |
$( '.questions' ).on( 'click', '.delete-page-button', function( event ) {
|
400 |
event.preventDefault();
|
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: 6.1.
|
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 6.1.
|
13 |
* @package QSM
|
14 |
*/
|
15 |
|
@@ -33,7 +33,7 @@ class MLWQuizMasterNext {
|
|
33 |
* @var string
|
34 |
* @since 4.0.0
|
35 |
*/
|
36 |
-
public $version = '6.1.
|
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: 6.1.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 6.1.2
|
13 |
* @package QSM
|
14 |
*/
|
15 |
|
33 |
* @var string
|
34 |
* @since 4.0.0
|
35 |
*/
|
36 |
+
public $version = '6.1.2';
|
37 |
|
38 |
/**
|
39 |
* QSM Alert Manager Object
|
php/admin/about-page.php
CHANGED
@@ -46,10 +46,7 @@ function mlw_generate_about_page() {
|
|
46 |
</div>
|
47 |
<div class="qsm-tab-content tab-2" style="display: none;">
|
48 |
<h2>Changelog</h2>
|
49 |
-
<?php QSM_Changelog_Generator::get_changelog_list( 'fpcorso/quiz_master_next',
|
50 |
-
<?php QSM_Changelog_Generator::get_changelog_list( 'fpcorso/quiz_master_next', 54 ); ?>
|
51 |
-
<?php QSM_Changelog_Generator::get_changelog_list( 'fpcorso/quiz_master_next', 53 ); ?>
|
52 |
-
<?php QSM_Changelog_Generator::get_changelog_list( 'fpcorso/quiz_master_next', 36 ); ?>
|
53 |
</div>
|
54 |
<div class="qsm-tab-content tab-3" style="display:none;">
|
55 |
<h2>GitHub Contributors</h2>
|
46 |
</div>
|
47 |
<div class="qsm-tab-content tab-2" style="display: none;">
|
48 |
<h2>Changelog</h2>
|
49 |
+
<?php QSM_Changelog_Generator::get_changelog_list( 'fpcorso/quiz_master_next', 57 ); ?>
|
|
|
|
|
|
|
50 |
</div>
|
51 |
<div class="qsm-tab-content tab-3" style="display:none;">
|
52 |
<h2>GitHub Contributors</h2>
|
php/admin/options-page-questions-tab.php
CHANGED
@@ -1,10 +1,13 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* This file handles the "Questions" tab when editing a quiz/survey
|
|
|
|
|
4 |
*/
|
5 |
|
6 |
-
if ( ! defined( 'ABSPATH' ) )
|
7 |
-
|
|
|
8 |
/**
|
9 |
* Adds the settings for questions tab to the Quiz Settings page.
|
10 |
*
|
@@ -15,7 +18,7 @@ function qsm_settings_questions_tab() {
|
|
15 |
global $mlwQuizMasterNext;
|
16 |
$mlwQuizMasterNext->pluginHelper->register_quiz_settings_tabs( __( 'Questions', 'quiz-master-next' ), 'qsm_options_questions_tab_content' );
|
17 |
}
|
18 |
-
add_action(
|
19 |
|
20 |
|
21 |
/**
|
@@ -31,17 +34,17 @@ function qsm_options_questions_tab_content() {
|
|
31 |
$quiz_id = intval( $_GET['quiz_id'] );
|
32 |
|
33 |
$json_data = array(
|
34 |
-
'quizID'
|
35 |
-
'answerText'
|
36 |
-
'nonce'
|
37 |
-
'pages'
|
38 |
);
|
39 |
|
40 |
// Scripts and styles.
|
41 |
wp_enqueue_script( 'micromodal_script', plugins_url( '../../js/micromodal.min.js', __FILE__ ) );
|
42 |
wp_enqueue_script( 'qsm_admin_question_js', plugins_url( '../../js/qsm-admin-question.js', __FILE__ ), array( 'backbone', 'underscore', 'jquery-ui-sortable', 'wp-util', 'micromodal_script' ), $mlwQuizMasterNext->version, true );
|
43 |
wp_localize_script( 'qsm_admin_question_js', 'qsmQuestionSettings', $json_data );
|
44 |
-
wp_enqueue_style( 'qsm_admin_question_css', plugins_url( '../../css/qsm-admin-question.css', __FILE__ ), array(), $mlwQuizMasterNext->version
|
45 |
wp_enqueue_script( 'math_jax', '//cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' );
|
46 |
wp_enqueue_editor();
|
47 |
wp_enqueue_media();
|
@@ -78,13 +81,18 @@ function qsm_options_questions_tab_content() {
|
|
78 |
<h3>Questions</h3>
|
79 |
<p>Use this tab to create and modify the different pages of your quiz or survey as well as the questions on each page. Click "Create New Page" to get started! Need more information? Check out the <a href="https://docs.quizandsurveymaster.com/article/19-creating-pages-and-questions" target="_blank">documentation for this tab!</a></p>
|
80 |
<div class="questions-messages"></div>
|
81 |
-
<
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
<
|
87 |
-
|
|
|
|
|
|
|
|
|
|
|
88 |
<div class="questions"></div>
|
89 |
|
90 |
<!-- Popup for question bank -->
|
1 |
<?php
|
2 |
/**
|
3 |
* This file handles the "Questions" tab when editing a quiz/survey
|
4 |
+
*
|
5 |
+
* @package QSM
|
6 |
*/
|
7 |
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit;
|
10 |
+
}
|
11 |
/**
|
12 |
* Adds the settings for questions tab to the Quiz Settings page.
|
13 |
*
|
18 |
global $mlwQuizMasterNext;
|
19 |
$mlwQuizMasterNext->pluginHelper->register_quiz_settings_tabs( __( 'Questions', 'quiz-master-next' ), 'qsm_options_questions_tab_content' );
|
20 |
}
|
21 |
+
add_action( 'plugins_loaded', 'qsm_settings_questions_tab', 5 );
|
22 |
|
23 |
|
24 |
/**
|
34 |
$quiz_id = intval( $_GET['quiz_id'] );
|
35 |
|
36 |
$json_data = array(
|
37 |
+
'quizID' => $quiz_id,
|
38 |
+
'answerText' => __( 'Answer', 'quiz-master-next' ),
|
39 |
+
'nonce' => wp_create_nonce( 'wp_rest' ),
|
40 |
+
'pages' => $mlwQuizMasterNext->pluginHelper->get_quiz_setting( 'pages', array() ),
|
41 |
);
|
42 |
|
43 |
// Scripts and styles.
|
44 |
wp_enqueue_script( 'micromodal_script', plugins_url( '../../js/micromodal.min.js', __FILE__ ) );
|
45 |
wp_enqueue_script( 'qsm_admin_question_js', plugins_url( '../../js/qsm-admin-question.js', __FILE__ ), array( 'backbone', 'underscore', 'jquery-ui-sortable', 'wp-util', 'micromodal_script' ), $mlwQuizMasterNext->version, true );
|
46 |
wp_localize_script( 'qsm_admin_question_js', 'qsmQuestionSettings', $json_data );
|
47 |
+
wp_enqueue_style( 'qsm_admin_question_css', plugins_url( '../../css/qsm-admin-question.css', __FILE__ ), array(), $mlwQuizMasterNext->version );
|
48 |
wp_enqueue_script( 'math_jax', '//cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' );
|
49 |
wp_enqueue_editor();
|
50 |
wp_enqueue_media();
|
81 |
<h3>Questions</h3>
|
82 |
<p>Use this tab to create and modify the different pages of your quiz or survey as well as the questions on each page. Click "Create New Page" to get started! Need more information? Check out the <a href="https://docs.quizandsurveymaster.com/article/19-creating-pages-and-questions" target="_blank">documentation for this tab!</a></p>
|
83 |
<div class="questions-messages"></div>
|
84 |
+
<div class="question-controls">
|
85 |
+
<div>
|
86 |
+
<button class="new-page-button button">Create New Page</button>
|
87 |
+
<button class="save-page-button button-primary">Save Questions and Pages</button>
|
88 |
+
</div>
|
89 |
+
<span>Total Questions: <span id="total-questions"></span></span>
|
90 |
+
<p class="search-box">
|
91 |
+
<label class="screen-reader-text" for="question_search">Search Questions:</label>
|
92 |
+
<input type="search" id="question_search" name="question_search" value="">
|
93 |
+
<a href="#" class="button">Search Questions</a>
|
94 |
+
</p>
|
95 |
+
</div>
|
96 |
<div class="questions"></div>
|
97 |
|
98 |
<!-- Popup for question bank -->
|
php/admin/quizzes-page.php
CHANGED
@@ -360,7 +360,7 @@ function qsm_generate_quizzes_surveys_page() {
|
|
360 |
<script type="text/template" id="tmpl-no-quiz">
|
361 |
<h2><?php _e( 'You do not have any quizzes or surveys. Click "Add New" to get started.', 'quiz-master-next' ); ?></h2>
|
362 |
<h2>Is this your first time using this plugin? Check out our <a href="https://docs.quizandsurveymaster.com" target="_blank">Documentation</a> or watch our Getting Started Video below</h2>
|
363 |
-
<iframe width="560" height="315" src="https://www.youtube.com/embed/
|
364 |
</script>
|
365 |
|
366 |
<script type="text/template" id="tmpl-quiz-row">
|
360 |
<script type="text/template" id="tmpl-no-quiz">
|
361 |
<h2><?php _e( 'You do not have any quizzes or surveys. Click "Add New" to get started.', 'quiz-master-next' ); ?></h2>
|
362 |
<h2>Is this your first time using this plugin? Check out our <a href="https://docs.quizandsurveymaster.com" target="_blank">Documentation</a> or watch our Getting Started Video below</h2>
|
363 |
+
<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/coE5W_WB-48" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
|
364 |
</script>
|
365 |
|
366 |
<script type="text/template" id="tmpl-quiz-row">
|
php/classes/class-qsm-changelog-generator.php
CHANGED
@@ -88,7 +88,7 @@ class QSM_Changelog_Generator {
|
|
88 |
$milestone_url = "https://api.github.com/repos/$repo/milestones/$milestone";
|
89 |
$milestone_data = QSM_Changelog_Generator::api_call( $milestone_url );
|
90 |
|
91 |
-
if ( $milestone_data ) {
|
92 |
$milestone_array = array(
|
93 |
'title' => $milestone_data["title"],
|
94 |
'description' => $milestone_data["description"],
|
88 |
$milestone_url = "https://api.github.com/repos/$repo/milestones/$milestone";
|
89 |
$milestone_data = QSM_Changelog_Generator::api_call( $milestone_url );
|
90 |
|
91 |
+
if ( $milestone_data && isset( $milestone_data['title'] ) ) {
|
92 |
$milestone_array = array(
|
93 |
'title' => $milestone_data["title"],
|
94 |
'description' => $milestone_data["description"],
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: quiz, survey, lead, test, score, exam, questionnaire, question
|
|
4 |
Requires at least: 4.9
|
5 |
Tested up to: 5.0.2
|
6 |
Requires PHP: 5.4
|
7 |
-
Stable tag: 6.1.
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -111,6 +111,11 @@ This is usually a theme conflict. You can [checkout out our common conflict solu
|
|
111 |
|
112 |
== Changelog ==
|
113 |
|
|
|
|
|
|
|
|
|
|
|
114 |
= 6.1.1 (December 28, 2018) =
|
115 |
* Fixes issue causing broken quizzes on sites using older versions of WordPress
|
116 |
|
4 |
Requires at least: 4.9
|
5 |
Tested up to: 5.0.2
|
6 |
Requires PHP: 5.4
|
7 |
+
Stable tag: 6.1.2
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
111 |
|
112 |
== Changelog ==
|
113 |
|
114 |
+
= 6.1.2 (January 7, 2019) =
|
115 |
+
* Closed User Request: Add special character selector to question editor ([Issue #750](https://github.com/fpcorso/quiz_master_next/issues/750))
|
116 |
+
* Closed User Request: Add total questions and total pages to Questions tab ([Issue #749](https://github.com/fpcorso/quiz_master_next/issues/749))
|
117 |
+
* Updated getting started video
|
118 |
+
|
119 |
= 6.1.1 (December 28, 2018) =
|
120 |
* Fixes issue causing broken quizzes on sites using older versions of WordPress
|
121 |
|