From 5e441b1035bfa97ea9d038c7472bf4aca958df41 Mon Sep 17 00:00:00 2001 From: Angel Fernando Quiroz Campos Date: Fri, 19 Jul 2019 10:06:29 -0500 Subject: [PATCH] Plugin: Fix Whispeak when saving question answer - refs BT#15819 --- main/inc/ajax/exercise.ajax.php | 2 ++ plugin/whispeakauth/WhispeakAuthPlugin.php | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/main/inc/ajax/exercise.ajax.php b/main/inc/ajax/exercise.ajax.php index 4ca9980460..5566c25862 100755 --- a/main/inc/ajax/exercise.ajax.php +++ b/main/inc/ajax/exercise.ajax.php @@ -453,6 +453,8 @@ switch ($action) { echo 'ok'; break; + } else { + ChamiloSession::erase(WhispeakAuthPlugin::SESSION_QUIZ_QUESTION); } // Getting information of the current exercise. diff --git a/plugin/whispeakauth/WhispeakAuthPlugin.php b/plugin/whispeakauth/WhispeakAuthPlugin.php index de25c2136d..23a1be1681 100644 --- a/plugin/whispeakauth/WhispeakAuthPlugin.php +++ b/plugin/whispeakauth/WhispeakAuthPlugin.php @@ -281,7 +281,7 @@ class WhispeakAuthPlugin extends Plugin implements HookPluginInterface return false; } - $questionInfo = ChamiloSession::read(WhispeakAuthPlugin::SESSION_QUIZ_QUESTION, []); + $questionInfo = ChamiloSession::read(self::SESSION_QUIZ_QUESTION, []); if (empty($questionInfo)) { return true; @@ -295,8 +295,6 @@ class WhispeakAuthPlugin extends Plugin implements HookPluginInterface return true; } - ChamiloSession::erase(WhispeakAuthPlugin::SESSION_QUIZ_QUESTION); - return false; }