wip: Remove old model
This commit is contained in:
parent
fa76989bbf
commit
d1166ed507
|
|
@ -10,7 +10,6 @@ from vbv_lernwelt.learnpath.models import (
|
||||||
LearningContentAttendanceCourse,
|
LearningContentAttendanceCourse,
|
||||||
LearningContentDocumentList,
|
LearningContentDocumentList,
|
||||||
LearningContentEdoniqTest,
|
LearningContentEdoniqTest,
|
||||||
LearningContentFeedback,
|
|
||||||
LearningContentFeedbackUK,
|
LearningContentFeedbackUK,
|
||||||
LearningContentFeedbackVV,
|
LearningContentFeedbackVV,
|
||||||
LearningContentKnowledgeAssessment,
|
LearningContentKnowledgeAssessment,
|
||||||
|
|
@ -51,8 +50,6 @@ class LearningContentInterface(CoursePageInterface):
|
||||||
return LearningContentAssignmentObjectType
|
return LearningContentAssignmentObjectType
|
||||||
elif isinstance(instance, LearningContentAttendanceCourse):
|
elif isinstance(instance, LearningContentAttendanceCourse):
|
||||||
return LearningContentAttendanceCourseObjectType
|
return LearningContentAttendanceCourseObjectType
|
||||||
elif isinstance(instance, LearningContentFeedback):
|
|
||||||
return LearningContentFeedbackUKObjectType
|
|
||||||
elif isinstance(instance, LearningContentFeedbackUK):
|
elif isinstance(instance, LearningContentFeedbackUK):
|
||||||
return LearningContentFeedbackUKObjectType
|
return LearningContentFeedbackUKObjectType
|
||||||
elif isinstance(instance, LearningContentFeedbackVV):
|
elif isinstance(instance, LearningContentFeedbackVV):
|
||||||
|
|
@ -250,7 +247,7 @@ class LearningUnitObjectType(DjangoObjectType):
|
||||||
if hasattr(info.context, "circle_descendants"):
|
if hasattr(info.context, "circle_descendants"):
|
||||||
circle_descendants = info.context.circle_descendants
|
circle_descendants = info.context.circle_descendants
|
||||||
index = circle_descendants.index(self)
|
index = circle_descendants.index(self)
|
||||||
siblings = circle_descendants[index + 1 :]
|
siblings = circle_descendants[index + 1:]
|
||||||
|
|
||||||
if not siblings:
|
if not siblings:
|
||||||
siblings = self.get_siblings().live().specific()
|
siblings = self.get_siblings().live().specific()
|
||||||
|
|
@ -283,7 +280,7 @@ class LearningSequenceObjectType(DjangoObjectType):
|
||||||
if hasattr(info.context, "circle_descendants"):
|
if hasattr(info.context, "circle_descendants"):
|
||||||
circle_descendants = info.context.circle_descendants
|
circle_descendants = info.context.circle_descendants
|
||||||
index = circle_descendants.index(root)
|
index = circle_descendants.index(root)
|
||||||
siblings = circle_descendants[index + 1 :]
|
siblings = circle_descendants[index + 1:]
|
||||||
|
|
||||||
if not siblings:
|
if not siblings:
|
||||||
siblings = root.get_siblings().live().specific()
|
siblings = root.get_siblings().live().specific()
|
||||||
|
|
@ -317,7 +314,7 @@ class CircleObjectType(DjangoObjectType):
|
||||||
if hasattr(info.context, "learning_path_descendants"):
|
if hasattr(info.context, "learning_path_descendants"):
|
||||||
children = info.context.learning_path_descendants
|
children = info.context.learning_path_descendants
|
||||||
circle_start_index = children.index(self)
|
circle_start_index = children.index(self)
|
||||||
next_children = children[circle_start_index + 1 :]
|
next_children = children[circle_start_index + 1:]
|
||||||
next_circle_index = find_first_index(
|
next_circle_index = find_first_index(
|
||||||
next_children,
|
next_children,
|
||||||
pred=lambda child: child.specific_class == Circle,
|
pred=lambda child: child.specific_class == Circle,
|
||||||
|
|
@ -356,7 +353,7 @@ class TopicObjectType(DjangoObjectType):
|
||||||
if hasattr(info.context, "learning_path_descendants"):
|
if hasattr(info.context, "learning_path_descendants"):
|
||||||
learning_path_descendants = info.context.learning_path_descendants
|
learning_path_descendants = info.context.learning_path_descendants
|
||||||
index = learning_path_descendants.index(root)
|
index = learning_path_descendants.index(root)
|
||||||
siblings = learning_path_descendants[index + 1 :]
|
siblings = learning_path_descendants[index + 1:]
|
||||||
|
|
||||||
if not siblings:
|
if not siblings:
|
||||||
siblings = root.get_next_siblings().live().specific()
|
siblings = root.get_next_siblings().live().specific()
|
||||||
|
|
|
||||||
|
|
@ -319,12 +319,6 @@ class LearningContentPlaceholder(LearningContent):
|
||||||
can_user_self_toggle_course_completion = models.BooleanField(default=True)
|
can_user_self_toggle_course_completion = models.BooleanField(default=True)
|
||||||
|
|
||||||
|
|
||||||
class LearningContentFeedback(LearningContent):
|
|
||||||
parent_page_types = ["learnpath.Circle"]
|
|
||||||
subpage_types = []
|
|
||||||
can_user_self_toggle_course_completion = models.BooleanField(default=False)
|
|
||||||
|
|
||||||
|
|
||||||
class LearningContentFeedbackUK(LearningContent):
|
class LearningContentFeedbackUK(LearningContent):
|
||||||
parent_page_types = ["learnpath.Circle"]
|
parent_page_types = ["learnpath.Circle"]
|
||||||
subpage_types = []
|
subpage_types = []
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue