Skip to content

Commit

Permalink
Update so auto works in an iframe for admin
Browse files Browse the repository at this point in the history
  • Loading branch information
csev committed Mar 4, 2021
1 parent b5e2859 commit 401febc
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
4 changes: 3 additions & 1 deletion admin/gate.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@
}
$rest_path = \Tsugi\Util\U::rest_path();
$redirect = U::reconstruct_query($rest_path->current);
header("Location: ".$redirect);
$redirect = U::addSession($redirect);

Output::doRedirect($redirect);
$REDIRECTED = true;
return;
}
Expand Down
5 changes: 4 additions & 1 deletion admin/key/auto.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<?php
if ( ! defined('COOKIE_SESSION') ) define('COOKIE_SESSION', true);
# Do not use cookie session here. We might be in an iframe and unable to establish
# a session - thanks trackers!. Make sure the auto endpoint has the .php or
# route.php will do cookie session.

require_once("../../config.php");
session_start();
require_once("../gate.php");
Expand Down
2 changes: 1 addition & 1 deletion admin/key/key-detail.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
$retval = CrudForm::updateForm($row, $fields, $current, $from_location, $allow_edit, $allow_delete,$extra_buttons,$titles);
if ( is_string($retval) ) die($retval);
echo("</p>\n");
$autoConfigUrl = $CFG->wwwroot . "/admin/key/auto?tsugi_key=" . $row['key_id'];
$autoConfigUrl = $CFG->wwwroot . "/admin/key/auto.php?tsugi_key=" . $row['key_id'];

?>
<p>
Expand Down
2 changes: 1 addition & 1 deletion settings/key/key-detail.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
if ( is_string($retval) ) die($retval);
echo("</p>\n");

$autoConfigUrl = $from_location . "/auto?tsugi_key=" . $row['key_id'];
$autoConfigUrl = $from_location . "/auto.php?tsugi_key=" . $row['key_id'];
?>
<p>
<b>LTI Advantage Auto Configuration URL:
Expand Down

0 comments on commit 401febc

Please sign in to comment.