Skip to content

Commit

Permalink
Update to fix LTI provider as session not existing under some circums…
Browse files Browse the repository at this point in the history
…tances

git-svn-id: https://xerteonlinetoolkits.googlecode.com/svn/trunk@447 912cdd6b-5c7d-d5a7-a2ba-d0f0cdb91641
  • Loading branch information
Simon Atack committed Oct 9, 2012
1 parent 8540dec commit 6cc92b5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
9 changes: 2 additions & 7 deletions LTI/ims-lti/UoN_LTI.php
Expand Up @@ -50,11 +50,6 @@ public function init_lti($usesession = true, $doredirect = false) {
// give up or try to retrieve the context from session
if (!is_lti_request()) {
if ($usesession === false) return;

if(session_status()==PHP_SESSION_NONE) {
session_start();
}

if (strlen(session_id()) > 0) {
if (isset($_SESSION['_lti_row'])) $row = $_SESSION['_lti_row'];
if (isset($row)) $this->row = $row;
Expand Down Expand Up @@ -365,11 +360,11 @@ function lookup_lti_user($lti_user_key = false) {
if ($rows < 1) {
return false;
}
$stmt->bind_result($rogo_id, $updated);
$stmt->bind_result($users_id, $updated);
$stmt->fetch();
$stmt->close();
}
return (array($rogo_id, $updated));
return (array($users_id, $updated));
}

/**
Expand Down
3 changes: 3 additions & 0 deletions LTI/index.php
Expand Up @@ -99,6 +99,9 @@ function auth($update = false) {


} else {
if(isset($_SESSION['toolkits_logon_username'])) {
$_SESSION['toolkits_logon_username']=$returned[0];
}
$time1 = strtotime($returned[1]);
$time2 = time();
$timediff = $time2 - $time1;
Expand Down

0 comments on commit 6cc92b5

Please sign in to comment.