Add loc mapper fn from locn to CourseLocator

This commit is contained in:
Don Mitchell
2014-01-22 10:46:27 -05:00
parent 32e0021260
commit 9d6ed66e24
3 changed files with 41 additions and 2 deletions

View File

@@ -168,7 +168,7 @@ class CourseRole(GroupBasedRole):
else:
groupnames.append('{0}_{1}'.format(role, course_context))
try:
locator = loc_mapper().translate_location(course_context, self.location, True, True)
locator = loc_mapper().translate_location_to_course_locator(course_context, self.location)
groupnames.append('{0}_{1}'.format(role, locator.package_id))
except (InvalidLocationError, ItemNotFoundError):
# if it's never been mapped, the auth won't be via the Locator syntax