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

🔥 Ne réécrie pas la méthode update d'une question qcm #1764

Conversation

marouria
Copy link
Contributor

No description provided.

Comment on lines -51 to -71
def update
if @question.update(question_params)
redirect_to admin_question_qcm_path
else
render :edit, status: :unprocessable_entity
end
end

private

def question_params
params.require(:question_qcm).permit(
:categorie, :libelle, :nom_technique, :description,
:metacompetence, :type_qcm, :illustration, :supprimer_illustration,
:supprimer_audio_intitule,
:supprimer_audio_modalite_reponse,
:supprimer_audio_consigne,
choix_attributes: %i[id intitule audio type_choix _destroy nom_technique],
transcriptions_attributes: %i[id categorie ecrit audio _destroy]
)
end
Copy link
Contributor Author

@marouria marouria Nov 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

J'ai l'impression que ça ne sert à rien et c'est difficile à maintenir car il faut ne pas oublier de mettre à jour la liste des params. Dans ce cas précis ça ne mettait donc pas à jour le champs :demarrage_audio_modalite_reponse

On ne le fait pas pour les autres types de questions.

@marouria marouria merged commit 1ab9e05 into develop Nov 26, 2024
5 checks passed
@marouria marouria deleted the EVA-240-le-superadmin-peut-configurer-lordre-de-lecture-des-audios-2 branch November 26, 2024 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant