diff --git a/main/exercice/exercice_submit.php b/main/exercice/exercice_submit.php
index f051a2baa6..b29645499f 100755
--- a/main/exercice/exercice_submit.php
+++ b/main/exercice/exercice_submit.php
@@ -66,6 +66,7 @@ $TBL_REPONSES = Database :: get_course_table(TABLE_QUIZ_ANSWER);
if (empty ($origin)) {
$origin = $_REQUEST['origin'];
}
+
if (empty ($learnpath_id)) {
$learnpath_id = intval($_REQUEST['learnpath_id']);
}
diff --git a/main/exercice/exercise.class.php b/main/exercice/exercise.class.php
index 299fb61454..4e28044b97 100755
--- a/main/exercice/exercise.class.php
+++ b/main/exercice/exercise.class.php
@@ -1474,6 +1474,10 @@ class Exercise {
}
public function show_button($nbrQuestions, $questionNum, $exerciseId) {
+ global $origin, $learnpath_id,$learnpath_item_id;
+ $nbrQuestions = intval($nbrQuestions);
+ $exerciseId = intval($exerciseId);
+
$html = '';
$html = '
';
$confirmation_alert = $this->type == 1? " onclick=\"javascript:if(!confirm('".get_lang("ConfirmYourChoice")."')) return false;\" ":"";
@@ -1483,11 +1487,18 @@ class Exercise {
if ($this->selectFeedbackType() == EXERCISE_FEEDBACK_TYPE_DIRECT && $this->type == ONE_PER_PAGE) {
$submit_btn = '';
$html .='';
+ $html .='';
$html .='';
-
+ $html .= api_get_jquery_ui_js();
+ $html .='
+ ';
//$html .='
';
$html .='';
- $html .= get_lang('ValidateAnswer').'';
+ $html .= get_lang('ValidateAnswer').'';
$html .='
';
} else {
diff --git a/main/exercice/exercise_submit_modal.php b/main/exercice/exercise_submit_modal.php
index 62d9100d56..808eb35c35 100755
--- a/main/exercice/exercise_submit_modal.php
+++ b/main/exercice/exercise_submit_modal.php
@@ -7,7 +7,7 @@
$language_file=array('exercice');
require_once '../inc/global.inc.php';
api_protect_course_script(false);
-require_once api_get_path(INCLUDE_PATH) . 'reduced_header.inc.php';
+require_once api_get_path(INCLUDE_PATH).'reduced_header.inc.php';
require_once api_get_path(LIBRARY_PATH).'geometry.lib.php';
$dbg_local = 0;
@@ -26,7 +26,6 @@ if (empty($exerciseResultCoordinates)) {
if (empty($origin)) {
$origin = Security::remove_XSS($_REQUEST['origin']);
}
-
// if origin is learnpath
if (empty ($learnpath_id)) {
$learnpath_id = Security::remove_XSS($_REQUEST['learnpath_id']);