fnp
/
redakcja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix typo
[redakcja.git]
/
redakcja
/
static
/
edumed
/
js
/
edumed.coffee
diff --git
a/redakcja/static/edumed/js/edumed.coffee
b/redakcja/static/edumed/js/edumed.coffee
index
24955fd
..
6fce16b
100644
(file)
--- a/
redakcja/static/edumed/js/edumed.coffee
+++ b/
redakcja/static/edumed/js/edumed.coffee
@@
-97,7
+97,12
@@
class Exercise extends Binding
return [mandat, opt]
show_score: (score) ->
return [mandat, opt]
show_score: (score) ->
- $(".message", @element).text("Wynik: #{score[0]} / #{score[1]}")
+ $msg = $(".message", @element)
+ $msg.text("Wynik: #{score[0]} / #{score[1]}")
+ if score[0] == score[1]
+ $msg.addClass("maxscore")
+ else
+ $msg.removeClass("maxscore")
draggable_equal: ($draggable1, $draggable2) ->
draggable_equal: ($draggable1, $draggable2) ->
@@
-370,7
+375,7
@@
class Zastap extends Exercise
class Przyporzadkuj extends Exercise
is_multiple: ->
for qp in $(".question-piece", @element)
class Przyporzadkuj extends Exercise
is_multiple: ->
for qp in $(".question-piece", @element)
- if $(qp).
data('
solution').split(/[ ,]+/).length > 1
+ if $(qp).
attr('data-
solution').split(/[ ,]+/).length > 1
return true
return false
return true
return false
@@
-391,7
+396,7
@@
class Przyporzadkuj extends Exercise
count = 0
all = 0
if not minimum
count = 0
all = 0
if not minimum
- all = $(".subject
s
.question-piece", question).length
+ all = $(".subject .question-piece", question).length
for pred in $(".predicate [data-predicate]", question)
pn = $(pred).attr('data-predicate')
for pred in $(".predicate [data-predicate]", question)
pn = $(pred).attr('data-predicate')