Exemplo n.º 1
0
    def create_grading(self, grade: int, participation_id: int):
        grading = Grading()
        grading.set_grade(grade)
        grading.set_participation_id(participation_id)

        with GradingMapper() as mapper:
            mapper.insert(grading)
Exemplo n.º 2
0
    def create_grading_for_participation(self, participation):
        """Eine Bewertung anlegen"""

        grading = Grading()
        grading.set_id(participation.get_id)
        grading.set_id(1)

        with GradingMapper() as mapper:
            return mapper.insert(grading)
Exemplo n.º 3
0
 def get_grading_by_participation_id(self, participation):
     """Die Bewertung von einer Teilnahme auslesen"""
     with GradingMapper() as mapper:
         return mapper.get_grading_by_participation(participation)
Exemplo n.º 4
0
 def get_all_gradings(self):
     """Alle Bewertungen ausgeben"""
     with GradingMapper() as mapper:
         return mapper.find_all()
Exemplo n.º 5
0
 def get_grading_by_id(self, id):
     """Eine Bewertung anhand ihrer ID auslesen"""
     with GradingMapper() as mapper:
         return mapper.find_by_id(id)
Exemplo n.º 6
0
 def delete_grading(self, grading):
     """Eine Bewertung löschen"""
     with GradingMapper() as mapper:
         mapper.delete(grading)
Exemplo n.º 7
0
 def save_grading(self, grading):
     """Eine Bewertung speichern"""
     with GradingMapper() as mapper:
         mapper.update(grading)