[svn r10276]

skala
Luk Vanlanduyt 18 years ago
parent e79900d8dd
commit e76a1b0590
  1. 8
      main/exercice/exercice_submit.php
  2. 17
      main/exercice/exercise_result.php

@ -1,4 +1,4 @@
<?php // $Id: exercice_submit.php 10234 2006-11-28 13:43:34Z develop-it $ <?php // $Id: exercice_submit.php 10276 2006-11-30 15:10:57Z develop-it $
/* /*
============================================================================== ==============================================================================
Dokeos - elearning and course management software Dokeos - elearning and course management software
@ -403,7 +403,7 @@ $number_of_hotspot_questions = 0;
$onsubmit = ''; $onsubmit = '';
$i=0; $i=0;
var_dump($questionList); //var_dump($questionList);
foreach($questionList as $questionId) foreach($questionList as $questionId)
{ {
@ -437,11 +437,11 @@ foreach($questionList as $questionId)
} }
} }
echo ':' . $number_of_hotspot_questions; //echo ':' . $number_of_hotspot_questions;
if($number_of_hotspot_questions > 0) if($number_of_hotspot_questions > 0)
{ {
$onsubmit = "onsubmit=\"return validateFlashVar('".$number_of_hotspot_questions."', '".get_lang('HotspotValidateError1')."', '".get_lang('HotspotValidateError2')."')\""; $onsubmit = "onsubmit=\"return validateFlashVar('".$number_of_hotspot_questions."', '".get_lang('HotspotValidateError1')."', '".get_lang('HotspotValidateError2')."');\"";
} }
$s=" $s="
<p>$exerciseDescription</p> <p>$exerciseDescription</p>

@ -1,4 +1,4 @@
<?php // $Id: exercise_result.php 10237 2006-11-28 14:54:07Z develop-it $ <?php // $Id: exercise_result.php 10276 2006-11-30 15:10:57Z develop-it $
/* /*
============================================================================== ==============================================================================
Dokeos - elearning and course management software Dokeos - elearning and course management software
@ -273,8 +273,6 @@ $exerciseTitle=api_parse_tex($exerciseTitle);
$exeId =mysql_result($res,0,"id"); $exeId =mysql_result($res,0,"id");
$exeId=$exeId+1; $exeId=$exeId+1;
var_dump($questionList);
foreach($questionList as $questionId) foreach($questionList as $questionId)
{ {
// gets the student choice for this question // gets the student choice for this question
@ -282,7 +280,6 @@ $exerciseTitle=api_parse_tex($exerciseTitle);
// creates a temporary Question object // creates a temporary Question object
$objQuestionTmp=new Question(); $objQuestionTmp=new Question();
echo $questionId;
$objQuestionTmp->read($questionId); $objQuestionTmp->read($questionId);
$questionName=$objQuestionTmp->selectTitle(); $questionName=$objQuestionTmp->selectTitle();
@ -301,6 +298,11 @@ $exerciseTitle=api_parse_tex($exerciseTitle);
{ {
$colspan=2; $colspan=2;
} }
elseif($answerType == HOT_SPOT || $answerType == HOT_SPOT_ORDER)
{
$colspan=4;
$rowspan=$nbrAnswers+1;
}
else else
{ {
$colspan=1; $colspan=1;
@ -362,7 +364,6 @@ $exerciseTitle=api_parse_tex($exerciseTitle);
} }
elseif($answerType == HOT_SPOT) elseif($answerType == HOT_SPOT)
{ {
echo $questionId;
?> ?>
<tr> <tr>
<td width="40%"> <td width="40%">
@ -653,6 +654,12 @@ $exerciseTitle=api_parse_tex($exerciseTitle);
} }
} }
} // end for that loops over all answers of the current question } // end for that loops over all answers of the current question
if ($answerType == HOT_SPOT || $answerType == HOT_SPOT_ORDER)
{
// We made an extra table for the answers
echo "</table></td></tr>";
}
?> ?>
<tr> <tr>
<td colspan="<?php echo $colspan; ?>" align="right"> <td colspan="<?php echo $colspan; ?>" align="right">

Loading…
Cancel
Save