[svn r15412] apply some display changes in hotspots (FS#2524)

skala
Eric Marguin 18 years ago
parent 3564212aec
commit faca37c066
  1. 5
      main/exercice/exercice_submit.php
  2. 9
      main/exercice/exercise.lib.php
  3. 28
      main/exercice/exercise_result.php
  4. 23
      main/exercice/exercise_show.php
  5. 15
      main/exercice/hotspot_admin.inc.php

@ -33,7 +33,7 @@
* the administrator
* @package dokeos.exercise
* @author Olivier Brouckaert
* @version $Id: exercice_submit.php 15358 2008-05-22 08:47:39Z elixir_inter $
* @version $Id: exercice_submit.php 15412 2008-05-26 13:56:24Z elixir_inter $
*/
@ -537,9 +537,8 @@ else
<td width='3%' bgcolor='#e6e6e6'><img src=\"".api_get_path(WEB_IMG_PATH)."test.gif\" align=\"absmiddle\"></td>
<td valign='middle' bgcolor='#e6e6e6'>
".get_lang('Question')." ";
$s.=$i;
$s.=$i.' : ';
if($exerciseType == 2) $s.=' / '.$nbrQuestions;
$s.='</td></tr>';
echo $s;

@ -23,7 +23,7 @@
* shows a question and its answers
* @package dokeos.exercise
* @author Olivier Brouckaert <oli.brouckaert@skynet.be>
* @version $Id: exercise.lib.php 15358 2008-05-22 08:47:39Z elixir_inter $
* @version $Id: exercise.lib.php 15412 2008-05-26 13:56:24Z elixir_inter $
*/
@ -48,8 +48,6 @@ function showQuestion($questionId, $onlyAnswers=false, $origin=false)
$questionName=$objQuestionTmp->selectTitle();
$questionDescription=$objQuestionTmp->selectDescription();
$s="<tr>
<td valign='top' colspan='2'>&nbsp;";
$questionName=api_parse_tex($questionName);
$s.=$questionName;
$s.="</td>
@ -283,10 +281,7 @@ function showQuestion($questionId, $onlyAnswers=false, $origin=false)
if(!$onlyAnswers)
{
$s="<tr>
<td valign='top' colspan='2'>&nbsp;";
$questionName=api_parse_tex($questionName);
$s.=$questionName;
$s=$questionName;
$s.="</td>
</tr>
<tr>

@ -25,7 +25,7 @@
* @package dokeos.exercise
* @author Olivier Brouckaert, main author
* @author Roan Embrechts, some refactoring
* @version $Id: exercise_result.php 15352 2008-05-21 20:42:25Z elixir_inter $
* @version $Id: exercise_result.php 15412 2008-05-26 13:56:24Z elixir_inter $
*
* @todo split more code up in functions, move functions to library?
*/
@ -274,17 +274,17 @@ function display_hotspot_answer($answerId, $answer, $studentChoice, $answerComme
"#F7BDE2");
?>
<tr>
<td width="25%" valign="top">
<td valign="top">
<div style="float:left; padding-left:5px;">
<div style="display:inline; float:left; width:80px;"><?php echo $answer ?></div>
<div style="height:11px; width:11px; background-color:<?php echo $hotspot_colors[$answerId]; ?>; display:inline; float:left; margin-top:3px;"></div>
</div>
</td>
<td width="25%" valign="top"><?php echo $answerId; ?></td>
<td width="25%" valign="top">
<td valign="top"><?php echo $answerId; ?></td>
<td valign="top">
<?php $studentChoice = ($studentChoice)?get_lang('Correct'):get_lang('Fault'); echo $studentChoice; ?>
</td>
<td width="25%" valign="top">
<td valign="top">
<?php echo stripslashes($answerComment); ?>
</td>
</tr>
@ -357,13 +357,11 @@ $exerciseTitle=api_parse_tex($exerciseTitle);
<table width="100%" border="0" cellpadding="3" cellspacing="2">
<tr bgcolor="#E6E6E6">
<td colspan="<?php echo $colspan; ?>">
<?php echo get_lang("Question").' '.($counter); ?>
<?php echo get_lang("Question").' '.($counter).' : '.$questionName; ?>
</td>
</tr>
<tr>
<td colspan="<?php echo $colspan; ?>">
<?php echo $questionName; ?>
<br />
<i>
<?php echo $questionDescription; ?>
</i>
@ -417,15 +415,15 @@ $exerciseTitle=api_parse_tex($exerciseTitle);
?>
<tr>
<td valign="top" colspan="2">
<table width="100%" border="0">
<table width="556" border="0">
<tr>
<td width="25%" valign="top">
<td width="40%" valign="top">
<i><?php echo get_lang("CorrectAnswer"); ?></i><br /><br />
</td>
<td width="25%" valign="top">
<td width="15%" valign="top">
<i><?php echo get_lang("ClickNumber"); ?></i><br /><br />
</td>
<td width="25%" valign="top">
<td width="20%" valign="top">
<i><?php echo get_lang('HotspotHit'); ?></i><br /><br />
</td>
<td width="25%" valign="top">
@ -747,7 +745,7 @@ $exerciseTitle=api_parse_tex($exerciseTitle);
}
?>
<tr>
<td colspan="<?php echo $colspan; ?>" align="right">
<td colspan="<?php echo $colspan; ?>" align="left">
<b>
<?php
if($questionScore==-1){
@ -756,7 +754,7 @@ $exerciseTitle=api_parse_tex($exerciseTitle);
else{
echo get_lang('Score')." : $questionScore/$questionWeighting";
}
?></b>
?></b><br /><br />
</td>
</tr>
</table>
@ -839,7 +837,7 @@ $exerciseTitle=api_parse_tex($exerciseTitle);
if ($origin != 'learnpath')
{
?>
<input type="submit" value="<?php echo get_lang('Ok'); ?>" />
<input type="submit" value="<?php echo get_lang('Finish'); ?>" />
<?php
}
?>

@ -385,10 +385,7 @@ $result =api_sql_query($query, __FILE__, __LINE__);
}?>
<tr bgcolor="#E6E6E6">
<td colspan="2" > <?php echo get_lang("Question").' '.($counter); ?> </td>
</tr>
<tr>
<td colspan="2"><?php echo $questionName; ?> </td>
<td colspan="2" > <?php echo get_lang("Question").' '.($counter).' : '.$questionName; ?> </td>
</tr>
<tr>
<td colspan="2"><?php echo $questionDescription; ?> </td>
@ -690,12 +687,7 @@ $result =api_sql_query($query, __FILE__, __LINE__);
?>
<table width="355" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td><i><?php echo get_lang("Answer"); ?></i> </td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
@ -708,8 +700,7 @@ $result =api_sql_query($query, __FILE__, __LINE__);
<tr>
<td valign="top" align="left">
<table style="border: 1px solid #4271b5;border-bottom:none" width="556">
<?php
error_log('la');
<?php
for($answerId=1;$answerId <= $nbrAnswers;$answerId++)
{
$answer=$objAnswerTmp->selectAnswer($answerId);
@ -843,14 +834,14 @@ $result =api_sql_query($query, __FILE__, __LINE__);
}
}?>
</td><tr><td></td><td align="right"><b><?php echo get_lang('Score')." : $questionScore/$questionWeighting"; ?></b></td>
</td><tr><td align="left"><b><?php echo get_lang('Score')." : $questionScore/$questionWeighting"; ?></b><br /><br /></td>
</tr>
<?php unset($objAnswerTmp);
$i++;
$totalWeighting+=$questionWeighting;
}
?>
<tr><td></td><td align=right><b><?php
<tr><td align="left"><b><?php
//$query = "update ".$TBL_TRACK_EXERCICES." set exe_result = $totalScore where exe_id = '$id'";
//api_sql_query($query,__FILE__,__LINE__);
echo '<br/>'.get_lang('YourTotalScore')." ";
@ -864,8 +855,8 @@ $totalWeighting+=$questionWeighting;
}
?> !</b>
</td></tr>
<tr><td></td>
<td align="right">
<tr>
<td align="left">
<br />
<?php $strids = implode(",",$arrid);
$marksid = implode(",",$arrmarks);

@ -285,19 +285,18 @@ if($modifyAnswers)
?>
<h3>
<?php echo $langQuestion.": ".$questionName; ?>
<?php echo $langQuestion.": ".$questionName.' <img src="../img/info3.gif" title="'.strip_tags(get_lang('HotspotChoose')).'" alt="'.strip_tags(get_lang('HotspotChoose')).'" />'; ?>
</h3>
<?php
if(!empty($msgErr))
{
Display::display_normal_message($msgErr); //main API
}
Display::display_normal_message(stripslashes(get_lang('HotspotChoose')), false);
?>
<form method="post" action="<?php echo api_get_self(); ?>?hotspotadmin=<?php echo $modifyAnswers; ?>" name="frm_exercise">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<table border="0" cellpadding="0" cellspacing="2" width="100%">
<tr>
<td colspan="2" valign="bottom">
@ -308,7 +307,7 @@ if($modifyAnswers)
</td>
</tr>
<tr>
<td valign="top" style="border:1px solid #4271b5;border-top:none; border-right:none; border-bottom:none">
<td valign="top" style="border:1px solid #4271b5;border-top:none;border-bottom:none;border-right:none;" >
<input type="hidden" name="formSent" value="1" />
<input type="hidden" name="nbrAnswers" value="<?php echo $nbrAnswers; ?>" />
<table class="data_table">
@ -343,12 +342,6 @@ if($modifyAnswers)
?>
</table>
<table cellpadding="0" cellspacing="0">
<tr>
<td style="text-align:center; vertical-align:top; width:20px;">*</td>
<td style="width:auto;"><?php echo get_lang('HotspotRequired'); ?></td>
</tr>
</table>
</td>
</tr>
<tr>

Loading…
Cancel
Save