Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Stud.IP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jan-Hendrik Willms
Stud.IP
Commits
a73d0ae6
Commit
a73d0ae6
authored
7 months ago
by
Elmar Ludwig
Committed by
David Siegfried
7 months ago
Browse files
Options
Downloads
Patches
Plain Diff
add lis_course_section_sourcedid parameter, fixes #4461
Closes #4461 Merge request
studip/studip!3246
parent
b22c5a0b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/classes/LtiLink.php
+7
-5
7 additions, 5 deletions
lib/classes/LtiLink.php
with
7 additions
and
5 deletions
lib/classes/LtiLink.php
+
7
−
5
View file @
a73d0ae6
...
...
@@ -28,7 +28,7 @@ class LtiLink
protected
$launch_url
;
protected
$consumer_key
;
protected
$consumer_secret
;
protected
$
oauth_
signature_method
;
protected
$signature_method
;
// launch parameters and variables
protected
$parameters
=
[];
...
...
@@ -40,13 +40,14 @@ class LtiLink
* @param string $launch_url launch URL of external LTI tool
* @param string $consumer_key consumer key of the LTI link
* @param string $consumer_secret consumer secret of the LTI link
* @param string $signature_method signature method to use (optional)
*/
public
function
__construct
(
$launch_url
,
$consumer_key
,
$consumer_secret
,
$
oauth_
signature_method
=
'sha1'
)
public
function
__construct
(
$launch_url
,
$consumer_key
,
$consumer_secret
,
$signature_method
=
'sha1'
)
{
$this
->
launch_url
=
$launch_url
;
$this
->
consumer_key
=
$consumer_key
;
$this
->
consumer_secret
=
$consumer_secret
;
$this
->
oauth_
signature_method
=
$
oauth_
signature_method
;
$this
->
signature_method
=
$signature_method
;
// Basic LTI uses OAuth to sign requests
// OAuth Core 1.0 spec: http://oauth.net/core/1.0/
...
...
@@ -58,7 +59,7 @@ class LtiLink
'oauth_version'
=>
'1.0'
,
'oauth_nonce'
=>
uniqid
(
'lti'
,
true
),
'oauth_timestamp'
=>
time
(),
'oauth_signature_method'
=>
'HMAC-'
.
strtoupper
(
$this
->
oauth_
signature_method
),
'oauth_signature_method'
=>
'HMAC-'
.
strtoupper
(
$this
->
signature_method
),
'tool_consumer_info_product_family_code'
=>
'studip'
,
'tool_consumer_info_version'
=>
$GLOBALS
[
'SOFTWARE_VERSION'
],
'tool_consumer_instance_guid'
=>
Config
::
get
()
->
STUDIP_INSTALLATION_ID
,
...
...
@@ -126,6 +127,7 @@ class LtiLink
'context_type'
=>
$this
->
variables
[
'Context.type'
],
'context_label'
=>
$this
->
variables
[
'Context.label'
],
'context_title'
=>
$this
->
variables
[
'Context.title'
],
'lis_course_section_sourcedid'
=>
$this
->
variables
[
'CourseSection.sourcedId'
],
]);
}
}
...
...
@@ -320,7 +322,7 @@ class LtiLink
$request
->
withQueryParams
(
$launch_params
),
$this
->
consumer_secret
,
''
,
$this
->
oauth_
signature_method
$this
->
signature_method
);
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment