Browse Source

Fixed form.php to send to the LTI Provider using POST arguments instead of querystring as specified into the IMS/LTI spec

meuhland 6 years ago
parent
commit
cfa814699f
1 changed files with 8 additions and 2 deletions
  1. 8 2
      plugin/ims_lti/form.php

+ 8 - 2
plugin/ims_lti/form.php

@@ -83,8 +83,14 @@ $result = $oauth->sign(array(
         <title>title</title>
     </head>
     <body>
-        <form action="<?php echo $result['signed_url'] ?>" name="ltiLaunchForm" method="post" encType="application/x-www-form-urlencoded">
-            <input type="submit" value="Press to continue to external tool"/>
+        <form action="<?php echo $tool->getLaunchUrl() ?>" name="ltiLaunchForm" method="post" encType="application/x-www-form-urlencoded">
+        <?php
+          foreach($result["parameters"] as $key => $values) //Dump parameters
+			{
+                echo("<input type='hidden' name='$key' value='$values' />");
+			}
+		?>
+			<input type="submit" value="Press to continue to external tool"/>
         </form>
 
         <script language="javascript">