From 6ced1484cf0b817c6066c9cb8439f71a1ea53ce9 Mon Sep 17 00:00:00 2001 From: Angel Fernando Quiroz Campos Date: Mon, 6 Mar 2017 11:02:13 -0500 Subject: [PATCH] Fix #1517 --- main/exercise/hotspot_actionscript.as.php | 6 +++--- main/inc/lib/exercise.lib.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/main/exercise/hotspot_actionscript.as.php b/main/exercise/hotspot_actionscript.as.php index e3c469b5dd..ffa48fe058 100755 --- a/main/exercise/hotspot_actionscript.as.php +++ b/main/exercise/hotspot_actionscript.as.php @@ -133,9 +133,9 @@ if (!empty($attemptList)) { $data['nmbrTries'] = $nmbrTries; $data['done'] = 'done'; -if (Session::has('hotspot_ordered')) { +if (Session::has("hotspot_ordered$questionId")) { $tempHotspots = []; - $hotspotOrdered = Session::read('hotspot_ordered'); + $hotspotOrdered = Session::read("hotspot_ordered$questionId"); foreach ($hotspotOrdered as $hotspotOrder) { foreach ($data['hotspots'] as $hotspot) { @@ -149,7 +149,7 @@ if (Session::has('hotspot_ordered')) { $data['hotspots'] = $tempHotspots; - Session::erase('hotspot_ordered'); + Session::erase("hotspot_ordered$questionId"); } header('Content-Type: application/json'); diff --git a/main/inc/lib/exercise.lib.php b/main/inc/lib/exercise.lib.php index 6f000abfc6..fe5c6f9732 100644 --- a/main/inc/lib/exercise.lib.php +++ b/main/inc/lib/exercise.lib.php @@ -1186,7 +1186,7 @@ HTML; '; if (!empty($answers_hotspot)) { - Session::write('hotspot_ordered', array_keys($answers_hotspot)); + Session::write("hotspot_ordered$questionId", array_keys($answers_hotspot)); $countAnswers = 1; foreach ($answers_hotspot as $value) { $answerList .= "
  • {$countAnswers} - {$value}

  • ";