[svn r15917] add delineation hotspot type

skala
Eric Marguin 18 years ago
parent f020ddc532
commit b5f0c77cd6
  1. 4
      main/exercice/admin.php
  2. 4
      main/exercice/export/qti2/qti2_classes.php
  3. 5
      main/exercice/hotspot_actionscript.as.php
  4. 6
      main/exercice/hotspot_actionscript_admin.as.php
  5. 2
      main/exercice/hotspot_admin.inc.php
  6. 6
      main/exercice/hotspot_answers.as.php
  7. 2
      main/exercice/hotspot_save.inc.php
  8. 2
      main/lang/french/hotspot.inc.php
  9. 6
      main/plugin/hotspot/hotspot.js
  10. BIN
      main/plugin/hotspot/hotspot_admin.fla
  11. BIN
      main/plugin/hotspot/hotspot_admin.swf

@ -63,7 +63,7 @@
* *
* @package dokeos.exercise * @package dokeos.exercise
* @author Olivier Brouckaert * @author Olivier Brouckaert
* @version $Id: admin.php 15842 2008-07-24 16:41:17Z dperales $ * @version $Id: admin.php 15917 2008-08-05 14:44:11Z elixir_inter $
*/ */
@ -461,6 +461,7 @@ if(!empty($description))
} }
echo '<br /><br />'; echo '<br /><br />';
if($newQuestion || $editQuestion) if($newQuestion || $editQuestion)
{ {
// statement management // statement management
@ -469,6 +470,7 @@ if($newQuestion || $editQuestion)
<?php <?php
include('question_admin.inc.php'); include('question_admin.inc.php');
} }
if(isset($_GET['hotspotadmin'])) if(isset($_GET['hotspotadmin']))
{ {
include('hotspot_admin.inc.php'); include('hotspot_admin.inc.php');

@ -405,6 +405,10 @@ class ImsAnswerHotspot extends Answer
$type = 'poly'; $type = 'poly';
$coords = str_replace(array(';','|'),array(',',','),$answer['hotspot_coord']); $coords = str_replace(array(';','|'),array(',',','),$answer['hotspot_coord']);
break; break;
case 'delineation' :
$type = 'delineation';
$coords = str_replace(array(';','|'),array(',',','),$answer['hotspot_coord']);
break;
} }
$text .= ' <hotspotChoice shape="'.$type.'" coords="'.$coords.'" identifier="'.$key.'"/>'."\n"; $text .= ' <hotspotChoice shape="'.$type.'" coords="'.$coords.'" identifier="'.$key.'"/>'."\n";
} }

@ -74,6 +74,11 @@ while ($hotspot = mysql_fetch_assoc($result))
{ {
$output .= "&hotspot_".$hotspot['id']."_type=poly"; $output .= "&hotspot_".$hotspot['id']."_type=poly";
} }
// Delineation
if ($hotspot['hotspot_type'] == 'delineation')
{
$output .= "&hotspot_".$hotspot['id']."_type=delineation";
}
// This is a good answer, count + 1 for nmbr of clicks // This is a good answer, count + 1 for nmbr of clicks
if ($hotspot['hotspot_type'] > 0) if ($hotspot['hotspot_type'] > 0)

@ -85,6 +85,12 @@ for($i=1;$i <= $nbrAnswers;$i++)
$output .= "&hotspot_".$i."_type=poly"; $output .= "&hotspot_".$i."_type=poly";
} }
// Delineation
if ($answers['hotspot_type'][$i] == 'delineation')
{
$output .= "&hotspot_".$i."_type=delineation";
}
// This is a good answer, count + 1 for nmbr of clicks // This is a good answer, count + 1 for nmbr of clicks
if ($answers['weighting'][$i] > 0) if ($answers['weighting'][$i] > 0)
{ {

@ -31,7 +31,6 @@ if(!defined('ALLOWED_TO_INCLUDE'))
{ {
exit(); exit();
} }
$modifyAnswers = $_GET['hotspotadmin']; $modifyAnswers = $_GET['hotspotadmin'];
if(!is_object($objQuestion)) if(!is_object($objQuestion))
@ -155,7 +154,6 @@ if($submitAnswers || $buttonBack)
{ {
$questionWeighting+=$weighting[$i]; $questionWeighting+=$weighting[$i];
} }
// creates answer // creates answer
$objAnswer->createAnswer($reponse[$i], '',$comment[$i],$weighting[$i],$i,$hotspot_coordinates[$i],$hotspot_type[$i]); $objAnswer->createAnswer($reponse[$i], '',$comment[$i],$weighting[$i],$i,$hotspot_coordinates[$i],$hotspot_type[$i]);
} // end for() } // end for()

@ -79,6 +79,12 @@ while ($hotspot = mysql_fetch_array($result))
$output .= "&hotspot_".$hotspot['id']."_type=poly"; $output .= "&hotspot_".$hotspot['id']."_type=poly";
} }
// Delineation
if ($hotspot['hotspot_type'] == 'delineation')
{
$output .= "&hotspot_".$hotspot['id']."_type=delineation";
}
$output .= "&hotspot_".$hotspot['id']."_coord=".$hotspot['hotspot_coordinates'].""; $output .= "&hotspot_".$hotspot['id']."_coord=".$hotspot['hotspot_coordinates']."";
$i++; $i++;

@ -40,7 +40,7 @@ if ($_GET['type'] == "square" || $_GET['type'] == "circle")
$hotspot_type = $_GET['type']; $hotspot_type = $_GET['type'];
$hotspot_coordinates = $_GET['x'].";".$_GET['y']."|".$_GET['width']."|".$_GET['height']; $hotspot_coordinates = $_GET['x'].";".$_GET['y']."|".$_GET['width']."|".$_GET['height'];
} }
if ($_GET['type'] == "poly") if ($_GET['type'] == "poly" || $_GET['type'] == "delineation")
{ {
$hotspot_type = $_GET['type']; $hotspot_type = $_GET['type'];
$tmp_coord = explode(",",$_GET['co']); $tmp_coord = explode(",",$_GET['co']);

@ -5,6 +5,7 @@ $select = "S
$square = "Rectangle"; $square = "Rectangle";
$circle = "Ellipse"; $circle = "Ellipse";
$poly = "Polygone"; $poly = "Polygone";
$delineation = "Délinéation";
$status1 = "Dessinez une zone cliquable."; $status1 = "Dessinez une zone cliquable.";
$status2_poly = "Faites un clic droit pour fermer le polygone."; $status2_poly = "Faites un clic droit pour fermer le polygone.";
$status2_other = "Relâchez le bouton de la souris pour sauvegarder la zone cliquable."; $status2_other = "Relâchez le bouton de la souris pour sauvegarder la zone cliquable.";
@ -15,6 +16,7 @@ $exercise_status_3 = "Statut : Question termin
$showUserPoints = "Montrer/cacher les clics"; $showUserPoints = "Montrer/cacher les clics";
$showHotspots = "Montrer/cacher les zones cliquables"; $showHotspots = "Montrer/cacher les zones cliquables";
$labelPolyMenu = "Fermer le polygone"; $labelPolyMenu = "Fermer le polygone";
$labelDelineationMenu = "Fermer la délinéation";
$triesleft = "Essais restants"; $triesleft = "Essais restants";
$exeFinished = "Toutes les réponses ont été remplies. Modifiez vos choix ou envoyez vos réponses"; $exeFinished = "Toutes les réponses ont été remplies. Modifiez vos choix ou envoyez vos réponses";
$nextAnswer = "Cliquez maintenant sur : &done=done"; $nextAnswer = "Cliquez maintenant sur : &done=done";

@ -57,3 +57,9 @@ function savePolyHotspot(question_id, hotspot_id, coordinates)
document.frm_exercise["hotspot_coordinates["+hotspot_id+"]"].value = coordinates; document.frm_exercise["hotspot_coordinates["+hotspot_id+"]"].value = coordinates;
document.frm_exercise["hotspot_type["+hotspot_id+"]"].value = "poly"; document.frm_exercise["hotspot_type["+hotspot_id+"]"].value = "poly";
} }
function saveDelineationHotspot(question_id, hotspot_id, coordinates)
{
document.frm_exercise["hotspot_coordinates["+hotspot_id+"]"].value = coordinates;
document.frm_exercise["hotspot_type["+hotspot_id+"]"].value = "delineation";
}
Loading…
Cancel
Save