mirror of
https://codeberg.org/Mo8it/AdvLabDB.git
synced 2024-12-20 23:41:20 +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):
|
class AssistantAppointmentView(SecureAssistantModelView):
|
||||||
|
can_edit = True
|
||||||
|
|
||||||
column_list = [
|
column_list = [
|
||||||
"date",
|
"date",
|
||||||
"special",
|
"special",
|
||||||
|
@ -51,6 +53,7 @@ class AssistantAppointmentView(SecureAssistantModelView):
|
||||||
column_editable_list = [
|
column_editable_list = [
|
||||||
"date",
|
"date",
|
||||||
]
|
]
|
||||||
|
form_columns = column_editable_list
|
||||||
|
|
||||||
def queryFilter(self):
|
def queryFilter(self):
|
||||||
return and_(
|
return and_(
|
||||||
|
@ -62,6 +65,8 @@ class AssistantAppointmentView(SecureAssistantModelView):
|
||||||
|
|
||||||
|
|
||||||
class AssistantExperimentMarkView(SecureAssistantModelView):
|
class AssistantExperimentMarkView(SecureAssistantModelView):
|
||||||
|
can_edit = True
|
||||||
|
|
||||||
column_list = [
|
column_list = [
|
||||||
"oral_mark",
|
"oral_mark",
|
||||||
"protocol_mark",
|
"protocol_mark",
|
||||||
|
@ -98,6 +103,8 @@ class AssistantExperimentMarkView(SecureAssistantModelView):
|
||||||
"oral_mark",
|
"oral_mark",
|
||||||
"protocol_mark",
|
"protocol_mark",
|
||||||
]
|
]
|
||||||
|
form_columns = column_editable_list
|
||||||
|
|
||||||
form_args = {
|
form_args = {
|
||||||
"oral_mark": {"validators": [NumberRange(0, 15)]},
|
"oral_mark": {"validators": [NumberRange(0, 15)]},
|
||||||
"protocol_mark": {"validators": [NumberRange(0, 15)]},
|
"protocol_mark": {"validators": [NumberRange(0, 15)]},
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
{{information(current_user, userActiveSemester, role="admin")}}
|
{{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)}}
|
{{missing_final_experiment_marks(number_of_missing_final_experiment_marks, number_of_all_experiment_marks)}}
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
{{information(current_user, userActiveSemester, role="assistant")}}
|
{{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)}}
|
{{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) %}
|
{% macro missing_final_experiment_marks(number_of_missing_final_experiment_marks, number_of_all_experiment_marks) %}
|
||||||
<p>
|
<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 }}
|
{{ number_of_missing_final_experiment_marks }} / {{ number_of_all_experiment_marks }}
|
||||||
</p>
|
</p>
|
||||||
{% endmacro %}
|
{% endmacro %}
|
Loading…
Reference in a new issue