[svn r20697] Show hotspot width 500px heigth 400px see FS#4050

skala
Carlos Vargas 16 years ago
parent d0d526daf0
commit fb251f2e74
  1. 10
      main/exercice/exercise.lib.php
  2. 6
      main/exercice/exercise_result.php
  3. 12
      main/exercice/exercise_show.php
  4. 4
      main/exercice/hotspot.class.php
  5. BIN
      main/plugin/hotspot/hotspot_solution.fla
  6. BIN
      main/plugin/hotspot/hotspot_solution.swf
  7. BIN
      main/plugin/hotspot/hotspot_user.fla
  8. BIN
      main/plugin/hotspot/hotspot_user.swf

@ -1,4 +1,4 @@
<?php // $Id: exercise.lib.php 20451 2009-05-10 12:02:22Z ivantcholakov $
<?php // $Id: exercise.lib.php 20697 2009-05-15 15:42:37Z cvargas1 $
/*
==============================================================================
@ -29,7 +29,7 @@
* shows a question and its answers
* @package dokeos.exercise
* @author Olivier Brouckaert <oli.brouckaert@skynet.be>
* @version $Id: exercise.lib.php 20451 2009-05-10 12:02:22Z ivantcholakov $
* @version $Id: exercise.lib.php 20697 2009-05-15 15:42:37Z cvargas1 $
*/
/**
@ -315,7 +315,7 @@ function showQuestion($questionId, $onlyAnswers=false, $origin=false,$current_it
$objAnswerTmp=new Answer($questionId);
$nbrAnswers=$objAnswerTmp->selectNbrAnswers();
$answer_list = '<div style="padding: 10px; margin-left: 0px; border: 1px solid #A4A4A4; height: 481px; width: 200px;"><b>'.get_lang('HotspotZones').'</b><ol>';
$answer_list = '<div style="padding: 10px; margin-left: 0px; border: 1px solid #A4A4A4; height: 460px; width: 200px;"><b>'.get_lang('HotspotZones').'</b><ol>';
for($answerId=1;$answerId <= $nbrAnswers;$answerId++)
{
$answer_list .= '<li>'.$objAnswerTmp->selectAnswer($answerId).'</li>';
@ -463,7 +463,7 @@ function showQuestion($questionId, $onlyAnswers=false, $origin=false,$current_it
}
// -->
</script>";
$s .= '<tr><td valign="top" colspan="2" width="100%"><table><tr><td width="570">'."
$s .= '<tr><td valign="top" colspan="2" width="520"><table><tr><td width="520">'."
<script language=\"JavaScript\" type=\"text/javascript\">
<!--
// Version check based upon the values entered above in \"Globals\"
@ -472,7 +472,7 @@ function showQuestion($questionId, $onlyAnswers=false, $origin=false,$current_it
// Check to see if the version meets the requirements for playback
if (hasReqestedVersion) { // if we've detected an acceptable version
var oeTags = '<object type=\"application/x-shockwave-flash\" data=\"../plugin/hotspot/hotspot_user.swf?modifyAnswers=".$questionId."&amp;canClick:".$canClick."\" width=\"556\" height=\"501\">'
var oeTags = '<object type=\"application/x-shockwave-flash\" data=\"../plugin/hotspot/hotspot_user.swf?modifyAnswers=".$questionId."&amp;canClick:".$canClick."\" width=\"510\" height=\"480\">'
+ '<param name=\"movie\" value=\"../plugin/hotspot/hotspot_user.swf?modifyAnswers=".$questionId."&amp;canClick:".$canClick."\" \/>'
+ '<\/object>';
document.write(oeTags); // embed the Flash Content SWF when all tests are passed

@ -29,7 +29,7 @@
* @author Olivier Brouckaert, main author
* @author Roan Embrechts, some refactoring
* @author Julio Montoya Armas switchable fill in blank option added
* @version $Id: exercise_result.php 20604 2009-05-13 20:40:35Z cfasanando $
* @version $Id: exercise_result.php 20697 2009-05-15 15:42:37Z cvargas1 $
*
* @todo split more code up in functions, move functions to library?
*/
@ -555,7 +555,7 @@ foreach ($questionList as $questionId) {
?>
<tr>
<td valign="top" colspan="2">
<table width="556" border="0">
<table width="510" border="0">
<tr>
<td width="40%" valign="top">
<i><?php echo get_lang("CorrectAnswer"); ?></i><br /><br />
@ -924,7 +924,7 @@ foreach ($questionList as $questionId) {
<tr>
<td colspan="2">
<i><?php echo get_lang('Hotspot'); ?></i><br /><br />
<object type="application/x-shockwave-flash" data="../plugin/hotspot/hotspot_solution.swf?modifyAnswers=<?php echo Security::remove_XSS($questionId); ?>&exe_id=&from_db=0" width="556" height="421">
<object type="application/x-shockwave-flash" data="../plugin/hotspot/hotspot_solution.swf?modifyAnswers=<?php echo Security::remove_XSS($questionId); ?>&exe_id=&from_db=0" width="500" height="400">
<param name="movie" value="../plugin/hotspot/hotspot_solution.swf?modifyAnswers=<?php echo Security::remove_XSS($questionId); ?>&exe_id=&from_db=0" />
</object>
</td>

@ -4,7 +4,7 @@
*
* @package dokeos.exercise
* @author Julio Montoya Armas Added switchable fill in blank option added
* @version $Id: exercise_show.php 20608 2009-05-13 21:01:19Z cfasanando $
* @version $Id: exercise_show.php 20697 2009-05-15 15:42:37Z cvargas1 $
*
* @todo remove the debug code and use the general debug library
* @todo use the Database:: functions
@ -848,10 +848,8 @@ if ($show_results) {
echo '</table>';
} elseif ($answerType == HOT_SPOT) {
?>
<table width="355" border="0">
<tr>
<td>&nbsp;</td>
</tr>
<table width="500" border="0">
<?php
$objAnswerTmp=new Answer($questionId);
$nbrAnswers=$objAnswerTmp->selectNbrAnswers();
@ -859,7 +857,7 @@ if ($show_results) {
?>
<tr>
<td valign="top" align="left" style="padding-left:0px;" >
<table style="border: 1px solid #A4A4A4;border-bottom:none" width="556px">
<table style="border: 1px solid #A4A4A4;border-bottom:none" width="500">
<?php
for ($answerId=1;$answerId <= $nbrAnswers;$answerId++) {
$answer=$objAnswerTmp->selectAnswer($answerId);
@ -883,7 +881,7 @@ if ($show_results) {
echo '<tr>
<td colspan="2">'.
//<object type="application/x-shockwave-flash" data="../plugin/hotspot/hotspot_solution.swf?modifyAnswers='.$questionId.'&exe_id='.$id.'&from_db=1" width="556" height="421">
'<object type="application/x-shockwave-flash" data="../plugin/hotspot/hotspot_solution.swf?modifyAnswers='.Security::remove_XSS($questionId).'&exe_id='.$id.'&from_db=1" width="556" height="421">
'<object type="application/x-shockwave-flash" data="../plugin/hotspot/hotspot_solution.swf?modifyAnswers='.Security::remove_XSS($questionId).'&exe_id='.$id.'&from_db=1" width="100%" height="400">
<param name="movie" value="../plugin/hotspot/hotspot_solution.swf?modifyAnswers='.Security::remove_XSS($questionId).'&exe_id='.$id.'&from_db=1" />
</object>

@ -68,9 +68,9 @@ class HotSpot extends Question {
$this->uploadPicture($file_info['tmp_name'], $file_info['name']);
list($width,$height) = @getimagesize($file_info['tmp_name']);
if($width>=$height) {
$this->resizePicture('width',544);
$this->resizePicture('width',500);
} else {
$this->resizePicture('height',408);
$this->resizePicture('height',400);
}
$this->save();
}

Loading…
Cancel
Save