Example #1
0
    def create_project(self, name: str, id, external_partners: str,
                       capacity: int, weekly_flag: bool,
                       bd_preferred_in_lecture_period: int,
                       bd_in_lecture_period: int, bd_in_exam_period: int,
                       bd_before_lecture_period: int, short_description: str,
                       special_room: str, project_type_id: int, module_id: int,
                       person_id: int, semester_id: int):
        """Ein Projekt anlegen"""

        project = Project()
        project.set_name(name)
        project.set_id(id)
        project.set_external_partners(external_partners)
        project.set_capacity(capacity)
        project.set_weekly_flag(weekly_flag)
        project.set_bd_preferred_in_lecture_period(
            bd_preferred_in_lecture_period)
        project.set_bd_in_lecture_period(bd_in_lecture_period)
        project.set_bd_in_exam_period(bd_in_exam_period)
        project.set_bd_before_lecture_period(bd_before_lecture_period)
        project.set_short_description(short_description)
        project.set_special_room(special_room)
        project.set_project_type_id(project_type_id)
        project.set_module_id(module_id)
        project.set_person_id(person_id)
        project.set_semester_id(semester_id)

        with ProjectMapper() as mapper:
            return mapper.insert(project)
Example #2
0
 def get_graded_projects_of_student(self, student_id):
     "Alle benoteten Projekte ienes bestimmten Studenten ausgeben"
     with ProjectMapper() as mapper:
         return mapper.get_graded_projects_of_student(student_id)
Example #3
0
 def get_registered_projects_of_student(self, student):
     """Alle Teilnahmen des Studenten auslesen"""
     with ProjectMapper() as mapper:
         return mapper.get_registered_projects_of_student(student)
Example #4
0
 def get_available_projects_for_student(self, student_id):
     """Alle Projekte, die genehmigt sind und noch nicht vom Student angemeldet"""
     with ProjectMapper() as mapper:
         return mapper.get_available_projects_for_student(student_id)
Example #5
0
 def save_project(self, project):
     """Ein Projekt speichern"""
     with ProjectMapper() as mapper:
         mapper.update(project)
Example #6
0
 def approve_project(self, project):
     """Ein Projekt genehmigen"""
     with ProjectMapper() as mapper:
         mapper.approve_project(project)
Example #7
0
 def add_semester_to_project(self, semester, project):
     """Ein Semester einem Projekt hinzufügen"""
     with ProjectMapper() as mapper:
         mapper.add_semester_to_project(semester, project)
Example #8
0
 def add_participation_list_to_project(self, participation, project):
     """Eine Teilnehmerliste einem Projekt hinzufügen"""
     with ProjectMapper() as mapper:
         mapper.add_participation_list_to_project(participation, project)
Example #9
0
 def get_project_type_of_project(self, project_id):
     """Den Projekttyp eines Projekts auslesen"""
     with ProjectMapper() as mapper:
         return mapper.get_project_type_of_project(project_id)
Example #10
0
 def get_projects_of_student(self, student):
     """Alle Projekte des gegebenen Student auslesen"""
     with ProjectMapper() as mapper:
         return mapper.find_by_id(student.get_id())
Example #11
0
 def get_projects_by_person(self, person_id):
     """Alle Projekte der gegebenen Person auslesen"""
     with ProjectMapper() as mapper:
         return mapper.get_projects_by_person(person_id)
Example #12
0
 def get_project_by_name(self, name):
     """Ein Projekt anhand seines Namens auslesen"""
     with ProjectMapper() as mapper:
         return mapper.find_by_name(name)
Example #13
0
 def get_all_projects(self):
     """Alle Projekte ausgeben"""
     with ProjectMapper() as mapper:
         return mapper.find_all()
Example #14
0
 def get_project_by_id(self, id):
     """Ein Projekt anhand seiner ID auslesen"""
     with ProjectMapper() as mapper:
         return mapper.find_by_id(id)
Example #15
0
 def delete_project(self, project):
     """Ein Projekt löschen"""
     with ProjectMapper() as mapper:
         mapper.delete(project)
Example #16
0
 def add_person_to_project(self, person, project):
     """Eine Person einem Projekt hinzufügen"""
     with ProjectMapper() as mapper:
         mapper.add_person_to_project(person, project)
Example #17
0
 def remove_person_from_project(self, person, project):
     """Eine Person von einem Projekt entfernen"""
     with ProjectMapper() as mapper:
         mapper.remove_person_from_project(person, project)
Example #18
0
 def get_module_of_project(self, project_id):
     """Das Modul eines Projekts auslesen"""
     with ProjectMapper() as mapper:
         return mapper.get_module_of_project(project_id)
Example #19
0
 def remove_participation_list_from_project(self, participation, project):
     """Eine Teilnehmerliste von einem Projekt entfernen"""
     with ProjectMapper() as mapper:
         mapper.remove_participation_list_from_project(
             participation, project)
Example #20
0
 def get_state_of_project(self, state_id):
     """Den Zustand eines Projekts auslesen"""
     with ProjectMapper() as mapper:
         return mapper.get_state_of_project(state_id)
Example #21
0
 def remove_semester_from_project(self, semester, project):
     """Ein Semester von einem Projekt entfernen"""
     with ProjectMapper() as mapper:
         mapper.remove_semester_from_project(semester, project)
Example #22
0
 def get_projects_by_state(self, current_state):
     """Alle Projekte eines bestimmten Zustands auslesen"""
     with ProjectMapper() as mapper:
         return mapper.get_projects_by_state(current_state)
Example #23
0
 def reject_project(self, project):
     """Ein Project ablehnen"""
     with ProjectMapper() as mapper:
         mapper.reject_project(project)
Example #24
0
 def get_projects_by_state_id(self):
     """Alle Projekte, die sich in einem bestimmten Zustand befinden, ausgeben"""
     with ProjectMapper() as mapper:
         return mapper.find_by_id(state.get_id())