feat: improve assessment creation and edition
This commit is contained in:
17
forms.py
17
forms.py
@@ -33,18 +33,5 @@ class StudentForm(FlaskForm):
|
||||
super(StudentForm, self).__init__(*args, **kwargs)
|
||||
self.class_group_id.choices = [(cg.id, cg.name) for cg in ClassGroup.query.order_by(ClassGroup.name).all()]
|
||||
|
||||
class ExerciseForm(FlaskForm):
|
||||
title = StringField('Titre', validators=[DataRequired(), Length(max=200)])
|
||||
description = TextAreaField('Description', validators=[Optional()])
|
||||
order = IntegerField('Ordre', validators=[DataRequired(), NumberRange(min=1)], default=1)
|
||||
submit = SubmitField('Enregistrer')
|
||||
|
||||
class GradingElementForm(FlaskForm):
|
||||
label = StringField('Libellé', validators=[DataRequired(), Length(max=200)])
|
||||
description = TextAreaField('Description', validators=[Optional()])
|
||||
skill = StringField('Compétence', validators=[Optional(), Length(max=200)])
|
||||
max_points = FloatField('Barème (points max)', validators=[DataRequired(), NumberRange(min=0.1)], default=1.0)
|
||||
grading_type = SelectField('Type de notation', validators=[DataRequired()],
|
||||
choices=[('points', 'Points (ex: 2.5/4)'), ('score', 'Score (0, 1, 2, 3, .)')],
|
||||
default='points')
|
||||
submit = SubmitField('Enregistrer')
|
||||
# Formulaires ExerciseForm et GradingElementForm supprimés
|
||||
# Ces éléments sont maintenant gérés via le formulaire unifié AssessmentForm
|
||||
Reference in New Issue
Block a user