@ensure_csrf_cookie
@ensure_valid_course_key
def jump_to_id(request, course_id, module_id):
 course_key = SlashSeparatedCourseKey.from_deprecated_string(course_id)
 items = modulestore().get_items(course_key, qualifiers={'name': module_id})
 if (len(items) == 0):
  raise Http404(u'Could not find id: {0} in course_id: {1}. Referer: {2}'.format(module_id, course_id, request.META.get('HTTP_REFERER', '')))
 if (len(items) > 1):
  log.warning(u'Multiple items found with id: %s in course_id: %s. Referer: %s. Using first: %s', module_id, course_id, request.META.get('HTTP_REFERER', ''), items[0].location.to_deprecated_string())
 return jump_to(request, course_id, items[0].location.to_deprecated_string())

@ ensure_csrf_cookie @ ensure_valid_course_key def jump_to_id ( request , course_id , module_id ) : course_key = SlashSeparatedCourseKey . from_deprecated_string ( course_id ) items = modulestore ( ) . get_items ( course_key , qualifiers = { 'name' : module_id } ) if ( len ( items ) == 0 ) : raise Http404 ( u'Could not find id: {0} in course_id: {1}. Referer: {2}' . format ( module_id , course_id , request . META . get ( 'HTTP_REFERER' , '' ) ) ) if ( len ( items ) > 1 ) : log . warning ( u'Multiple items found with id: %s in course_id: %s. Referer: %s. Using first: %s' , module_id , course_id , request . META . get ( 'HTTP_REFERER' , '' ) , items [ 0 ] . location . to_deprecated_string ( ) ) return jump_to ( request , course_id , items [ 0 ] . location . to_deprecated_string ( ) )
this entry point allows for a shorter version of a jump to where just the id of the element is passed in .