- 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.attr('data-predicate')
- if mandatory.indexOf(pn) >= 0 or optional.indexOf(pn) >= 0
- count += 1
- @piece_correct qp
- else
- @piece_incorrect qp
- all += 1
+ if not minimum
+ all = $(".subjects .question-piece", question).length
+
+ for pred in $(".predicate [data-predicate]", question)
+ pn = $(pred).attr('data-predicate')
+ if minimum?
+ all += minimum