Skip to content

Commit

Permalink
Fix Hotspot question, student cannot move points if several Hotspot q…
Browse files Browse the repository at this point in the history
…uestions on one page - Refs #8098
  • Loading branch information
jloguercio committed Feb 25, 2016
1 parent 2b2c541 commit 9dabe82
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions main/inc/lib/javascript/hotspot/js/hotspot.js
Expand Up @@ -900,9 +900,13 @@ window.HotspotQuestion = (function () {
isMoving = true;

if (e.target.tagName === 'circle') {
answerIndex = $(e.target).index('circle');
//Hack to move correctly the hot spots if there are more than one HS question in same page
answerIndex = $(e.target).next().html();
answerIndex = parseInt(answerIndex) - 1;
} else if (e.target.tagName === 'text') {
answerIndex = $(e.target).index('text');
//Hack to move correctly the hot spots if there are more than one HS question in same page
answerIndex = $(e.target).html();
answerIndex = parseInt(answerIndex) - 1;
}

hotspot = self.hotspotsCollection.get(answerIndex);
Expand Down

0 comments on commit 9dabe82

Please sign in to comment.