[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. 6
      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
* @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 />';
if($newQuestion || $editQuestion)
{
// statement management
@ -469,6 +470,7 @@ if($newQuestion || $editQuestion)
<?php
include('question_admin.inc.php');
}
if(isset($_GET['hotspotadmin']))
{
include('hotspot_admin.inc.php');

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

@ -73,6 +73,11 @@ while ($hotspot = mysql_fetch_assoc($result))
if ($hotspot['hotspot_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

@ -83,6 +83,12 @@ for($i=1;$i <= $nbrAnswers;$i++)
if ($answers['hotspot_type'][$i] == '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

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

@ -77,6 +77,12 @@ while ($hotspot = mysql_fetch_array($result))
if ($hotspot['hotspot_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']."";

@ -40,7 +40,7 @@ if ($_GET['type'] == "square" || $_GET['type'] == "circle")
$hotspot_type = $_GET['type'];
$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'];
$tmp_coord = explode(",",$_GET['co']);

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

@ -56,4 +56,10 @@ function savePolyHotspot(question_id, hotspot_id, coordinates)
{
document.frm_exercise["hotspot_coordinates["+hotspot_id+"]"].value = coordinates;
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