diff --git a/index.php b/index.php index e3947f6..cad5c3d 100644 --- a/index.php +++ b/index.php @@ -6,11 +6,11 @@ use Pimple\Container; use CurrikiTsugi\App; -use Tsugi\Core\LTIX; +// use Tsugi\Core\LTIX; use CurrikiTsugi\Interfaces\ControllerInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; -$LTI = LTIX::requireData(); +// $LTI = LTIX::requireData(); $container = new Container(); $container[Request::class] = function($c){ diff --git a/src/App.php b/src/App.php index 58d364f..092e02d 100644 --- a/src/App.php +++ b/src/App.php @@ -29,6 +29,7 @@ public function bootstrap() call_user_func(array($this->controller, 'index')); } } else { + $LTI = LTIX::requireData(); // Obtain User ID $user_id = $LTI->user->id; //TSUGI member ID // Obtain User Email @@ -49,7 +50,7 @@ public function bootstrap() $playlist_studio_link = CURRIKI_STUDIO_HOST . "/playlist/$playlist_id/preview/lti"; $redirect_to_studio_url = $playlist_studio_link . "?" . $lti_token_params; header("Location: $redirect_to_studio_url"); - } elseif ($activity_id && $playlist_id) { + } elseif ($activity_id) { // && $playlist_id // Check if the grade is being passedback $is_gradepassback = (int) U::get($_GET, "gpb"); if ($is_gradepassback) {