Skip to content

Commit

Permalink
Made some more changes to the LTI grade passback. Moved the LTI launc…
Browse files Browse the repository at this point in the history
…h code back into the App.php class, and playlist id is no longer needed to load activity view.
  • Loading branch information
aqeel-tkxel committed Dec 9, 2020
1 parent e6cd267 commit 46ea634
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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){
Expand Down
3 changes: 2 additions & 1 deletion src/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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) {
Expand Down

0 comments on commit 46ea634

Please sign in to comment.