From 9d5ac308b1635964cec980d150d1c0d0efa786fd Mon Sep 17 00:00:00 2001 From: Chris Dodge Date: Wed, 23 Jan 2013 15:11:41 -0500 Subject: [PATCH 1/2] remove flag to hide progress tab --- common/lib/xmodule/xmodule/modulestore/xml_importer.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/common/lib/xmodule/xmodule/modulestore/xml_importer.py b/common/lib/xmodule/xmodule/modulestore/xml_importer.py index ca5fd34a5e..fa45f92dfc 100644 --- a/common/lib/xmodule/xmodule/modulestore/xml_importer.py +++ b/common/lib/xmodule/xmodule/modulestore/xml_importer.py @@ -137,9 +137,6 @@ def import_from_xml(store, data_dir, course_dirs=None, module = remap_namespace(module, target_location_namespace) - # HACK: for now we don't support progress tabs. There's a special metadata configuration setting for this. - module.metadata['hide_progress_tab'] = True - # cdodge: more hacks (what else). Seems like we have a problem when importing a course (like 6.002) which # does not have any tabs defined in the policy file. The import goes fine and then displays fine in LMS, # but if someone tries to add a new tab in the CMS, then the LMS barfs because it expects that - From 9c3e727889e5b7a45def57f6909bcb1b77c92c95 Mon Sep 17 00:00:00 2001 From: Chris Dodge Date: Wed, 23 Jan 2013 15:14:36 -0500 Subject: [PATCH 2/2] add unit test to assert that the flag is not set on course metadata --- cms/djangoapps/contentstore/tests/tests.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cms/djangoapps/contentstore/tests/tests.py b/cms/djangoapps/contentstore/tests/tests.py index 2597ac64fd..3025ee78a4 100644 --- a/cms/djangoapps/contentstore/tests/tests.py +++ b/cms/djangoapps/contentstore/tests/tests.py @@ -364,6 +364,16 @@ class ContentStoreTest(TestCase): effort = ms.get_item(Location(['i4x','edX','full','about','end_date', None])) self.assertEqual(effort.definition['data'],'TBD') + def test_remove_hide_progress_tab(self): + import_from_xml(modulestore(), 'common/test/data/', ['full']) + + ms = modulestore('direct') + cs = contentstore() + + source_location = CourseDescriptor.id_to_location('edX/full/6.002_Spring_2012') + course = ms.get_item(source_location) + self.assertNotIn('hide_progress_tab', course.metadata) + def test_clone_course(self): import_from_xml(modulestore(), 'common/test/data/', ['full'])