diff --git a/app/static/icons/warning_bloquant.svg b/app/static/icons/warning_bloquant.svg new file mode 100644 index 000000000..81b4416e3 --- /dev/null +++ b/app/static/icons/warning_bloquant.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/static/icons/warning_std.svg b/app/static/icons/warning_std.svg new file mode 100644 index 000000000..ae68b668e --- /dev/null +++ b/app/static/icons/warning_std.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/templates/formsemestre/bulletins_choice.j2 b/app/templates/formsemestre/bulletins_choice.j2 new file mode 100644 index 000000000..db38985b1 --- /dev/null +++ b/app/templates/formsemestre/bulletins_choice.j2 @@ -0,0 +1,50 @@ +{% extends "sco_page.j2" %} +{% import 'wtf.j2' as wtf %} + +{% block styles %} +{{super()}} + +{% endblock %} + +{% block scripts %} + {{super()}} + +{% endblock %} + + +{% block app_content %} +
+

{{ title }}

+ +

+ {{ explanation|safe }} +

+ +
+ + + +
+ Groupes d'étudiants à utiliser: {{menu_groups_choice|safe}} +
+ + {% if choose_mail %} +
+ + Utiliser si possible les adresses email personnelles +
+ {% endif %} +
+ +
+
+
+{% endblock %} diff --git a/migrations/versions/cddabc3f868a_evaluation_bloquee.py b/migrations/versions/cddabc3f868a_evaluation_bloquee.py new file mode 100644 index 000000000..567fd960e --- /dev/null +++ b/migrations/versions/cddabc3f868a_evaluation_bloquee.py @@ -0,0 +1,83 @@ +"""evaluation bloquee + +Revision ID: cddabc3f868a +Revises: 2e4875004e12 +Create Date: 2024-02-25 16:39:45.947342 + +""" + +from alembic import op +import sqlalchemy as sa +from sqlalchemy.orm import sessionmaker # added by ev + + +# revision identifiers, used by Alembic. +revision = "cddabc3f868a" +down_revision = "2e4875004e12" +branch_labels = None +depends_on = None + +Session = sessionmaker() + + +def upgrade(): + # ces champs étaient nullables + # Added by ev: remove duplicates + bind = op.get_bind() + session = Session(bind=bind) + session.execute( + sa.text( + """UPDATE notes_evaluation SET description='' WHERE description IS NULL;""" + ) + ) + session.execute( + sa.text("""UPDATE notes_evaluation SET note_max=20. WHERE note_max IS NULL;""") + ) + session.execute( + sa.text( + """UPDATE notes_evaluation SET coefficient=0. WHERE coefficient IS NULL;""" + ) + ) + # + with op.batch_alter_table("notes_evaluation", schema=None) as batch_op: + batch_op.add_column( + sa.Column("blocked_until", sa.DateTime(timezone=True), nullable=True) + ) + batch_op.alter_column("description", existing_type=sa.TEXT(), nullable=False) + batch_op.alter_column( + "note_max", existing_type=sa.DOUBLE_PRECISION(precision=53), nullable=False + ) + batch_op.alter_column( + "coefficient", + existing_type=sa.DOUBLE_PRECISION(precision=53), + nullable=False, + ) + + with op.batch_alter_table("notes_formsemestre", schema=None) as batch_op: + batch_op.add_column( + sa.Column( + "mode_calcul_moyennes", sa.Integer(), server_default="0", nullable=False + ) + ) + + # ### end Alembic commands ### + + +def downgrade(): + # ### commands auto generated by Alembic - please adjust! ### + with op.batch_alter_table("notes_formsemestre", schema=None) as batch_op: + batch_op.drop_column("mode_calcul_moyennes") + + with op.batch_alter_table("notes_evaluation", schema=None) as batch_op: + batch_op.alter_column( + "coefficient", + existing_type=sa.DOUBLE_PRECISION(precision=53), + nullable=True, + ) + batch_op.alter_column( + "note_max", existing_type=sa.DOUBLE_PRECISION(precision=53), nullable=True + ) + batch_op.alter_column("description", existing_type=sa.TEXT(), nullable=True) + batch_op.drop_column("blocked_until") + + # ### end Alembic commands ###