Merge pull request #1658 from MITx/fix/zoldak/poll-merged-fix-factory

Update course factory to reflect XBlock changes
This commit is contained in:
Christina Roberts
2013-03-12 11:09:51 -07:00

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()])