chore: logs & naming
This commit is contained in:
parent
67188a5b73
commit
123adb7bf1
|
|
@ -1,5 +1,7 @@
|
||||||
from typing import List, Set, Tuple
|
from typing import List, Set, Tuple
|
||||||
|
|
||||||
|
import structlog
|
||||||
|
|
||||||
from vbv_lernwelt.core.models import User
|
from vbv_lernwelt.core.models import User
|
||||||
from vbv_lernwelt.course.models import Course
|
from vbv_lernwelt.course.models import Course
|
||||||
from vbv_lernwelt.learning_mentor.entities import (
|
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
|
from vbv_lernwelt.self_evaluation_feedback.models import SelfEvaluationFeedback
|
||||||
|
|
||||||
|
logger = structlog.get_logger(__name__)
|
||||||
|
|
||||||
|
|
||||||
def create_blank_completions_non_requesters(
|
def create_blank_completions_non_requesters(
|
||||||
completions: List[MentorAssignmentCompletion],
|
completions: List[MentorAssignmentCompletion],
|
||||||
|
|
@ -21,11 +25,11 @@ def create_blank_completions_non_requesters(
|
||||||
) -> List[MentorAssignmentCompletion]:
|
) -> List[MentorAssignmentCompletion]:
|
||||||
non_requester_completions = []
|
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])
|
completion_seen_user_ids = set([str(c.user_id) for c in completions])
|
||||||
|
|
||||||
user_by_id = {str(p.id): p for p in participants}
|
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_user = user_by_id[non_requester_user_id]
|
||||||
|
|
||||||
non_requester_completions.append(
|
non_requester_completions.append(
|
||||||
|
|
@ -56,6 +60,11 @@ def get_self_feedback_evaluation(
|
||||||
for learning_unit in LearningUnit.objects.filter(
|
for learning_unit in LearningUnit.objects.filter(
|
||||||
feedback_user=LearningUnitPerformanceFeedbackType.MENTOR_FEEDBACK.value,
|
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_page = learning_unit.get_parent()
|
||||||
circle = circle_page.specific
|
circle = circle_page.specific
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue