diff --git a/evap/evaluation/models.py b/evap/evaluation/models.py index ddb9248272981aba5649479cce1a8f6b9b9cca32..6029639ca5589e0822b65999fb37b0d1da1858ef 100644 --- a/evap/evaluation/models.py +++ b/evap/evaluation/models.py @@ -1184,7 +1184,7 @@ class Question(models.Model): Choices = NamedTuple( "Choices", [ - ("cssClass", str), + ("css_class", str), ("values", Tuple[Number]), ("colors", Tuple[str]), ("grades", Tuple[Number]), @@ -1194,7 +1194,7 @@ Choices = NamedTuple( BipolarChoices = NamedTuple( "BipolarChoices", [ - ("cssClass", str), + ("css_class", str), ("values", Tuple[Number]), ("colors", Tuple[str]), ("grades", Tuple[Number]), @@ -1207,21 +1207,21 @@ BipolarChoices = NamedTuple( NO_ANSWER = 6 BASE_UNIPOLAR_CHOICES = { - "cssClass": "vote-type-unipolar", + "css_class": "vote-type-unipolar", "values": (1, 2, 3, 4, 5, NO_ANSWER), "colors": ("green", "lime", "yellow", "orange", "red", "gray"), "grades": (1, 2, 3, 4, 5), } BASE_BIPOLAR_CHOICES = { - "cssClass": "vote-type-bipolar", + "css_class": "vote-type-bipolar", "values": (-3, -2, -1, 0, 1, 2, 3, NO_ANSWER), "colors": ("red", "orange", "lime", "green", "lime", "orange", "red", "gray"), "grades": (5, 11 / 3, 7 / 3, 1, 7 / 3, 11 / 3, 5), } BASE_YES_NO_CHOICES = { - "cssClass": "vote-type-yes-no", + "css_class": "vote-type-yes-no", "values": (1, 5, NO_ANSWER), "colors": ("green", "red", "gray"), "grades": (1, 5), diff --git a/evap/results/templates/distribution_with_grade.html b/evap/results/templates/distribution_with_grade.html index 221438c27b7c39bed7bfcad2e69ad1f6bc4072b2..9ae33a07406c54e42329bc829979b16164b31d69 100644 --- a/evap/results/templates/distribution_with_grade.html +++ b/evap/results/templates/distribution_with_grade.html @@ -2,7 +2,7 @@ {% load evaluation_filters %} <div class="distribution-bar-container{% if question_result.warning %} participants-warning{% endif %}"> - <div class="distribution-bar {{ question_result.choices.cssClass }}" + <div class="distribution-bar {{ question_result.choices.css_class }}" {% if question_result.question.is_bipolar_likert_question %} style="left: {{ question_result.minus_balance_count|percentage_one_decimal:question_result.count_sum }}"{% endif %} > {% with colors=question_result.choices|to_colors %} diff --git a/evap/student/templates/student_vote_questionnaire_group.html b/evap/student/templates/student_vote_questionnaire_group.html index d0726384d66692298b1f79cb297ee27a671f77df..0998bcdc8a5090579a5d5e3984af6a915d3d2bdf 100644 --- a/evap/student/templates/student_vote_questionnaire_group.html +++ b/evap/student/templates/student_vote_questionnaire_group.html @@ -43,7 +43,7 @@ {% endif %} {% if field|is_choice_field %} <div class="col-answer col-lg-8 col-xl-7 my-auto d-flex"> - <div class="vote-inputs tab-row {{ field.field.widget.attrs.choices.cssClass }} btn-group" data-bs-toggle="buttons"> + <div class="vote-inputs tab-row {{ field.field.widget.attrs.choices.css_class }} btn-group" data-bs-toggle="buttons"> {% for choice, color in field|zip:field.field.widget.attrs.choices.colors %} <input id="{{ choice.id_for_label }}" class="tab-selectable num-selectable btn-check" name="{{ choice.data.name }}" type="radio" value="{{ choice.data.value }}" autocomplete="off"{% if field.value == choice.data.value %} checked{% endif %}{% if preview %} disabled{% endif %}/> <label for="{{ choice.id_for_label }}" class="btn btn-sm vote-btn vote-btn-{{ color }} d-flex{% if field.value == choice.data.value %} active{% endif %}{% if field.errors %} choice-error{% endif %}">