Skip to content

Commit

Permalink
Merge pull request #2028 from QuizandSurveyMaster/dev
Browse files Browse the repository at this point in the history
Release 8.0.6
  • Loading branch information
etvarun authored Nov 22, 2022
2 parents 39ce35b + d3e0586 commit 90b75da
Show file tree
Hide file tree
Showing 30 changed files with 2,254 additions and 1,728 deletions.
685 changes: 354 additions & 331 deletions css/common.css

Large diffs are not rendered by default.

168 changes: 92 additions & 76 deletions css/qsm-admin-question.css

Large diffs are not rendered by default.

872 changes: 543 additions & 329 deletions css/qsm-admin.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion data/parsing_script.json

Large diffs are not rendered by default.

191 changes: 136 additions & 55 deletions js/qsm-admin.js

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions js/qsm-quiz.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ var qsmTimerInterval = [];
$('.g-recaptcha').hide();
// Cycle through all quizzes
_.each(qmn_quiz_data, function (quiz) {
quizID = parseInt(quiz.quiz_id);
let quizID = parseInt(quiz.quiz_id);
QSM.initPagination(quizID);
qsmTimerInterval[quizID] = setInterval(function () { qmnTimeTakenTimer(quizID) }, 1000);
if ( ( quiz.hasOwnProperty('pagination') || ( _.keys(quiz.qpages).length > 1 && !jQuery('.qsm-quiz-container-'+quizID+' .qsm-auto-page-row').length ) ) ) {
Expand Down Expand Up @@ -419,7 +419,7 @@ var qsmTimerInterval = [];
}).animate({
Counter: new_text
}, {
duration: 1000,
duration: 500,
easing: 'swing',
step: function () {
jQuery('#quizForm' + quizID).find('.progressbar-text').text(Math.round(this.Counter) + ' %');
Expand Down Expand Up @@ -828,7 +828,7 @@ function qmnValidation(element, quiz_form_id) {
}
}
var by_pass = true;
if (qmn_quiz_data[quizID].timer_limit_val > 0 && qmn_quiz_data[quiz_id].hasOwnProperty('skip_validation_time_expire') && qmn_quiz_data[quiz_id].skip_validation_time_expire == 0) {
if (qmn_quiz_data[quiz_id].timer_limit_val > 0 && qmn_quiz_data[quiz_id].hasOwnProperty('skip_validation_time_expire') && qmn_quiz_data[quiz_id].skip_validation_time_expire == 0) {
by_pass = false;
}

Expand Down Expand Up @@ -937,8 +937,8 @@ function qmnFormSubmit(quiz_form_id) {
fd.append("currentuserTimeZone", Intl.DateTimeFormat().resolvedOptions().timeZone);


qsmEndTimeTakenTimer(quizID);
if (qmn_quiz_data[quizID].hasOwnProperty('advanced_timer') && qmn_quiz_data[quizID].advanced_timer.hasOwnProperty('show_stop_timer') ) {
qsmEndTimeTakenTimer(quiz_id);
if (qmn_quiz_data[quiz_id].hasOwnProperty('advanced_timer') && qmn_quiz_data[quiz_id].advanced_timer.hasOwnProperty('show_stop_timer') ) {
QSMPageTimer.endPageTimer(quiz_id);
}
if (qmn_quiz_data[quiz_id].hasOwnProperty('timer_limit')) {
Expand All @@ -958,7 +958,7 @@ function qmnFormSubmit(quiz_form_id) {
if (window.qsm_results_data === undefined) {
window.qsm_results_data = new Object();
}
window.qsm_results_data[quizID] = {
window.qsm_results_data[quiz_id] = {
'save_response': response.result_status['save_response'],
'id': response.result_status['id']
};
Expand Down Expand Up @@ -1249,7 +1249,7 @@ function qmnInitProgressbarOnClick(quiz_id, page_number, total_page_number) {
}).animate({
Counter: new_text
}, {
duration: 1000,
duration: 500,
easing: 'swing',
step: function () {
jQuery('#qsm_progress_bar_' + quiz_id).find('.progressbar-text').text(Math.round(this.Counter) + ' %');
Expand Down
6 changes: 3 additions & 3 deletions mlw_quizmaster2.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Plugin Name: Quiz And Survey Master
* Description: Easily and quickly add quizzes and surveys to your website.
* Version: 8.0.5
* Version: 8.0.6
* Author: ExpressTech
* Author URI: https://quizandsurveymaster.com/
* Plugin URI: https://expresstech.io/
Expand All @@ -21,7 +21,7 @@
define( 'QSM_SUBMENU', __FILE__ );
define( 'QSM_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
define( 'hide_qsm_adv', true );
define( 'QSM_THEME_PATH', plugin_dir_path( __DIR__ ) );
define( 'QSM_THEME_PATH', WP_PLUGIN_DIR . '/' );
define( 'QSM_THEME_SLUG', plugins_url( '/' ) );
define( 'QSM_PLUGIN_CSS_URL', QSM_PLUGIN_URL . 'css' );
define( 'QSM_PLUGIN_JS_URL', QSM_PLUGIN_URL . 'js' );
Expand All @@ -43,7 +43,7 @@ class MLWQuizMasterNext {
* @var string
* @since 4.0.0
*/
public $version = '8.0.5';
public $version = '8.0.6';

/**
* QSM Alert Manager Object
Expand Down
20 changes: 10 additions & 10 deletions php/admin/admin-results-details-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ function qsm_generate_results_details_tab() {
wp_add_inline_script( 'math_jax', $mlwQuizMasterNext::$default_MathJax_script, 'before' );
}
echo '<div style="text-align:right; margin-top: 20px; margin-bottom: 20px;">';
echo '<h3 class="result-page-title">Quiz Result - '. esc_html( $results_data->quiz_name ) .'</h3>';
echo '<h3 class="result-page-title">'.esc_html__('Quiz Result','quiz-master-next').' - '. esc_html( $results_data->quiz_name ) .'</h3>';
echo '<a style="margin-right: 15px;" href="?page=mlw_quiz_results" class="button button-primary" title="Return to results">'. esc_html__( 'Back to Results', 'quiz-master-next' ) .'</a>';
if ( ! is_null( $previous_results ) && $previous_results ) {
echo "<a class='button button-primary' title='View Previous Result' href=\"?page=qsm_quiz_result_details&&result_id=" . intval( $previous_results ) . "\" ><span class='dashicons dashicons-arrow-left-alt2'></span></a> ";
Expand Down Expand Up @@ -157,7 +157,7 @@ function qsm_generate_results_details_tab() {
$template .= '<div class="overview-main-wrapper">';
//User detail
$template .= '<div class="candidate-detail-wrap overview-inner-wrap">';
$template .= '<div id="submitdiv" class="postbox "><h2 class="hndle ui-sortable-handle"><span>User Detail</span></h2>';
$template .= '<div id="submitdiv" class="postbox "><h2 class="hndle ui-sortable-handle"><span>'.__('User Detail','quiz-master-next').'</span></h2>';
$template .= '<div class="inside">';
if ( isset( $results_array['contact'] ) && is_array( $results_array['contact'] ) && ! empty( $results_array['contact'] ) ) {
for ( $i = 0; $i < count( $results_array["contact"] ); $i++ ) {
Expand All @@ -176,9 +176,9 @@ function qsm_generate_results_details_tab() {
if ( isset( $results_data->form_type ) && 0 === intval( $results_data->form_type ) ) {
//Scoreboard design
$template .= '<div class="candidate-detail-wrap overview-inner-wrap">';
$template .= '<div id="submitdiv" class="postbox qsm-scorecard-box"><h2 class="hndle ui-sortable-handle"><span>Scorecard</span></h2>';
$template .= '<div id="submitdiv" class="postbox qsm-scorecard-box"><h2 class="hndle ui-sortable-handle"><span>'.__('Scorecard','quiz-master-next').'</span></h2>';
$template .= '<div class="inside">';
$template .= $span_start. __( 'Correct Answers:', 'quiz-master-next' ) .'</label><span>%AMOUNT_CORRECT% Out of %TOTAL_QUESTIONS%</span></span>';
$template .= $span_start. __( 'Correct Answers:', 'quiz-master-next' ) .'</label><span class="qsm-correct-span"> <span class="amount-correct">%AMOUNT_CORRECT%</span> '.__('Out of','quiz-master-next').' %TOTAL_QUESTIONS%</span></span>';
$template .= $span_start. __( 'Points:', 'quiz-master-next' ) .'</label><span class="qsm-total-point">%POINT_SCORE% </span></span>';
$template .= $span_start. __( 'Percentage:', 'quiz-master-next' ) .'</label><span class="qsm-total-percentage">%CORRECT_SCORE%%</span></span>';
$template .= '</div>';
Expand All @@ -188,7 +188,7 @@ function qsm_generate_results_details_tab() {

//Timer design
$template .= '<div class="overview-inner-wrap">';
$template .= '<div id="submitdiv" class="postbox "><h2 class="hndle ui-sortable-handle"><span>Time Taken</span></h2>';
$template .= '<div id="submitdiv" class="postbox "><h2 class="hndle ui-sortable-handle"><span>'.__('Time Taken','quiz-master-next').'</span></h2>';
$template .= '<div class="inside">';
$template .= '<div class="timer-div-wrapper">';

Expand All @@ -202,7 +202,7 @@ function qsm_generate_results_details_tab() {
} else {
$template .= '<div>';
$template .= '<span class="hours timer-span">00</span>';
$template .= '<span class="timer-text">hours</span>';
$template .= '<span class="timer-text">'.__('hours','quiz-master-next').'</span>';
$template .= '</div>';
}
$mlw_complete_minutes = floor(($mlw_qmn_results_array[0] % 3600) / 60);
Expand All @@ -215,7 +215,7 @@ function qsm_generate_results_details_tab() {
} else {
$template .= '<div>';
$template .= '<span class="minutes timer-span">00</span>';
$template .= '<span class="timer-text">minutes</span>';
$template .= '<span class="timer-text">'.__('minutes','quiz-master-next').'</span>';
$template .= '</div>';
}

Expand All @@ -235,7 +235,7 @@ function qsm_generate_results_details_tab() {

if ( 0 === intval( $comments_enabled ) ) {
$template .= '<div class="comment-inner-wrap" style="">';
$template .= '<div id="submitdiv" class="postbox" ><h2 class="hndle ui-sortable-handle"><span>User Comments</span></h2>';
$template .= '<div id="submitdiv" class="postbox" ><h2 class="hndle ui-sortable-handle"><span>'.__('User Comments','quiz-master-next').'</span></h2>';
$template .= '<div class="inside">';
$template .= '%COMMENT_SECTION%';
$template .= '</div>';
Expand All @@ -244,7 +244,7 @@ function qsm_generate_results_details_tab() {
}
//Response div
$template .= '<div class="response-inner-wrap">';
$template .= '<div id="submitdiv" class="postbox "><h2 class="hndle ui-sortable-handle"><span>Responses</span></h2>';
$template .= '<div id="submitdiv" class="postbox "><h2 class="hndle ui-sortable-handle"><span>'.__('Responses','quiz-master-next').'</span></h2>';
$template .= '<div class="inside check">';
$template .= '%QUESTIONS_ANSWERS%';
$template .= '</div>';
Expand All @@ -258,7 +258,7 @@ function qsm_generate_results_details_tab() {
if ( isset( $settings['results_details_template'] ) ) {
$template = htmlspecialchars_decode( $settings['results_details_template'], ENT_QUOTES );
} else {
$template = "<h2>Quiz Results for %QUIZ_NAME%</h2>
$template = "<h2>".__('Quiz Results for','quiz-master-next')." %QUIZ_NAME%</h2>
<p>%CONTACT_ALL%</p>
<p>Name Provided: %USER_NAME%</p>
<p>Business Provided: %USER_BUSINESS%</p>
Expand Down
Loading

0 comments on commit 90b75da

Please sign in to comment.