Initial commit: standalone quiz-testing system
Full-stack F# (Domain/Server/Client via Fable+Elmish+Feliz), PostgreSQL persistence via Dapper, Docker Compose deployment. Student quiz-taking flow with time-limit enforcement and focus-loss tracking, Teacher question bank and quiz builder with results analytics, Admin user management.
This commit is contained in:
24
src/Client/Features/Quizzes/ViewResult/View.fs
Normal file
24
src/Client/Features/Quizzes/ViewResult/View.fs
Normal file
@@ -0,0 +1,24 @@
|
||||
module Client.Features.Quizzes.ViewResult.View
|
||||
|
||||
open Feliz
|
||||
open Domain.Contracts
|
||||
open Client.Shared
|
||||
|
||||
/// Small enough that it doesn't need its own Types/State — it only ever
|
||||
/// dispatches the parent's "go back to the quiz list" message.
|
||||
let view (result: AttemptResult) (onBackToQuizList: unit -> unit) =
|
||||
Html.div [
|
||||
prop.className "result-page"
|
||||
prop.children [
|
||||
Html.h2 "Результат"
|
||||
match result.Passed with
|
||||
| Some true -> Html.div [ prop.className "grade-stamp passed"; prop.text "Тест пройден" ]
|
||||
| Some false -> Html.div [ prop.className "grade-stamp failed"; prop.text "Тест не пройден" ]
|
||||
| None -> Html.none
|
||||
Html.span [
|
||||
prop.className "score-value"
|
||||
prop.text (sprintf "%s / %s" (Format.points result.Score) (Format.points result.MaxScore))
|
||||
]
|
||||
Html.button [ prop.onClick (fun _ -> onBackToQuizList ()); prop.text "К списку тестов" ]
|
||||
]
|
||||
]
|
||||
Reference in New Issue
Block a user