[svn r13177] various display changes in exercises

skala
Eric Marguin 18 years ago
parent ff9e2cc3e3
commit ececab3a12
  1. 6
      main/exercice/exercice_submit.php
  2. 8
      main/exercice/exercise.lib.php
  3. 4
      main/exercice/exercise_result.php
  4. 6
      main/exercice/exercise_show.php
  5. 25
      main/exercice/hotspot_admin.inc.php

@ -33,7 +33,7 @@
* the administrator
* @package dokeos.exercise
* @author Olivier Brouckaert
* @version $Id: exercice_submit.php 12891 2007-08-12 19:25:08Z yannoo $
* @version $Id: exercice_submit.php 13177 2007-09-21 14:50:21Z elixir_inter $
*/
@ -482,7 +482,7 @@ $s.=" <form method='post' action='".api_get_self()."?autocomplete=off".$s2."' na
<table width='100%' border='0' cellpadding='1' cellspacing='0'>
<tr>
<td>
<table width='100%' cellpadding='3' cellspacing='2' border='0'>";
<table width='100%' cellpadding='3' cellspacing='0' border='0'>";
echo $s;
$i=0;
@ -520,7 +520,7 @@ foreach($questionList as $questionId)
}
$s="<tr>
<td width='3%'><img src=\"".api_get_path(WEB_IMG_PATH)."test.gif\" align=\"absmiddle\"></td>
<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;

@ -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 13139 2007-09-20 15:19:08Z elixir_inter $
* @version $Id: exercise.lib.php 13177 2007-09-21 14:50:21Z elixir_inter $
*/
@ -274,7 +274,7 @@ function showQuestion($questionId, $onlyAnswers=false, $origin=false)
$objAnswerTmp=new Answer($questionId);
$nbrAnswers=$objAnswerTmp->selectNbrAnswers();
$answer_list = '<div style="padding: 10px; margin-left: -8px; border: 1px solid #4271b5; height: 448px; width: 200px;"><b>'.get_lang('HotspotZones').'</b><ol>';
$answer_list = '<div style="padding: 10px; margin-left: -8px; border: 1px solid #4271b5; height: 620px; width: 200px;"><b>'.get_lang('HotspotZones').'</b><ol>';
for($answerId=1;$answerId <= $nbrAnswers;$answerId++)
{
$answer_list .= '<li>'.$objAnswerTmp->selectAnswer($answerId).'</li>';
@ -415,7 +415,7 @@ function showQuestion($questionId, $onlyAnswers=false, $origin=false)
}
// -->
</script>";
$s .= '<tr><td valign="top" colspan="2" width="100%"><table><tr><td width="100%">'."
$s .= '<tr><td valign="top" colspan="2" width="100%"><table><tr><td width="735">'."
<script language=\"JavaScript\" type=\"text/javascript\">
<!--
// Version check based upon the values entered above in \"Globals\"
@ -436,7 +436,7 @@ function showQuestion($questionId, $onlyAnswers=false, $origin=false)
}
// -->
</script></td>
<td valign='top'>$answer_list</td></tr></table>
<td valign='top' align='left'>$answer_list</td></tr></table>
</td></tr>";
echo $s;

@ -25,7 +25,7 @@
* @package dokeos.exercise
* @author Olivier Brouckaert, main author
* @author Roan Embrechts, some refactoring
* @version $Id: exercise_result.php 13128 2007-09-20 13:38:47Z elixir_inter $
* @version $Id: exercise_result.php 13177 2007-09-21 14:50:21Z elixir_inter $
*
* @todo split more code up in functions, move functions to library?
*/
@ -783,7 +783,7 @@ $exerciseTitle=api_parse_tex($exerciseTitle);
}else{
echo $totalScore."/".$totalWeighting;
}
?> !</b>
?></b>
</td>
</tr>
<tr>

@ -687,7 +687,7 @@ $result =api_sql_query($query, __FILE__, __LINE__);
?>
<tr>
<td valign="top" align="left">
<table style="border: 1px solid" width="200">';
<table style="border: 1px solid #4271b5;border-bottom:none" width="730">
<?php
for($answerId=1;$answerId <= $nbrAnswers;$answerId++)
{
@ -699,7 +699,7 @@ $result =api_sql_query($query, __FILE__, __LINE__);
$query = "select answer from ".$TBL_TRACK_ATTEMPT." where exe_id = $id and question_id= $questionId";
$resq=api_sql_query($query);
$choice = mysql_result($resq,0,"answer");
echo $choice;
display_hotspot_answer($answerId,$answer,$choice,$answerComment);
$i++;
@ -716,7 +716,7 @@ $result =api_sql_query($query, __FILE__, __LINE__);
echo '
<tr>
<td colspan="2">
<object type="application/x-shockwave-flash" data="../plugin/hotspot/hotspot_solution.swf?modifyAnswers='.$questionId.'" width="730" height="730">
<object type="application/x-shockwave-flash" data="../plugin/hotspot/hotspot_solution.swf?modifyAnswers='.$questionId.'" width="730" height="570">
<param name="movie" value="../plugin/hotspot/hotspot_solution.swf?modifyAnswers='.$questionId.'" />
</object>
</td>

@ -297,7 +297,16 @@ if($modifyAnswers)
?>
<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="0" width="100%">
<tr>
<td colspan="2" valign="bottom">
<input type="submit" name="lessAnswers" value="<?php echo get_lang('LessHotspots'); ?>" />
<input type="submit" name="moreAnswers" value="<?php echo get_lang('MoreHotspots'); ?>" />
<input type="submit" name="cancelAnswers" value="<?php echo get_lang('Cancel'); ?>" onclick="javascript:if(!confirm('<?php echo addslashes(htmlentities(get_lang('ConfirmYourChoice'))); ?>')) return false;" />
<input type="submit" name="submitAnswers" value="<?php echo get_lang('Ok'); ?>" />
</td>
</tr>
<tr>
<td valign="top" style="border:1px solid #4271b5;border-top:none; border-right:none; border-bottom:none">
<input type="hidden" name="formSent" value="1" />
@ -324,7 +333,7 @@ if($modifyAnswers)
<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="45" /></td>
<td align="left"><textarea wrap="virtual" rows="1" cols="25" 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); ?>" />
<td valign="top"><input type="text" name="weighting[<?php echo $i; ?>]" size="1" value="<?php echo (isset($weighting[$i]) ? $weighting[$i] : 10); ?>" />
<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>
</tr>
@ -340,17 +349,7 @@ if($modifyAnswers)
<td style="width:auto;"><?php echo get_lang('HotspotRequired'); ?></td>
</tr>
</table>
</td>
<td style="border-right:1px solid #4271b5;" valign="bottom">
<input type="submit" name="lessAnswers" value="<?php echo get_lang('LessHotspots'); ?>" />
<input type="submit" name="moreAnswers" value="<?php echo get_lang('MoreHotspots'); ?>" /><br /><br /><br />
</td>
</tr>
<tr>
<td colspan="2" style="border:1px solid #4271b5;border-top:none;padding-bottom:3px;margin-bottom:5px;">
<input type="submit" name="submitAnswers" value="<?php echo get_lang('Ok'); ?>" />
<input type="submit" name="cancelAnswers" value="<?php echo get_lang('Cancel'); ?>" onclick="javascript:if(!confirm('<?php echo addslashes(htmlentities(get_lang('ConfirmYourChoice'))); ?>')) return false;" />
</td>
</td>
</tr>
<tr>
<td colspan="2" valign="top" style="border:1px solid #4271b5;border-top:none">

Loading…
Cancel
Save