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:
12
src/Client/Shared/Format.fs
Normal file
12
src/Client/Shared/Format.fs
Normal file
@@ -0,0 +1,12 @@
|
||||
module Client.Shared.Format
|
||||
|
||||
/// Whole-numbered points render without a decimal point ("3"); anything with
|
||||
/// a fractional part renders with one decimal place ("2.5") — points are
|
||||
/// usually whole in this app, but `AverageAttempt` grading or a partial-point
|
||||
/// question config can produce a fractional value that a blanket "%.0f"
|
||||
/// would otherwise silently round away.
|
||||
let points (value: float) : string =
|
||||
if value = System.Math.Round value then
|
||||
sprintf "%.0f" value
|
||||
else
|
||||
sprintf "%.1f" value
|
||||
Reference in New Issue
Block a user