Fixing delineation when using LPs

skala
Julio Montoya 15 years ago
parent 42d12892ad
commit 1f238ae004
  1. 1
      main/exercice/exercice_submit.php
  2. 15
      main/exercice/exercise.class.php
  3. 3
      main/exercice/exercise_submit_modal.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']);
}

@ -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 = '<div style="margin-top:-10px;">';
$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 .='<script src="' . api_get_path(WEB_LIBRARY_PATH) . 'javascript/thickbox.js" type="text/javascript"></script>';
$html .='<style type="text/css" media="all">@import "' . api_get_path(WEB_LIBRARY_PATH) . 'javascript/thickbox.css";</style>';
$html .='<style type="text/css" media="all">@import "' . api_get_path(WEB_LIBRARY_PATH) . 'javascript/thickbox.css";</style>';
$html .= api_get_jquery_ui_js();
$html .='
<script>
$(function() {
$(".button").button();
});
</script>';
//$html .='<br /><a href="exercise_submit_modal.php?learnpath_id='.$learnpath_id.'&learnpath_item_id='.$learnpath_item_id.'&origin='.$origin.'&hotspot='.$hotspot_get.'&nbrQuestions='.$nbrQuestions.'&questionnum='.$questionNum.'&exerciseType='.$exerciseType.'&exerciseId='.$exerciseId.'&placeValuesBeforeTB_=savedValues&TB_iframe=true&height=480&width=640&modal=true" title="" class="thickbox button" id="validationButton">';
$html .='<a href="exercise_submit_modal.php?learnpath_id='.$learnpath_id.'&learnpath_item_id='.$learnpath_item_id.'&origin='.$origin.'&hotspot='.$hotspot_get.'&nbrQuestions='.$nbrQuestions.'&questionnum='.$questionNum.'&exerciseType='.$exerciseType.'&exerciseId='.$exerciseId.'&placeValuesBeforeTB_=savedValues&TB_iframe=true&height=480&width=640&modal=true" title="" class="thickbox button" id="validationButton">';
$html .= get_lang('ValidateAnswer').'</a></button>';
$html .= get_lang('ValidateAnswer').'</a>';
$html .='<br />';
} else {

@ -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']);

Loading…
Cancel
Save