From a5498bcbd7cda158342ed6a7a5629c875f1d767c Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Mon, 17 Mar 2014 10:45:14 -0400 Subject: [PATCH] Make progress page work with pure xblocks [LMS-2349] --- common/lib/xmodule/xmodule/x_module.py | 20 +++++++++---------- lms/djangoapps/courseware/tests/test_views.py | 1 - 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/common/lib/xmodule/xmodule/x_module.py b/common/lib/xmodule/xmodule/x_module.py index 8bbde279ad..38bb854152 100644 --- a/common/lib/xmodule/xmodule/x_module.py +++ b/common/lib/xmodule/xmodule/x_module.py @@ -301,6 +301,16 @@ class XModuleMixin(XBlockMixin): """ return self.icon_class + def has_dynamic_children(self): + """ + Returns True if this descriptor has dynamic children for a given + student when the module is created. + + Returns False if the children of this descriptor are the same + children that the module will return for any student. + """ + return False + # Functions used in the LMS def get_score(self): @@ -657,16 +667,6 @@ class XModuleDescriptor(XModuleMixin, HTMLSnippet, ResourceTemplates, XBlock): self.edited_by = self.edited_on = self.previous_version = self.update_version = self.definition_locator = None self.xmodule_runtime = None - def has_dynamic_children(self): - """ - Returns True if this descriptor has dynamic children for a given - student when the module is created. - - Returns False if the children of this descriptor are the same - children that the module will return for any student. - """ - return False - @classmethod def _translate(cls, key): 'VS[compat]' diff --git a/lms/djangoapps/courseware/tests/test_views.py b/lms/djangoapps/courseware/tests/test_views.py index fe71cc4e4b..f005074282 100644 --- a/lms/djangoapps/courseware/tests/test_views.py +++ b/lms/djangoapps/courseware/tests/test_views.py @@ -447,7 +447,6 @@ class ProgressPageTests(ModuleStoreTestCase): self.section = ItemFactory(category='sequential', parent_location=self.chapter.location) self.vertical = ItemFactory(category='vertical', parent_location=self.section.location) - @unittest.expectedFailure def test_pure_ungraded_xblock(self): ItemFactory(category='acid', parent_location=self.vertical.location)