Merge pull request #1338 from MITx/fix/cdodge/remove-hide-progress-tab

Fix/cdodge/remove hide progress tab
This commit is contained in:
Christina Roberts
2013-01-23 12:20:54 -08:00
2 changed files with 10 additions and 3 deletions

View File

@@ -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'])

View File

@@ -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 -