django-lti-provider
django-lti-provider copied to clipboard
Example of passing grade back
Are there any examples of best practice for passing back a grade to the consumer?
Is there a standard approach to handling grading logic in our own app-specific views and then redirecting the result with score post variable to /grade?
The approach outlined in django-lti-provider-example looks something like this
<form action="{% url 'lti-post-grade' %}" method="post">
{% csrf_token %}
<input type="input" name="score" value=".55"/>
<input type="hidden" name="next" value="{% url 'main:assignment-success' %}"/>
<input type="submit" value="submit"/>
</form>
but that approach wouldn't allow for app-specific logic before determining a grade.
(When I do try this basic approach, the oauth2 library complains that "Base URL for request is not set." and causes a 500 error. I've traced that down to the fact that a normalized_url isn't set in Oauth when the request to the consumer goes out...I'm wondering if that means I haven't configured my producer right? I have set my LTI_TOOL_CONFIGURATION per the example...)
Any thoughts are much appreciated!