Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Submit
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
Analyze
Contributor analytics
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
Submit
Merge requests
!242
Resolve "Copy assignments to new edition"
Code
Review changes
Check out branch
Open in Workspace
Download
Patches
Plain diff
Expand sidebar
Merged
Resolve "Copy assignments to new edition"
121-copy-assignments-to-new-edition
into
development
Overview
11
Commits
23
Pipelines
0
Changes
17
All threads resolved!
Hide all comments
Merged
Resolve "Copy assignments to new edition"
Danae Savvidi
requested to merge
121-copy-assignments-to-new-edition
into
development
11 months ago
Overview
11
Commits
23
Pipelines
0
Changes
17
All threads resolved!
Hide all comments
Closes
#121 (closed)
Edited
4 months ago
by
Danae Savvidi
0
0
Merge request reports
Compare
development
version 21
55ece9fb
4 months ago
version 20
19a9ca87
4 months ago
version 19
54717167
4 months ago
version 18
23e50c73
4 months ago
version 17
b61d21ea
4 months ago
version 16
292e28a0
4 months ago
version 15
24f33cf8
7 months ago
version 14
e7dd0326
7 months ago
version 13
62adb85b
7 months ago
version 12
5292519e
10 months ago
version 11
f9b70cc5
10 months ago
version 10
4890739f
10 months ago
version 9
3aa4b15a
10 months ago
version 8
29fc2ad0
10 months ago
version 7
14d70d4b
10 months ago
version 6
9a75f4d2
10 months ago
version 5
1a6793d5
10 months ago
version 4
b11173b5
10 months ago
version 3
72b20f78
10 months ago
version 2
b84b0af6
10 months ago
version 1
a7688ec6
10 months ago
development (base)
and
latest version
latest version
0953ee4d
23 commits,
4 months ago
version 21
55ece9fb
22 commits,
4 months ago
version 20
19a9ca87
21 commits,
4 months ago
version 19
54717167
20 commits,
4 months ago
version 18
23e50c73
19 commits,
4 months ago
version 17
b61d21ea
18 commits,
4 months ago
version 16
292e28a0
17 commits,
4 months ago
version 15
24f33cf8
16 commits,
7 months ago
version 14
e7dd0326
15 commits,
7 months ago
version 13
62adb85b
14 commits,
7 months ago
version 12
5292519e
13 commits,
10 months ago
version 11
f9b70cc5
12 commits,
10 months ago
version 10
4890739f
11 commits,
10 months ago
version 9
3aa4b15a
10 commits,
10 months ago
version 8
29fc2ad0
9 commits,
10 months ago
version 7
14d70d4b
8 commits,
10 months ago
version 6
9a75f4d2
7 commits,
10 months ago
version 5
1a6793d5
6 commits,
10 months ago
version 4
b11173b5
5 commits,
10 months ago
version 3
72b20f78
4 commits,
10 months ago
version 2
b84b0af6
3 commits,
10 months ago
version 1
a7688ec6
2 commits,
10 months ago
17 files
+
499
−
11
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
17
src/main/java/nl/tudelft/submit/controller/EditionController.java
+
21
−
0
View file @ 0953ee4d
Edit in single-file editor
Open in Web IDE
Show full file
@@ -238,6 +238,27 @@ public class EditionController {
return
"edition/assist"
;
}
/**
* Copies existing modules to an edition.
*
* @param ids The moduleIds
* @param editionId The edition id
* @return The page to redirect to
*/
@PostMapping
(
"/{editionId}/import-modules"
)
@PreAuthorize
(
"@authorizationService.canCreateModule(#editionId)"
)
public
String
importModules
(
@RequestParam
String
ids
,
@PathVariable
Long
editionId
,
RedirectAttributes
redirectAttributes
)
{
try
{
moduleService
.
copyModulesToEdition
(
Arrays
.
stream
(
ids
.
split
(
","
)).
filter
(
x
->
!
x
.
isBlank
()).
map
(
Long:
:
valueOf
).
toList
(),
editionId
);
}
catch
(
Exception
e
)
{
redirectAttributes
.
addFlashAttribute
(
"import_error"
,
e
.
getMessage
());
}
return
"redirect:/edition/"
+
editionId
;
}
/**
* Gets the student page for an edition. This is the only edition page students typically see.
*
Loading