Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NodeClientSharedCode
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
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
Dojo Project (HES-SO)
Projects
Shared
NodeClientSharedCode
Compare revisions
4256114048734c2708436cc8505abecdf62fe6df to 55a94e77db69635e1ca837a52de29cb04d0b4138
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
dojo_project/projects/shared/nodeclientsharedcode
Select target project
No results found
55a94e77db69635e1ca837a52de29cb04d0b4138
Select Git revision
Branches
ask-user-to-delete-exercises-on-duplicates
jw_sonar
jw_sonar_backup
main
move-to-esm-only
open_tool_for_self_hosting
v5.0
v6.0
Tags
v4.1
v4.2
10 results
Swap
Target
dojo_project/projects/shared/nodeclientsharedcode
Select target project
dojo_project/projects/shared/nodeclientsharedcode
1 result
4256114048734c2708436cc8505abecdf62fe6df
Select Git revision
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (4)
Fix bug on get api url function
· 4011aa14
michael.minelli
authored
1 year ago
4011aa14
Exercise => Add correctionDescription field
· efea29fe
michael.minelli
authored
1 year ago
efea29fe
ApiRoute => Use correction update route for delete too
· 5bbb2606
michael.minelli
authored
1 year ago
5bbb2606
Merge branch 'v4.1'
· 55a94e77
michael.minelli
authored
1 year ago
55a94e77
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
helpers/Dojo/DojoBackendHelper.ts
+4
-4
4 additions, 4 deletions
helpers/Dojo/DojoBackendHelper.ts
models/Exercise.ts
+1
-0
1 addition, 0 deletions
models/Exercise.ts
types/Dojo/ApiRoute.ts
+13
-13
13 additions, 13 deletions
types/Dojo/ApiRoute.ts
with
18 additions
and
17 deletions
helpers/Dojo/DojoBackendHelper.ts
View file @
55a94e77
...
...
@@ -4,19 +4,19 @@ import ClientsSharedConfig from '../../config/ClientsSharedConfig.js';
class
DojoBackendHelper
{
public
getApiUrl
(
route
:
ApiRoute
,
options
?:
Partial
<
{
assignmentNameOrUrl
:
string
,
exerciseIdOrUrl
:
string
,
gitlabProjectId
:
string
}
>
):
string
{
cons
t
url
=
`
${
ClientsSharedConfig
.
apiURL
}${
route
}
`
;
le
t
url
=
`
${
ClientsSharedConfig
.
apiURL
}${
route
}
`
;
if
(
options
)
{
if
(
options
.
assignmentNameOrUrl
)
{
return
url
.
replace
(
'
{{assignmentNameOrUrl}}
'
,
encodeURIComponent
(
options
.
assignmentNameOrUrl
));
url
=
url
.
replace
(
'
{{assignmentNameOrUrl}}
'
,
encodeURIComponent
(
options
.
assignmentNameOrUrl
));
}
if
(
options
.
exerciseIdOrUrl
)
{
return
url
.
replace
(
'
{{exerciseIdOrUrl}}
'
,
encodeURIComponent
(
options
.
exerciseIdOrUrl
));
url
=
url
.
replace
(
'
{{exerciseIdOrUrl}}
'
,
encodeURIComponent
(
options
.
exerciseIdOrUrl
));
}
if
(
options
.
gitlabProjectId
)
{
return
url
.
replace
(
'
{{gitlabProjectId}}
'
,
encodeURIComponent
(
options
.
gitlabProjectId
));
url
=
url
.
replace
(
'
{{gitlabProjectId}}
'
,
encodeURIComponent
(
options
.
gitlabProjectId
));
}
}
...
...
This diff is collapsed.
Click to expand it.
models/Exercise.ts
View file @
55a94e77
...
...
@@ -18,6 +18,7 @@ interface Exercise {
isCorrection
:
boolean
;
correctionCommit
:
Gitlab
.
CommitSchema
|
undefined
;
correctionDescription
:
string
|
undefined
;
}
...
...
This diff is collapsed.
Click to expand it.
types/Dojo/ApiRoute.ts
View file @
55a94e77
enum
ApiRoute
{
LOGIN
=
'
/login
'
,
REFRESH_TOKENS
=
'
/refresh_tokens
'
,
TEST_SESSION
=
'
/test_session
'
,
GITLAB_CHECK_TEMPLATE_ACCESS
=
'
/gitlab/project/{{gitlabProjectId}}/checkTemplateAccess
'
,
ASSIGNMENT_GET
=
'
/assignments/{{assignmentNameOrUrl}}
'
,
ASSIGNMENT_CREATE
=
'
/assignments
'
,
ASSIGNMENT_PUBLISH
=
'
/assignments/{{assignmentNameOrUrl}}/publish
'
,
ASSIGNMENT_UNPUBLISH
=
'
/assignments/{{assignmentNameOrUrl}}/unpublish
'
,
ASSIGNMENT_CORRECTION_LINK
=
'
/assignments/{{assignmentNameOrUrl}}/corrections
'
,
ASSIGNMENT_CORRECTION_UPDATE
=
'
/assignments/{{assignmentNameOrUrl}}/corrections/{{exerciseIdOrUrl}}
'
,
EXERCISE_CREATE
=
'
/assignments/{{assignmentNameOrUrl}}/exercises
'
,
EXERCISE_ASSIGNMENT
=
'
/exercises/{{exerciseIdOrUrl}}/assignment
'
,
EXERCISE_RESULTS
=
'
/exercises/{{exerciseIdOrUrl}}/results
'
LOGIN
=
'
/login
'
,
REFRESH_TOKENS
=
'
/refresh_tokens
'
,
TEST_SESSION
=
'
/test_session
'
,
GITLAB_CHECK_TEMPLATE_ACCESS
=
'
/gitlab/project/{{gitlabProjectId}}/checkTemplateAccess
'
,
ASSIGNMENT_GET
=
'
/assignments/{{assignmentNameOrUrl}}
'
,
ASSIGNMENT_CREATE
=
'
/assignments
'
,
ASSIGNMENT_PUBLISH
=
'
/assignments/{{assignmentNameOrUrl}}/publish
'
,
ASSIGNMENT_UNPUBLISH
=
'
/assignments/{{assignmentNameOrUrl}}/unpublish
'
,
ASSIGNMENT_CORRECTION_LINK
=
'
/assignments/{{assignmentNameOrUrl}}/corrections
'
,
ASSIGNMENT_CORRECTION_UPDATE
_DELETE
=
'
/assignments/{{assignmentNameOrUrl}}/corrections/{{exerciseIdOrUrl}}
'
,
EXERCISE_CREATE
=
'
/assignments/{{assignmentNameOrUrl}}/exercises
'
,
EXERCISE_ASSIGNMENT
=
'
/exercises/{{exerciseIdOrUrl}}/assignment
'
,
EXERCISE_RESULTS
=
'
/exercises/{{exerciseIdOrUrl}}/results
'
}
...
...
This diff is collapsed.
Click to expand it.