diff --git a/mo/web/org_round.py b/mo/web/org_round.py index 5a12dbe9555119d6bb32d5e01613b8458a025295..dae1272baff51aca245f3dd797636ac4687feb97 100644 --- a/mo/web/org_round.py +++ b/mo/web/org_round.py @@ -284,6 +284,7 @@ class TaskEditForm(FlaskForm): validators.Regexp(r'^[A-Za-z0-9-]+$', message="Kód úlohy smí obsahovat jen nediakritická písmena, čísla a znak -"), ], render_kw={'autofocus': True}) name = wtforms.StringField('Název úlohy') + type = wtforms.SelectField('Typ úlohy', choices=db.TaskType.choices(), coerce=db.TaskType.coerce) max_points = mo_fields.Points( 'Maximum bodů', validators=[validators.Optional(), validators.NumberRange(min=0)], description="Při nastavení maxima nelze udělit více bodů, pro zrušení uložte prázdnou hodnotu", diff --git a/mo/web/templates/org_contest.html b/mo/web/templates/org_contest.html index 0042d9ede74b752ee18fabeee5c614b2f87fbf78..cbef413b21e0c2a0d2b81896cdd048a96295f9ed 100644 --- a/mo/web/templates/org_contest.html +++ b/mo/web/templates/org_contest.html @@ -119,8 +119,9 @@ <tr> <th>Kód <th>Název - <th>Odevzdaná řešení - <th>Maximum bodů + <th>Typ + <th>Odevzdáno + <th>Max. bodů <th>Jednotlivé akce <th>Dávkové operace </tr> @@ -129,6 +130,7 @@ <tr> <td>{{ task.code }} <td>{{ task.name }} + <td>{{ task.type.friendly_name() }} <td>{{ task.sol_count }} <td>{{ task.max_points|decimal|none_value('–') }} <td><div class="btn-group"> diff --git a/mo/web/templates/org_round.html b/mo/web/templates/org_round.html index ddb74769aa51ad4f7a30c0c211cac1615d08454b..6d8ed7d1a899c873b0b3ce889bc6acb1979a93e9 100644 --- a/mo/web/templates/org_round.html +++ b/mo/web/templates/org_round.html @@ -173,6 +173,7 @@ <tr> <th>Kód <th>Název + <th>Typ <th>Odevzdaná řešení <th>Maximum bodů {% if can_manage_round %}<th>Akce{% endif %} @@ -183,6 +184,7 @@ <tr> <td>{{ task.code }} <td>{{ task.name }} + <td>{{ task.type.friendly_name() }} <td>{{ sol_count }} <td>{{ task.max_points|decimal|none_value('–') }} {% if can_manage_round %}