Skip to content
Snippets Groups Projects
Commit 5fa44123 authored by Don Mitchell's avatar Don Mitchell
Browse files

Allow 'course' as course's id keyword

parent 9cf318ce
No related merge requests found
......@@ -46,7 +46,8 @@ class CourseFactory(XModuleFactory):
# passed in via **kwargs. However, some of those aren't actual field values,
# so pop those off for use separately
org = kwargs.pop('org', None)
number = kwargs.pop('number', kwargs.pop('course', None))
# because the factory provides a default 'number' arg, prefer the non-defaulted 'course' arg if any
number = kwargs.pop('course', kwargs.pop('number', None))
store = kwargs.pop('modulestore')
location = Location('i4x', org, number, 'course', Location.clean(kwargs.get('display_name')))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment