1
0
Fork 0
mirror of https://codeberg.org/Mo8it/AdvLabDB.git synced 2024-09-19 18:31:16 +00:00

Improved columns in assistantSpace

This commit is contained in:
Mo 2021-08-01 00:41:21 +02:00
parent a50ad2f73f
commit 08c86bca0b
2 changed files with 45 additions and 4 deletions

View file

@ -51,13 +51,12 @@ This URL leads to the home page where you can login with this testing admin acco
# To-Do: # To-Do:
- Calculate final experiment and part mark - Calculate final experiment and part mark
- Assistants space
- Deactivate assistants account after a while if not assigned to experiments - Deactivate assistants account after a while if not assigned to experiments
- Homepage text changeable - Homepage text changeable
- Email integration? - Email integration?
- 2FA? - 2FA?
- Students code for getting information and giving feedback - Students code for getting information and giving feedback
- Database scripts - Statistics
- Logging - Logging
- Documentation with Sphinx - Documentation with Sphinx
- Production server configuration - Production server configuration

View file

@ -37,8 +37,20 @@ class AssistantAppointmentView(SecureAssistantModelView):
can_edit = False can_edit = False
column_display_actions = False column_display_actions = False
column_list = ["date", "special", "group_experiment"] column_list = [
column_editable_list = ["date", "special"] "date",
"special",
"group_experiment.semester_experiment.experiment",
"group_experiment.group",
"group_experiment.group.part_students",
]
column_labels = {
"group_experiment.semester_experiment.experiment": "Experiment",
"group_experiment.group": "Group",
"group_experiment.group.part_students": "Students",
}
column_editable_list = ["date"]
def queryFilter(self): def queryFilter(self):
return and_( return and_(
@ -58,6 +70,36 @@ class AssistantExperimentMarkView(SecureAssistantModelView):
can_edit = False can_edit = False
column_display_actions = False column_display_actions = False
column_list = [
"oral_mark",
"protocol_mark",
"group_experiment.semester_experiment.experiment",
"part_student.student.first_name",
"part_student.student.last_name",
"part_student.group",
"part_student.student.uni_email",
"part_student.student.contact_email",
"part_student.part",
"assistant",
"edited_by_admin",
]
column_labels = {
"group_experiment.semester_experiment.experiment": "Experiment",
"part_student.student.first_name": "First Name",
"part_student.student.last_name": "Last Name",
"part_student.group": "Group",
"part_student.student.uni_email": "Uni Email",
"part_student.student.contact_email": "Contact Email",
"part_student.part": "Part",
}
column_descriptions = {
"oral_mark": "Between 0 and 15",
"protocol_mark": "Between 0 and 15",
"part_student.student.contact_email": "The preferred contact email address if entered by the student",
"assistant": "The assistant who assigned the mark",
"edited_by_admin": "If the mark was edited by an admin",
}
column_editable_list = ["oral_mark", "protocol_mark"] column_editable_list = ["oral_mark", "protocol_mark"]
form_args = { form_args = {
"oral_mark": {"validators": [NumberRange(0, 15)]}, "oral_mark": {"validators": [NumberRange(0, 15)]},