diff --git a/common/lib/xmodule/xmodule/js/src/sequence/display.coffee b/common/lib/xmodule/xmodule/js/src/sequence/display.coffee index d2fc831e35..74d063e474 100644 --- a/common/lib/xmodule/xmodule/js/src/sequence/display.coffee +++ b/common/lib/xmodule/xmodule/js/src/sequence/display.coffee @@ -4,7 +4,7 @@ class @Sequence @contents = @$('.seq_contents') @num_contents = @contents.length @id = @el.data('id') - @modx_url = @el.data('course_modx_root') + @ajaxUrl = @el.data('ajax-url') @initProgress() @bind() @render parseInt(@el.data('position')) @@ -84,7 +84,7 @@ class @Sequence if @position != new_position if @position != undefined @mark_visited @position - modx_full_url = @modx_url + '/' + @id + '/goto_position' + modx_full_url = '#{@ajaxUrl}/goto_position' $.postWithPrefix modx_full_url, position: new_position # On Sequence change, fire custom event "sequence:change" on element. diff --git a/common/lib/xmodule/xmodule/seq_module.py b/common/lib/xmodule/xmodule/seq_module.py index c0c9bfc1a0..291d7a1ea1 100644 --- a/common/lib/xmodule/xmodule/seq_module.py +++ b/common/lib/xmodule/xmodule/seq_module.py @@ -98,6 +98,7 @@ class SequenceModule(SequenceFields, XModule): 'item_id': self.id, 'position': self.position, 'tag': self.location.category, + 'ajax_url': self.system.ajax_url, } fragment.add_content(self.system.render_template('seq_module.html', params)) diff --git a/lms/templates/seq_module.html b/lms/templates/seq_module.html index 0e7fae62b3..4d1dea2258 100644 --- a/lms/templates/seq_module.html +++ b/lms/templates/seq_module.html @@ -1,6 +1,6 @@ <%! from django.utils.translation import ugettext as _ %> -
+