Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
components
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
7
Issues
7
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Wandelwerk-Software
libraries
components
Commits
540dae1b
Commit
540dae1b
authored
Sep 11, 2020
by
Joachim Schunk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix java-cast-error
parent
82fe8cfc
Pipeline
#47612
failed with stages
in 2 minutes and 18 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
src/cljc/lernmeister/components/exercise_types/calculation/check.cljc
...nmeister/components/exercise_types/calculation/check.cljc
+4
-2
No files found.
src/cljc/lernmeister/components/exercise_types/calculation/check.cljc
View file @
540dae1b
(
ns
lernmeister.components.exercise-types.calculation.check
(
:require
[
lernmeister.components.exercise-types.calculation.migrate-answer
(
:require
[
clojure.tools.reader.edn
:as
edn
]
[
lernmeister.components.exercise-types.calculation.migrate-answer
:refer
[
answer-scheme-version
migrate-answer
]]
[
lernmeister.components.exercise-types.check
:as
e-check
]
...
...
@@ -19,7 +20,8 @@
(
defn
check-calculation
[
id
ans-obj
ex-obj
res-map
with-oom
with-units
]
(
let
[
phys-val-check-res
(
check-phys-vals
ex-obj
ans-obj
:with-oom
with-oom
:with-units
with-units
)
is-correct?
(
tolerable-error?
(
:calculation-error
phys-val-check-res
)
(
int
(
:error-relative
ex-obj
)))]
is-correct?
(
tolerable-error?
(
:calculation-error
phys-val-check-res
)
(
edn/read-string
(
:error-relative
ex-obj
)))]
(
assoc
res-map
id
{
:correct
is-correct?
:points
(
if
is-correct?
(
:correct-points
ex-obj
)
(
:incorrect-points
ex-obj
))
:points-max
(
:correct-points
ex-obj
)})))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment