Commit 62a41be5 authored by Bruno Burke's avatar Bruno Burke 🍔
Browse files

add remove-feedback button for ce-exercise

parent 3e817c2d
Pipeline #105431 passed with stages
in 6 minutes and 13 seconds
......@@ -107,7 +107,8 @@
feedback (:feedback options)
on-change (or (:on-change options) identity)
check-fn (:check-fn options)
reset-fn (:reset-fn options)]
reset-fn (:reset-fn options)
remove-feedback-fn (:remove-feedback-fn options)]
(if-not exercise
[:div [:p.has-background-danger "No valid exercise found..."]
[:p "Element: " (str element)]
......@@ -143,12 +144,16 @@
^{:key (str "feedback-ce" (:id ce))}
[ce-core/show ce feedback-options]))})
feedback)}]])
(when (or check-fn reset-fn)
(when (or check-fn remove-feedback-fn reset-fn)
[:div.level.my-1
(when reset-fn
[:div.level-item
[:a.button {:on-click (:reset-fn options)}
"Aufgabe zurücksetzen"]])
(when remove-feedback-fn
[:div.level-item
[:a.button {:on-click remove-feedback-fn}
"Feedback entfernen"]])
(when (and check-fn (not result))
[:div.level-item
[:a.button {:on-click (:check-fn options)}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment