diff --git a/main/exercice/question.class.php b/main/exercice/question.class.php index f229a8af62..b56631a39d 100755 --- a/main/exercice/question.class.php +++ b/main/exercice/question.class.php @@ -908,7 +908,7 @@ abstract class Question ]; $id = Database::insert($TBL_ANSWERS, $params); if ($id) { - $sql = "UPDATE $TBL_ANSWERS SET id = id_auto WHERE id_auto = $id"; + $sql = "UPDATE $TBL_ANSWERS SET id = iid, id_auto = iid WHERE iid = $id"; Database::query($sql); } } @@ -931,7 +931,7 @@ abstract class Question $id = Database::insert($TBL_ANSWERS, $params); if ($id) { - $sql = "UPDATE $TBL_ANSWERS SET id = id_auto WHERE id_auto = $id"; + $sql = "UPDATE $TBL_ANSWERS SET id = iid, id_auto = iid WHERE iid = $id"; Database::query($sql); } } diff --git a/main/inc/lib/exercise.lib.php b/main/inc/lib/exercise.lib.php index 637450e010..e8c27b286d 100644 --- a/main/inc/lib/exercise.lib.php +++ b/main/inc/lib/exercise.lib.php @@ -1129,25 +1129,31 @@ HTML; ); } - // display answers of hotpost order by id - $answer_list = '
' . get_lang( - 'HotspotZones' - ) . '
'; - if (!empty($answers_hotspot)) { - ksort($answers_hotspot); - foreach ($answers_hotspot as $key => $value) { - $answer_list .= '
' . $key . '.- ' . $value . '

'; + $answerList = ''; + + if ($answerType != HOT_SPOT_DELINEATION) { + $answerList = ' +
+ +
    + '; + + if (!empty($answers_hotspot)) { + ksort($answers_hotspot); + + $countAnswers = 1; + + foreach ($answers_hotspot as $value) { + $answerList .= "
  1. {$countAnswers} - {$value}

  2. "; + + $countAnswers++; + } } - } - $answer_list .= '
'; - if ($answerType == HOT_SPOT_DELINEATION) { - $answer_list = ''; - $swf_file = 'hotspot_delineation_user'; - $swf_height = 405; - } else { - $swf_file = 'hotspot_user'; - $swf_height = 436; + $answerList .= ' + + + '; } if (!$only_questions) { @@ -1179,7 +1185,7 @@ HOTSPOT;
- $answer_list + $answerList
HOTSPOT; echo <<