diff --git a/main/exercice/admin.php b/main/exercice/admin.php
index a38429d898..828b9df3fb 100755
--- a/main/exercice/admin.php
+++ b/main/exercice/admin.php
@@ -344,121 +344,8 @@ $template = new Template();
$htmlHeadXtra[] = $template->fetch('default/exercise/submit.js.tpl');
$htmlHeadXtra[] = api_get_js('d3/jquery.xcolor.js');
-$htmlHeadXtra[] = '';
-$htmlHeadXtra[] = '';
-
-$htmlHeadXtra[] = "
-
-
-
-
-";
+$htmlHeadXtra[] = '';
+$htmlHeadXtra[] = '';
Display::display_header($nameTools,'Exercise');
/*
diff --git a/main/exercice/exercise.class.php b/main/exercice/exercise.class.php
index 613753a860..b83bfe8142 100755
--- a/main/exercice/exercise.class.php
+++ b/main/exercice/exercise.class.php
@@ -2101,118 +2101,7 @@ class Exercise
*/
public function show_lp_javascript()
{
- return "
-
-
-
-
- ";
+ return "";
}
/**
diff --git a/main/exercice/exercise_result.php b/main/exercice/exercise_result.php
index c12dbb9769..98d98eff98 100755
--- a/main/exercice/exercise_result.php
+++ b/main/exercice/exercise_result.php
@@ -75,8 +75,8 @@ $interbreadcrumb[] = array(
"name" => get_lang('Exercises'),
);
-$htmlHeadXtra[] = '';
-$htmlHeadXtra[] = '';
+$htmlHeadXtra[] = '';
+$htmlHeadXtra[] = '';
if ($origin != 'learnpath') {
// So we are not in learnpath tool
diff --git a/main/exercice/exercise_show.php b/main/exercice/exercise_show.php
index 3c808b7241..455afb7538 100755
--- a/main/exercice/exercise_show.php
+++ b/main/exercice/exercise_show.php
@@ -120,8 +120,8 @@ $interbreadcrumb[]= array("url" => "#","name" => get_lang('Result'));
$this_section = SECTION_COURSES;
-$htmlHeadXtra[] = '';
-$htmlHeadXtra[] = '';
+$htmlHeadXtra[] = '';
+$htmlHeadXtra[] = '';
if ($origin != 'learnpath') {
Display::display_header('');
diff --git a/main/exercice/exercise_submit.php b/main/exercice/exercise_submit.php
index 0170cb32b9..d13463a3ff 100755
--- a/main/exercice/exercise_submit.php
+++ b/main/exercice/exercise_submit.php
@@ -60,8 +60,8 @@ $htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_PATH).'javascript/epicloc
$htmlHeadXtra[] = api_get_js('epiclock/javascript/jquery.dateformat.min.js');
$htmlHeadXtra[] = api_get_js('epiclock/javascript/jquery.epiclock.min.js');
$htmlHeadXtra[] = api_get_js('epiclock/renderers/minute/epiclock.minute.js');
-$htmlHeadXtra[] = '';
-$htmlHeadXtra[] = '';
+$htmlHeadXtra[] = '';
+$htmlHeadXtra[] = '';
$template = new Template();
diff --git a/main/exercice/exercise_submit_modal.php b/main/exercice/exercise_submit_modal.php
index 3d71e914fd..84fbba8dc4 100755
--- a/main/exercice/exercise_submit_modal.php
+++ b/main/exercice/exercise_submit_modal.php
@@ -12,6 +12,9 @@ api_protect_course_script(false);
require_once api_get_path(LIBRARY_PATH).'geometry.lib.php';
Display::display_reduced_header();
+
+echo '
';
+
$message = null;
$dbg_local = 0;
$gradebook = null;
@@ -29,14 +32,20 @@ if (empty ($exerciseResult)) {
$exerciseResultCoordinates = isset($_REQUEST['exerciseResultCoordinates']) ? $_REQUEST['exerciseResultCoordinates'] : null;
+$origin = '';
+
if (empty($origin)) {
$origin = Security::remove_XSS($_REQUEST['origin']);
}
// if origin is learnpath
+$learnpath_id = 0;
+
if (empty($learnpath_id)) {
$learnpath_id = Security::remove_XSS($_REQUEST['learnpath_id']);
}
+$learnpath_item_id = 0;
+
if (empty($learnpath_item_id)) {
$learnpath_item_id = Security::remove_XSS($_REQUEST['learnpath_item_id']);
}
@@ -67,6 +76,8 @@ if (is_array($coords) && count($coords) > 0) {
}
}
+$choice_value = '';
+
$user_array = substr($user_array,0,-1);
if (isset($_GET['choice'])){
@@ -109,8 +120,10 @@ if (empty($choice_value)) {
//this is the real redirect function
//echo 'window.location.href = "exercise_submit_modal.php?learnpath_id='.$learnpath_id.'&learnpath_item_id='.$learnpath_item_id.'&hotspotcoord="+ hotspotcoord + "&hotspot="+ hotspot + "&choice="+ choice_js + "&exerciseId='.$exerciseId.'&num='.$questionNum.'&exerciseType='.$exerciseType.'&origin='.$origin.'&gradebook='.$gradebook.'";';
echo ' url = "exercise_submit_modal.php?learnpath_id='.$learnpath_id.'&learnpath_item_id='.$learnpath_item_id.'&hotspotcoord="+ hotspotcoord + "&hotspot="+ hotspot + "&choice="+ choice_js + "&exerciseId='.$exerciseId.'&num='.$questionNum.'&exerciseType='.$exerciseType.'&origin='.$origin.'&gradebook='.$gradebook.'";';
- echo "$('#dialog').load(url); ";
+ echo "$('#global-modal .modal-body').load(url);";
echo '';
+
+ exit;
}
$choice = array();
@@ -574,3 +587,7 @@ if ($links!='') {
//self.parent.tb_remove();
';
}
+
+echo '
';
+
+Display::display_footer();
diff --git a/main/exercice/export/scorm/scorm_classes.php b/main/exercice/export/scorm/scorm_classes.php
index fec3ba36e8..17393c7105 100755
--- a/main/exercice/export/scorm/scorm_classes.php
+++ b/main/exercice/export/scorm/scorm_classes.php
@@ -566,10 +566,7 @@ class ScormAnswerHotspot extends Answer
{
if ($this->standalone) {
$header = '';
- $header .= '';
//because this header closes so many times the
get_lang('Square'),
'Circle' => get_lang('Circle'),
- 'Poly' => get_lang('Poly'),
+ 'Polygon' => get_lang('Polygon'),
'HotspotStatus1' => get_lang('HotspotStatus1'),
'HotspotStatus2Polygon' => get_lang('HotspotStatus2Polygon'),
'HotspotStatus2Other' => get_lang('HotspotStatus2Other'),
@@ -54,7 +54,8 @@ $data['lang'] = [
'NextAnswer' => get_lang('NextAnswer'),
'Delineation' => get_lang('Delineation'),
'CloseDelineation' => get_lang('CloseDelineation'),
- 'Oar' => get_lang('oar')
+ 'Oar' => get_lang('Oar'),
+ 'ClosePolygon' => get_lang('ClosePolygon')
];
$data['image'] = $objQuestion->selectPicturePath();
$data['image_width'] = $pictureWidth;
diff --git a/main/exercice/result.php b/main/exercice/result.php
index 6ddf8d8d1b..21865c30d3 100755
--- a/main/exercice/result.php
+++ b/main/exercice/result.php
@@ -53,8 +53,8 @@ if (!$is_allowedToEdit) {
}
}
-$htmlHeadXtra[] = '';
-$htmlHeadXtra[] = '';
+$htmlHeadXtra[] = '';
+$htmlHeadXtra[] = '';
if ($show_headers) {
$interbreadcrumb[] = array(
diff --git a/main/inc/lib/exercise.lib.php b/main/inc/lib/exercise.lib.php
index 6908143a63..ff8f450b9c 100644
--- a/main/inc/lib/exercise.lib.php
+++ b/main/inc/lib/exercise.lib.php
@@ -1172,12 +1172,12 @@ HOTSPOT;
$canClick = isset($_GET['editQuestion']) ? '0' : (isset($_GET['modifyAnswers']) ? '0' : '1');
- $s .= <<
-
+ $s .= "
+
-
+
$answerList
-HOTSPOT;
+ ";
+
echo <<
diff --git a/main/plugin/hotspot2/css/hotspot.css b/main/inc/lib/javascript/hotspot/css/hotspot.css
similarity index 100%
rename from main/plugin/hotspot2/css/hotspot.css
rename to main/inc/lib/javascript/hotspot/css/hotspot.css
diff --git a/main/plugin/hotspot2/js/hotspot.js b/main/inc/lib/javascript/hotspot/js/hotspot.js
similarity index 69%
rename from main/plugin/hotspot2/js/hotspot.js
rename to main/inc/lib/javascript/hotspot/js/hotspot.js
index 3d2325104a..9e4ac52c30 100755
--- a/main/plugin/hotspot2/js/hotspot.js
+++ b/main/inc/lib/javascript/hotspot/js/hotspot.js
@@ -399,7 +399,7 @@ var HotspotQuestion = (function () {