Skip to content

Commit

Permalink
Merge pull request #103 from Harvard-ATG/use-reverse
Browse files Browse the repository at this point in the history
Use reverse
  • Loading branch information
Tylor Dodge authored Dec 5, 2019
2 parents 3a2d0c5 + 80b385e commit c8f54fa
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions hx_lti_initializer/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,9 @@ def launch_lti(request):
except:
logger.info("Not waiting to be added as admin")
logger.debug("DEBUG - User wants to go directly to annotations for a specific target object using UI")
return access_annotation_target(request, course_id, assignment_id, object_id)
url = reverse('hx_lti_initializer:access_annotation_target', args=[course_id,assignment_id,object_id])
url += '?resource_link_id=%s' % resource_link_id
return redirect(url)
except AnnotationTargetDoesNotExist as e:
logger.warning('Could not access annotation target using resource config.')
logger.info('Deleting resource config because it is invalid.')
Expand Down Expand Up @@ -246,7 +248,9 @@ def launch_lti(request):
return redirect(url)
else:
logger.debug("DEBUG - User wants to go directly to annotations for a specific target object")
return access_annotation_target(request, course_id, assignment_id, object_id)
url = reverse('hx_lti_initializer:access_annotation_target', args=[course_id,assignment_id,object_id])
url += '?resource_link_id=%s' % resource_link_id
return redirect(url)
except:
logger.debug("DEBUG - User wants the index")

Expand Down

0 comments on commit c8f54fa

Please sign in to comment.