fix submitting on assignment with # in url
added if statement to catch urls with lone #'s at the end when submitting assignments fixes CNVS-15812 Test Plan: -Navigate to a published file upload assignment as a student. -Submit the assignment with a file. -Notice it succeeds. -Add a #<any text here> to the end of the assignment url so it should look like this: /assignments/:id/#<your text here> and refresh the the page until it actually reloads. -Submit the assignment again. -Notice it submits successfully -Navigate to /assignments/:id/# (make sure it actually reloads the page) -Submit the assignment. -The page should refresh and the Submit section of the page should have disappeared. Change-Id: Ic81b4e7e51de96a20f7eae8c2fa609b82be6965a Reviewed-on: https://gerrit.instructure.com/41756 Reviewed-by: Mike Nomitch <mnomitch@instructure.com> QA-Review: Amber Taniuchi <amber@instructure.com> Tested-by: Jenkins <jenkins@instructure.com> Product-Review: Simon Williams <simon@instructure.com>
This commit is contained in:
parent
efc2a6ee4f
commit
dd09f32384
|
@ -130,7 +130,7 @@ define([
|
||||||
url: $(this).attr('action'),
|
url: $(this).attr('action'),
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
submitting = true;
|
submitting = true;
|
||||||
window.location = window.location.href.replace(window.location.hash, "");
|
window.location = window.location.href.replace(/\#$/g, "").replace(window.location.hash, "");
|
||||||
},
|
},
|
||||||
error: function(data) {
|
error: function(data) {
|
||||||
submissionForm.find("button[type='submit']").text(I18n.t('messages.submit_failed', "Submit Failed, please try again"));
|
submissionForm.find("button[type='submit']").text(I18n.t('messages.submit_failed', "Submit Failed, please try again"));
|
||||||
|
|
Loading…
Reference in New Issue