Ver Fonte

[svn r10276]

Luk Vanlanduyt há 18 anos atrás
pai
commit
e76a1b0590
2 ficheiros alterados com 16 adições e 9 exclusões
  1. 4 4
      main/exercice/exercice_submit.php
  2. 12 5
      main/exercice/exercise_result.php

+ 4 - 4
main/exercice/exercice_submit.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
@@ -403,7 +403,7 @@ $number_of_hotspot_questions = 0;
 $onsubmit = '';
 $i=0;
 
-var_dump($questionList);
+//var_dump($questionList);
 
 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)
 {
-	$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="
 <p>$exerciseDescription</p>

+ 12 - 5
main/exercice/exercise_result.php

@@ -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
@@ -273,8 +273,6 @@ $exerciseTitle=api_parse_tex($exerciseTitle);
 	$exeId =mysql_result($res,0,"id");
 	$exeId=$exeId+1;
 	
-	var_dump($questionList);
-	
 	foreach($questionList as $questionId)
 	{
 		// gets the student choice for this question
@@ -282,7 +280,6 @@ $exerciseTitle=api_parse_tex($exerciseTitle);
 		// creates a temporary Question object
 		$objQuestionTmp=new Question();
 		
-		echo $questionId;
 		$objQuestionTmp->read($questionId);
 
 		$questionName=$objQuestionTmp->selectTitle();
@@ -301,6 +298,11 @@ $exerciseTitle=api_parse_tex($exerciseTitle);
 		{
 			$colspan=2;
 		}
+		elseif($answerType == HOT_SPOT || $answerType == HOT_SPOT_ORDER)
+		{
+			$colspan=4;
+			$rowspan=$nbrAnswers+1;
+		}
 		else
 		{
 			$colspan=1;
@@ -362,7 +364,6 @@ $exerciseTitle=api_parse_tex($exerciseTitle);
 		}
 		elseif($answerType == HOT_SPOT)
 		{
-			echo $questionId;
 			?>			
 				<tr>
 					<td width="40%">
@@ -653,6 +654,12 @@ $exerciseTitle=api_parse_tex($exerciseTitle);
 				}
 			}
 		} // 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>
 			<td colspan="<?php echo $colspan; ?>" align="right">