From c37f013998c68de1d65ed6c551aedaac83d69754 Mon Sep 17 00:00:00 2001 From: Marcin Koziej Date: Wed, 13 Feb 2013 15:17:42 +0100 Subject: [PATCH] data() sometimes creates numbers and sometimes strings... --- redakcja/static/edumed/js/edumed.coffee | 2 +- redakcja/static/edumed/js/edumed.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/redakcja/static/edumed/js/edumed.coffee b/redakcja/static/edumed/js/edumed.coffee index 4cf17aac..e8762ec5 100644 --- a/redakcja/static/edumed/js/edumed.coffee +++ b/redakcja/static/edumed/js/edumed.coffee @@ -375,7 +375,7 @@ class Zastap extends Exercise 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 diff --git a/redakcja/static/edumed/js/edumed.js b/redakcja/static/edumed/js/edumed.js index 2c5e3083..17d485f8 100644 --- a/redakcja/static/edumed/js/edumed.js +++ b/redakcja/static/edumed/js/edumed.js @@ -493,7 +493,7 @@ _ref = $(".question-piece", this.element); for (_i = 0, _len = _ref.length; _i < _len; _i++) { qp = _ref[_i]; - if ($(qp).data('solution').split(/[ ,]+/).length > 1) { + if ($(qp).attr('data-solution').split(/[ ,]+/).length > 1) { return true; } } -- 2.20.1