+ check_question: (question) ->
+ # subjects placed in predicates
+ count = 0
+ all = 0
+ all_multiple = 0
+ for qp in $(".predicate .question-piece", question)
+ pred = $(qp).closest("[data-predicate]")
+ v = @get_value_optional_list qp, 'solution'
+ mandatory = v[0]
+ optional = v[1]
+ all_multiple += mandatory.length + optional.length
+ pn = pred.data('predicate')
+ if mandatory.indexOf(pn) >= 0 or optional.indexOf(pn) >= 0
+ count += 1
+ @piece_correct qp
+ else
+ @piece_incorrect qp
+ all += 1
+
+ if @multiple
+ for qp in $(".subject .question-piece", question)
+ v = @get_value_optional_list qp, 'solution'
+ mandatory = v[0]
+ optional = v[1]
+ all_multiple += mandatory.length + optional.length
+ return [count, all_multiple]
+ else
+ return [count, all]
+
+
+