Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
moodle-xapi
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Quentin Pimont
moodle-xapi
Commits
b4e7ee4e
Unverified
Commit
b4e7ee4e
authored
6 years ago
by
Ryan Smith
Committed by
GitHub
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
fix: Fixes endpoint correction to close #184. (#187)
parent
d6d987bf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/loader/lrs.php
+5
-3
5 additions, 3 deletions
src/loader/lrs.php
with
5 additions
and
3 deletions
src/loader/lrs.php
+
5
−
3
View file @
b4e7ee4e
...
...
@@ -18,9 +18,11 @@ namespace src\loader\lrs;
defined
(
'MOODLE_INTERNAL'
)
||
die
();
function
correct_endpoint
(
$endpoint
)
{
$nostatements
=
trim
(
$endpoint
,
'statements'
);
$noslash
=
trim
(
$nostatements
,
'/'
);
return
$noslash
;
$endswithstatements
=
substr
(
$endpoint
,
-
11
)
===
"/statements"
;
if
(
$endswithstatements
)
{
return
substr
(
$endpoint
,
0
,
-
11
);
}
return
rtrim
(
$endpoint
,
'/'
);
}
function
load_transormed_events_to_lrs
(
array
$config
,
array
$transformedevents
)
{
...
...
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