|
|
|
|
@ -22,7 +22,7 @@ |
|
|
|
|
* This script allows to manage answers. It is included from the script admin.php |
|
|
|
|
* @package dokeos.exercise |
|
|
|
|
* @author Olivier Brouckaert |
|
|
|
|
* @version $Id: answer_admin.inc.php 12269 2007-05-03 14:17:37Z elixir_julian $ |
|
|
|
|
* @version $Id: answer_admin.inc.php 13301 2007-09-27 03:47:39Z yannoo $ |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -990,8 +990,8 @@ if($modifyAnswers) |
|
|
|
|
} |
|
|
|
|
?> |
|
|
|
|
|
|
|
|
|
<td align="left"><textarea wrap="virtual" rows="7" cols="25" name="reponse[<?php echo $i; ?>]"><?php echo htmlentities($reponse[$i]); ?></textarea></td>
|
|
|
|
|
<td align="left"><textarea wrap="virtual" rows="7" cols="25" name="comment[<?php echo $i; ?>]"><?php echo htmlentities($comment[$i]); ?></textarea></td>
|
|
|
|
|
<td align="left"><textarea wrap="virtual" rows="7" cols="25" name="reponse[<?php echo $i; ?>]"><?php echo htmlentities($reponse[$i],ENT_QUOTES,$charset); ?></textarea></td>
|
|
|
|
|
<td align="left"><textarea wrap="virtual" rows="7" cols="25" name="comment[<?php echo $i; ?>]"><?php echo htmlentities($comment[$i],ENT_QUOTES,$charset); ?></textarea></td>
|
|
|
|
|
|
|
|
|
|
<td valign="top"><input type="text" name="weighting[<?php echo $i; ?>]" size="5" value="<?php echo isset($weighting[$i])?$weighting[$i]:0; ?>"></td>
|
|
|
|
|
</tr> |
|
|
|
|
@ -1005,7 +1005,7 @@ if($modifyAnswers) |
|
|
|
|
<input type="submit" name="submitAnswers" value="<?php echo get_lang('Ok'); ?>">
|
|
|
|
|
<input type="submit" name="lessAnswers" value="<?php echo get_lang('LessAnswers'); ?>">
|
|
|
|
|
<input type="submit" name="moreAnswers" value="<?php echo get_lang('MoreAnswers'); ?>">
|
|
|
|
|
<!-- <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="cancelAnswers" value="<?php echo get_lang('Cancel'); ?>" onclick="javascript:if(!confirm('<?php echo addslashes(htmlentities(get_lang('ConfirmYourChoice'),ENT_QUOTES,$charset)); ?>')) return false;"> //-->
|
|
|
|
|
</td> |
|
|
|
|
</tr> |
|
|
|
|
</table> |
|
|
|
|
@ -1033,7 +1033,7 @@ if($modifyAnswers) |
|
|
|
|
{ |
|
|
|
|
?> |
|
|
|
|
|
|
|
|
|
<input type="hidden" name="weighting" value="<?php echo $submitAnswers?htmlentities($weighting):htmlentities(serialize($weighting)); ?>">
|
|
|
|
|
<input type="hidden" name="weighting" value="<?php echo $submitAnswers?htmlentities($weighting,ENT_QUOTES,$charset):htmlentities(serialize($weighting),ENT_QUOTES,$charset); ?>">
|
|
|
|
|
|
|
|
|
|
<table border="0" cellpadding="5" width="500"> |
|
|
|
|
|
|
|
|
|
@ -1071,11 +1071,11 @@ if($modifyAnswers) |
|
|
|
|
<td><?php echo get_lang('TypeTextBelow').', '.get_lang('And').' '.get_lang('UseTagForBlank'); ?> :</td>
|
|
|
|
|
</tr> |
|
|
|
|
<tr> |
|
|
|
|
<td><textarea wrap="virtual" name="reponse" cols="65" rows="6"><?php if(!$submitAnswers && empty($reponse)) echo get_lang('DefaultTextInBlanks'); else echo htmlentities($reponse); ?></textarea></td>
|
|
|
|
|
<td><textarea wrap="virtual" name="reponse" cols="65" rows="6"><?php if(!$submitAnswers && empty($reponse)) echo get_lang('DefaultTextInBlanks'); else echo htmlentities($reponse,ENT_QUOTES,$charset); ?></textarea></td>
|
|
|
|
|
</tr> |
|
|
|
|
<tr> |
|
|
|
|
<td colspan="5"> |
|
|
|
|
<!-- <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="cancelAnswers" value="<?php echo get_lang('Cancel'); ?>" onclick="javascript:if(!confirm('<?php echo addslashes(htmlentities(get_lang('ConfirmYourChoice'),ENT_QUOTES,$charset)); ?>')) return false;">
|
|
|
|
|
//--> <input type="submit" name="submitAnswers" value="<?php echo get_lang('Ok'); ?>">
|
|
|
|
|
</td> |
|
|
|
|
</tr> |
|
|
|
|
@ -1086,8 +1086,8 @@ if($modifyAnswers) |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
?> |
|
|
|
|
<input type="hidden" name="blanks" value="<?php echo htmlentities(serialize($blanks)); ?>">
|
|
|
|
|
<input type="hidden" name="reponse" value="<?php echo htmlentities($reponse); ?>">
|
|
|
|
|
<input type="hidden" name="blanks" value="<?php echo htmlentities(serialize($blanks),ENT_QUOTES,$charset); ?>">
|
|
|
|
|
<input type="hidden" name="reponse" value="<?php echo htmlentities($reponse,ENT_QUOTES,$charset); ?>">
|
|
|
|
|
<table border="0" cellpadding="5" width="500"> |
|
|
|
|
<?php |
|
|
|
|
if(!empty($msgErr)) |
|
|
|
|
@ -1136,7 +1136,7 @@ if($modifyAnswers) |
|
|
|
|
<td colspan="2"> |
|
|
|
|
<input type="submit" name="buttonBack" value="< <?php echo get_lang('Back'); ?>">
|
|
|
|
|
<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;"> //-->
|
|
|
|
|
<!-- <input type="submit" name="cancelAnswers" value="<?php echo get_lang('Cancel'); ?>" onclick="javascript:if(!confirm('<?php echo addslashes(htmlentities(get_lang('ConfirmYourChoice'),ENT_QUOTES,$charset)); ?>')) return false;"> //-->
|
|
|
|
|
</td> |
|
|
|
|
</tr> |
|
|
|
|
</table> |
|
|
|
|
@ -1195,7 +1195,7 @@ if($modifyAnswers) |
|
|
|
|
if(!$submitAnswers && empty($free_comment)) |
|
|
|
|
echo ''; |
|
|
|
|
else |
|
|
|
|
echo htmlentities($free_comment); ?> |
|
|
|
|
echo htmlentities($free_comment,ENT_QUOTES,$charset); ?> |
|
|
|
|
<tr><td width="22%"><?php echo get_lang('QuestionWeighting'); ?></td>
|
|
|
|
|
<td width="78%"><input type="text" size="4" name="weighting" value="<?php if(!$submitAnswers && !isset($weighting)) echo '0'; else echo $weighting; ?>"></td>
|
|
|
|
|
</tr> |
|
|
|
|
@ -1274,7 +1274,7 @@ if($modifyAnswers) |
|
|
|
|
|
|
|
|
|
<tr> |
|
|
|
|
<td><?php echo $j; ?></td>
|
|
|
|
|
<td><input type="text" name="match[<?php echo $i; ?>]" size="58" value="<?php if(!$formSent && !isset($match[$i])) echo ${"langDefaultMakeCorrespond$j"}; else echo htmlentities($match[$i]); ?>"></td>
|
|
|
|
|
<td><input type="text" name="match[<?php echo $i; ?>]" size="58" value="<?php if(!$formSent && !isset($match[$i])) echo ${"langDefaultMakeCorrespond$j"}; else echo htmlentities($match[$i],ENT_QUOTES,$charset); ?>"></td>
|
|
|
|
|
<td align="center"><select name="sel[<?php echo $i; ?>]">
|
|
|
|
|
|
|
|
|
|
<?php |
|
|
|
|
@ -1313,7 +1313,7 @@ if($modifyAnswers) |
|
|
|
|
|
|
|
|
|
<tr> |
|
|
|
|
<td><?php echo $val; ?></td>
|
|
|
|
|
<td colspan="3"><input type="text" name="option[<?php echo $key; ?>]" size="80" value="<?php if(!$formSent && !isset($option[$key])) echo get_lang("DefaultMatchingOpt$val"); else echo htmlentities($option[$key]); ?>"></td>
|
|
|
|
|
<td colspan="3"><input type="text" name="option[<?php echo $key; ?>]" size="80" value="<?php if(!$formSent && !isset($option[$key])) echo get_lang("DefaultMatchingOpt$val"); else echo htmlentities($option[$key],ENT_QUOTES,$charset); ?>"></td>
|
|
|
|
|
</tr> |
|
|
|
|
|
|
|
|
|
<?php |
|
|
|
|
@ -1331,7 +1331,7 @@ if($modifyAnswers) |
|
|
|
|
</tr> |
|
|
|
|
<tr> |
|
|
|
|
<td colspan="4"> |
|
|
|
|
<!-- <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="cancelAnswers" value="<?php echo get_lang('Cancel'); ?>" onclick="javascript:if(!confirm('<?php echo addslashes(htmlentities(get_lang('ConfirmYourChoice'),ENT_QUOTES,$charset)); ?>')) return false;">
|
|
|
|
|
//--> <input type="submit" name="submitAnswers" value="<?php echo get_lang('Ok'); ?>">
|
|
|
|
|
</td> |
|
|
|
|
</tr> |
|
|
|
|
@ -1420,8 +1420,8 @@ 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 valign="top" align="left"><input type="text" name="reponse[<?php echo $i; ?>]" value="<?php echo htmlentities($reponse[$i],ENT_QUOTES,$charset); ?>" 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],ENT_QUOTES,$charset); ?></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>
|
|
|
|
|
@ -1437,7 +1437,7 @@ if($modifyAnswers) |
|
|
|
|
<input type="submit" name="moreAnswers" value="<?php echo get_lang('MoreHotspots'); ?>" />
|
|
|
|
|
<hr noshade="noshade" size="1" style="color: #4271b5" /> |
|
|
|
|
<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;" />
|
|
|
|
|
<input type="submit" name="cancelAnswers" value="<?php echo get_lang('Cancel'); ?>" onclick="javascript:if(!confirm('<?php echo addslashes(htmlentities(get_lang('ConfirmYourChoice'),ENT_QUOTES,$charset)); ?>')) return false;" />
|
|
|
|
|
</td> |
|
|
|
|
</tr> |
|
|
|
|
</table> |
|
|
|
|
|