Skip to content

Commit

Permalink
fix content-item selection & storage
Browse files Browse the repository at this point in the history
  • Loading branch information
emmachughes committed Aug 17, 2023
1 parent 7b24338 commit 954d0d9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
7 changes: 2 additions & 5 deletions sourcecode/hub/app/Http/Requests/StoreContentRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,10 @@ protected function prepareForValidation(): void
*/
public function rules(): array
{
$propTitle = str_replace('.', '\.', ContentItems::PROP_TITLE);
$propUrl = str_replace('.', '\.', ContentItems::PROP_URL);

return [
"[email protected].@type" => ['required', 'in:LtiLinkItem'],
"[email protected].$propTitle" => ['required', 'string'],
"[email protected].$propUrl" => ['required', 'url'],
"[email protected].title" => ['required', 'string'],
"[email protected].url" => ['required', 'url'],
];
}
}
1 change: 1 addition & 0 deletions sourcecode/hub/app/Models/Content.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ public function toItemSelectionRequest(): Oauth1Request
flags: JSON_THROW_ON_ERROR,
),
'lti_message_type' => 'ContentItemSelection',
'lti_version' => 'LTI-1p0',
]), $credentials);
}

Expand Down
8 changes: 4 additions & 4 deletions sourcecode/hub/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 954d0d9

Please sign in to comment.