Skip to content

Commit

Permalink
send user_id and locale as lti params
Browse files Browse the repository at this point in the history
  • Loading branch information
emmachughes committed Sep 7, 2023
1 parent 301ee0a commit 8dada02
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sourcecode/hub/app/Http/Controllers/ContentController.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ public function show(Content $content, LtiLaunchBuilder $launchBuilder): View
->withWidth(640)
->withHeight(480)
->withClaim('launch_presentation_locale', app()->getLocale())
->withClaim('user_id', $this->getUser()->id)
->toPresentationLaunch($credentials, $launchUrl, $content->id);

return view('content.show', [
Expand Down Expand Up @@ -106,6 +107,8 @@ public function edit(Content $content, LtiLaunchBuilder $builder): View
assert(is_string($launchUrl));

$launch = $builder
->withClaim('launch_presentation_locale', app()->getLocale())
->withClaim('user_id', $this->getUser()->id)
->toPresentationLaunch($credentials, $launchUrl, $content->id);

return view('content.edit', [
Expand All @@ -120,6 +123,7 @@ public function launchCreator(LtiTool $tool, LtiLaunchBuilder $launchBuilder): V
->withWidth(640)
->withHeight(480)
->withClaim('launch_presentation_locale', app()->getLocale())
->withClaim('user_id', $this->getUser())
->toItemSelectionLaunch(
$tool->getOauth1Credentials(),
$tool->creator_launch_url,
Expand Down

0 comments on commit 8dada02

Please sign in to comment.