Skip to content

Commit

Permalink
fixed conflict with dev branch
Browse files Browse the repository at this point in the history
  • Loading branch information
zubairraeen committed Aug 1, 2023
2 parents f4b36dd + 02c315b commit f4e21aa
Show file tree
Hide file tree
Showing 23 changed files with 302 additions and 306 deletions.
1 change: 1 addition & 0 deletions js/crypto-js.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions js/qsm-admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ var QSMAdmin;
$('.' + name + '_' + value).show();
}
});
$(document).on('change', '.qsm_tab_content #form_type input, #quiz_settings_wrapper input[name="form_type"]', function () {
$(document).on('change', '.qsm_tab_content select:not(.question_limit_category,.qsm-woo-result-related-products, .qsm-woo-email-related-products), #quiz_settings_wrapper select:not(.question_limit_category)', function () {
var value = $(this).val();
hide_show_quiz_options(value);
});
Expand Down Expand Up @@ -964,7 +964,7 @@ if(current_id == 'qsm_variable_text'){ jQuery(".current_variable")[0].click();}
event.preventDefault();
MicroModal.show('modal-export-import');
});
$(document).on('change', '.qsm_tab_content select, #quiz_settings_wrapper select', function () {
$(document).on('change', '.qsm_tab_content select:not(.qsm-woo-result-related-products, .qsm-woo-email-related-products), #quiz_settings_wrapper select', function () {
var name = $(this).attr('name');
var value = $(this).val();
$('.qsm_hidden_tr').hide();
Expand Down Expand Up @@ -1635,7 +1635,7 @@ var QSMContact;
};
wp.editor.initialize('email-template-' + QSMAdminEmails.total, settings);
}
jQuery(document).trigger('qsm_after_add_email_block', [conditions, to, subject, content, replyTo]);
jQuery(document).trigger('qsm_after_add_email_block', [conditions, to, subject, content, replyTo, QSMAdminEmails.total]);
},
newEmail: function () {
var conditions = [{
Expand Down Expand Up @@ -3460,7 +3460,7 @@ var import_button;
quicktags: true,
};
wp.editor.initialize('results-page-' + QSMAdminResults.total, settings);
jQuery(document).trigger('qsm_after_add_result_block', [conditions, page, redirect]);
jQuery(document).trigger('qsm_after_add_result_block', [conditions, page, redirect, QSMAdminResults.total]);
},
newResultsPage: function () {
var conditions = [{
Expand Down
276 changes: 141 additions & 135 deletions js/qsm-quiz.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 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.1.10
* Version: 8.1.12
* Author: ExpressTech
* Author URI: https://quizandsurveymaster.com/
* Plugin URI: https://expresstech.io/
Expand Down Expand Up @@ -43,7 +43,7 @@ class MLWQuizMasterNext {
* @var string
* @since 4.0.0
*/
public $version = '8.1.10';
public $version = '8.1.12';

/**
* QSM Alert Manager Object
Expand Down
2 changes: 1 addition & 1 deletion php/admin/admin-results-details-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ function qsm_generate_results_details_tab() {
$total_hidden_questions = 0;
$results = maybe_unserialize( $results_data->quiz_results );
if ( is_array( $results ) ) {
$total_hidden_questions = isset( $results['hidden_questions'] ) ? count( $results['hidden_questions'] ) : 0;
$total_hidden_questions = ! empty( $results['hidden_questions'] ) && is_array( $results['hidden_questions'] ) ? count( $results['hidden_questions'] ) : 0;
if ( ! isset( $results["contact"] ) ) {
$results["contact"] = array();
}
Expand Down
6 changes: 3 additions & 3 deletions php/admin/admin-results-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -371,13 +371,13 @@ function qsm_results_overview_tab_content() {
if ( "0" === $results_screen_option['time_taken'] ) {
$values['time_taken']['style'] = $display_none;
}

if ( $mlw_quiz_data ) {
foreach ( $mlw_quiz_data as $mlw_quiz_info ) {
$quiz_infos[] = $mlw_quiz_info;
$mlw_complete_time = '';
$mlw_qmn_results_array = maybe_unserialize( $mlw_quiz_info->quiz_results );
$hidden_questions = isset( $mlw_qmn_results_array['hidden_questions'] ) ? count( $mlw_qmn_results_array['hidden_questions'] ) : 0;
$hidden_questions = ! empty( $mlw_qmn_results_array['hidden_questions'] ) && is_array($mlw_qmn_results_array['hidden_questions']) ? count( $mlw_qmn_results_array['hidden_questions'] ) : 0;
if ( is_array( $mlw_qmn_results_array ) ) {
$mlw_complete_hours = floor( $mlw_qmn_results_array[0] / 3600 );
if ( $mlw_complete_hours > 0 ) {
Expand Down Expand Up @@ -437,7 +437,7 @@ function qsm_results_overview_tab_content() {
$values['user']['content'][] = '<a href="' . esc_url( admin_url( 'user-edit.php?user_id=' . $mlw_quiz_info->user ) ) . '">' . esc_html( $mlw_quiz_info->user ) . '</a>';
}
}

if ( isset( $values['start_date'] ) ) {
if ( isset($mlw_qmn_results_array['quiz_start_date']) ) {
$sdate = gmdate( get_option( 'date_format' ), strtotime( $mlw_qmn_results_array['quiz_start_date'] ) );
Expand Down
1 change: 1 addition & 0 deletions php/admin/options-page-email-tab.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ function qsm_options_emails_tab_template() {
<label><?php esc_html_e( 'Email Content', 'quiz-master-next' ); ?></label>
<textarea id="email-template-{{ data.id }}" class="email-template">{{{ data.content }}}</textarea>
<label><input type="checkbox" class="reply-to" <# if ( "true" == data.replyTo || true == data.replyTo ) { #>checked<# } #>>Add user email as Reply-To</label>
<?php do_action( 'qsm_email_page_after', $quiz_id, $categories ); ?>
</div>
</main>
</div>
Expand Down
1 change: 1 addition & 0 deletions php/admin/options-page-results-page-tab.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ function qsm_options_results_tab_template(){
<textarea id="results-page-{{ data.id }}" class="results-page-template">{{{ data.page }}}</textarea>
<p><?php esc_html_e( 'Or, redirect the user by entering the URL below:', 'quiz-master-next' ); ?></p>
<input type="text" class="results-page-redirect" value="<# if ( data.redirect ) { #>{{ data.redirect }}<# } #>">
<?php do_action( 'qsm_result_page_after', $quiz_id, $categories ); ?>
</div>
</main>
</div>
Expand Down
8 changes: 0 additions & 8 deletions php/admin/options-page-style-tab.php
Original file line number Diff line number Diff line change
Expand Up @@ -308,14 +308,6 @@ class="button-primary"><?php esc_html_e( 'Save Quiz Style', 'quiz-master-next' )
</tr>
<?php
}
} else {
?>
<tr>
<td colspan="2">
<?php esc_html_e( 'No settings found', 'quiz-master-next' ); ?>
</td>
</tr>
<?php
}
?>
</table>
Expand Down
2 changes: 1 addition & 1 deletion php/classes/class-qmn-quiz-creator.php
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ public function duplicate_quiz( $quiz_id, $quiz_name, $is_duplicating_questions
}
}
// Fixed Rules Questions with new question ids
if ( $logic_rules ) {
if ( is_array( $logic_rules ) ) {
foreach ( $logic_rules as $logic_key => $logic_value ) {
foreach ( $logic_value as $logic_cond_k => $logic_cond ) {
foreach ( $logic_cond as $l_cond_k => $logic_val ) {
Expand Down
Loading

0 comments on commit f4e21aa

Please sign in to comment.