class AssignmentService: Any
Fields
Name | Description |
---|---|
val assignmentRepository: AssignmentRepository
|
|
val assignmentACLRepository: AssignmentACLRepository
|
|
val submissionRepository: SubmissionRepository
|
|
val assigneeRepository: AssigneeRepository
|
|
val submissionService: SubmissionService
|
|
val assignmentTestMethodRepository: AssignmentTestMethodRepository
|
|
val submissionReportRepository: SubmissionReportRepository
|
|
val assignmentTagRepository: AssignmentTagRepository
|
Constructors
<init>
constructor(assignmentRepository: AssignmentRepository, assignmentACLRepository: AssignmentACLRepository, submissionRepository: SubmissionRepository, assigneeRepository: AssigneeRepository, submissionService: SubmissionService, assignmentTestMethodRepository: AssignmentTestMethodRepository, submissionReportRepository: SubmissionReportRepository, assignmentTagRepository: AssignmentTagRepository)
AssignmentService provides Assignment related functionality (e.g. list of assignments).
Parameters
Name | Description |
---|---|
assignmentRepository: AssignmentRepository
|
|
assignmentACLRepository: AssignmentACLRepository
|
|
submissionRepository: SubmissionRepository
|
|
assigneeRepository: AssigneeRepository
|
|
submissionService: SubmissionService
|
|
assignmentTestMethodRepository: AssignmentTestMethodRepository
|
|
submissionReportRepository: SubmissionReportRepository
|
|
assignmentTagRepository: AssignmentTagRepository
|
Methods
getMyAssignments
fun getMyAssignments(principal: Principal, archived: Boolean): List<Assignment>
Returns the Assignments that a certain user can access. The returned assignments will be the ones that are owned by the user and also the ones that the user has been given access to.
Parameters
Name | Description |
---|---|
principal: Principal
|
is a Principal, representing the user whose assignments shall be retrieved. |
archived: Boolean
|
is a Boolean. If true, only archived Assignment(s) will be returned. Otherwise, only non-archived Assignment(s) will be returned. |
ReturnValue
Name | Description |
---|---|
List<Assignment>
|
An ArrayList of Assignment(s) |
getAllSubmissionsForAssignment
fun getAllSubmissionsForAssignment(assignmentId: String, principal: Principal, model: ModelMap, request: HttpServletRequest, includeTestDetails: Boolean, mode: String)
Collects into model information about all the Submissions related with a certain Assignment.
Parameters
Name | Description |
---|---|
assignmentId: String
|
is a String identifying the relevant assignment. |
principal: Principal
|
is a Principal representing the user making the request. |
model: ModelMap
|
is a ModelMap that will be populated with information to use in a View. |
request: HttpServletRequest
|
is a HttpServletRequest |
includeTestDetails: Boolean
|
is a Boolean, indicating if test-matrix information should be included. |
mode: String
|
is a String which indicates the page that is being served and influences the information that is placed in the model. Possible values are: |
ReturnValue
Name | Description |
---|---|
Unit
|
submissionCompilledCorrectly
fun submissionCompilledCorrectly(submission: Submission): Boolean
Checks if a Submission was compiled correctly.
Parameters
Name | Description |
---|---|
submission: Submission
|
is a Submission |
ReturnValue
Name | Description |
---|---|
Boolean
|
a Boolean |
groupGroupsByFailures
fun groupGroupsByFailures(failuresByGroup: HashMap
Identifies and joins into a group the student groups that are failing the same unit tests.
Parameters
ReturnValue
Name | Description |
---|---|
List<GroupedProjectGroups>
|
a List of GroupedProjectsGroups |
updateAssignment
fun updateAssignment(existingAssignment: Assignment, assignmentForm: AssignmentForm)
Updates an existing Assignment with the contents of an AssignmentForm.
Parameters
Name | Description |
---|---|
existingAssignment: Assignment
|
, the Assignment that will be updated |
assignmentForm: AssignmentForm
|
, the AssignmentForm from which the Assignment contents will be copied |
ReturnValue
Name | Description |
---|---|
Unit
|
AssignmentService provides Assignment related functionality (e.g. list of assignments).