[svn r11595] improve the information for students for free answers when the question has'nt been corrected

skala
Julian Prud'homme 18 years ago
parent 25cacbb8b3
commit 55f9bda903
  1. 15
      main/exercice/exercise_result.php
  2. 11
      main/exercice/exercise_show.php

@ -27,7 +27,7 @@
* @package dokeos.exercise
* @author Olivier Brouckaert, main author
* @author Roan Embrechts, some refactoring
* @version $Id: exercise_result.php 11562 2007-03-13 15:41:19Z elixir_julian $
* @version $Id: exercise_result.php 11595 2007-03-15 13:07:10Z elixir_julian $
*
* @todo split more code up in functions, move functions to library?
*/
@ -569,7 +569,8 @@ $exerciseTitle=api_parse_tex($exerciseTitle);
if($studentChoice)
{
$questionScore=0;
//Score is at -1 because the question has'nt been corected
$questionScore=-1;
$totalScore+=0;
}
@ -691,7 +692,15 @@ $exerciseTitle=api_parse_tex($exerciseTitle);
?>
<tr>
<td colspan="<?php echo $colspan; ?>" align="right">
<b><?php echo get_lang('Score')." : $questionScore/$questionWeighting"; ?></b>
<b>
<?php
if($questionScore==-1){
echo get_lang('Score')." : 0/$questionWeighting";
}
else{
echo get_lang('Score')." : $questionScore/$questionWeighting";
}
?></b>
</td>
</tr>
</table>

@ -569,7 +569,12 @@ $result =api_sql_query($query, __FILE__, __LINE__);
$resq=api_sql_query($query);
$choice = mysql_result($resq,0,"answer");
$questionScore = mysql_result($resq,0,"marks");
$totalScore+=$questionScore;
if($questionScore==-1){
$totalScore+=0;
}
else{
$totalScore+=$questionScore;
}
?>
<tr>
<td valign="top"><?php display_free_answer($choice, $id, $questionId);?> </td>
@ -802,6 +807,10 @@ $result =api_sql_query($query, __FILE__, __LINE__);
<?php } ?>
</select>
</form></div><?php
if($questionScore==-1){
$questionScore=0;
echo '<br>'.get_lang('notCorrectedYet');
}
}
else{
$arrmarks[] = $questionId;

Loading…
Cancel
Save