Skip to content
Snippets Groups Projects
Commit 7d698995 authored by TamaraGunkel's avatar TamaraGunkel
Browse files

Fixes #7 replaced hardcoded url in ajax function

parent abed9406
Branches
Tags
No related merge requests found
...@@ -30,8 +30,10 @@ define(['jquery'], function ($) { ...@@ -30,8 +30,10 @@ define(['jquery'], function ($) {
init: function() { init: function() {
$('#ltiLaunchForm').submit(function(e) { $('#ltiLaunchForm').submit(function(e) {
e.preventDefault(); e.preventDefault();
var ocurl = decodeURIComponent($(this).attr("action"));
$.ajax({ $.ajax({
url: 'http://localhost:8080/lti', url: ocurl,
crossDomain: true, crossDomain: true,
type: 'post', type: 'post',
xhrFields: {withCredentials: true}, xhrFields: {withCredentials: true},
......
...@@ -85,7 +85,7 @@ function filter_opencast_login() { ...@@ -85,7 +85,7 @@ function filter_opencast_login() {
$params['oauth_signature_method'] = 'HMAC-SHA1'; $params['oauth_signature_method'] = 'HMAC-SHA1';
$params['oauth_signature'] = $helper->sign("POST", $endpoint, $params, $consumersecret . '&'); $params['oauth_signature'] = $helper->sign("POST", $endpoint, $params, $consumersecret . '&');
$content = "<form action=\"" . $endpoint . $content = "<form action=\"" . urlencode($endpoint) .
"\" name=\"ltiLaunchForm\" id=\"ltiLaunchForm\" method=\"post\" encType=\"application/x-www-form-urlencoded\">\n"; "\" name=\"ltiLaunchForm\" id=\"ltiLaunchForm\" method=\"post\" encType=\"application/x-www-form-urlencoded\">\n";
// Construct html form for the launch parameters. // Construct html form for the launch parameters.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment