Skip to content

Commit

Permalink
fixed sonar issue
Browse files Browse the repository at this point in the history
  • Loading branch information
zubairraeen committed Dec 13, 2024
1 parent a7f3569 commit dd191e9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
3 changes: 0 additions & 3 deletions js/qsm-admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -2249,7 +2249,6 @@ var import_button;
import_button.attr("onclick", "return confirm('" + qsm_admin_messages.confirm_message + " " + qsm_admin_messages.import_question_again + "');");
}
QSMQuestion.openEditPopup(model.id, $('.question[data-question-id=' + model.id + ']').find('.edit-question-button'));
// $('#save-popup-button').trigger('click');
},
addNewQuestion: function (model) {
var default_answers = parseInt(qsmQuestionSettings.default_answers);
Expand Down Expand Up @@ -2770,7 +2769,6 @@ var import_button;
}
CurrentElement.parents('.question').next('.questionElements').slideDown('slow');
$('#modal-1-content').html(questionElements);
//MicroModal.show( 'modal-1' );
$('.questions').sortable('disable');
$('.page').sortable('disable');

Expand Down Expand Up @@ -3786,7 +3784,6 @@ var import_button;
.fail(QSMAdmin.displayjQueryError);
},
loadResults: function () {
//QSMAdmin.displayAlert( 'Loading results pages...', 'info' );
$.ajax({
url: wpApiSettings.root + 'quiz-survey-master/v1/quizzes/' + qsmResultsObject.quizID + '/results',
headers: { 'X-WP-Nonce': qsmResultsObject.nonce },
Expand Down
14 changes: 7 additions & 7 deletions js/qsm-quiz.js
Original file line number Diff line number Diff line change
Expand Up @@ -1864,15 +1864,15 @@ jQuery(document).ready(function () {
let captchaElement = jQuery('#mlw_code_captcha');
if (captchaElement.length !== 0) {
mlw_code = '';
var mlw_chars = '0123456789ABCDEFGHIJKL!@#$%^&*()MNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz';
var mlw_code_length = 5;
for (var i = 0; i < mlw_code_length; i++) {
var rnum = Math.floor(Math.random() * mlw_chars.length);
let mlw_chars = '0123456789ABCDEFGHIJKL!@#$%^&*()MNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz';
let mlw_code_length = 5;
for (let i = 0; i < mlw_code_length; i++) {
let rnum = Math.floor(Math.random() * mlw_chars.length);
mlw_code += mlw_chars.substring(rnum, rnum + 1);
}
var captchaCanvas = document.getElementById('mlw_captcha');
var mlw_captchaCTX = captchaCanvas.getContext('2d');
var containerDirection = window.getComputedStyle(captchaCanvas).direction || 'ltr';
let captchaCanvas = document.getElementById('mlw_captcha');
let mlw_captchaCTX = captchaCanvas.getContext('2d');
let containerDirection = window.getComputedStyle(captchaCanvas).direction || 'ltr';
mlw_captchaCTX.font = 'normal 24px Verdana';
mlw_captchaCTX.strokeStyle = '#000000';
mlw_captchaCTX.clearRect(0, 0, captchaCanvas.width, captchaCanvas.height);
Expand Down

0 comments on commit dd191e9

Please sign in to comment.