diff --git a/README.md b/README.md index d85cf36..86d55d3 100644 --- a/README.md +++ b/README.md @@ -51,13 +51,12 @@ This URL leads to the home page where you can login with this testing admin acco # To-Do: - Calculate final experiment and part mark -- Assistants space - Deactivate assistants account after a while if not assigned to experiments - Homepage text changeable - Email integration? - 2FA? - Students code for getting information and giving feedback -- Database scripts +- Statistics - Logging - Documentation with Sphinx - Production server configuration diff --git a/advlabdb/assistantModelViews.py b/advlabdb/assistantModelViews.py index d0f7050..7ee48c5 100644 --- a/advlabdb/assistantModelViews.py +++ b/advlabdb/assistantModelViews.py @@ -37,8 +37,20 @@ class AssistantAppointmentView(SecureAssistantModelView): can_edit = False column_display_actions = False - column_list = ["date", "special", "group_experiment"] - column_editable_list = ["date", "special"] + column_list = [ + "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): return and_( @@ -58,6 +70,36 @@ class AssistantExperimentMarkView(SecureAssistantModelView): can_edit = 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"] form_args = { "oral_mark": {"validators": [NumberRange(0, 15)]},