[svn r20843] partial new heigth hotspot see FS#4050

skala
Carlos Vargas 17 years ago
parent eaae7c3ef2
commit 5262382539
  1. 10
      main/exercice/exercise.lib.php
  2. 6
      main/exercice/exercise_result.php
  3. 6
      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 20697 2009-05-15 15:42:37Z cvargas1 $
<?php // $Id: exercise.lib.php 20843 2009-05-19 17:19:12Z 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 20697 2009-05-15 15:42:37Z cvargas1 $
* @version $Id: exercise.lib.php 20843 2009-05-19 17:19:12Z 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: 460px; width: 200px;"><b>'.get_lang('HotspotZones').'</b><ol>';
$answer_list = '<div style="padding: 10px; margin-left: 0px; border: 1px solid #A4A4A4; height: 414px; width: 200px;"><b>'.get_lang('HotspotZones').'</b><ol>';
for($answerId=1;$answerId <= $nbrAnswers;$answerId++)
{
$answer_list .= '<li>'.$objAnswerTmp->selectAnswer($answerId).'</li>';
@ -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=\"510\" height=\"480\">'
var oeTags = '<object type=\"application/x-shockwave-flash\" data=\"../plugin/hotspot/hotspot_user.swf?modifyAnswers=".$questionId."&amp;canClick:".$canClick."\" width=\"560\" height=\"436\">'
+ '<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
@ -489,7 +489,7 @@ function showQuestion($questionId, $onlyAnswers=false, $origin=false,$current_it
echo $s;
}
echo "<tr><td colspan='2'>&nbsp;</td></tr></table>";
echo "</table>";
return $nbrAnswers;
}

@ -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 20795 2009-05-18 18:05:02Z iflorespaz $
* @version $Id: exercise_result.php 20843 2009-05-19 17:19:12Z cvargas1 $
*
* @todo split more code up in functions, move functions to library?
*/
@ -673,7 +673,7 @@ foreach ($questionList as $questionId) {
// quits the loop if there are no more blanks (detect '[')
if(($pos = api_strpos($temp,'[')) === false)
{
// adds the end of the text
// adds the end of the textsolution
$answer=$temp;
// TeX parsing - replacement of texcode tags
$texstring = api_parse_tex($texstring);
@ -923,7 +923,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="500" height="400">
<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="560" height="382">
<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 20795 2009-05-18 18:05:02Z iflorespaz $
* @version $Id: exercise_show.php 20843 2009-05-19 17:19:12Z cvargas1 $
*
* @todo remove the debug code and use the general debug library
* @todo use the Database:: functions
@ -857,7 +857,7 @@ if ($show_results) {
?>
<tr>
<td valign="top" align="center" style="padding-left:0px;" >
<table style="border: 1px solid #A4A4A4;border-bottom:none" width="470">
<table style="border: 1px solid #A4A4A4;border-bottom:none" width="560">
<?php
for ($answerId=1;$answerId <= $nbrAnswers;$answerId++) {
$answer=$objAnswerTmp->selectAnswer($answerId);
@ -881,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="100%" height="400">
'<object type="application/x-shockwave-flash" data="../plugin/hotspot/hotspot_solution.swf?modifyAnswers='.Security::remove_XSS($questionId).'&exe_id='.$id.'&from_db=1" width="560" height="382">
<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',500);
$this->resizePicture('width',550);
} else {
$this->resizePicture('height',400);
$this->resizePicture('height',350);
}
$this->save();
}

Loading…
Cancel
Save