Controller methods for Editions
Endpoint (Method)
Params | Type | Comment |
---|---|---|
Input | Long | Edition id |
String | name | |
Output | Long | Module id |
What does this method do?
- Creates a module with the specified name in an edition
- Returns the created module's id
Not possible without Course and Cohort. The method with these is added, however.
Endpoint (Method)
Params | Type | Comment |
---|---|---|
Input | Long | Edition id |
List | usernames | |
Output | void |
What does this method do?
- Removes users from an edition
Done, with IDs instead of usernames for performance reasons, let us know if usernames is needed nonetheless
Endpoint (Method)
Params | Type | Comment |
---|---|---|
Input | Long | Edition id |
Output | List |
What does this method do?
- Returns the list of all modules by edition
Done
Endpoint (Method)
Params | Type | Comment |
---|---|---|
Input | Long | Edition id |
Output | List |
What does this method do?
- Returns the list of all roles by edition
Done.
Endpoint (Method)
Params | Type | Comment |
---|---|---|
Input | ||
person | Person | |
Output | ||
editions | List |
What does this method do?
Check all roles to see if the person associated with them matches the given person, and retrieve all roles where this is true.
SELECT * FROM roles WHERE person == (given person)
done
Endpoint (Method)
Params | Type | Comment |
---|---|---|
Input | ||
Output | ||
editions | List |
What does this method do?
Select all editions from the database where the edition is openForEnrolment == True.
Done.
DTO
Name: ModuleViewDTO
This DTO is a:
-
Create -
Patch -
View
It has the following fields:
Type | Name | Comment |
---|---|---|
Long | id | |
String | name |
DTO
Name: RoleViewDTO
This DTO is a:
-
Create -
Patch -
View
It has the following fields:
Type | Name | Comment |
---|---|---|
Long | id | |
TypeEnum | type | |
PersonViewDTO | person |
DTO
Name: PersonViewDTO
This DTO is a:
-
Create -
Patch -
View
It has the following fields:
Type | Name | Comment |
---|---|---|
Long | id | |
String | username |
DTO
Name: EditionViewDTO
This DTO is a:
-
Create -
Patch -
View
It has the following fields:
Type | Name | Comment |
---|---|---|
String | name | |
List | roles | all roles within the edition |
Boolean | openForEnrolment |
The last field will also have to be added in the "Edition" entity, with a @NotBlank annotation.