Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
068d0ce6
Commit
068d0ce6
authored
Oct 09, 2013
by
Valera Rozuvan
Committed by
polesye
Oct 14, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added back check in JS for empty or default URL.
parent
e2fb2aec
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletions
+11
-1
common/lib/xmodule/xmodule/js/src/lti/lti.js
+11
-1
No files found.
common/lib/xmodule/xmodule/js/src/lti/lti.js
View file @
068d0ce6
...
...
@@ -37,7 +37,7 @@ window.LTI = (function () {
//
// @return undefined
function
initialize
(
element
)
{
var
form
,
openInANewPage
;
var
form
,
openInANewPage
,
formAction
;
// In cms (Studio) the element is already a jQuery object. In lms it is
// a DOM object.
...
...
@@ -47,6 +47,16 @@ window.LTI = (function () {
element
=
$
(
element
);
form
=
element
.
find
(
'.ltiLaunchForm'
);
formAction
=
form
.
attr
(
'action'
);
// If action is empty string, or action is the default URL that should
// not cause a form submit.
if
(
!
formAction
||
formAction
===
'http://www.example.com'
)
{
// Nothing to do - no valid action provided. Error message will be
// displaced in browser (HTML).
return
;
}
// We want a Boolean 'true' or 'false'. First we will retrieve the data
// attribute, and then we will parse it via native JSON.parse().
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment