Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LabraCORE
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EIP
Labrador
LabraCORE
Merge requests
!159
Dev to master
Code
Review changes
Check out branch
Open in Workspace
Download
Patches
Plain diff
Expand sidebar
Merged
Dev to master
development
into
master
Overview
0
Commits
2
Pipelines
5
Changes
6
Merged
Dev to master
Ruben Backx
requested to merge
development
into
master
Aug 23, 2021
Overview
0
Commits
2
Pipelines
5
Changes
6
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
c6b7a23d
2 commits,
Aug 23, 2021
6 files
+
144
−
9
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
6
src/main/java/nl/tudelft/labracore/controller/StudentGroupController.java
+
16
−
0
View file @ c6b7a23d
Edit in single-file editor
Open in Web IDE
Show full file
@@ -23,6 +23,7 @@ import javax.transaction.Transactional;
import
nl.tudelft.labracore.dto.create.StudentGroupCreateDTO
;
import
nl.tudelft.labracore.dto.helper.GroupGenerateDTO
;
import
nl.tudelft.labracore.dto.helper.GroupImportDTO
;
import
nl.tudelft.labracore.dto.patch.StudentGroupPatchDTO
;
import
nl.tudelft.labracore.dto.view.structured.details.StudentGroupDetailsDTO
;
import
nl.tudelft.labracore.dto.view.structured.summary.RoleSummaryDTO
;
@@ -203,6 +204,21 @@ public class StudentGroupController {
sgs
.
allocateGroupsForModule
(
moduleId
,
capacity
);
}
/**
* Imports groups to a module.
*
* @param moduleId The id of the module
* @param groups The groups to import
* @param createUsers Whether to create non-existent users
*/
@PostMapping
(
"/{moduleId}/import"
)
@PreAuthorize
(
"hasAuthority('STUDENT_GROUP_CREATE')"
)
public
List
<
String
>
importGroupsToModule
(
@PathVariable
Long
moduleId
,
@RequestBody
GroupImportDTO
groups
,
@RequestParam
(
required
=
false
,
defaultValue
=
"false"
)
Boolean
createUsers
)
{
return
sgs
.
importGroups
(
moduleId
,
groups
.
getGroups
(),
createUsers
);
}
/**
* Removes a member from a group.
*
Loading