Skip to content

Extracted services and controllers into separate files #91

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

mmhlego
Copy link
Contributor

@mmhlego mmhlego commented Jul 13, 2025

- Added example service and controller (close #60)
- Minor bug fixes
- Code cleanup
- Added `getExamplePassRatePerTestCase` to exampleService
- Added getStudents to cache
- Added testScores column (close #61)
- Added `submissionService`
- Updated `Results` model to support `testScores`
@@ -6,5 +6,6 @@ import lombok.Data
class Results(
var points: Double? = null,
var hints: MutableList<String> = mutableListOf(),
var tests: MutableList<String> = mutableListOf()
var tests: MutableList<String> = mutableListOf(),
var testScores: MutableList<Double> = mutableListOf()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No longer needed, as discussed.

@@ -48,6 +48,10 @@ class Submission {
@OneToMany(mappedBy = "submission", cascade = [CascadeType.ALL])
var persistentResultFiles: MutableList<ResultFile> = ArrayList()

@Column(name = "test_scores")
@JdbcTypeCode(SqlTypes.JSON)
var testScores: List<Double> = ArrayList()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here:)

@@ -276,6 +277,7 @@ class ExecutionService(
if (results.points != null) {
// only relevant for GRADE submissions (RUN and TEST are always valid)
submission.valid = true
submission.testScores = results.testScores
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again remove:)

return example
}

fun createExampleSubmission(courseSlug: String, taskSlug: String, submissionDTO: SubmissionDTO) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't we also put this into the SubmissionService, now that we have it?

@mmhlego
Copy link
Contributor Author

mmhlego commented Jul 15, 2025

There is a new merge request from @patsalv which resolved and applied all the changes.

@mmhlego mmhlego closed this Jul 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants