Update course factory to reflect XBlock changes

This commit is contained in:
Jay Zoldak
2013-03-12 14:04:56 -04:00
parent c0b6c01fd1
commit f9f0bd0deb

View File

@@ -84,7 +84,6 @@ class XModuleCourseFactory(Factory):
if display_name is not None:
new_course.display_name = display_name
new_course.data_dir = uuid4().hex
new_course.lms.start = gmtime()
new_course.tabs = [{"type": "courseware"},
{"type": "course_info", "name": "Course Info"},
@@ -140,14 +139,11 @@ class XModuleItemFactory(Factory):
new_item = store.clone_item(template, dest_location)
# TODO: This needs to be deleted when we have proper storage for static content
new_item.data_dir = parent.data_dir
# replace the display name with an optional parameter passed in from the caller
if display_name is not None:
new_item.display_name = display_name
store.update_metadata(new_item.location.url(), new_item.own_metadata)
store.update_metadata(new_item.location.url(), own_metadata(new_item))
if new_item.location.category not in DETACHED_CATEGORIES:
store.update_children(parent_location, parent.children + [new_item.location.url()])