mirror of
https://codeberg.org/Mo8it/AdvLabDB.git
synced 2024-11-08 21:21:06 +00:00
Fix assistant's editing
This commit is contained in:
parent
d0a6090553
commit
f287a5325c
4 changed files with 12 additions and 3 deletions
|
@ -35,6 +35,8 @@ from advlabdb.utils import (
|
|||
|
||||
|
||||
class AssistantAppointmentView(SecureAssistantModelView):
|
||||
can_edit = True
|
||||
|
||||
column_list = [
|
||||
"date",
|
||||
"special",
|
||||
|
@ -51,6 +53,7 @@ class AssistantAppointmentView(SecureAssistantModelView):
|
|||
column_editable_list = [
|
||||
"date",
|
||||
]
|
||||
form_columns = column_editable_list
|
||||
|
||||
def queryFilter(self):
|
||||
return and_(
|
||||
|
@ -62,6 +65,8 @@ class AssistantAppointmentView(SecureAssistantModelView):
|
|||
|
||||
|
||||
class AssistantExperimentMarkView(SecureAssistantModelView):
|
||||
can_edit = True
|
||||
|
||||
column_list = [
|
||||
"oral_mark",
|
||||
"protocol_mark",
|
||||
|
@ -98,6 +103,8 @@ class AssistantExperimentMarkView(SecureAssistantModelView):
|
|||
"oral_mark",
|
||||
"protocol_mark",
|
||||
]
|
||||
form_columns = column_editable_list
|
||||
|
||||
form_args = {
|
||||
"oral_mark": {"validators": [NumberRange(0, 15)]},
|
||||
"protocol_mark": {"validators": [NumberRange(0, 15)]},
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
|
||||
{% block body %}
|
||||
{{information(current_user, userActiveSemester, role="admin")}}
|
||||
<h3>Welcome back, commander!</h3>
|
||||
|
||||
<hr>
|
||||
|
||||
{{missing_final_experiment_marks(number_of_missing_final_experiment_marks, number_of_all_experiment_marks)}}
|
||||
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
|
||||
{% block body %}
|
||||
{{information(current_user, userActiveSemester, role="assistant")}}
|
||||
<h3>Welcome back!</h3>
|
||||
|
||||
<hr>
|
||||
|
||||
{{missing_final_experiment_marks(number_of_missing_final_experiment_marks, number_of_all_experiment_marks)}}
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ User: <a href="{{ url_for('index') }}{{ role }}/user/details/?id={{ current_user
|
|||
|
||||
{% macro missing_final_experiment_marks(number_of_missing_final_experiment_marks, number_of_all_experiment_marks) %}
|
||||
<p>
|
||||
Number of missing final experiment marks:
|
||||
Number of <strong>missing</strong> final experiment marks:
|
||||
{{ number_of_missing_final_experiment_marks }} / {{ number_of_all_experiment_marks }}
|
||||
</p>
|
||||
{% endmacro %}
|
Loading…
Reference in a new issue