diff --git a/server/vbv_lernwelt/learning_mentor/content/self_evaluation_feedback.py b/server/vbv_lernwelt/learning_mentor/content/self_evaluation_feedback.py index bcee4075..f434485a 100644 --- a/server/vbv_lernwelt/learning_mentor/content/self_evaluation_feedback.py +++ b/server/vbv_lernwelt/learning_mentor/content/self_evaluation_feedback.py @@ -1,5 +1,7 @@ from typing import List, Set, Tuple +import structlog + from vbv_lernwelt.core.models import User from vbv_lernwelt.course.models import Course from vbv_lernwelt.learning_mentor.entities import ( @@ -14,6 +16,8 @@ from vbv_lernwelt.learnpath.models import ( ) from vbv_lernwelt.self_evaluation_feedback.models import SelfEvaluationFeedback +logger = structlog.get_logger(__name__) + def create_blank_completions_non_requesters( completions: List[MentorAssignmentCompletion], @@ -21,11 +25,11 @@ def create_blank_completions_non_requesters( ) -> List[MentorAssignmentCompletion]: non_requester_completions = [] - participants_ids = set([str(p.id) for p in participants]) + participants_user_ids = set([str(p.id) for p in participants]) completion_seen_user_ids = set([str(c.user_id) for c in completions]) user_by_id = {str(p.id): p for p in participants} - for non_requester_user_id in participants_ids - completion_seen_user_ids: + for non_requester_user_id in participants_user_ids - completion_seen_user_ids: non_requester_user = user_by_id[non_requester_user_id] non_requester_completions.append( @@ -56,6 +60,11 @@ def get_self_feedback_evaluation( for learning_unit in LearningUnit.objects.filter( feedback_user=LearningUnitPerformanceFeedbackType.MENTOR_FEEDBACK.value, ): + logger.debug( + "Relevant learning unit found for mentor dashboard", + learning_unit=learning_unit.id, + ) + circle_page = learning_unit.get_parent() circle = circle_page.specific