Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cu 86cu729j1 result page translation issue #2435

Merged
merged 2 commits into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion php/classes/class-qmn-quiz-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -907,6 +907,7 @@ public function display_quiz( $options, $quiz_data, $question_amount, $shortcode
'recaptcha_error_text' => __( 'ReCaptcha is missing', 'quiz-master-next' ),
);
$qmn_json_data = apply_filters( 'qsm_json_error_message', $qmn_json_data ,$options);
$quiz_time_over = __( 'Quiz time is over.', 'quiz-master-next' );
wp_enqueue_script( 'progress-bar', QSM_PLUGIN_JS_URL . '/progressbar.min.js', array(), '1.1.0', true );
wp_enqueue_script( 'jquery-ui-slider' );
wp_enqueue_script( 'jquery-ui-slider-rtl-js', QSM_PLUGIN_JS_URL . '/jquery.ui.slider-rtl.js', array(), $mlwQuizMasterNext->version, true );
Expand All @@ -924,7 +925,7 @@ public function display_quiz( $options, $quiz_data, $question_amount, $shortcode
'ajaxurl' => admin_url( 'admin-ajax.php' ),
'multicheckbox_limit_reach' => $mlwQuizMasterNext->pluginHelper->qsm_language_support( $options->quiz_limit_choice, "quiz_quiz_limit_choice-{$options->quiz_id}" ),
'out_of_text' => __( ' out of ', 'quiz-master-next' ),
'quiz_time_over' => __( 'Quiz time is over.', 'quiz-master-next' ),
'quiz_time_over' => esc_html($quiz_time_over),
'security' => wp_create_nonce( 'qsm_submit_quiz' ),
'start_date' => current_time( 'h:i:s A m/d/Y' ),
)
Expand Down
3 changes: 2 additions & 1 deletion php/shortcodes.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,12 +244,13 @@ function qsm_get_post_id_from_quiz_id( $quiz_id ) {
add_filter( 'qmn_end_shortcode', 'qsm_display_popup_div', 10, 3 );
function qsm_display_popup_div( $return_display, $qmn_quiz_options ) {
if ( '0' === $qmn_quiz_options->enable_result_after_timer_end && 0 < $qmn_quiz_options->timer_limit ) {
$time_up = __( 'Time is Up!', 'quiz-master-next' );
$return_display .= '<div style="display: none;" class="qsm-popup qsm-popup-slide" id="modal-3" aria-hidden="false">';
$return_display .= '<div class="qsm-popup__overlay" tabindex="-1" data-micromodal-close="">';
$return_display .= '<div class="qsm-popup__container qmn_quiz_container" role="dialog" aria-modal="true">';
$return_display .= '<div class="qsm-popup__content">';
$return_display .= '<img src="' . QSM_PLUGIN_URL . 'assets/clock.png' . '" alt="clock.png"/>';
$return_display .= '<p class="qsm-time-up-text">'. __( 'Time is Up!', 'quiz-master-next' ) .'</p>';
$return_display .= '<p class="qsm-time-up-text">'. esc_html($time_up) .'</p>';
$return_display .= '</div>';
$return_display .= '<footer class="qsm-popup__footer"><button class="qsm-popup-secondary-button qmn_btn" data-micromodal-close="" aria-label="Close this dialog window">'. __( 'Cancel', 'quiz-master-next' ).'</button><button data-quiz_id="' . $qmn_quiz_options->quiz_id . '" class="submit-the-form qmn_btn">'.__( 'Submit Quiz', 'quiz-master-next' ).'</button></footer>'; $return_display .= '</div>';
$return_display .= '</div>';
Expand Down
5 changes: 3 additions & 2 deletions php/template-variables.php
Original file line number Diff line number Diff line change
Expand Up @@ -1099,10 +1099,11 @@ function qsm_questions_answers_shortcode_to_text( $mlw_quiz_array, $qmn_question
if ( $do_show_wrong ) {
if ( 0 == $form_type && ( 0 == $quiz_system || 3 == $quiz_system ) ) {
$question_with_answer_text .= '<span class="qsm-text-wrong-option">' . $user_given_answer . '</span>';
foreach ( $total_answers as $single_answer ) {
foreach ( $total_answers as $single_answer_key => $single_answer ) {
$questionid = $questions[ $answer['id'] ]['question_id'];
$hide_correct_answer = $mlwQuizMasterNext->pluginHelper->get_section_setting( 'quiz_options', 'hide_correct_answer' );
if ( isset( $single_answer[2] ) && 1 == $single_answer[2] && 1 != $hide_correct_answer ) {
$question_with_answer_text .= '<span class="qsm-text-correct-option">' . $mlwQuizMasterNext->pluginHelper->qsm_language_support( $single_answer[0], 'answer-' . $single_answer[0], 'QSM Answers' ) . '</span>';
$question_with_answer_text .= '<span class="qsm-text-correct-option">' . $mlwQuizMasterNext->pluginHelper->qsm_language_support( $single_answer[0], 'answer-' . $questionid . '-' . $single_answer_key, 'QSM Answers' ) . '</span>';
break;
}
}
Expand Down
1 change: 1 addition & 0 deletions php/template-variables/qsm-tempvar-question-answers.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ function qsm_tempvar_qa_text_qt_choice( $total_answers, $answers_from_response,
$show_user_answer = $mlwQuizMasterNext->pluginHelper->qsm_language_support( htmlspecialchars_decode( $single_answer[0], ENT_QUOTES ), 'answer-' . $single_answer[0], 'QSM Answers' );
$show_user_answer = apply_filters( 'qsm_show_user_answer_before', $show_user_answer, $single_answer, $user_answer_array, $single_answer_key, $answers_from_response, $grading_system, $question_settings, $form_type );
$image_class = '';
$show_user_answer = $mlwQuizMasterNext->pluginHelper->qsm_language_support( $show_user_answer, 'answer-' . $answers_from_response['id'] . '-' . $single_answer_key, 'QSM Answers' );
}
$close_span = '</span>';
if ( 0 == $form_type && ( 0 === intval( $grading_system ) || 3 === intval( $grading_system ) ) ) {
Expand Down
Loading