Remove as_old_location methods
They were incorrect if there were periods in the org or name.
This commit is contained in:
@@ -37,9 +37,7 @@ def get_course_groupname_for_role(location, role):
|
||||
groupnames.append('{0}_{1}'.format(role, location.course))
|
||||
elif isinstance(location, CourseLocator):
|
||||
old_location = loc_mapper().translate_locator_to_location(location)
|
||||
if old_location is None:
|
||||
groupnames.append('{0}_{1}'.format(role, location.as_old_location_course_id))
|
||||
else:
|
||||
if old_location:
|
||||
groupnames.append('{0}_{1}'.format(role, old_location.course_id))
|
||||
|
||||
for groupname in groupnames:
|
||||
|
||||
@@ -131,9 +131,9 @@ def course_index(request, course_url):
|
||||
lms_link = get_lms_link_for_item(old_location)
|
||||
|
||||
upload_asset_callback_url = reverse('upload_asset', kwargs={
|
||||
'org': location.as_old_location_org,
|
||||
'course': location.as_old_location_course,
|
||||
'coursename': location.as_old_location_run
|
||||
'org': old_location.org,
|
||||
'course': old_location.course,
|
||||
'coursename': old_location.name
|
||||
})
|
||||
|
||||
course = modulestore().get_item(old_location, depth=3)
|
||||
|
||||
Reference in New Issue
Block a user