From c091275eb1cacf106e22a3596a35a854cbd8cb8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szab=C3=B3=20Benedek?= Date: Wed, 18 Feb 2026 10:17:01 +0100 Subject: [PATCH] Show expected solution of task when grading an answer --- .../sch/cmsch/component/task/TaskAdminRateController.kt | 1 + backend/src/main/resources/templates/details.html | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/backend/src/main/kotlin/hu/bme/sch/cmsch/component/task/TaskAdminRateController.kt b/backend/src/main/kotlin/hu/bme/sch/cmsch/component/task/TaskAdminRateController.kt index 3e8fbb19b..91724e87b 100644 --- a/backend/src/main/kotlin/hu/bme/sch/cmsch/component/task/TaskAdminRateController.kt +++ b/backend/src/main/kotlin/hu/bme/sch/cmsch/component/task/TaskAdminRateController.kt @@ -173,6 +173,7 @@ class TaskAdminRateController( model.addAttribute("data", entity.orElseThrow()) model.addAttribute("taskTitle", entity.orElseThrow().task?.title) model.addAttribute("taskDescription", entity.orElseThrow().task?.description?.let { markdownToHtml(it) }) + model.addAttribute("taskSolution", entity.orElseThrow().task?.solution?.let { markdownToHtml(it) }) val maxScore = entity.orElseThrow().task?.maxScore ?: 0 model.addAttribute("comment", "Feladványhoz tartozó max pont: $maxScore") model.addAttribute("maxScore", maxScore) diff --git a/backend/src/main/resources/templates/details.html b/backend/src/main/resources/templates/details.html index e58cffa5f..a5419769e 100644 --- a/backend/src/main/resources/templates/details.html +++ b/backend/src/main/resources/templates/details.html @@ -22,7 +22,7 @@

View create

View type

-
+

@@ -31,6 +31,11 @@

View type

+ + + +

+