Commit a84f66cd by David Baumgold

Pass asset upload URL to Javascript

parent ace8914a
......@@ -423,6 +423,12 @@ def textbook_index(request, org, course, name):
"""
location = get_location_and_verify_access(request, org, course, name)
course = modulestore().get_item(location, depth=3)
upload_asset_callback_url = reverse('upload_asset', kwargs={
'org': org,
'course': course,
'coursename': name
})
return render_to_response('textbooks.html', {
'context_course': course,
'upload_asset_callback_url': upload_asset_callback_url,
})
......@@ -43,6 +43,8 @@
<%block name="jsextra">
<script type="text/javascript">
window.UPLOAD_ASSET_CALLBACK_URL = "${upload_asset_callback_url}"
CMS.Models.Textbook = Backbone.Model.extend({
defaults: {
name: ""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment