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
Marcus Eibrink-Lunzenauer
Stud.IP
Commits
46738b63
Commit
46738b63
authored
3 years ago
by
farbod
Committed by
Marcus Eibrink-Lunzenauer
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
not showing courses without courseware, refs #277
parent
1f13700e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
resources/vue/components/courseware/CoursewareManagerCopySelector.vue
+1
-1
1 addition, 1 deletion
...e/components/courseware/CoursewareManagerCopySelector.vue
resources/vue/store/courseware/courseware.module.js
+16
-6
16 additions, 6 deletions
resources/vue/store/courseware/courseware.module.js
with
17 additions
and
7 deletions
resources/vue/components/courseware/CoursewareManagerCopySelector.vue
+
1
−
1
View file @
46738b63
...
...
@@ -194,7 +194,7 @@ export default {
}
},
async
mounted
()
{
this
.
courses
=
await
this
.
loadUsersCourses
(
this
.
userId
);
this
.
courses
=
await
this
.
loadUsersCourses
(
{
userId
:
this
.
userId
,
withCourseware
:
true
}
);
this
.
loadSemesterMap
();
}
...
...
This diff is collapsed.
Click to expand it.
resources/vue/store/courseware/courseware.module.js
+
16
−
6
View file @
46738b63
...
...
@@ -819,7 +819,7 @@ export const actions = {
}
while
(
rootGetters
[
`
${
type
}
/all`
].
length
<
rootGetters
[
`
${
type
}
/lastMeta`
].
page
.
total
);
},
async
loadUsersCourses
({
dispatch
,
rootGetters
,
state
},
userId
)
{
async
loadUsersCourses
({
dispatch
,
rootGetters
,
state
},
{
userId
,
withCourseware
}
)
{
const
parent
=
{
type
:
'
users
'
,
id
:
userId
,
...
...
@@ -841,19 +841,29 @@ export const actions = {
});
let
courses
=
[];
membership
s
.
forEach
((
membership
)
=>
{
for
(
let
membership
of
membership
s
)
{
if
(
membership
.
attributes
.
permission
===
'
dozent
'
&&
state
.
context
.
id
!==
membership
.
relationships
.
course
.
data
.
id
)
{
courses
.
push
(
rootGetters
[
'
courses/related
'
]({
parent
:
membership
,
relationship
:
'
course
'
}));
const
course
=
rootGetters
[
'
courses/related
'
]({
parent
:
membership
,
relationship
:
'
course
'
});
if
(
!
withCourseware
)
{
courses
.
push
(
course
);
continue
;
}
const
coursewareInstance
=
await
dispatch
(
'
loadRemoteCoursewareStructure
'
,
{
rangeId
:
course
.
id
,
rangeType
:
course
.
type
});
if
(
coursewareInstance
?.
relationships
?.
root
)
{
courses
.
push
(
course
);
}
}
});
}
return
courses
;
},
loadRemoteCoursewareStructure
({
dispatch
,
rootGetters
},
{
rangeId
,
rangeType
})
{
async
loadRemoteCoursewareStructure
({
dispatch
,
rootGetters
},
{
rangeId
,
rangeType
})
{
const
parent
=
{
id
:
rangeId
,
type
:
rangeType
,
...
...
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