Add method to find courses that contain a particular module location

This commit is contained in:
Calen Pennington
2012-09-25 09:23:07 -04:00
parent 2223d2007b
commit 335b4bb04b
2 changed files with 17 additions and 2 deletions

View File

@@ -110,7 +110,7 @@ def edit_item(request):
lms_link = "{lms_base}/courses/{course_id}/jump_to/{location}".format(
lms_base=settings.LMS_BASE,
# TODO: These will need to be changed to point to the particular instance of this problem in the particular course
course_id=[course.id for course in modulestore().get_courses() if course.location.org == item.location.org and course.location.course == item.location.course][0],
course_id=modulestore().get_containing_courses()[0].id,
location=item.location,
)
else: