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

added classes for image type questions #2348

Merged
merged 1 commit into from
Sep 14, 2023
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
6 changes: 4 additions & 2 deletions js/qsm-admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -2246,7 +2246,8 @@ var import_button;
question_id: answer['question_id'],
answerType: answer['answerType'],
form_type: qsmQuestionSettings.form_type,
quiz_system: qsmQuestionSettings.quiz_system
quiz_system: qsmQuestionSettings.quiz_system,
question_type: questionType,
};
if (answer['answerType'] == 'image') {
ansTemp = {
Expand All @@ -2258,7 +2259,8 @@ var import_button;
question_id: answer['question_id'],
answerType: answer['answerType'],
form_type: qsmQuestionSettings.form_type,
quiz_system: qsmQuestionSettings.quiz_system
quiz_system: qsmQuestionSettings.quiz_system,
question_type: questionType
};
}
jQuery(document).trigger('qsm_new_answer_template', [ansTemp, answer, questionType]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function qmn_horizontal_multiple_choice_display( $id, $question, $answers ) {
$size_style .= ' height:'.$image_height.'px !important;';
}
?>
<img alt="<?php echo esc_attr( $new_question_title ); ?>" src="<?php echo esc_url( trim( htmlspecialchars_decode( $answer[0], ENT_QUOTES ) ) ); ?>" style="<?php echo esc_attr( $size_style ); ?>" />
<img class="qsm-multiple-choice-horizontal-img" alt="<?php echo esc_attr( $new_question_title ); ?>" src="<?php echo esc_url( trim( htmlspecialchars_decode( $answer[0], ENT_QUOTES ) ) ); ?>" style="<?php echo esc_attr( $size_style ); ?>" />
<span class="qsm_image_caption">
<?php
$caption_text = trim( htmlspecialchars_decode( $answer[3], ENT_QUOTES ) );
Expand Down
2 changes: 1 addition & 1 deletion php/question-types/qsm-question-type-multiple-choice.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function qmn_multiple_choice_display( $id, $question, $answers ) {
$size_style .= ' height:'.$image_height.'px !important;';
}
?>
<img alt="<?php echo esc_attr( $new_question_title ); ?>" src="<?php echo esc_url( trim( htmlspecialchars_decode( $answer[0], ENT_QUOTES ) ) ); ?>" style="<?php echo esc_attr( $size_style ); ?>" />
<img class="qsm-multiple-choice-img" alt="<?php echo esc_attr( $new_question_title ); ?>" src="<?php echo esc_url( trim( htmlspecialchars_decode( $answer[0], ENT_QUOTES ) ) ); ?>" style="<?php echo esc_attr( $size_style ); ?>" />
<span class="qsm_image_caption">
<?php
$caption_text = trim( htmlspecialchars_decode($answer[3], ENT_QUOTES ) );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function qmn_horizontal_multiple_response_display( $id, $question, $answers ) {
$size_style .= ' height:'.$image_height.'px !important;';
}
?>
<img alt="<?php echo esc_attr( $new_question_title ); ?>" src="<?php echo esc_url( trim( htmlspecialchars_decode( $answer[0], ENT_QUOTES ) ) ); ?>" style="<?php echo esc_attr( $size_style ); ?>" />
<img class="qsm-multiple-response-horizontal-img" alt="<?php echo esc_attr( $new_question_title ); ?>" src="<?php echo esc_url( trim( htmlspecialchars_decode( $answer[0], ENT_QUOTES ) ) ); ?>" style="<?php echo esc_attr( $size_style ); ?>" />
<span class="qsm_image_caption">
<?php
$caption_text = trim( htmlspecialchars_decode( $answer[3], ENT_QUOTES ) );
Expand Down
2 changes: 1 addition & 1 deletion php/question-types/qsm-question-type-multiple-response.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function qmn_multiple_response_display( $id, $question, $answers ) {
$size_style .= ' height:'.$image_height.'px !important;';
}
?>
<img alt="<?php echo esc_attr( $new_question_title ); ?>" src="<?php echo esc_url( trim( htmlspecialchars_decode( $answer[0], ENT_QUOTES ) ) ); ?>" style="<?php echo esc_attr( $size_style ); ?>" />
<img class="qsm-multiple-response-img" alt="<?php echo esc_attr( $new_question_title ); ?>" src="<?php echo esc_url( trim( htmlspecialchars_decode( $answer[0], ENT_QUOTES ) ) ); ?>" style="<?php echo esc_attr( $size_style ); ?>" />
<span class="qsm_image_caption">
<?php
$caption_text = trim( htmlspecialchars_decode( $answer[3], ENT_QUOTES ) );
Expand Down
2 changes: 1 addition & 1 deletion php/question-types/qsm-question-type-polar.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function qmn_polar_display( $id, $question, $answers ) {
}
$left_image = $answers[0][0];
?>
<img alt="<?php echo esc_attr( $new_question_title ); ?>" src="<?php echo esc_url( trim( htmlspecialchars_decode( $left_image, ENT_QUOTES ) ) ); ?>" style="<?php echo esc_attr( $size_style ); ?>" />
<img class="qsm-polar-img" alt="<?php echo esc_attr( $new_question_title ); ?>" src="<?php echo esc_url( trim( htmlspecialchars_decode( $left_image, ENT_QUOTES ) ) ); ?>" style="<?php echo esc_attr( $size_style ); ?>" />
<span class="qsm_image_caption">
<?php
$caption_text = trim( htmlspecialchars_decode( $answers[0][3], ENT_QUOTES ) );
Expand Down