187 lines
7.4 KiB
Python
187 lines
7.4 KiB
Python
from marshmallow import Schema, fields, validate
|
|
|
|
POINTS = [0, 1, 3, 4]
|
|
|
|
|
|
class ProjectSupervisorWithAvailableGroupsSchema(Schema):
|
|
first_name = fields.Str()
|
|
last_name = fields.Str()
|
|
email = fields.Str()
|
|
available_groups = fields.Integer()
|
|
|
|
|
|
class ProjectSupervisorPaginationSchema(Schema):
|
|
project_supervisors = fields.List(
|
|
fields.Nested(ProjectSupervisorWithAvailableGroupsSchema)
|
|
)
|
|
max_pages = fields.Integer()
|
|
|
|
|
|
class ProjectSupervisorQuerySchema(Schema):
|
|
page = fields.Integer()
|
|
per_page = fields.Integer()
|
|
|
|
|
|
class TemporaryStudentSchema(Schema):
|
|
student_id = fields.Integer(required=True)
|
|
show_available = fields.Boolean(required=False)
|
|
|
|
|
|
class ExaminationScheduleStudentSchema(Schema):
|
|
id = fields.Integer()
|
|
title = fields.Str()
|
|
start_date = fields.DateTime()
|
|
end_date = fields.DateTime()
|
|
open_enrollments = fields.Boolean()
|
|
|
|
|
|
class ExaminationScheduleListSchema(Schema):
|
|
examination_schedules = fields.List(fields.Nested(ExaminationScheduleStudentSchema))
|
|
|
|
|
|
class ProjectSupervisorCommitteeSchema(Schema):
|
|
id = fields.Integer()
|
|
first_name = fields.Str()
|
|
last_name = fields.Str()
|
|
|
|
|
|
class TermOfDefenceStudentItemSchema(Schema):
|
|
id = fields.Integer()
|
|
start_date = fields.DateTime()
|
|
end_date = fields.DateTime()
|
|
members_of_committee = fields.List(fields.Nested(ProjectSupervisorCommitteeSchema))
|
|
|
|
|
|
class StudentDataItemSchema(Schema):
|
|
index = fields.Integer()
|
|
first_name = fields.Str()
|
|
last_name = fields.Str()
|
|
|
|
|
|
class GroupDataItemSchema(Schema):
|
|
name = fields.Str()
|
|
students = fields.List(fields.Nested(StudentDataItemSchema))
|
|
|
|
|
|
class AssignedGroupToTermOfDefenceItemSchema(TermOfDefenceStudentItemSchema):
|
|
group = fields.Nested(GroupDataItemSchema)
|
|
|
|
|
|
class TermOfDefenceStudentListSchema(Schema):
|
|
term_of_defences = fields.List(
|
|
fields.Nested(AssignedGroupToTermOfDefenceItemSchema)
|
|
)
|
|
|
|
|
|
class StudentIndexQueryTempSchema(Schema):
|
|
student_id = fields.Integer(required=True) # it will be removed
|
|
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))
|
|
presentation_answers_to_questions_from_committee_1 = fields.Integer(
|
|
validate=validate.OneOf(POINTS)
|
|
)
|
|
|
|
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))
|
|
group_work_management_of_source_code_1 = fields.Integer(
|
|
validate=validate.OneOf(POINTS)
|
|
)
|
|
group_work_devops_1 = fields.Integer(validate=validate.OneOf(POINTS))
|
|
|
|
products_project_complexity_of_product_1 = fields.Integer(
|
|
validate=validate.OneOf(POINTS)
|
|
)
|
|
products_project_access_to_application_1 = fields.Integer(
|
|
validate=validate.OneOf(POINTS)
|
|
)
|
|
products_project_security_issues_1 = fields.Integer(validate=validate.OneOf(POINTS))
|
|
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)
|
|
)
|
|
products_project_promises_well_1 = fields.Integer(validate=validate.OneOf(POINTS))
|
|
products_project_has_been_implemented_1 = fields.Integer(
|
|
validate=validate.OneOf(POINTS)
|
|
)
|
|
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))
|
|
presentation_answers_to_questions_from_committee_2 = fields.Integer(
|
|
validate=validate.OneOf(POINTS)
|
|
)
|
|
|
|
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))
|
|
group_work_management_of_source_code_2 = fields.Integer(
|
|
validate=validate.OneOf(POINTS)
|
|
)
|
|
group_work_devops_2 = fields.Integer(validate=validate.OneOf(POINTS))
|
|
|
|
products_project_complexity_of_product_2 = fields.Integer(
|
|
validate=validate.OneOf(POINTS)
|
|
)
|
|
products_project_access_to_application_2 = fields.Integer(
|
|
validate=validate.OneOf(POINTS)
|
|
)
|
|
products_project_security_issues_2 = fields.Integer(validate=validate.OneOf(POINTS))
|
|
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)
|
|
)
|
|
products_project_promises_well_2 = fields.Integer(validate=validate.OneOf(POINTS))
|
|
products_project_has_been_implemented_2 = fields.Integer(
|
|
validate=validate.OneOf(POINTS)
|
|
)
|
|
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()
|