Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Queue
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
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Queue
Merge requests
!693
Prevent enqueueing without a group if groups are required
Code
Review changes
Check out branch
Open in Workspace
Download
Patches
Plain diff
Expand sidebar
Merged
Prevent enqueueing without a group if groups are required
prevent-enqueue-without-group
into
development
Overview
1
Commits
1
Pipelines
0
Changes
8
Merged
Prevent enqueueing without a group if groups are required
Ruben Backx
requested to merge
prevent-enqueue-without-group
into
development
Aug 31, 2023
Overview
1
Commits
1
Pipelines
0
Changes
8
0
0
Merge request reports
Compare
development
version 4
bdf0343e
Aug 31, 2023
version 3
26e5408c
Aug 31, 2023
version 2
0fb47f34
Aug 31, 2023
version 1
45ea3646
Aug 31, 2023
development (base)
and
latest version
latest version
36fe4b94
1 commit,
Aug 31, 2023
version 4
bdf0343e
1 commit,
Aug 31, 2023
version 3
26e5408c
1 commit,
Aug 31, 2023
version 2
0fb47f34
1 commit,
Aug 31, 2023
version 1
45ea3646
1 commit,
Aug 31, 2023
8 files
+
189
−
4
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
8
src/main/java/nl/tudelft/queue/controller/AssignmentController.java
+
23
−
4
View file @ 36fe4b94
Edit in single-file editor
Open in Web IDE
Show full file
@@ -18,10 +18,8 @@
package
nl.tudelft.queue.controller
;
import
nl.tudelft.labracore.api.AssignmentControllerApi
;
import
nl.tudelft.labracore.api.dto.AssignmentCreateDTO
;
import
nl.tudelft.labracore.api.dto.EditionDetailsDTO
;
import
nl.tudelft.labracore.api.dto.ModuleDetailsDTO
;
import
nl.tudelft.labracore.api.dto.ModuleSummaryDTO
;
import
nl.tudelft.labracore.api.StudentGroupControllerApi
;
import
nl.tudelft.labracore.api.dto.*
;
import
nl.tudelft.queue.cache.AssignmentCacheManager
;
import
nl.tudelft.queue.cache.EditionCacheManager
;
import
nl.tudelft.queue.cache.ModuleCacheManager
;
@@ -50,6 +48,9 @@ public class AssignmentController {
@Autowired
private
AssignmentControllerApi
aApi
;
@Autowired
private
StudentGroupControllerApi
sgApi
;
/**
* Gets the page for creating an assignment. This is a basic page with only the most basic of properties
* for an assignment. Further adjustments or creation options should be made available in Portal or later
@@ -141,6 +142,24 @@ public class AssignmentController {
return
"redirect:/edition/"
+
module
.
getEdition
().
getId
()
+
"/modules"
;
}
/**
* Get the page with a list of groups to join for an assignment.
*
* @param assignmentId The id of the assignment
* @return The group page
*/
@GetMapping
(
"/assignment/{assignmentId}/groups"
)
public
String
getAssignmentGroups
(
@PathVariable
Long
assignmentId
,
Model
model
)
{
AssignmentDetailsDTO
assignment
=
aCache
.
getRequired
(
assignmentId
);
ModuleDetailsDTO
module
=
mCache
.
getRequired
(
assignment
.
getModule
().
getId
());
model
.
addAttribute
(
"module"
,
module
);
model
.
addAttribute
(
"edition"
,
eCache
.
getRequired
(
module
.
getEdition
().
getId
()));
model
.
addAttribute
(
"groups"
,
sgApi
.
getAllGroupsInModule
(
module
.
getId
()).
collectList
().
block
());
return
"module/groups"
;
}
/**
* Adds attributes for the create assignment page to the given model.
*
Loading