Skip to content

Commit

Permalink
Ajoute eslint et corrige quelques erreurs
Browse files Browse the repository at this point in the history
  • Loading branch information
etienneCharignon committed Jan 24, 2025
1 parent 57072e0 commit 01e4b4d
Show file tree
Hide file tree
Showing 3 changed files with 4,218 additions and 193 deletions.
8 changes: 4 additions & 4 deletions app/assets/javascripts/evaluation.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function reinitialiseFormulaire(evaluationId) {

function ouvreQcm(evaluationId, qcm, effectuee) {
fermeQcm(evaluationId);
bouton_actif = $(`#${evaluationId} .reponse-mise-en-action[data-reponse='${effectuee}']`);
let bouton_actif = $(`#${evaluationId} .reponse-mise-en-action[data-reponse='${effectuee}']`);
bouton_actif.addClass('bouton--actif');
bouton_actif.attr('aria-expanded', true);
$(`#${evaluationId} .carte-liste`).addClass('carte--deroulee');
Expand Down Expand Up @@ -83,11 +83,11 @@ function enregistreQualificationMiseEnAction(evaluationId, $bouton, { ignorer })

function nomQcm(miseEnActionEffectuee) {
return miseEnActionEffectuee ? 'remediation' : 'difficulte';
};
}

function reponseSelectionnee(evaluationId, qcm) {
return $(`#${evaluationId} .questions-${qcm} input[name=reponse_qcm]:checked`).val();
};
}

function miseEnActionEffectuee($bouton) {
return $bouton.closest('.qcm')[0].classList.contains('questions-remediation')
Expand All @@ -99,7 +99,7 @@ function ecouteBoutons(boutons, callback) {
const evaluationId = event.currentTarget.closest('.carte__conteneur').getAttribute('id')
callback(evaluationId, $(this));
});
};
}

document.addEventListener('DOMContentLoaded', () => {
ecouteBoutons($(".reponse-mise-en-action"), enregistreReponseMiseEnAction);
Expand Down
Loading

0 comments on commit 01e4b4d

Please sign in to comment.