2023-01-14 17:38:03 +01:00
|
|
|
from marshmallow import Schema, fields, validate
|
2022-12-15 20:44:03 +01:00
|
|
|
|
|
|
|
POINTS = [0, 1, 3, 4]
|
2022-06-12 22:20:10 +02:00
|
|
|
|
|
|
|
|
2023-01-14 17:38:03 +01:00
|
|
|
class ProjectSupervisorWithAvailableGroupsSchema(Schema):
|
2022-06-12 22:20:10 +02:00
|
|
|
first_name = fields.Str()
|
|
|
|
last_name = fields.Str()
|
2022-06-13 18:27:30 +02:00
|
|
|
email = fields.Str()
|
2022-06-12 22:20:10 +02:00
|
|
|
available_groups = fields.Integer()
|
|
|
|
|
|
|
|
|
2022-10-27 16:59:12 +02:00
|
|
|
class ProjectSupervisorPaginationSchema(Schema):
|
2023-01-14 17:38:03 +01:00
|
|
|
project_supervisors = fields.List(
|
|
|
|
fields.Nested(ProjectSupervisorWithAvailableGroupsSchema)
|
|
|
|
)
|
2022-06-12 22:20:10 +02:00
|
|
|
max_pages = fields.Integer()
|
|
|
|
|
|
|
|
|
2022-10-27 16:59:12 +02:00
|
|
|
class ProjectSupervisorQuerySchema(Schema):
|
2022-06-12 22:20:10 +02:00
|
|
|
page = fields.Integer()
|
|
|
|
per_page = fields.Integer()
|
2022-10-27 16:59:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
class TemporaryStudentSchema(Schema):
|
2023-01-14 17:38:03 +01:00
|
|
|
student_id = fields.Integer(required=True)
|
2022-10-27 16:59:12 +02:00
|
|
|
|
|
|
|
|
2023-01-14 17:38:03 +01:00
|
|
|
class ExaminationScheduleStudentSchema(Schema):
|
2022-11-12 16:18:07 +01:00
|
|
|
id = fields.Integer()
|
|
|
|
title = fields.Str()
|
|
|
|
start_date = fields.DateTime()
|
|
|
|
end_date = fields.DateTime()
|
2023-01-14 17:38:03 +01:00
|
|
|
open_enrollments = fields.Boolean()
|
2022-11-12 16:18:07 +01:00
|
|
|
|
|
|
|
|
|
|
|
class ExaminationScheduleListSchema(Schema):
|
2023-01-14 17:38:03 +01:00
|
|
|
examination_schedules = fields.List(fields.Nested(ExaminationScheduleStudentSchema))
|
2022-11-16 20:42:40 +01:00
|
|
|
|
|
|
|
|
2022-11-17 10:21:36 +01:00
|
|
|
class ProjectSupervisorCommitteeSchema(Schema):
|
|
|
|
id = fields.Integer()
|
|
|
|
first_name = fields.Str()
|
|
|
|
last_name = fields.Str()
|
|
|
|
|
|
|
|
|
2022-11-16 20:42:40 +01:00
|
|
|
class TermOfDefenceStudentItemSchema(Schema):
|
|
|
|
id = fields.Integer()
|
|
|
|
start_date = fields.DateTime()
|
|
|
|
end_date = fields.DateTime()
|
2022-11-17 10:21:36 +01:00
|
|
|
members_of_committee = fields.List(fields.Nested(ProjectSupervisorCommitteeSchema))
|
2022-11-16 20:42:40 +01:00
|
|
|
|
2023-01-14 01:37:31 +01:00
|
|
|
|
2023-01-13 04:08:34 +01:00
|
|
|
class StudentDataItemSchema(Schema):
|
|
|
|
index = fields.Integer()
|
|
|
|
first_name = fields.Str()
|
2023-01-14 01:37:31 +01:00
|
|
|
last_name = fields.Str()
|
|
|
|
|
2023-01-13 04:08:34 +01:00
|
|
|
|
|
|
|
class GroupDataItemSchema(Schema):
|
|
|
|
name = fields.Str()
|
2023-01-14 01:37:31 +01:00
|
|
|
students = fields.List(fields.Nested(StudentDataItemSchema))
|
|
|
|
|
2023-01-13 04:08:34 +01:00
|
|
|
|
|
|
|
class AssignedGroupToTermOfDefenceItemSchema(TermOfDefenceStudentItemSchema):
|
|
|
|
group = fields.Nested(GroupDataItemSchema)
|
2022-11-16 20:42:40 +01:00
|
|
|
|
2023-01-14 01:37:31 +01:00
|
|
|
|
2022-11-16 20:42:40 +01:00
|
|
|
class TermOfDefenceStudentListSchema(Schema):
|
2023-01-14 17:38:03 +01:00
|
|
|
term_of_defences = fields.List(
|
|
|
|
fields.Nested(AssignedGroupToTermOfDefenceItemSchema)
|
|
|
|
)
|
2022-11-16 20:42:40 +01:00
|
|
|
|
|
|
|
|
2022-12-15 20:44:03 +01:00
|
|
|
class StudentIndexQueryTempSchema(Schema):
|
2023-01-14 17:38:03 +01:00
|
|
|
student_id = fields.Integer(required=True) # it will be removed
|
2022-12-15 20:44:03 +01:00
|
|
|
term = fields.Integer(required=True, validate=validate.OneOf([1, 2]))
|
|
|
|
|
|
|
|
|
|
|
|
class ProjectGradeSheetEditFirstTermSchema(Schema):
|
|
|
|
presentation_required_content_1 = fields.Integer(validate=validate.OneOf(POINTS))
|
|
|
|
presentation_was_compatible_1 = fields.Integer(validate=validate.OneOf(POINTS))
|
|
|
|
presentation_showing_1 = fields.Integer(validate=validate.OneOf(POINTS))
|
2023-01-14 17:38:03 +01:00
|
|
|
presentation_answers_to_questions_from_committee_1 = fields.Integer(
|
|
|
|
validate=validate.OneOf(POINTS)
|
|
|
|
)
|
2022-12-15 20:44:03 +01:00
|
|
|
|
|
|
|
documentation_project_vision_1 = fields.Integer(validate=validate.OneOf(POINTS))
|
|
|
|
documentation_requirements_1 = fields.Integer(validate=validate.OneOf(POINTS))
|
|
|
|
documentation_for_clients_1 = fields.Integer(validate=validate.OneOf(POINTS))
|
|
|
|
documentation_for_developers_1 = fields.Integer(validate=validate.OneOf(POINTS))
|
|
|
|
documentation_license_1 = fields.Integer(validate=validate.OneOf(POINTS))
|
|
|
|
|
|
|
|
group_work_regularity_1 = fields.Integer(validate=validate.OneOf(POINTS))
|
|
|
|
group_work_division_of_work_1 = fields.Integer(validate=validate.OneOf(POINTS))
|
|
|
|
group_work_contact_with_client_1 = fields.Integer(validate=validate.OneOf(POINTS))
|
|
|
|
group_work_management_of_risk_1 = fields.Integer(validate=validate.OneOf(POINTS))
|
|
|
|
group_work_work_methodology_1 = fields.Integer(validate=validate.OneOf(POINTS))
|
2023-01-14 17:38:03 +01:00
|
|
|
group_work_management_of_source_code_1 = fields.Integer(
|
|
|
|
validate=validate.OneOf(POINTS)
|
|
|
|
)
|
2022-12-15 20:44:03 +01:00
|
|
|
group_work_devops_1 = fields.Integer(validate=validate.OneOf(POINTS))
|
|
|
|
|
2023-01-14 17:38:03 +01:00
|
|
|
products_project_complexity_of_product_1 = fields.Integer(
|
|
|
|
validate=validate.OneOf(POINTS)
|
|
|
|
)
|
|
|
|
products_project_access_to_application_1 = fields.Integer(
|
|
|
|
validate=validate.OneOf(POINTS)
|
|
|
|
)
|
2022-12-15 20:44:03 +01:00
|
|
|
products_project_security_issues_1 = fields.Integer(validate=validate.OneOf(POINTS))
|
2023-01-14 17:38:03 +01:00
|
|
|
products_project_access_to_test_application_1 = fields.Integer(
|
|
|
|
validate=validate.OneOf(POINTS)
|
|
|
|
)
|
|
|
|
products_project_acceptance_criteria_1 = fields.Integer(
|
|
|
|
validate=validate.OneOf(POINTS)
|
|
|
|
)
|
|
|
|
products_project_expected_functionality_1 = fields.Integer(
|
|
|
|
validate=validate.OneOf(POINTS)
|
|
|
|
)
|
2022-12-15 20:44:03 +01:00
|
|
|
products_project_promises_well_1 = fields.Integer(validate=validate.OneOf(POINTS))
|
2023-01-14 17:38:03 +01:00
|
|
|
products_project_has_been_implemented_1 = fields.Integer(
|
|
|
|
validate=validate.OneOf(POINTS)
|
|
|
|
)
|
2022-12-15 20:44:03 +01:00
|
|
|
products_project_is_useful_1 = fields.Integer(validate=validate.OneOf(POINTS))
|
|
|
|
products_project_prototype_1 = fields.Integer(validate=validate.OneOf(POINTS))
|
|
|
|
products_project_tests_1 = fields.Integer(validate=validate.OneOf(POINTS))
|
|
|
|
products_project_technology_1 = fields.Integer(validate=validate.OneOf(POINTS))
|
|
|
|
|
|
|
|
|
|
|
|
class ProjectGradeSheetDetailFirstTermSchema(ProjectGradeSheetEditFirstTermSchema):
|
|
|
|
id = fields.Integer()
|
|
|
|
|
|
|
|
|
|
|
|
class ProjectGradeSheetEditSecondTermSchema(Schema):
|
|
|
|
presentation_required_content_2 = fields.Integer(validate=validate.OneOf(POINTS))
|
|
|
|
presentation_was_compatible_2 = fields.Integer(validate=validate.OneOf(POINTS))
|
|
|
|
presentation_showing_2 = fields.Integer(validate=validate.OneOf(POINTS))
|
2023-01-14 17:38:03 +01:00
|
|
|
presentation_answers_to_questions_from_committee_2 = fields.Integer(
|
|
|
|
validate=validate.OneOf(POINTS)
|
|
|
|
)
|
2022-12-15 20:44:03 +01:00
|
|
|
|
|
|
|
documentation_project_vision_2 = fields.Integer(validate=validate.OneOf(POINTS))
|
|
|
|
documentation_requirements_2 = fields.Integer(validate=validate.OneOf(POINTS))
|
|
|
|
documentation_for_clients_2 = fields.Integer(validate=validate.OneOf(POINTS))
|
|
|
|
documentation_for_developers_2 = fields.Integer(validate=validate.OneOf(POINTS))
|
|
|
|
documentation_license_2 = fields.Integer(validate=validate.OneOf(POINTS))
|
|
|
|
|
|
|
|
group_work_regularity_2 = fields.Integer(validate=validate.OneOf(POINTS))
|
|
|
|
group_work_division_of_work_2 = fields.Integer(validate=validate.OneOf(POINTS))
|
|
|
|
group_work_contact_with_client_2 = fields.Integer(validate=validate.OneOf(POINTS))
|
|
|
|
group_work_management_of_risk_2 = fields.Integer(validate=validate.OneOf(POINTS))
|
|
|
|
group_work_work_methodology_2 = fields.Integer(validate=validate.OneOf(POINTS))
|
2023-01-14 17:38:03 +01:00
|
|
|
group_work_management_of_source_code_2 = fields.Integer(
|
|
|
|
validate=validate.OneOf(POINTS)
|
|
|
|
)
|
2022-12-15 20:44:03 +01:00
|
|
|
group_work_devops_2 = fields.Integer(validate=validate.OneOf(POINTS))
|
|
|
|
|
2023-01-14 17:38:03 +01:00
|
|
|
products_project_complexity_of_product_2 = fields.Integer(
|
|
|
|
validate=validate.OneOf(POINTS)
|
|
|
|
)
|
|
|
|
products_project_access_to_application_2 = fields.Integer(
|
|
|
|
validate=validate.OneOf(POINTS)
|
|
|
|
)
|
2022-12-15 20:44:03 +01:00
|
|
|
products_project_security_issues_2 = fields.Integer(validate=validate.OneOf(POINTS))
|
2023-01-14 17:38:03 +01:00
|
|
|
products_project_access_to_test_application_2 = fields.Integer(
|
|
|
|
validate=validate.OneOf(POINTS)
|
|
|
|
)
|
|
|
|
products_project_acceptance_criteria_2 = fields.Integer(
|
|
|
|
validate=validate.OneOf(POINTS)
|
|
|
|
)
|
|
|
|
products_project_expected_functionality_2 = fields.Integer(
|
|
|
|
validate=validate.OneOf(POINTS)
|
|
|
|
)
|
2022-12-15 20:44:03 +01:00
|
|
|
products_project_promises_well_2 = fields.Integer(validate=validate.OneOf(POINTS))
|
2023-01-14 17:38:03 +01:00
|
|
|
products_project_has_been_implemented_2 = fields.Integer(
|
|
|
|
validate=validate.OneOf(POINTS)
|
|
|
|
)
|
2022-12-15 20:44:03 +01:00
|
|
|
products_project_is_useful_2 = fields.Integer(validate=validate.OneOf(POINTS))
|
|
|
|
products_project_prototype_2 = fields.Integer(validate=validate.OneOf(POINTS))
|
|
|
|
products_project_tests_2 = fields.Integer(validate=validate.OneOf(POINTS))
|
|
|
|
products_project_technology_2 = fields.Integer(validate=validate.OneOf(POINTS))
|
|
|
|
|
|
|
|
|
|
|
|
class ProjectGradeSheetDetailSecondTermSchema(ProjectGradeSheetEditSecondTermSchema):
|
|
|
|
id = fields.Integer()
|