[svn r11765] Fix a bug when there is a ' in the test name

skala
Julian Prud'homme 19 years ago
parent a3bf5518a7
commit dbe69eb4e5
  1. 4
      main/exercice/exercice.php
  2. 6
      main/exercice/exercise_show.php

@ -24,7 +24,7 @@
* @author Olivier Brouckaert, original author * @author Olivier Brouckaert, original author
* @author Denes Nagy, HotPotatoes integration * @author Denes Nagy, HotPotatoes integration
* @author Wolfgang Schneider, code/html cleanup * @author Wolfgang Schneider, code/html cleanup
* @version $Id: exercice.php 11760 2007-03-29 07:46:40Z pcool $ * @version $Id: exercice.php 11765 2007-03-29 08:34:31Z elixir_julian $
*/ */
@ -871,7 +871,7 @@ $message = "<p>You attempt for the test #test# has been viewed/commented/correct
<td><?php $test = $results[$i][1]; echo $results[$i][1]; ?></td> <td><?php $test = $results[$i][1]; echo $results[$i][1]; ?></td>
<td><?php $dt = strftime($dateTimeFormatLong,$results[$i][4]); echo strftime($dateTimeFormatLong,$results[$i][4]); ?></td> <td><?php $dt = strftime($dateTimeFormatLong,$results[$i][4]); echo strftime($dateTimeFormatLong,$results[$i][4]); ?></td>
<td><?php $res = $results[$i][2]; echo $results[$i][2]; ?> / <?php echo $results[$i][3]; ?></td> <td><?php $res = $results[$i][2]; echo $results[$i][2]; ?> / <?php echo $results[$i][3]; ?></td>
<td><?php echo $is_allowedToEdit?"<a href='exercise_show.php?user=$user&test=$test&dt=$dt&res=$res&id=$id&email=$mailid'>Edit</a>":"<a href='exercise_show.php?test=$test&dt=$dt&res=$res&id=$id'>".get_lang('Show')."</a>"?></td> <td><?php echo $is_allowedToEdit?"<a href='exercise_show.php?user=$user&dt=$dt&res=$res&id=$id&email=$mailid'>Edit</a>":"<a href='exercise_show.php?dt=$dt&res=$res&id=$id'>".get_lang('Show')."</a>"?></td>
</tr> </tr>

@ -288,7 +288,11 @@ function display_hotspot_answer($answerId, $answer, $studentChoice, $answerComme
<table width="100%" border="0" cellspacing=0 cellpadding=0> <table width="100%" border="0" cellspacing=0 cellpadding=0>
<tr> <tr>
<td colspan="2"> <td colspan="2">
<?php $exerciseTitle=api_parse_tex($test); <?php
$sql_test_name='SELECT title FROM '.$TBL_EXERCICES.' WHERE id="'.$id.'"';
$result=api_sql_query($sql_test_name);
$test=mysql_result($result,0,0);
$exerciseTitle=api_parse_tex($test);
$query = "select * from `".$TABLETRACK_ATTEMPT."` as attempts $query = "select * from `".$TABLETRACK_ATTEMPT."` as attempts
INNER JOIN `".$TABLETRACK_EXERCICES."` as stats_exercices ON stats_exercices.exe_id=attempts.exe_id INNER JOIN `".$TABLETRACK_EXERCICES."` as stats_exercices ON stats_exercices.exe_id=attempts.exe_id

Loading…
Cancel
Save