[svn r11074] fix bugs

skala
Julian Prud'homme 18 years ago
parent 5bbeb79227
commit 9673800f3d
  1. 5
      main/exercice/exercise_result.php
  2. 17
      main/exercice/exercise_show.php
  3. 2
      main/exercice/hotspot_admin.inc.php

@ -27,7 +27,7 @@
* @package dokeos.exercise
* @author Olivier Brouckaert, main author
* @author Roan Embrechts, some refactoring
* @version $Id: exercise_result.php 11023 2007-01-30 12:48:38Z elixir_inter $
* @version $Id: exercise_result.php 11074 2007-02-07 15:57:38Z elixir_julian $
*
* @todo split more code up in functions, move functions to library?
*/
@ -267,7 +267,7 @@ function display_hotspot_answer($answerId, $answer, $studentChoice, $answerComme
<?php $studentChoice = ($studentChoice)?get_lang('Correct'):get_lang('Fault'); echo $studentChoice; ?>
</td>
<td width="25%" valign="top">
<?php echo $answerComment ?>
<?php echo stripslashes($answerComment); ?>
</td>
</tr>
<?php
@ -723,6 +723,7 @@ $exerciseTitle=api_parse_tex($exerciseTitle);
$val = $choice[$j];
if (preg_match_all ('#<font color="red"><s>([0-9a-z ]*)</s></font>#', $val, $arr1))
$val = $arr1[1][0];
$val=addslashes($val);
$sql = "select position from $table_ans where question_id=$questionId and answer='$val'";
$res = api_sql_query($sql, __FILE__, __LINE__);
$answer = mysql_result($res,0,"position");

@ -706,19 +706,6 @@ $result =api_sql_query($query, __FILE__, __LINE__);
?>
</table></td></tr></table>
<?php
}
?>
@ -818,8 +805,8 @@ $totalWeighting+=$questionWeighting;
}
?>
<tr><td></td><td align=right><b><?php
$query = "update `".$TABLETRACK_EXERCICES."` set exe_result = $totalScore where exe_id = '$id'";
api_sql_query($query,__FILE__,__LINE__);
//$query = "update `".$TABLETRACK_EXERCICES."` set exe_result = $totalScore where exe_id = '$id'";
//api_sql_query($query,__FILE__,__LINE__);
echo get_lang('YourTotalScore')." ";
if($dsp_percent == true)
{

@ -346,7 +346,7 @@ if($modifyAnswers)
<tr>
<td valign="top"><div style="height: 15px; width: 15px; background-color: <?php echo $hotspot_colors[$i]; ?>"> </div></td>
<td valign="top" align="left"><input type="text" name="reponse[<?php echo $i; ?>]" value="<?php echo htmlentities($reponse[$i]); ?>" size="12" /></td>
<td align="left"><textarea wrap="virtual" rows="3" cols="10" name="comment[<?php echo $i; ?>]" style="width: 100%"><?php echo htmlentities($comment[$i]); ?></textarea></td>
<td align="left"><textarea wrap="virtual" rows="3" cols="10" name="comment[<?php echo $i; ?>]" style="width: 100%"><?php echo stripslashes(htmlentities($comment[$i])); ?></textarea></td>
<td valign="top"><input type="text" name="weighting[<?php echo $i; ?>]" size="1" value="<?php echo (isset($weighting[$i]) ? $weighting[$i] : 1); ?>" />
<input type="hidden" name="hotspot_coordinates[<?php echo $i; ?>]" value="<?php echo (empty($hotspot_coordinates[$i]) ? '0;0|0|0' : $hotspot_coordinates[$i]); ?>" />
<input type="hidden" name="hotspot_type[<?php echo $i; ?>]" value="<?php echo (empty($hotspot_type[$i]) ? 'square' : $hotspot_type[$i]); ?>" /></td>

Loading…
Cancel
Save