Exemple #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)
Exemple #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)
Exemple #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)
Exemple #4
0
 def get_all_gradings(self):
     """Alle Bewertungen ausgeben"""
     with GradingMapper() as mapper:
         return mapper.find_all()
Exemple #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)
Exemple #6
0
 def delete_grading(self, grading):
     """Eine Bewertung löschen"""
     with GradingMapper() as mapper:
         mapper.delete(grading)
Exemple #7
0
 def save_grading(self, grading):
     """Eine Bewertung speichern"""
     with GradingMapper() as mapper:
         mapper.update(grading)