Merge branch '1.10.x' of github.com:chamilo/chamilo-lms into 1.10.x

1.10.x
aragonc 10 years ago
commit f29c6f612a
  1. 117
      main/exercice/admin.php
  2. 113
      main/exercice/exercise.class.php
  3. 4
      main/exercice/exercise_result.php
  4. 4
      main/exercice/exercise_show.php
  5. 4
      main/exercice/exercise_submit.php
  6. 19
      main/exercice/exercise_submit_modal.php
  7. 7
      main/exercice/export/scorm/scorm_classes.php
  8. 5
      main/exercice/hotspot_actionscript.as.php
  9. 3
      main/exercice/hotspot_actionscript_admin.as.php
  10. 257
      main/exercice/hotspot_admin.inc.php
  11. 5
      main/exercice/hotspot_answers.as.php
  12. 4
      main/exercice/result.php
  13. 13
      main/inc/lib/exercise.lib.php
  14. 0
      main/inc/lib/javascript/hotspot/css/hotspot.css
  15. 543
      main/inc/lib/javascript/hotspot/js/hotspot.js
  16. 18
      main/lang/arabic/hotspot.inc.php
  17. 21
      main/lang/asturian/hotspot.inc.php
  18. 21
      main/lang/basque/hotspot.inc.php
  19. 5
      main/lang/bengali/hotspot.inc.php
  20. 5
      main/lang/bosnian/hotspot.inc.php
  21. 21
      main/lang/brazilian/hotspot.inc.php
  22. 21
      main/lang/bulgarian/hotspot.inc.php
  23. 21
      main/lang/catalan/hotspot.inc.php
  24. 18
      main/lang/croatian/hotspot.inc.php
  25. 20
      main/lang/czech/hotspot.inc.php
  26. 18
      main/lang/danish/hotspot.inc.php
  27. 5
      main/lang/dari/hotspot.inc.php
  28. 21
      main/lang/dutch/hotspot.inc.php
  29. 21
      main/lang/english/hotspot.inc.php
  30. 15
      main/lang/english/trad4all.inc.php
  31. 5
      main/lang/esperanto/hotspot.inc.php
  32. 5
      main/lang/faroese/hotspot.inc.php
  33. 5
      main/lang/finnish/hotspot.inc.php
  34. 21
      main/lang/french/hotspot.inc.php
  35. 5
      main/lang/friulian/hotspot.inc.php
  36. 21
      main/lang/galician/hotspot.inc.php
  37. 5
      main/lang/georgian/hotspot.inc.php
  38. 21
      main/lang/german/hotspot.inc.php
  39. 21
      main/lang/greek/hotspot.inc.php
  40. 5
      main/lang/hebrew/hotspot.inc.php
  41. 5
      main/lang/hindi/hotspot.inc.php
  42. 18
      main/lang/hungarian/hotspot.inc.php
  43. 5
      main/lang/indonesian/hotspot.inc.php
  44. 21
      main/lang/italian/hotspot.inc.php
  45. 18
      main/lang/japanese/hotspot.inc.php
  46. 5
      main/lang/korean/hotspot.inc.php
  47. 21
      main/lang/latvian/hotspot.inc.php
  48. 18
      main/lang/lithuanian/hotspot.inc.php
  49. 18
      main/lang/macedonian/hotspot.inc.php
  50. 5
      main/lang/malay/hotspot.inc.php
  51. 5
      main/lang/norwegian/hotspot.inc.php
  52. 5
      main/lang/occitan/hotspot.inc.php
  53. 5
      main/lang/pashto/hotspot.inc.php
  54. 21
      main/lang/persian/hotspot.inc.php
  55. 21
      main/lang/polish/hotspot.inc.php
  56. 21
      main/lang/portuguese/hotspot.inc.php
  57. 20
      main/lang/quechua_cusco/hotspot.inc.php
  58. 21
      main/lang/romanian/hotspot.inc.php
  59. 18
      main/lang/russian/hotspot.inc.php
  60. 12
      main/lang/serbian/hotspot.inc.php
  61. 5
      main/lang/simpl_chinese/hotspot.inc.php
  62. 21
      main/lang/slovak/hotspot.inc.php
  63. 21
      main/lang/slovenian/hotspot.inc.php
  64. 5
      main/lang/somali/hotspot.inc.php
  65. 21
      main/lang/spanish/hotspot.inc.php
  66. 15
      main/lang/spanish/trad4all.inc.php
  67. 5
      main/lang/spanish_latin/hotspot.inc.php
  68. 5
      main/lang/swahili/hotspot.inc.php
  69. 13
      main/lang/swedish/hotspot.inc.php
  70. 5
      main/lang/tagalog/hotspot.inc.php
  71. 5
      main/lang/thai/hotspot.inc.php
  72. 5
      main/lang/tibetan/hotspot.inc.php
  73. 9
      main/lang/trad_chinese/hotspot.inc.php
  74. 21
      main/lang/turkish/hotspot.inc.php
  75. 6
      main/lang/ukrainian/hotspot.inc.php
  76. 5
      main/lang/vietnamese/hotspot.inc.php
  77. 5
      main/lang/xhosa/hotspot.inc.php
  78. 5
      main/lang/yoruba/hotspot.inc.php
  79. 455
      main/plugin/hotspot/JavaScriptFlashGateway.js
  80. BIN
      main/plugin/hotspot/JavaScriptFlashGateway.swf
  81. 199
      main/plugin/hotspot/com/macromedia/javascript/JavaScriptProxy.as
  82. 478
      main/plugin/hotspot/com/macromedia/javascript/JavaScriptSerializer.as
  83. 104
      main/plugin/hotspot/hotspot.js
  84. BIN
      main/plugin/hotspot/hotspot_admin.fla
  85. BIN
      main/plugin/hotspot/hotspot_admin.swf
  86. BIN
      main/plugin/hotspot/hotspot_delineation_admin.fla
  87. BIN
      main/plugin/hotspot/hotspot_delineation_admin.swf
  88. BIN
      main/plugin/hotspot/hotspot_delineation_user.fla
  89. BIN
      main/plugin/hotspot/hotspot_delineation_user.swf
  90. BIN
      main/plugin/hotspot/hotspot_solution.fla
  91. 349
      main/plugin/hotspot/hotspot_solution.fla.as
  92. BIN
      main/plugin/hotspot/hotspot_solution.swf
  93. BIN
      main/plugin/hotspot/hotspot_user.fla
  94. BIN
      main/plugin/hotspot/hotspot_user.swf
  95. 86
      main/plugin/hotspot/jsmethods.js
  96. 13
      main/plugin/hotspot/vbmethods.vbscript
  97. 2
      main/webservices/courses_list.soap.php
  98. 2
      main/webservices/registration.soap.php
  99. 4
      main/webservices/user_info.soap.php

@ -344,121 +344,8 @@ $template = new Template();
$htmlHeadXtra[] = $template->fetch('default/exercise/submit.js.tpl'); $htmlHeadXtra[] = $template->fetch('default/exercise/submit.js.tpl');
$htmlHeadXtra[] = api_get_js('d3/jquery.xcolor.js'); $htmlHeadXtra[] = api_get_js('d3/jquery.xcolor.js');
$htmlHeadXtra[] = '<link rel="stylesheet" href="../plugin/hotspot2/css/hotspot.css">'; $htmlHeadXtra[] = '<link rel="stylesheet" href="' . api_get_path(WEB_LIBRARY_JS_PATH) . 'hotspot/css/hotspot.css">';
$htmlHeadXtra[] = '<script src="../plugin/hotspot2/js/hotspot.js"></script>'; $htmlHeadXtra[] = '<script src="' . api_get_path(WEB_LIBRARY_JS_PATH) . 'hotspot/js/hotspot.js"></script>';
$htmlHeadXtra[] = "<script type=\"text/javascript\" src=\"../plugin/hotspot/JavaScriptFlashGateway.js\"></script>
<script src=\"../plugin/hotspot/hotspot.js\" type=\"text/javascript\"></script>
<script language=\"JavaScript\" type=\"text/javascript\">
<!--
// -----------------------------------------------------------------------------
// Globals
// Major version of Flash required
var requiredMajorVersion = 7;
// Minor version of Flash required
var requiredMinorVersion = 0;
// Minor version of Flash required
var requiredRevision = 0;
// the version of javascript supported
var jsVersion = 1.0;
// -----------------------------------------------------------------------------
// -->
</script>
<script language=\"VBScript\" type=\"text/vbscript\">
<!-- // Visual basic helper required to detect Flash Player ActiveX control version information
Function VBGetSwfVer(i)
on error resume next
Dim swControl, swVersion
swVersion = 0
set swControl = CreateObject(\"ShockwaveFlash.ShockwaveFlash.\" + CStr(i))
if (IsObject(swControl)) then
swVersion = swControl.GetVariable(\"\$version\")
end if
VBGetSwfVer = swVersion
End Function
// -->
</script>
<script language=\"JavaScript1.1\" type=\"text/javascript\">
<!-- // Detect Client Browser type
var isIE = (navigator.appVersion.indexOf(\"MSIE\") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf(\"win\") != -1) ? true : false;
var isOpera = (navigator.userAgent.indexOf(\"Opera\") != -1) ? true : false;
jsVersion = 1.1;
// JavaScript helper required to detect Flash Player PlugIn version information
function JSGetSwfVer(i){
// NS/Opera version >= 3 check for Flash plugin in plugin array
if (navigator.plugins != null && navigator.plugins.length > 0) {
if (navigator.plugins[\"Shockwave Flash 2.0\"] || navigator.plugins[\"Shockwave Flash\"]) {
var swVer2 = navigator.plugins[\"Shockwave Flash 2.0\"] ? \" 2.0\" : \"\";
var flashDescription = navigator.plugins[\"Shockwave Flash\" + swVer2].description;
descArray = flashDescription.split(\" \");
tempArrayMajor = descArray[2].split(\".\");
versionMajor = tempArrayMajor[0];
versionMinor = tempArrayMajor[1];
if ( descArray[3] != \"\" ) {
tempArrayMinor = descArray[3].split(\"r\");
} else {
tempArrayMinor = descArray[4].split(\"r\");
}
versionRevision = tempArrayMinor[1] > 0 ? tempArrayMinor[1] : 0;
flashVer = versionMajor + \".\" + versionMinor + \".\" + versionRevision;
} else {
flashVer = -1;
}
}
// MSN/WebTV 2.6 supports Flash 4
else if (navigator.userAgent.toLowerCase().indexOf(\"webtv/2.6\") != -1) flashVer = 4;
// WebTV 2.5 supports Flash 3
else if (navigator.userAgent.toLowerCase().indexOf(\"webtv/2.5\") != -1) flashVer = 3;
// older WebTV supports Flash 2
else if (navigator.userAgent.toLowerCase().indexOf(\"webtv\") != -1) flashVer = 2;
// Can't detect in all other cases
else {
flashVer = -1;
}
return flashVer;
}
// When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available
function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision)
{
reqVer = parseFloat(reqMajorVer + \".\" + reqRevision);
// loop backwards through the versions until we find the newest version
for (i=25;i>0;i--) {
if (isIE && isWin && !isOpera) {
versionStr = VBGetSwfVer(i);
} else {
versionStr = JSGetSwfVer(i);
}
if (versionStr == -1 ) {
return false;
} else if (versionStr != 0) {
if(isIE && isWin && !isOpera) {
tempArray = versionStr.split(\" \");
tempString = tempArray[1];
versionArray = tempString .split(\",\");
} else {
versionArray = versionStr.split(\".\");
}
versionMajor = versionArray[0];
versionMinor = versionArray[1];
versionRevision = versionArray[2];
versionString = versionMajor + \".\" + versionRevision; // 7.0r24 == 7.24
versionNum = parseFloat(versionString);
// is the major.revision >= requested major.revision AND the minor version >= requested minor
if ( (versionMajor > reqMajorVer) && (versionNum >= reqVer) ) {
return true;
} else {
return ((versionNum >= reqVer && versionMinor >= reqMinorVer) ? true : false );
}
}
}
}
// -->
</script>";
Display::display_header($nameTools,'Exercise'); Display::display_header($nameTools,'Exercise');
/* /*

@ -2101,118 +2101,7 @@ class Exercise
*/ */
public function show_lp_javascript() public function show_lp_javascript()
{ {
return "<script type=\"text/javascript\" src=\"../plugin/hotspot/JavaScriptFlashGateway.js\"></script> return "";
<script src=\"../plugin/hotspot/hotspot.js\" type=\"text/javascript\"></script>
<script language=\"JavaScript\" type=\"text/javascript\">
<!--
// -----------------------------------------------------------------------------
// Globals
// Major version of Flash required
var requiredMajorVersion = 7;
// Minor version of Flash required
var requiredMinorVersion = 0;
// Minor version of Flash required
var requiredRevision = 0;
// the version of javascript supported
var jsVersion = 1.0;
// -----------------------------------------------------------------------------
// -->
</script>
<script language=\"VBScript\" type=\"text/vbscript\">
<!-- // Visual basic helper required to detect Flash Player ActiveX control version information
Function VBGetSwfVer(i)
on error resume next
Dim swControl, swVersion
swVersion = 0
set swControl = CreateObject(\"ShockwaveFlash.ShockwaveFlash.\" + CStr(i))
if (IsObject(swControl)) then
swVersion = swControl.GetVariable(\"\$version\")
end if
VBGetSwfVer = swVersion
End Function
// -->
</script>
<script language=\"JavaScript1.1\" type=\"text/javascript\">
<!-- // Detect Client Browser type
var isIE = (navigator.appVersion.indexOf(\"MSIE\") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf(\"win\") != -1) ? true : false;
var isOpera = (navigator.userAgent.indexOf(\"Opera\") != -1) ? true : false;
jsVersion = 1.1;
// JavaScript helper required to detect Flash Player PlugIn version information
function JSGetSwfVer(i){
// NS/Opera version >= 3 check for Flash plugin in plugin array
if (navigator.plugins != null && navigator.plugins.length > 0) {
if (navigator.plugins[\"Shockwave Flash 2.0\"] || navigator.plugins[\"Shockwave Flash\"]) {
var swVer2 = navigator.plugins[\"Shockwave Flash 2.0\"] ? \" 2.0\" : \"\";
var flashDescription = navigator.plugins[\"Shockwave Flash\" + swVer2].description;
descArray = flashDescription.split(\" \");
tempArrayMajor = descArray[2].split(\".\");
versionMajor = tempArrayMajor[0];
versionMinor = tempArrayMajor[1];
if ( descArray[3] != \"\" ) {
tempArrayMinor = descArray[3].split(\"r\");
} else {
tempArrayMinor = descArray[4].split(\"r\");
}
versionRevision = tempArrayMinor[1] > 0 ? tempArrayMinor[1] : 0;
flashVer = versionMajor + \".\" + versionMinor + \".\" + versionRevision;
} else {
flashVer = -1;
}
}
// MSN/WebTV 2.6 supports Flash 4
else if (navigator.userAgent.toLowerCase().indexOf(\"webtv/2.6\") != -1) flashVer = 4;
// WebTV 2.5 supports Flash 3
else if (navigator.userAgent.toLowerCase().indexOf(\"webtv/2.5\") != -1) flashVer = 3;
// older WebTV supports Flash 2
else if (navigator.userAgent.toLowerCase().indexOf(\"webtv\") != -1) flashVer = 2;
// Can't detect in all other cases
else {
flashVer = -1;
}
return flashVer;
}
// When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available
function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision)
{
reqVer = parseFloat(reqMajorVer + \".\" + reqRevision);
// loop backwards through the versions until we find the newest version
for (i=25;i>0;i--) {
if (isIE && isWin && !isOpera) {
versionStr = VBGetSwfVer(i);
} else {
versionStr = JSGetSwfVer(i);
}
if (versionStr == -1 ) {
return false;
} else if (versionStr != 0) {
if(isIE && isWin && !isOpera) {
tempArray = versionStr.split(\" \");
tempString = tempArray[1];
versionArray = tempString .split(\",\");
} else {
versionArray = versionStr.split(\".\");
}
versionMajor = versionArray[0];
versionMinor = versionArray[1];
versionRevision = versionArray[2];
versionString = versionMajor + \".\" + versionRevision; // 7.0r24 == 7.24
versionNum = parseFloat(versionString);
// is the major.revision >= requested major.revision AND the minor version >= requested minor
if ( (versionMajor > reqMajorVer) && (versionNum >= reqVer) ) {
return true;
} else {
return ((versionNum >= reqVer && versionMinor >= reqMinorVer) ? true : false );
}
}
}
}
// -->
</script>";
} }
/** /**

@ -75,8 +75,8 @@ $interbreadcrumb[] = array(
"name" => get_lang('Exercises'), "name" => get_lang('Exercises'),
); );
$htmlHeadXtra[] = '<script src="' . api_get_path(WEB_CODE_PATH) . 'plugin/hotspot2/js/hotspot.js"></script>'; $htmlHeadXtra[] = '<script src="' . api_get_path(WEB_LIBRARY_JS_PATH) . 'hotspot/js/hotspot.js"></script>';
$htmlHeadXtra[] = '<link rel="stylesheet" href="' . api_get_path(WEB_CODE_PATH) . 'plugin/hotspot2/css/hotspot.css">'; $htmlHeadXtra[] = '<link rel="stylesheet" href="' . api_get_path(WEB_LIBRARY_JS_PATH) . 'hotspot/css/hotspot.css">';
if ($origin != 'learnpath') { if ($origin != 'learnpath') {
// So we are not in learnpath tool // So we are not in learnpath tool

@ -120,8 +120,8 @@ $interbreadcrumb[]= array("url" => "#","name" => get_lang('Result'));
$this_section = SECTION_COURSES; $this_section = SECTION_COURSES;
$htmlHeadXtra[] = '<link rel="stylesheet" href="' . api_get_path(WEB_CODE_PATH) . 'plugin/hotspot2/css/hotspot.css">'; $htmlHeadXtra[] = '<link rel="stylesheet" href="' . api_get_path(WEB_LIBRARY_JS_PATH) . 'hotspot/css/hotspot.css">';
$htmlHeadXtra[] = '<script src="' . api_get_path(WEB_CODE_PATH) . 'plugin/hotspot2/js/hotspot.js"></script>'; $htmlHeadXtra[] = '<script src="' . api_get_path(WEB_LIBRARY_JS_PATH) . 'hotspot/js/hotspot.js"></script>';
if ($origin != 'learnpath') { if ($origin != 'learnpath') {
Display::display_header(''); Display::display_header('');

@ -60,8 +60,8 @@ $htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_PATH).'javascript/epicloc
$htmlHeadXtra[] = api_get_js('epiclock/javascript/jquery.dateformat.min.js'); $htmlHeadXtra[] = api_get_js('epiclock/javascript/jquery.dateformat.min.js');
$htmlHeadXtra[] = api_get_js('epiclock/javascript/jquery.epiclock.min.js'); $htmlHeadXtra[] = api_get_js('epiclock/javascript/jquery.epiclock.min.js');
$htmlHeadXtra[] = api_get_js('epiclock/renderers/minute/epiclock.minute.js'); $htmlHeadXtra[] = api_get_js('epiclock/renderers/minute/epiclock.minute.js');
$htmlHeadXtra[] = '<link rel="stylesheet" href="../plugin/hotspot2/css/hotspot.css">'; $htmlHeadXtra[] = '<link rel="stylesheet" href="' . api_get_path(WEB_LIBRARY_JS_PATH) . 'hotspot/css/hotspot.css">';
$htmlHeadXtra[] = '<script src="../plugin/hotspot2/js/hotspot.js"></script>'; $htmlHeadXtra[] = '<script src="' . api_get_path(WEB_LIBRARY_JS_PATH) . 'hotspot/js/hotspot.js"></script>';
$template = new Template(); $template = new Template();

@ -12,6 +12,9 @@ api_protect_course_script(false);
require_once api_get_path(LIBRARY_PATH).'geometry.lib.php'; require_once api_get_path(LIBRARY_PATH).'geometry.lib.php';
Display::display_reduced_header(); Display::display_reduced_header();
echo '<div id="delineation-container">';
$message = null; $message = null;
$dbg_local = 0; $dbg_local = 0;
$gradebook = null; $gradebook = null;
@ -29,14 +32,20 @@ if (empty ($exerciseResult)) {
$exerciseResultCoordinates = isset($_REQUEST['exerciseResultCoordinates']) ? $_REQUEST['exerciseResultCoordinates'] : null; $exerciseResultCoordinates = isset($_REQUEST['exerciseResultCoordinates']) ? $_REQUEST['exerciseResultCoordinates'] : null;
$origin = '';
if (empty($origin)) { if (empty($origin)) {
$origin = Security::remove_XSS($_REQUEST['origin']); $origin = Security::remove_XSS($_REQUEST['origin']);
} }
// if origin is learnpath // if origin is learnpath
$learnpath_id = 0;
if (empty($learnpath_id)) { if (empty($learnpath_id)) {
$learnpath_id = Security::remove_XSS($_REQUEST['learnpath_id']); $learnpath_id = Security::remove_XSS($_REQUEST['learnpath_id']);
} }
$learnpath_item_id = 0;
if (empty($learnpath_item_id)) { if (empty($learnpath_item_id)) {
$learnpath_item_id = Security::remove_XSS($_REQUEST['learnpath_item_id']); $learnpath_item_id = Security::remove_XSS($_REQUEST['learnpath_item_id']);
} }
@ -67,6 +76,8 @@ if (is_array($coords) && count($coords) > 0) {
} }
} }
$choice_value = '';
$user_array = substr($user_array,0,-1); $user_array = substr($user_array,0,-1);
if (isset($_GET['choice'])){ if (isset($_GET['choice'])){
@ -109,8 +120,10 @@ if (empty($choice_value)) {
//this is the real redirect function //this is the real redirect function
//echo 'window.location.href = "exercise_submit_modal.php?learnpath_id='.$learnpath_id.'&learnpath_item_id='.$learnpath_item_id.'&hotspotcoord="+ hotspotcoord + "&hotspot="+ hotspot + "&choice="+ choice_js + "&exerciseId='.$exerciseId.'&num='.$questionNum.'&exerciseType='.$exerciseType.'&origin='.$origin.'&gradebook='.$gradebook.'";'; //echo 'window.location.href = "exercise_submit_modal.php?learnpath_id='.$learnpath_id.'&learnpath_item_id='.$learnpath_item_id.'&hotspotcoord="+ hotspotcoord + "&hotspot="+ hotspot + "&choice="+ choice_js + "&exerciseId='.$exerciseId.'&num='.$questionNum.'&exerciseType='.$exerciseType.'&origin='.$origin.'&gradebook='.$gradebook.'";';
echo ' url = "exercise_submit_modal.php?learnpath_id='.$learnpath_id.'&learnpath_item_id='.$learnpath_item_id.'&hotspotcoord="+ hotspotcoord + "&hotspot="+ hotspot + "&choice="+ choice_js + "&exerciseId='.$exerciseId.'&num='.$questionNum.'&exerciseType='.$exerciseType.'&origin='.$origin.'&gradebook='.$gradebook.'";'; echo ' url = "exercise_submit_modal.php?learnpath_id='.$learnpath_id.'&learnpath_item_id='.$learnpath_item_id.'&hotspotcoord="+ hotspotcoord + "&hotspot="+ hotspot + "&choice="+ choice_js + "&exerciseId='.$exerciseId.'&num='.$questionNum.'&exerciseType='.$exerciseType.'&origin='.$origin.'&gradebook='.$gradebook.'";';
echo "$('#dialog').load(url); "; echo "$('#global-modal .modal-body').load(url);";
echo '</script>'; echo '</script>';
exit;
} }
$choice = array(); $choice = array();
@ -574,3 +587,7 @@ if ($links!='') {
//self.parent.tb_remove(); //self.parent.tb_remove();
</script>'; </script>';
} }
echo '</div>';
Display::display_footer();

@ -566,10 +566,7 @@ class ScormAnswerHotspot extends Answer
{ {
if ($this->standalone) { if ($this->standalone) {
$header = '<script type="text/javascript" language="javascript">'; $header = '<script type="text/javascript" language="javascript">';
$header .= file_get_contents('../plugin/hotspot/JavaScriptFlashGateway.js'); $header .= file_get_contents('../inc/lib/javascript/hotspot/js/hotspot.js');
$header .= '</script>';
$header .= '<script type="text/javascript" language="javascript">';
$header .= file_get_contents('../plugin/hotspot2/hotspot.js');
$header .= '</script>'; $header .= '</script>';
//because this header closes so many times the <script> tag, we have to reopen our own //because this header closes so many times the <script> tag, we have to reopen our own
$header .= '<script type="text/javascript" language="javascript">'."\n"; $header .= '<script type="text/javascript" language="javascript">'."\n";
@ -1001,7 +998,7 @@ class ScormSection
*/ */
function common_js() { function common_js() {
$js = "\n"; $js = "\n";
$js .= file_get_contents('../plugin/hotspot2/hotspot.js'); $js .= file_get_contents('../inc/lib/javascript/hotspot/js/hotspot.js');
$js .= file_get_contents('../newscorm/js/api_wrapper.js'); $js .= file_get_contents('../newscorm/js/api_wrapper.js');
$js .= 'var questions = new Array();' . "\n"; $js .= 'var questions = new Array();' . "\n";
$js .= 'var questions_answers = new Array();' . "\n"; $js .= 'var questions_answers = new Array();' . "\n";

@ -41,7 +41,7 @@ $data['type'] = 'user';
$data['lang'] = [ $data['lang'] = [
'Square' => get_lang('Square'), 'Square' => get_lang('Square'),
'Circle' => get_lang('Circle'), 'Circle' => get_lang('Circle'),
'Poly' => get_lang('Poly'), 'Polygon' => get_lang('Polygon'),
'HotspotStatus1' => get_lang('HotspotStatus1'), 'HotspotStatus1' => get_lang('HotspotStatus1'),
'HotspotStatus2Polygon' => get_lang('HotspotStatus2Polygon'), 'HotspotStatus2Polygon' => get_lang('HotspotStatus2Polygon'),
'HotspotStatus2Other' => get_lang('HotspotStatus2Other'), 'HotspotStatus2Other' => get_lang('HotspotStatus2Other'),
@ -53,7 +53,8 @@ $data['lang'] = [
'NextAnswer' => get_lang('NextAnswer'), 'NextAnswer' => get_lang('NextAnswer'),
'Delineation' => get_lang('Delineation'), 'Delineation' => get_lang('Delineation'),
'CloseDelineation' => get_lang('CloseDelineation'), 'CloseDelineation' => get_lang('CloseDelineation'),
'Oar' => get_lang('oar') 'Oar' => get_lang('Oar'),
'ClosePolygon' => get_lang('ClosePolygon')
]; ];
$data['image'] = $objQuestion->selectPicturePath(); $data['image'] = $objQuestion->selectPicturePath();
$data['image_width'] = $pictureWidth; $data['image_width'] = $pictureWidth;

@ -38,7 +38,8 @@ $data['lang'] = [
'NextAnswer' => get_lang('NextAnswer'), 'NextAnswer' => get_lang('NextAnswer'),
'Delineation' => get_lang('Delineation'), 'Delineation' => get_lang('Delineation'),
'CloseDelineation' => get_lang('CloseDelineation'), 'CloseDelineation' => get_lang('CloseDelineation'),
'Oar' => get_lang('oar') 'Oar' => get_lang('Oar'),
'ClosePolygon' => get_lang('ClosePolygon')
]; ];
$data['image'] = $objQuestion->selectPicturePath(); $data['image'] = $objQuestion->selectPicturePath();
$data['image_width'] = $pictureWidth; $data['image_width'] = $pictureWidth;

@ -569,7 +569,7 @@ if ($modifyAnswers) {
<button type="submit" class="btn btn-danger" name="lessAnswers" value="lessAnswers"> <button type="submit" class="btn btn-danger" name="lessAnswers" value="lessAnswers">
<em class="fa fa-trash"></em> <?php echo get_lang('LessOAR'); ?> <em class="fa fa-trash"></em> <?php echo get_lang('LessOAR'); ?>
</button> </button>
<button type="submit" name="moreOARAnswers" value="moreOARAnswers"> <button type="submit" class="btn btn-primary" name="moreOARAnswers" value="moreOARAnswers">
<em class="fa fa-plus"></em> <?php echo get_lang('MoreOAR'); ?> <em class="fa fa-plus"></em> <?php echo get_lang('MoreOAR'); ?>
</button> </button>
<?php } else { ?> <?php } else { ?>
@ -594,10 +594,6 @@ if ($modifyAnswers) {
<th width="5">&nbsp;</th> <th width="5">&nbsp;</th>
<th> <?php echo get_lang('HotspotDescription'); ?> *</th> <th> <?php echo get_lang('HotspotDescription'); ?> *</th>
<?php <?php
if ($answerType == HOT_SPOT_DELINEATION) {
echo '<th >' . get_lang('Thresholds') . '</th>';
}
if ($objExercise->selectFeedbackType() == EXERCISE_FEEDBACK_TYPE_DIRECT) { if ($objExercise->selectFeedbackType() == EXERCISE_FEEDBACK_TYPE_DIRECT) {
?> ?>
<th><?php echo get_lang('Comment'); ?></th> <th><?php echo get_lang('Comment'); ?></th>
@ -679,71 +675,73 @@ if ($modifyAnswers) {
$selected2 = 'selected="selected"'; $selected2 = 'selected="selected"';
if ($k == $threadhold3[$i]) if ($k == $threadhold3[$i])
$selected3 = 'selected="selected"'; $selected3 = 'selected="selected"';
$option1.='<option ' . $selected1 . ' >' . $k . '</option>'; $option1.='<option ' . $selected1 . ' >' . $k . ' % </option>';
$option2.='<option ' . $selected2 . ' >' . $k . '</option>'; $option2.='<option ' . $selected2 . ' >' . $k . ' % </option>';
$option3.='<option ' . $selected3 . '>' . $k . '</option>'; $option3.='<option ' . $selected3 . '>' . $k . ' %</option>';
} }
?> ?>
<tr> <tr>
<td> <td>
<div style="height: 15px; width: 15px; background-color: <?php echo $hotspot_colors[$i]; ?>"> </div> <span class="fa fa-square fa-2x" aria-hidden="true" style="color: <?php echo $hotspot_colors[$i]; ?>;"></span>
<input type="hidden" name="reponse[<?php echo $i; ?>]" value="delineation" /> <input type="hidden" name="reponse[<?php echo $i; ?>]" value="delineation" />
</td> </td>
<td> <td>
<b><?php echo get_lang('Delineation'); ?></b><br /><br /> <p><strong><?php echo get_lang('Delineation'); ?></strong></p>
<?php echo get_lang('MinOverlap'); ?><br/><br/> <p>
<?php echo get_lang('MaxExcess'); ?><br/><br/> <?php echo get_lang('MinOverlap'); ?>
<?php echo get_lang('MaxMissing'); ?><br/><br/> <select class="form-control" name="threadhold1[<?php echo $i; ?>]">
</td> <?php echo $option1; ?>
<td> </select>
<br/><br/> </p>
<select name="threadhold1[<?php echo $i; ?>]" > <p>
<?php echo $option1; ?> <?php echo get_lang('MaxExcess'); ?>
</select>% <select class="form-control" name="threadhold2[<?php echo $i; ?>]" >
<br/><br/> <?php echo $option2; ?>
<select name="threadhold2[<?php echo $i; ?>]" > </select>
<?php echo $option2; ?> </p>
</select>% <p>
<br/><br/> <?php echo get_lang('MaxMissing'); ?>
<select name="threadhold3[<?php echo $i; ?>]" > <select class="form-control" name="threadhold3[<?php echo $i; ?>]" >
<?php echo $option3; ?> <?php echo $option3; ?>
</select>% </select>
<br/> </p>
</td> </td>
<td align="left"> <td align="left">
<br /> <p>
<textarea wrap="virtual" rows="3" cols="25" name="comment[<?php echo $i; ?>]" style="width: 100%"> <textarea class="form-control" wrap="virtual" rows="3" cols="25" name="comment[<?php echo $i; ?>]" aria-describedBy="comment-<?php echo $i ?>-help"><?php echo Security::remove_XSS($comment[$i]); ?></textarea>
<?php echo Security::remove_XSS($comment[$i]); ?> <span id="comment-<?php echo $i ?>-help" class="help-block"><?php echo get_lang('LearnerIsInformed'); ?></span>
</textarea> </p>
<input type="hidden" name="hotspot_type[<?php echo $i; ?>]" value="delineation" /> <input type="hidden" name="hotspot_type[<?php echo $i; ?>]" value="delineation" />
<input type="hidden" name="hotspot_coordinates[<?php echo $i; ?>]" value="<?php <input type="hidden" name="hotspot_coordinates[<?php echo $i; ?>]" value="<?php
echo (empty($hotspot_coordinates[$i]) ? '0;0|0|0' : $hotspot_coordinates[$i]); echo (empty($hotspot_coordinates[$i]) ? '0;0|0|0' : $hotspot_coordinates[$i]);
?>" /> ?>" />
<br/>
<?php echo get_lang('LearnerIsInformed'); ?>
</td> </td>
<?php if ($objExercise->selectFeedbackType() == EXERCISE_FEEDBACK_TYPE_DIRECT) { ?> <?php if ($objExercise->selectFeedbackType() == EXERCISE_FEEDBACK_TYPE_DIRECT) { ?>
<td> <td>
<table> <div class="checkbox">
<tr> <p>
<td> <label>
<input type="checkbox" class="checkbox" name="<?php echo 'try[' . $i; ?>]" <?php if ($try[$i] == 1) echo'checked'; ?> /> <input type="checkbox" class="checkbox" name="<?php echo 'try[' . $i; ?>]" <?php if ($try[$i] == 1) echo'checked'; ?> />
<?php echo get_lang('TryAgain'); ?><br /><br /> <?php echo get_lang('TryAgain'); ?>
<?php echo get_lang('SeeTheory'); ?><br /> </label>
<select name="lp[<?php echo $i; ?>]" > </p>
<?php echo $option_lp; ?> </div>
</select> <p>
<br /><br /> <?php echo get_lang('SeeTheory'); ?>
<?php echo get_lang('Other'); ?> <br /> <select class="form-control" name="lp[<?php echo $i; ?>]" >
<input name="url[<?php echo $i; ?>]" value="<?php echo $url[$i]; ?>"> <?php echo $option_lp; ?>
<br /> <br /> </select>
<?php echo get_lang('SelectQuestion'); ?> <br /> </p>
<select name="select_question[<?php echo $i; ?>]" > <p>
<?php echo $option_feed; ?> <?php echo get_lang('Other'); ?>
</select> <input class="form-control" name="url[<?php echo $i; ?>]" value="<?php echo $url[$i]; ?>">
</td> </p>
</tr> <p>
</table> <?php echo get_lang('SelectQuestion'); ?>
<select class="form-control" name="select_question[<?php echo $i; ?>]" >
<?php echo $option_feed; ?>
</select>
</p>
</td> </td>
<?php } else { ?> <?php } else { ?>
<td> &nbsp;</td> <td> &nbsp;</td>
@ -765,30 +763,38 @@ if ($modifyAnswers) {
<input type="hidden" name="hotspot_type[<?php echo $i; ?>]" value="noerror" /> <input type="hidden" name="hotspot_type[<?php echo $i; ?>]" value="noerror" />
<input type="hidden" name="hotspot_coordinates[<?php echo $i; ?>]" value="0;0|0|0" /> <input type="hidden" name="hotspot_coordinates[<?php echo $i; ?>]" value="0;0|0|0" />
</td> </td>
<td colspan="2" align="left"> <td align="left">
<textarea wrap="virtual" rows="3" cols="25" name="comment[<?php echo $i; ?>]" style="width: 100%"><?php echo Security::remove_XSS($comment[$i]); ?></textarea> <textarea class="form-control" wrap="virtual" rows="3" cols="25" name="comment[<?php echo $i; ?>]" style="width: 100%"><?php echo Security::remove_XSS($comment[$i]); ?></textarea>
</td> </td>
<?php if ($objExercise->selectFeedbackType() == EXERCISE_FEEDBACK_TYPE_DIRECT) { ?> <?php if ($objExercise->selectFeedbackType() == EXERCISE_FEEDBACK_TYPE_DIRECT) { ?>
<td> <td>
<table> <table>
<tr> <tr>
<td> <td>
<input type="checkbox" class="checkbox" name="<?php echo 'try[' . $i; ?>]" <?php if ($try[$i] == 1) echo'checked'; ?> /> <div class="checkbox">
<?php echo get_lang('TryAgain'); ?> <p>
<br /><br /> <label>
<?php echo get_lang('SeeTheory'); ?> <input type="checkbox" class="checkbox" name="<?php echo 'try[' . $i; ?>]" <?php if ($try[$i] == 1) echo'checked'; ?> />
<br /> <?php echo get_lang('TryAgain'); ?>
<select name="lp[<?php echo $i; ?>]" > </label>
<?php echo $option_lp; ?> </p>
</select> </div>
<br /><br /> <p>
<?php echo get_lang('Other'); ?> <br /> <?php echo get_lang('SeeTheory'); ?>
<input name="url[<?php echo $i; ?>]" value="<?php echo $url[$i]; ?>"> <select class="form-control" name="lp[<?php echo $i; ?>]" >
<br /> <br /> <?php echo $option_lp; ?>
<?php echo get_lang('SelectQuestion'); ?> <br /> </select>
<select name="select_question[<?php echo $i; ?>]"> </p>
<?php echo $option_feed; ?> <p>
</select> <?php echo get_lang('Other'); ?> <br />
<input class="form-control" name="url[<?php echo $i; ?>]" value="<?php echo $url[$i]; ?>">
</p>
<p>
<?php echo get_lang('SelectQuestion'); ?> <br />
<select class="form-control" name="select_question[<?php echo $i; ?>]">
<?php echo $option_feed; ?>
</select>
</p>
</td> </td>
</tr> </tr>
</table> </table>
@ -816,14 +822,13 @@ if ($modifyAnswers) {
<?php } ?> <?php } ?>
<tr> <tr>
<td> <td>
<div style="height: 15px; width: 15px; background-color: <?php echo $hotspot_colors[$i]; ?>"> </div> <span class="fa fa-square fa-2x" aria-hidden="true" style="color: <?php echo $hotspot_colors[$i]; ?>"></span>
</td> </td>
<td> <td>
<input class="form-control" type="text" name="reponse[<?php echo $i; ?>]" value="<?php echo Security::remove_XSS($reponse[$i]); ?>" /> <input class="form-control" type="text" name="reponse[<?php echo $i; ?>]" value="<?php echo Security::remove_XSS($reponse[$i]); ?>" />
</td> </td>
<td colspan="2" align="left"> <td colspan="2" align="left">
<textarea wrap="virtual" rows="3" cols="25" name="comment[<?php echo $i; ?>]" style="width: 100%"><?php echo Security::remove_XSS($comment[$i]); ?></textarea> <textarea class="form-control" wrap="virtual" rows="3" cols="25" name="comment[<?php echo $i; ?>]" style="width: 100%"><?php echo Security::remove_XSS($comment[$i]); ?></textarea>
<input type="hidden" name="hotspot_type[<?php echo $i; ?>]" value="oar" /> <input type="hidden" name="hotspot_type[<?php echo $i; ?>]" value="oar" />
<input type="hidden" name="hotspot_coordinates[<?php echo $i; ?>]" value="<?php <input type="hidden" name="hotspot_coordinates[<?php echo $i; ?>]" value="<?php
echo (empty($hotspot_coordinates[$i]) ? '0;0|0|0' : $hotspot_coordinates[$i]); echo (empty($hotspot_coordinates[$i]) ? '0;0|0|0' : $hotspot_coordinates[$i]);
@ -831,27 +836,30 @@ if ($modifyAnswers) {
</td> </td>
<?php if ($objExercise->selectFeedbackType() == EXERCISE_FEEDBACK_TYPE_DIRECT) { ?> <?php if ($objExercise->selectFeedbackType() == EXERCISE_FEEDBACK_TYPE_DIRECT) { ?>
<td> <td>
<table> <div class="checkbox">
<tr> <p>
<td> <label>
<input type="checkbox" class="checkbox" name="<?php echo 'try[' . $i; ?>]" <?php if ($try[$i] == 1) echo'checked'; ?> /> <input type="checkbox" class="checkbox" name="<?php echo 'try[' . $i; ?>]" <?php if ($try[$i] == 1) echo'checked'; ?> />
<?php echo get_lang('TryAgain'); ?> <?php echo get_lang('TryAgain'); ?>
<br /><br /> </label>
<?php echo get_lang('SeeTheory'); ?> <br /> </p>
<select name="lp[<?php echo $i; ?>]" > </div>
<?php echo $option_lp; ?> <p>
</select> <?php echo get_lang('SeeTheory'); ?>
<br /><br /> <select class="form-control" name="lp[<?php echo $i; ?>]" >
<?php echo get_lang('Other'); ?> <br /> <?php echo $option_lp; ?>
<input name="url[<?php echo $i; ?>]" value="<?php echo $url[$i]; ?>"> </select>
<br /><br /> </p>
<?php echo get_lang('SelectQuestion'); ?> <br /> <p>
<select name="select_question[<?php echo $i; ?>]"> <?php echo get_lang('Other'); ?>
<?php echo $option_feed; ?> <input class="form-control" name="url[<?php echo $i; ?>]" value="<?php echo $url[$i]; ?>">
</select> </p>
</td> <p>
</tr> <?php echo get_lang('SelectQuestion'); ?>
</table> <select class="form-control" name="select_question[<?php echo $i; ?>]">
<?php echo $option_feed; ?>
</select>
</p>
</td> </td>
<?php } else { ?> <?php } else { ?>
<td>&nbsp;</td> <td>&nbsp;</td>
@ -895,7 +903,7 @@ if ($modifyAnswers) {
if ($answerType == HOT_SPOT_DELINEATION) { if ($answerType == HOT_SPOT_DELINEATION) {
if ($_SESSION['tmp_answers']['hotspot_type'][$i] == 'oar') { if ($_SESSION['tmp_answers']['hotspot_type'][$i] == 'oar') {
?> ?>
<input type="hidden" name="weighting[<?php echo $i; ?>]" class="span3" value="0" /> <input type="hidden" name="weighting[<?php echo $i; ?>]" class="form-cotrol" value="0" />
<?php } else { ?> <?php } else { ?>
<input class="form-control" type="text" name="weighting[<?php echo $i; ?>]" value="<?php echo (isset($weighting[$i]) ? $weighting[$i] : 10); ?>" /> <input class="form-control" type="text" name="weighting[<?php echo $i; ?>]" value="<?php echo (isset($weighting[$i]) ? $weighting[$i] : 10); ?>" />
<?php <?php
@ -973,31 +981,34 @@ if ($modifyAnswers) {
<?php echo get_lang('LearnerHasNoMistake'); ?> <?php echo get_lang('LearnerHasNoMistake'); ?>
</td> </td>
<td colspan="2" align="left"> <td colspan="2" align="left">
<textarea wrap="virtual" rows="3" cols="25" name="comment_noerror" style="width: 100%"><?php echo Security::remove_XSS($comment_noerror); ?></textarea> <textarea class="form-control" wrap="virtual" rows="3" cols="25" name="comment_noerror"><?php echo Security::remove_XSS($comment_noerror); ?></textarea>
</td> </td>
<?php if ($objExercise->selectFeedbackType() == EXERCISE_FEEDBACK_TYPE_DIRECT) { ?> <?php if ($objExercise->selectFeedbackType() == EXERCISE_FEEDBACK_TYPE_DIRECT) { ?>
<td> <td>
<table> <div class="checkbox">
<tr> <p>
<td> <label>
<input type="checkbox" class="checkbox" name="try_noerror" <?php if ($try_noerror == 1) echo'checked'; ?> /> <input type="checkbox" class="checkbox" name="try_noerror" <?php if ($try_noerror == 1) echo'checked'; ?> />
<?php echo get_lang('TryAgain'); ?> <?php echo get_lang('TryAgain'); ?>
<br /><br /> </label>
<?php echo get_lang('SeeTheory'); ?> <br /> </p>
<select name="lp_noerror" > </div>
<?php echo $option_lp; ?> <p>
</select> <?php echo get_lang('SeeTheory'); ?> <br />
<br /><br /> <select class="form-control" name="lp_noerror" >
<?php echo get_lang('Other'); ?> <br /> <?php echo $option_lp; ?>
<input name="url_noerror" value="<?php echo $url_noerror; ?>"> </select>
<br /><br /> </p>
<?php echo get_lang('SelectQuestion'); ?> <br /> <p>
<select name="select_question_noerror"> <?php echo get_lang('Other'); ?> <br />
<?php echo $option_feed; ?> <input class="form-control" name="url_noerror" value="<?php echo $url_noerror; ?>">
</select> </p>
</td> <p>
</tr> <?php echo get_lang('SelectQuestion'); ?> <br />
</table> <select class="form-control" name="select_question_noerror">
<?php echo $option_feed; ?>
</select>
</p>
</td> </td>
<td>&nbsp;</td> <td>&nbsp;</td>
<?php } else { ?> <?php } else { ?>
@ -1021,11 +1032,19 @@ if ($modifyAnswers) {
</form> </form>
<script> <script>
$(document).on('ready', function () { $(document).on('ready', function () {
HotspotQuestion.init({ <?php if ($answerType == HOT_SPOT_DELINEATION) { ?>
questionId: <?php echo $modifyAnswers ?>, DelineationQuestion.init({
selector: '#hotspot-container', questionId: <?php echo $modifyAnswers ?>,
for: 'admin' selector: '#hotspot-container',
}); for: 'admin'
});
<?php } else { ?>
HotspotQuestion.init({
questionId: <?php echo $modifyAnswers ?>,
selector: '#hotspot-container',
for: 'admin'
});
<?php } ?>
}); });
</script> </script>
<?php <?php

@ -42,7 +42,7 @@ $data['type'] = 'solution';
$data['lang'] = [ $data['lang'] = [
'Square' => get_lang('Square'), 'Square' => get_lang('Square'),
'Circle' => get_lang('Circle'), 'Circle' => get_lang('Circle'),
'Poly' => get_lang('Poly'), 'Polygon' => get_lang('Polygon'),
'HotspotStatus1' => get_lang('HotspotStatus1'), 'HotspotStatus1' => get_lang('HotspotStatus1'),
'HotspotStatus2Polygon' => get_lang('HotspotStatus2Polygon'), 'HotspotStatus2Polygon' => get_lang('HotspotStatus2Polygon'),
'HotspotStatus2Other' => get_lang('HotspotStatus2Other'), 'HotspotStatus2Other' => get_lang('HotspotStatus2Other'),
@ -54,7 +54,8 @@ $data['lang'] = [
'NextAnswer' => get_lang('NextAnswer'), 'NextAnswer' => get_lang('NextAnswer'),
'Delineation' => get_lang('Delineation'), 'Delineation' => get_lang('Delineation'),
'CloseDelineation' => get_lang('CloseDelineation'), 'CloseDelineation' => get_lang('CloseDelineation'),
'Oar' => get_lang('oar') 'Oar' => get_lang('Oar'),
'ClosePolygon' => get_lang('ClosePolygon')
]; ];
$data['image'] = $objQuestion->selectPicturePath(); $data['image'] = $objQuestion->selectPicturePath();
$data['image_width'] = $pictureWidth; $data['image_width'] = $pictureWidth;

@ -53,8 +53,8 @@ if (!$is_allowedToEdit) {
} }
} }
$htmlHeadXtra[] = '<link rel="stylesheet" href="' . api_get_path(WEB_CODE_PATH) . 'plugin/hotspot2/css/hotspot.css">'; $htmlHeadXtra[] = '<link rel="stylesheet" href="' . api_get_path(WEB_LIBRARY_JS_PATH) . 'hotspot/css/hotspot.css">';
$htmlHeadXtra[] = '<script src="' . api_get_path(WEB_CODE_PATH) . 'plugin/hotspot2/js/hotspot.js"></script>'; $htmlHeadXtra[] = '<script src="' . api_get_path(WEB_LIBRARY_JS_PATH) . 'hotspot/js/hotspot.js"></script>';
if ($show_headers) { if ($show_headers) {
$interbreadcrumb[] = array( $interbreadcrumb[] = array(

@ -1172,12 +1172,12 @@ HOTSPOT;
$canClick = isset($_GET['editQuestion']) ? '0' : (isset($_GET['modifyAnswers']) ? '0' : '1'); $canClick = isset($_GET['editQuestion']) ? '0' : (isset($_GET['modifyAnswers']) ? '0' : '1');
$s .= <<<HOTSPOT $s .= "
<div class="col-sm-8 col-md-9"> <div class=\"col-sm-8 col-md-9\">
<div class="hotspot-image"></div> <div class=\"hotspot-image\"></div>
<script> <script>
$(document).on('ready', function () { $(document).on('ready', function () {
HotspotQuestion.init({ " . ($answerType == HOT_SPOT_DELINEATION ? 'DelineationQuestion' : 'HotspotQuestion') . ".init({
questionId: $questionId, questionId: $questionId,
selector: '#question_div_' + $questionId + ' .hotspot-image', selector: '#question_div_' + $questionId + ' .hotspot-image',
for: 'user' for: 'user'
@ -1185,10 +1185,11 @@ HOTSPOT;
}); });
</script> </script>
</div> </div>
<div class="col-sm-4 col-md-3"> <div class=\"col-sm-4 col-md-3\">
$answerList $answerList
</div> </div>
HOTSPOT; ";
echo <<<HOTSPOT echo <<<HOTSPOT
$s $s
</div> </div>

@ -399,7 +399,7 @@ var HotspotQuestion = (function () {
<div class="input-group hotspot-' + this.hotspotIndex + ' active">\n\ <div class="input-group hotspot-' + this.hotspotIndex + ' active">\n\
<span class="input-group-addon" id="hotspot-' + this.hotspotIndex + '">\n\ <span class="input-group-addon" id="hotspot-' + this.hotspotIndex + '">\n\
<span class="fa fa-square fa-fw" data-hidden="true"></span>\n\ <span class="fa fa-square fa-fw" data-hidden="true"></span>\n\
<span class="sr-only">' + (this.hotspotSVG.model.get('name') ? this.hotspotSVG.model.get('name') : 'hotspot ' + this.hotspotIndex) + '</span>\n\ <span class="sr-only">' + (this.hotspotSVG.model.name ? this.hotspotSVG.model.name : 'hotspot ' + this.hotspotIndex) + '</span>\n\
</span>\n\ </span>\n\
<select class="form-control" aria-describedby="hotspot-' + this.hotspotIndex + '">\n\ <select class="form-control" aria-describedby="hotspot-' + this.hotspotIndex + '">\n\
<option value="square">' + lang.Square + '</option>\n\ <option value="square">' + lang.Square + '</option>\n\
@ -486,7 +486,7 @@ var HotspotQuestion = (function () {
var self = this, var self = this,
template = '\n\ template = '\n\
<li>\n\ <li>\n\
<a href="#">' + 'ClosePolygon' + '</a>\n\ <a href="#">' + lang.ClosePolygon + '</a>\n\
</li>\n\ </li>\n\
'; ';
@ -1020,7 +1020,7 @@ var HotspotQuestion = (function () {
return this; return this;
}; };
SolutionHotspotsSVG.prototype.renderHotspot = function (hotspotModel) { SolutionHotspotsSVG.prototype.renderHotspot = function (hotspotModel) {
var hotspotIndex = this.hotspotsCollection.length, var hotspotIndex = this.hotspotsCollection.length - 1,
hotspotSVG = new HotspotSVG(hotspotModel, hotspotIndex); hotspotSVG = new HotspotSVG(hotspotModel, hotspotIndex);
this.el.appendChild( this.el.appendChild(
@ -1160,3 +1160,540 @@ var HotspotQuestion = (function () {
} }
}; };
})(); })();
var DelineationQuestion = (function () {
'use strict';
var PolygonModel = function (attributes) {
this.id = 0;
this.name = '';
this.attributes = attributes;
this.event = null;
};
PolygonModel.prototype.set = function (key, value) {
this.attributes[key] = value;
if (this.event) {
this.event(this);
}
};
PolygonModel.prototype.get = function (key) {
if (!this.attributes[key]) {
return;
}
return this.attributes[key];
};
PolygonModel.prototype.onChange = function (callback) {
this.event = callback;
};
PolygonModel.prototype.encode = function () {
var pairedPoints = [];
$.each(this.get('points'), function (index, point) {
pairedPoints.push(
point.join(';')
);
});
return pairedPoints.join('|');
};
PolygonModel.decode = function (hotspotInfo) {
var pairedPoints = hotspotInfo.coord.split('|'),
points = [];
$.each(pairedPoints, function (index, pair) {
var point = pair.split(';');
points.push([
parseInt(point[0]),
point[1] ? parseInt(point[1]) : 0
]);
});
var hotspot = null;
if (hotspotInfo.type === 'delineation') {
hotspot = new DelineationModel({
points: points
});
} else if (hotspotInfo.type === 'oar') {
hotspot = new OarModel({
points: points
});
}
if (!hotspot) {
return;
}
hotspot.id = hotspotInfo.id;
hotspot.name = hotspotInfo.answer;
return hotspot;
};
var DelineationModel = function (attributes) {
PolygonModel.call(this, attributes);
};
DelineationModel.prototype = Object.create(PolygonModel.prototype);
var OarModel = function (attributes) {
PolygonModel.call(this, attributes);
};
OarModel.prototype = Object.create(PolygonModel.prototype);
var AnswerModel = function (attributes) {
PolygonModel.call(this, attributes);
};
AnswerModel.prototype = Object.create(PolygonModel.prototype);
AnswerModel.prototype.encode = function () {
var pairedPoints = [];
$.each(this.get('points'), function (index, point) {
pairedPoints.push(point.join(';'));
});
return pairedPoints.join('/');
};
var PolygonCollection = function () {
this.models = [];
this.length = 0;
this.event = null;
};
PolygonCollection.prototype.add = function (model) {
this.models.push(model);
this.length++;
if (this.event) {
this.event(model);
}
};
PolygonCollection.prototype.get = function (index) {
return this.models[index];
};
PolygonCollection.prototype.set = function (index, model) {
this.models[index] = model;
};
PolygonCollection.prototype.onAdd = function (callback) {
this.event = callback;
};
var PolygonSvg = function (polygonModel) {
this.el = document.createElementNS('http://www.w3.org/2000/svg', 'polygon');
this.model = polygonModel;
this.model.onChange(function () {
self.render();
});
var self = this,
$el = $(this.el);
this.render = function () {
var newEl = document.createElementNS('http://www.w3.org/2000/svg', 'polygon'),
pointsPaired = [];
$.each(this.model.get('points'), function (index, point) {
pointsPaired.push(point.join(','));
});
newEl.setAttributeNS(null, 'points', pointsPaired.join(' '));
newEl.setAttributeNS(null, 'class', 'hotspot-' + this.model.id);
if ($el.parent().length > 0) {
$el.replaceWith(newEl);
}
if (this.el.parentNode) {
this.el.parentNode.replaceChild(newEl, this.el);
}
this.el = newEl;
return this;
};
};
var HotspotSelect = function (polygonModel) {
this.el = $('<div>').addClass('col-xs-6 col-sm-4 col-md-3 col-lg-2').get(0);
this.model = polygonModel;
selectedPolygonIndex = this.model.id;
var self = this,
$el = $(this.el);
this.render = function () {
var type = this.model instanceof OarModel ? 'oar' : 'delineation';
var template = '\n\
<div class="input-group hotspot-' + this.model.id + ' active">\n\
<span class="input-group-addon" id="hotspot-' + this.model.id + '">\n\
<span class="fa fa-square fa-fw" data-hidden="true"></span>\n\
<span class="sr-only">' + (type === 'delineation' ? lang.Delineation : lang.Oar) + '</span>\n\
</span>\n\
<select class="form-control" aria-describedby="hotspot-' + this.hotspotIndex + '">\n\
<option selected>' + (type === 'delineation' ? lang.Delineation : lang.Oar) + '</option>\n\
</select>\n\
</div>\n\
';
$el.html(template);
$el.find('select')
.on('focus', function () {
$('.input-group').removeClass('active');
$el.find('.input-group').addClass('active');
selectedPolygonIndex = self.model.id;
});
return this;
};
};
var ContextMenu = function () {
this.el = $('<ul>', {
id: 'hotspot-context-menu'
}).addClass('dropdown-menu').get(0);
var self = this,
$el = $(this.el);
this.onHide = function (callback) {
$(this).on('hide', function () {
callback();
});
};
this.render = function () {
var template = '\n\
<li>\n\
<a href="#">' + lang.CloseDelineation + '</a>\n\
</li>\n\
';
$el.html(template);
$el.find('a')
.on('click', function (e) {
e.preventDefault();
$(self).trigger('hide');
$el.hide();
});
return this;
};
this.show = function (x, y) {
$el.css({
left: x,
top: y
}).show();
};
};
var AdminSvg = function (polygonCollection, image) {
this.collection = polygonCollection;
this.el = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
var self = this,
$el = $(this.el);
this.collection.onAdd(function (polygonModel) {
self.renderPolygon(polygonModel);
});
this.render = function () {
var imageSvg = document.createElementNS('http://www.w3.org/2000/svg', 'image');
imageSvg.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', image.src);
imageSvg.setAttributeNS(null, 'width', image.width);
imageSvg.setAttributeNS(null, 'height', image.height);
this.el.setAttributeNS(null, 'version', '1.1');
this.el.setAttributeNS(null, 'viewBox', '0 0 ' + image.width + ' ' + image.height);
this.el.appendChild(imageSvg);
var isDrawing = false;
var contextMenu = new ContextMenu();
contextMenu.onHide(function () {
var currentHotspot = self.collection.get(selectedPolygonIndex);
$('[name="hotspot_coordinates[' + (currentHotspot.id + 1) + ']"]').val(
currentHotspot.encode()
);
isDrawing = false;
});
$el.on({
'dragstart': function (e) {
e.preventDefault();
},
'click': function (e) {
e.preventDefault();
var currentPoint = getPointOnImage(self.el, e.clientX, e.clientY),
points = [];
if (!isDrawing) {
isDrawing = true;
} else {
points = self.collection.get(selectedPolygonIndex).get('points');
}
points.push([currentPoint.x, currentPoint.y]);
self.collection.get(selectedPolygonIndex).set('points', points);
},
'contextmenu': function (e) {
e.preventDefault();
if (!contextMenu.el.parentNode) {
$el.parent().append(contextMenu.render().el);
}
var currentPoint = getPointOnImage(self.el, e.clientX, e.clientY);
contextMenu.show(currentPoint.x, currentPoint.y);
}
});
return this;
};
this.renderPolygon = function (oarModel) {
var oarSVG = new PolygonSvg(oarModel);
$el.append(oarSVG.render().el);
var oarSelect = new HotspotSelect(oarModel);
$el.parent().parent().find('.row').append(
oarSelect.render().el
);
return this;
};
};
var startAdminSvg = function (questionInfo) {
var image = new Image();
image.onload = function () {
var polygonCollection = new PolygonCollection(),
adminSvg = new AdminSvg(polygonCollection, image);
$(config.selector)
.css('width', this.width)
.append(
adminSvg.render().el
);
$(config.selector).parent().prepend('<div class="row"></div>');
$.each(questionInfo.hotspots, function (index, hotspotInfo) {
$('.input-group').removeClass('active');
var polygonModel = PolygonModel.decode(hotspotInfo);
polygonModel.id = index;
polygonCollection.add(polygonModel);
});
};
image.src = questionInfo.image;
lang = questionInfo.lang;
};
var UserSvg = function (answerModel, image) {
this.el = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
this.model = answerModel;
var self = this,
$el = $(this.el);
this.render = function () {
var imageSvg = document.createElementNS('http://www.w3.org/2000/svg', 'image');
imageSvg.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', image.src);
imageSvg.setAttributeNS(null, 'width', image.width);
imageSvg.setAttributeNS(null, 'height', image.height);
this.el.setAttributeNS(null, 'version', '1.1');
this.el.setAttributeNS(null, 'viewBox', '0 0 ' + image.width + ' ' + image.height);
this.el.appendChild(imageSvg);
this.renderDelineation();
var isDrawing = false;
var contextMenu = new ContextMenu();
contextMenu.onHide(function () {
var answerInput = $('hotspot[' + config.questionId + '][1]'),
choiceInput = $('choice[' + config.questionId + '][1]');
if (!answerInput.length) {
answerInput = $('<input>', {
type: 'hidden',
name: 'hotspot[' + config.questionId + '][1]'
}).insertAfter($el);
}
if (!choiceInput.length) {
choiceInput = $('<input>', {
type: 'hidden',
name: 'choice[' + config.questionId + '][1]'
}).insertAfter($el);
}
answerInput.val(self.model.encode());
choiceInput.val(1);
isDrawing = false;
});
$el.on({
'dragstart': function (e) {
e.preventDefault();
},
'click': function (e) {
e.preventDefault();
var currentPoint = getPointOnImage(self.el, e.clientX, e.clientY),
points = [];
if (!isDrawing) {
isDrawing = true;
} else {
points = self.model.get('points');
}
points.push([currentPoint.x, currentPoint.y]);
self.model.set('points', points);
},
'contextmenu': function (e) {
e.preventDefault();
if (!contextMenu.el.parentNode) {
$el.parent().append(contextMenu.render().el);
}
var currentPoint = getPointOnImage(self.el, e.clientX, e.clientY);
contextMenu.show(currentPoint.x, currentPoint.y);
}
});
return this;
};
this.renderDelineation = function () {
var delineationSvg = new PolygonSvg(this.model);
$el.append(
delineationSvg.render().el
);
};
};
var startUserSvg = function (questionInfo) {
var image = new Image();
image.onload = function () {
var answerModel = new AnswerModel({
points: []
}),
userSvg = new UserSvg(answerModel, image);
$(config.selector)
.css('width', this.width)
.append(
userSvg.render().el
);
};
image.src = questionInfo.image;
lang = questionInfo.lang;
};
var config = {
questionId: 0,
exerciseId: 0,
selector: null,
for: ''
},
lang = {},
selectedPolygonIndex = -1;
var getPointOnImage = function (referenceElement, x, y) {
var pointerPosition = {
left: x + window.scrollX,
top: y + window.scrollY
},
canvasOffset = {
x: referenceElement.getBoundingClientRect().left + window.scrollX,
y: referenceElement.getBoundingClientRect().top + window.scrollY
};
return {
x: Math.round(pointerPosition.left - canvasOffset.x),
y: Math.round(pointerPosition.top - canvasOffset.y)
};
};
return {
init: function (settings) {
config = $.extend({
questionId: 0,
selector: ''
}, settings);
if (!config.questionId || !config.selector) {
return;
}
var xhrQuestion = null;
switch (config.for) {
case 'admin':
xhrQuestion = $.getJSON('/main/exercice/hotspot_actionscript_admin.as.php', {
modifyAnswers: parseInt(config.questionId)
});
break;
case 'user':
xhrQuestion = $.getJSON('/main/exercice/hotspot_actionscript.as.php', {
modifyAnswers: parseInt(config.questionId)
});
break;
case 'solution':
xhrQuestion = $.getJSON('/main/exercice/hotspot_answers.as.php', {
modifyAnswers: parseInt(config.questionId),
exe_id: parseInt(config.exerciseId)
});
}
$.when(xhrQuestion).done(function (questionInfo) {
switch (questionInfo.type) {
case 'admin':
startAdminSvg(questionInfo);
break;
case 'user':
startUserSvg(questionInfo);
break;
case 'solution':
break;
}
});
}
};
})();

@ -1,18 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
$square = "مربع";
$circle = "بيضاوي";
$poly = "مضلع";
$status1 = "ارسم نقاط ساخنة";
$status2_poly = "استخدم النقر بالزر الأيمن لغلق المضلع";
$status2_other = "أفلت زر الفأرة لحفظ النقاط الساخنة";
$status3 = "تم حفظ النقاط الساخنة";
$showUserPoints = "إظهار / إخفاء نقرات المستخدمين";
$showHotspots = "إظهار / إخفاء النقاط الساخنة";
$labelPolyMenu = "اغلق المضلع";
$triesleft = "محاولات متبقية";
$exeFinished = "تمت جميع الأجوبة. يمكنك الأن إعادة ترتيب النقاط الساخنة أو انقر زرالصور أدناه للإرسال";
$nextAnswer = " &done=done الأن انقر على:";
?>

@ -1,21 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
$square = "Cuadráu";
$circle = "Elipse";
$poly = "Polígonu";
$status1 = "Dibuxar una zona interautiva";
$status2_poly = "Use'l botón derechu del ratón pa cerrar el polígonu.";
$status2_other = "Suelte'l botón del ratón pa guardar zona interautiva.";
$status3 = "Zona interautiva guardada";
$showUserPoints = "Amosar / Esconder clicks";
$showHotspots = "Amosar / Esconder zones interautives";
$labelPolyMenu = "Cerrar polígonu";
$triesleft = "Intentos que queden";
$exeFinished = "Tán seleicionaes toles zones. Agora pue volver asignar les sos rempuestes o calcar nel botón d'embaxu y dar por acabada la entruga.";
$nextAnswer = "Calque enriba: &done=done";
$delineation = "Llende";
$labelDelineationMenu = "Cerrar llende";
$oar = "Zona de riesgu";
?>

@ -1,21 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
$square = "Koadratua";
$circle = "Elipsea";
$poly = "Poligonoa";
$status1 = "Marraztu gune interaktiboa";
$status2_poly = "Erabili saguaren eskuineko botoia poligonoa ixteko";
$status2_other = "Askatu saguaren botoia gune interaktiboa gordetzeko";
$status3 = "Gune interaktiboa gorde da";
$showUserPoints = "Erakutsi / Ezkutatu klikak";
$showHotspots = "Erakutsi / Ezkutatu gune interaktiboak";
$labelPolyMenu = "Itxi poligonoa";
$triesleft = "Gainerako saioak";
$exeFinished = "Erantzun guztiak berrikusi dira. Orain erantzunak aldatu ditzakezu edo, bestela, klikatu azpiko botoian erantzunak balidatzeko eta amaitzeko.";
$nextAnswer = "Orain klikatu hemen: &done=done";
$delineation = "Muga marraztea";
$labelDelineationMenu = "Itxi muga";
$oar = "Gunea arriskuan";
?>

@ -1,5 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
?>

@ -1,5 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
?>

@ -1,21 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
$square = "Retângulo";
$circle = "Círculo";
$poly = "Polígono";
$status1 = "Desenhar um hotspot";
$status2_poly = "Clique com o botão direito do mouse para fechar o polígono.";
$status2_other = "Soltar o botão do mouse para salvar o hotspot.";
$status3 = "Hotspot salvo";
$showUserPoints = "Exibir/Ocultar cliques do usuário";
$showHotspots = "Exibir/Ocultar hotspots";
$labelPolyMenu = "Fechar polígono";
$triesleft = "Tentativas restantes";
$exeFinished = "Todas as questões respondidas. Pode alterar a sua escolha ou clicar para enviar";
$nextAnswer = "Clique agora em: &done=done";
$delineation = "Delimitação";
$labelDelineationMenu = "Encerrar delimitação";
$oar = "Área de risco";
?>

@ -1,21 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
$square = "Правоъгълник";
$circle = "Елипса";
$poly = "Многоъгълник";
$status1 = "Чертаене на \"горещата точка\".";
$status2_poly = "Щракнете с десния бутон на мишката, за да затворите многоъгълника.";
$status2_other = "Отпуснете бутона на мишката, за да запишете \"горещата точка\".";
$status3 = "Горещата точка е записана.";
$showUserPoints = "Показване/скриване на щракванията";
$showHotspots = "Показване/скриване на горещите точки";
$labelPolyMenu = "Затваряне на многоъгълника";
$triesleft = "Оставащи опити";
$exeFinished = "Всички отговори са готови. Сега можете да пренаредите горещите точки или да щракнете бутона по-долу, за записване.";
$nextAnswer = "Щракнете върху: &done=done";
$delineation = "Очертание";
$labelDelineationMenu = "Затваряне на очертанието";
$oar = "Рискова зона";
?>

@ -1,21 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
$square = "Quadrat";
$circle = "El·lipse";
$poly = "Polígon";
$status1 = "Dibuixar una zona interactiva";
$status2_poly = "Utilitzeu el botó dret del ratolí per tancar el polígon";
$status2_other = "Deixeu anar el botó del ratolí per guardar la zona interactiva";
$status3 = "Zona interactiva guardada";
$showUserPoints = "Mostrar/Ocultar clics";
$showHotspots = "Mostrar/Ocultar zones interactives";
$labelPolyMenu = "Tancar polígon";
$triesleft = "Intents restants";
$exeFinished = "Totes les zones han estat seleccionades. Ara podeu modificar les vostres respostes o clicar per validar.";
$nextAnswer = "Ara cliqueu a: &done=done";
$delineation = "Delimitació";
$labelDelineationMenu = "Tancar delimitació";
$oar = "àrea de risc";
?>

@ -1,18 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
$square = "Kvadrat";
$circle = "Elipsa";
$poly = "Poligon";
$status1 = "Označi aktivno područje.";
$status2_poly = "Koristi desni klik za zatvaranje poligona.";
$status2_other = "Otpusti tipku na mišu za spremanje aktivnog područja.";
$status3 = "Aktivno područje spremljeno";
$showUserPoints = "Prikaži/Sakrij odabire korisnika";
$showHotspots = "Prikaži / Sakrij aktivna poručja";
$labelPolyMenu = "Zatvori poligon";
$triesleft = "Broj preostalih pokušaja";
$exeFinished = "Vaši su odgovori definirani. Možete preurediti aktivna područja ili odaberite tipku ispod slike za pohranjivanje.";
$nextAnswer = "Sada odaberite: &done=done";
?>

@ -1,20 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
$square = "Čtverec";
$circle = "Elipsa";
$poly = "Polygon";
$status1 = "Nakresli hostpot";
$status2_poly = "Použij pravé tlačítko myši pro uzavření polygonu";
$status2_other = "Uvolni tlačítko myši pro uložení hotspotu.";
$status3 = "Hotspot uložen";
$showUserPoints = "Ukaž/Schovej uživatelská kliknutí";
$showHotspots = "Ukaž/Schovej hotspoty";
$labelPolyMenu = "Zavřít polygon";
$triesleft = "Vynechané pokusy";
$exeFinished = "Nyní klikněte na tlačítko dole a ověřte své odpovědi";
$nextAnswer = "Nyní klikněte na: &done=done";
$delineation = "Náčrt";
$labelDelineationMenu = "Zvřít náčrt";
?>

@ -1,18 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
$square = "Firkant";
$circle = "Elipse";
$poly = "Polygon";
$status1 = "Indsæt et hotspot.";
$status2_poly = "Højreklik for at afslutte polygon-figuren";
$status2_other = "Slip muse-knappen for at gemme hotspot.";
$status3 = "Hotspot gemt";
$showUserPoints = "Vis/skjul deltagernes klik";
$showHotspots = "Vis/skjul hotspots";
$labelPolyMenu = "Afslut polygon";
$triesleft = "Antal forsøg tilbage";
$exeFinished = "Alle svar er afgivet. Du kan nu flytte rundt på hotspots eller klikke på knappen under billedet for at afslutte";
$nextAnswer = "Klik nu på: &done=done";
?>

@ -1,5 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
?>

@ -1,21 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
$square = "vierkant";
$circle = "Ellips";
$poly = "Poligoon";
$status1 = "Teken en hotspot.";
$status2_poly = "Gebruik de rechtermuisknop om de poligoon te sluiten.";
$status2_other = "Laat de muisknop los om de hotspot op te slaan";
$status3 = "Hotspot is bewaard";
$showUserPoints = "Klikken van de gebruikers weergeven / verbergen";
$showHotspots = "Hotspots weergeven / verbergen";
$labelPolyMenu = "Poligoon afsluiten";
$triesleft = "Resterende beurten";
$exeFinished = "Alle antwoorden zijn gedefinieerd. U kunt nu de hotspots herschikken of klikken om in te dienen.";
$nextAnswer = "Klik nu op: &done=done";
$delineation = "Delineatie";
$labelDelineationMenu = "Delineatie beëindigen";
$oar = "Risicogebied";
?>

@ -1,21 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
$square = "Square";
$circle = "Elipse";
$poly = "Polygon";
$status1 = "Draw a hotspot.";
$status2_poly = "Use right-click to close the polygon.";
$status2_other = "Release the mousebutton to save the hotspot.";
$status3 = "Hotspot saved";
$showUserPoints = "Show/Hide userclicks";
$showHotspots = "Show / Hide hotspots";
$labelPolyMenu = "Close polygon";
$triesleft = "Attempts left";
$exeFinished = "Now click on the button below to validate your answers.";
$nextAnswer = "Now click on: &done=done";
$delineation = "Delineation";
$labelDelineationMenu = "Close delineation";
$oar = "Area at risk";
?>

@ -7582,4 +7582,19 @@ $SocialWallWriteNewPostToFriend = "Write something on your friend's wall";
$EmptyTemplate = "Blank template"; $EmptyTemplate = "Blank template";
$BaseCourse = "Base course"; $BaseCourse = "Base course";
$BaseCourses = "Base courses"; $BaseCourses = "Base courses";
$Square = "Square";
$Ellipse = "Ellipse";
$Polygon = "Polygon";
$HotspotStatus1 = "Draw a hotspot";
$HotspotStatus2Polygon = "Use right-click to close the polygon";
$HotspotStatus2Other = "Release the mousebutton to save the hotspot";
$HotspotStatus3 = "Hotspot saved";
$HotspotShowUserPoints = "Show/Hide userclicks";
$ShowHotspots = "Show / Hide hotspots";
$Triesleft = "Attempts left";
$NextAnswer = "Now click on:";
$CloseDelineation = "Close delineation";
$Oar = "Area at risk";
$HotspotExerciseFinished = "Now click on the button below to validate your answers";
$ClosePolygon = "Close polygon";
?> ?>

@ -1,5 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
?>

@ -1,5 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
?>

@ -1,5 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
?>

@ -1,21 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
$square = "Rectangle";
$circle = "Ellipse";
$poly = "Polygone";
$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.";
$status3 = "Zone cliquable sauvegardée.";
$showUserPoints = "Montrer/cacher les clics";
$showHotspots = "Montrer/cacher les zones cliquables";
$labelPolyMenu = "Fermer le polygone";
$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";
$delineation = "Délinéation";
$labelDelineationMenu = "Fermer la délinéation";
$oar = "Zone à risque";
?>

@ -1,5 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
?>

@ -1,21 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
$square = "Rectángulo";
$circle = "Elipse";
$poly = "Polígono";
$status1 = "Debuxar un hotspot.";
$status2_poly = "Use o botón dereito do rato para pechar o polígono.";
$status2_other = "Solte o botón do rato para gardar o hotspot.";
$status3 = "Hotspot gardado";
$showUserPoints = "Mostrar/Ocultar os clics";
$showHotspots = "Mostrar/Ocultar hotspots";
$labelPolyMenu = " \tPechar polígono";
$triesleft = "Intentos restantes";
$exeFinished = "Identificáronse todas as respostas. Agora pode reasignar as súas respostas ou pulsar para enviar.";
$nextAnswer = "Agora faga clic en: &done=done";
$delineation = "Delimitación";
$labelDelineationMenu = "Cerrar delimitación";
$oar = "Area en perigo";
?>

@ -1,5 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
?>

@ -1,21 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
$square = "Quadrat";
$circle = "Elipse";
$poly = "Polygon";
$status1 = "Zeichne einen Hotspot.(anklickbare Zone)";
$status2_poly = "Rechts-Klick benutzen, um das Polygon zu schliessen.";
$status2_other = "Lassen Sie den Mauszeiger los, um den Hotspot zu speichern.";
$status3 = "Der Hotspot wurde gespeichert!";
$showUserPoints = "Klicks von Benutzer zeigen / verbergen";
$showHotspots = "Hotspots zeigen / verbergen";
$labelPolyMenu = "Schliesse Polygon";
$triesleft = "Verbleibende Versuche";
$exeFinished = "Alle Antworten sind definiert. Sie können jetzt die Hotspots neu anordnen oder auf speichern klicken.";
$nextAnswer = "Jetzt auf: &done=done klicken";
$delineation = "Skizze";
$labelDelineationMenu = "Skizze schliessen";
$oar = "Krtische Region";
?>

@ -1,21 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
$square = "Τετράγωνο";
$circle = "Έλλειψη";
$poly = "Πολύγωνο";
$status1 = "Draw a hotspot.";
$status2_poly = "Χρησιμοπιήστε το δεξί κλικ για να κλείσετε το πολύγωνο.";
$status2_other = "Ελευθερωτε το κουμπί του ποντικιού για την αποθήκευση του Καυτού θέματος.";
$status3 = "Hotspot saved";
$showUserPoints = "Εμφάνιση/ Απόκρυψη των κλικ των χρηστών";
$showHotspots = "Show / Hide hotspots";
$labelPolyMenu = "Κλείσιμο του πολυγώνου";
$triesleft = "Αριθμός προσπαθειών που απομένουν";
$exeFinished = "Τώρα, κάντε κλικ στο παρακάτω κουμπί για να επικυρώσετε τις απαντήσεις σας";
$nextAnswer = "Now click on: &done=done";
$delineation = "Delineation";
$labelDelineationMenu = "Close delineation";
$oar = "Περιοχή υπό κίνδυνο";
?>

@ -1,5 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
?>

@ -1,5 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
?>

@ -1,18 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
$square = "Négyzet";
$circle = "Elipszis";
$poly = "Poligon";
$status1 = "Hotspot rajzolása";
$status2_poly = "Használja a jobb egérgombot a poligon bezárásához";
$status2_other = "Engedje fel az egérgombot a hotspot mentéséhez";
$status3 = "Hotspot mentve";
$showUserPoints = "Felhasználók kattintásának mutatása/elrejtése";
$showHotspots = "Hotspot mutatása/elrejtése";
$labelPolyMenu = "Poligon zárása";
$triesleft = "Hátralévő próbálkozások";
$exeFinished = "Minden választ megadott. Most már elhelyezheti a forrópontokat, vagy továbbléphet.";
$nextAnswer = "Most kattintson erre: &done=done";
?>

@ -1,5 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
?>

@ -1,21 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
$square = "Rettangolo";
$circle = "Ellisse";
$poly = "Poligono";
$status1 = "Traccia una zona cliccabile";
$status2_poly = "Usa il tasto destro del mouse per chiudere il poligono.";
$status2_other = "Rilascia il tasto del mouse per salvare la zona cliccabile";
$status3 = "Zona cliccabile salvata";
$showUserPoints = "Mostra/Nascondi i click";
$showHotspots = "Mostra/Nascondi le zone cliccabili";
$labelPolyMenu = "Chiudi il poligono";
$triesleft = "Tentativi rimasti";
$exeFinished = "Tutte le risposte sono state fornite. Ora puoi risistemare le scelte o fare click per inviare la risposta";
$nextAnswer = "Ora clicca su &done=done";
$delineation = "Delimita";
$labelDelineationMenu = "Chiudi la delimitazione";
$oar = "Valutazione complessiva";
?>

@ -1,18 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
$square = "Square";
$circle = "Elipse";
$poly = "Polygon";
$status1 = "Draw a hotspot.";
$status2_poly = "Use right-click to close the polygon.";
$status2_other = "Release the mousebutton to save the hotspot.";
$status3 = "Hotspot saved";
$showUserPoints = "Show/Hide userclicks";
$showHotspots = "Show / Hide hotspots";
$labelPolyMenu = "Close polygon";
$triesleft = "Attempts left";
$exeFinished = "All answers done. You can now rearrange the hotspots or click button below image to submit";
$nextAnswer = "Now click on: &done=done";
?>

@ -1,5 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
?>

@ -1,21 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
$square = "Kvadrāts";
$circle = "Elipse";
$poly = "Daudzstūris";
$status1 = "Zīmēt \" karsto punktu\"";
$status2_poly = "Labais klikšķis, lai slēgtu daudzstūri";
$status2_other = "Atlaidiet peles pogu, lai saglabātu \" karsto punktu\"";
$status3 = "\"Karstais punkts\" saglabāts";
$showUserPoints = "Rādīt / Slēpt kursantu klikojumus";
$showHotspots = "Rādīt / Slēpt \"karstos punktus\"";
$labelPolyMenu = "Slēgt daudzstūri";
$triesleft = "Mēģinājumi ir beigušies";
$exeFinished = "Tagad, lai apstiprinātu Jūsu atbildes, nospiediet pogu apakšā";
$nextAnswer = "Tagad ar klikšķi atbildi: &done=done";
$delineation = "Uzmetums / plāns";
$labelDelineationMenu = "Slēgt uzmetumu / plānu";
$oar = "Riska laukums";
?>

@ -1,18 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
$square = "Square";
$circle = "Elipse";
$poly = "Polygon";
$status1 = "Draw a hotspot.";
$status2_poly = "Use right-click to close the polygon.";
$status2_other = "Release the mousebutton to save the hotspot.";
$status3 = "Hotspot saved";
$showUserPoints = "Show/Hide userclicks";
$showHotspots = "Show / Hide hotspots";
$labelPolyMenu = "Close polygon";
$triesleft = "Attempts left";
$exeFinished = "All answers done. You can now rearrange the hotspots or click button below image to submit";
$nextAnswer = "Now click on: &done=done";
?>

@ -1,18 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
$square = "Квадрат";
$circle = "Елипса";
$poly = "Многуаголник";
$status1 = "Нацртајте жариште";
$status2_poly = "Користете десен клик за да го затворите многуаголникот";
$status2_other = "Отпуштете го копчето од глувчето за да го зачувате жариштето";
$status3 = "Жариштето е зачувано";
$showUserPoints = "Покажи/Сокриј ги кликнувањата на корисникот";
$showHotspots = "Покажи / Сокриј ги жариштата";
$labelPolyMenu = "Затворање на многуаголник";
$triesleft = "Преостанати обиди";
$exeFinished = "Сите одговори се дефинирани. Сега можете да ги преуредите жариштата или кликнете за да го поднесете преуредувањето";
$nextAnswer = "Сега кликнете на: &done=done";
?>

@ -1,5 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
?>

@ -1,5 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
?>

@ -1,5 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
?>

@ -1,5 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
?>

@ -1,21 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
$square = "مربع";
$circle = "بیضی";
$poly = "چند گوشه";
$status1 = "رسم یک کانون";
$status2_poly = "از راست کلیک جهت بستن چند گوشه استفاده کنید.";
$status2_other = "انتشار دکمه ماوس جهت ذخیره کردن کانون.";
$status3 = "کانون ذخیره شد";
$showUserPoints = "نمایش/پنهان سازی کلیک کاربران";
$showHotspots = "نمایش/پنهان سازی کانون ها";
$labelPolyMenu = "بستن چند گوشه";
$triesleft = "تلاش های باقیمانده";
$exeFinished = "هم اکنون بر روی دکمه پایین جهت معتبر سازی پاسخ هایتان کلیک کنید.";
$nextAnswer = "اکنون کلیک کنید بروی: &done=done";
$delineation = "طرح";
$labelDelineationMenu = "بستن طرح";
$oar = "ناحیه در خطر";
?>

@ -1,21 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
$square = "Kwadrat";
$circle = "Elipsa";
$poly = "Wielokąt";
$status1 = "Narysuj hotspot.";
$status2_poly = "Kliknij prawym przyciskiem myszy, aby zamknąć wielokąt.";
$status2_other = "Zwolnij przycisk myszy, aby zapisać hotspot.";
$status3 = "Hotspot zapisany";
$showUserPoints = "Pokaż/Ukryj kliknięcia użytkownika";
$showHotspots = "Pokaż/Ukryj hotspot'y";
$labelPolyMenu = "Zamknij wielokąt";
$triesleft = "Próby pozostawione";
$exeFinished = "Kliknij na poniższy przycisk, aby potwierdzić swoje odpowiedzi.";
$nextAnswer = "Teraz kliknij na: &done=done";
$delineation = "Szkic";
$labelDelineationMenu = "Zamknij szkic";
$oar = "Zagrożony obszar";
?>

@ -1,21 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
$square = "Quadrado";
$circle = "Elipse";
$poly = "Polígono";
$status1 = "Desenhe um hotspot (área clicável).";
$status2_poly = "Utilize o botão direito do rato para fechar o polígono.";
$status2_other = "Libertar o botão do rato para guardar o hotspot (área clicável).";
$status3 = "Hotspot (área clicável) guardado";
$showUserPoints = "Mostrar/Esconder cliques do utilizador";
$showHotspots = "Mostrar / Esconder hotspots (áreas clicáveis)";
$labelPolyMenu = "Fechar polígono";
$triesleft = "Tentativas restantes";
$exeFinished = "Clique no botão abaixo para validar as suas respostas.";
$nextAnswer = "Clique agora em: &done=done";
$delineation = "Delimitação";
$labelDelineationMenu = "Fechar delimitação";
$oar = "Área em risco";
?>

@ -1,20 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
$square = "Tawa k'uchu";
$circle = "Lunp'u";
$poly = "Askha k'uchuyuq";
$status1 = "Seq'echay k'iti interactiva nisqata.";
$status2_poly = "Askha k'uchuyuqta wisqanapaqqa huk'uchaq pañan runp'unta q'apiy.";
$status2_other = "K'iti interactiva allchanapaqqa huk'uchaq runp'unta kachariy.";
$status3 = "K'iti interactiva allchasqa";
$showUserPoints = "Qhawachiy/Pakay clicks nisqata";
$showHotspots = "Qhawachiy/Pakay k'iti interactiva nisqata";
$labelPolyMenu = "Kisqay askha k'uchuyuqta";
$triesleft = "Mallinapaq puchuqkuna";
$exeFinished = "Llipin k'itikuna ajllasqaña. Kunanqa ichapas hoqmanta churawaq kutichisqaykikunata utaq urapi runp'u kaqta q'apispa tukuwaq taputa.";
$nextAnswer = "Clicta ruway kay patapi: &done=done";
$delineation = "Saywana";
$labelDelineationMenu = "Wisqay saywanata";
?>

@ -1,21 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
$square = "patrat";
$circle = "Cerc";
$poly = "Poligon";
$status1 = "Deseneaza o zona interactiva";
$status2_poly = "Apasati butonul din dreapta al mousului pentru a inchide poligonul.";
$status2_other = "Nu mai activati mouse-ul pentru a salva zona clicabila";
$status3 = "Zona clicabila este salvata";
$showUserPoints = "Aratati/Ascundeti incercarile utilizatorilor";
$showHotspots = "Arata/ascunde zone clicabile";
$labelPolyMenu = "Inchide poligonul";
$triesleft = "Incercari ramase";
$exeFinished = "Toate intrebarile sunt definite. Acum puteti rearanja spatiile.";
$nextAnswer = "Apasa pe:&done=done";
$delineation = "Delimitare";
$labelDelineationMenu = "Inchide delimitarea";
$oar = "Zona de risc";
?>

@ -1,18 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
$square = "Квадрат";
$circle = "Элипс";
$poly = "Многоугольник";
$status1 = "Начертить \"горячую\" точку";
$status2_poly = "Щелкните правой кнопкой мыши, чтобы закрыть многоугольник";
$status2_other = "Отпустите кнопку мыши, чтобы сохранить \"горячую\" точку";
$status3 = "\"Горячая\" точка сохранена";
$showUserPoints = "Показать/Спрятать щелчки пользователя";
$showHotspots = "Показать/Спрятать \"горячие\" точки";
$labelPolyMenu = "Закрыть многоугольник";
$triesleft = "Оставленные задания";
$exeFinished = "Все ответы даны. Сейчас Вы можете поменять \"горячие\" точки или щелкнуть кнопку внизу изображения, чтобы представить на рассмотрение";
$nextAnswer = "Сейчас щелкните: &done=done";
?>

@ -1,12 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
$square = "Kvadrat";
$circle = "Elipsa";
$poly = "Poligon";
$status2_poly = "Koristi desni klik da zatvoriš poligon";
$status2_other = "Pusti dugme miša da sačuvaš hotspot";
$status3 = "Hotspot sačuvan";
$labelPolyMenu = "Zatvori poligon";
?>

@ -1,5 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
?>

@ -1,21 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
$square = "Štvorec";
$circle = "Elipsa";
$poly = "Mnohouholník";
$status1 = "Kresliť hotspot.";
$status2_poly = "Pravé kliknutie uzavrie mnohouhoľník";
$status2_other = "Pre uloženie hotspotu pustite tlačidlo myši.";
$status3 = "Hotspot uložený";
$showUserPoints = "Ukázať/Skryť kliknutia používateľa";
$showHotspots = "Ukázať / Skryť hotspoty";
$labelPolyMenu = "Ukončiť mnohouholník";
$triesleft = "Pokusy vľavo";
$exeFinished = "Teraz kliknite na tlačidlo nižšie aby ste overili svoje odpovede.";
$nextAnswer = "Teraz kliknite na: &done=done";
$delineation = "Zobrazenie";
$labelDelineationMenu = "Ukončiť zobrazenie";
$oar = "Priestor s nebezpečenstvom";
?>

@ -1,21 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
$square = "Pravokotnik";
$circle = "Elipsa";
$poly = "Poligon";
$status1 = "Nariši vročo točko";
$status2_poly = "Uporabi desni klik za zapiranje poligona";
$status2_other = "Sprostite miškin gumb za shranitev vroče točke.";
$status3 = "Vroča točka je bila shranjena";
$showUserPoints = "Prikaži / Skrij uporabnikove izbire";
$showHotspots = "Prikaži / Skrij vroče točke";
$labelPolyMenu = "Zapri poligon";
$triesleft = "Preostalih poskusov";
$exeFinished = "Vsi odgovori so definirani. Sedaj lahko preuredite vroče točke ali kliknite Shrani.";
$nextAnswer = "Sedaj kliknite na: &done=done";
$delineation = "Orisovanje";
$labelDelineationMenu = "Zapri orisovanje";
$oar = "Ogroženo področje";
?>

@ -1,5 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
?>

@ -1,21 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
$square = "Cuadrado";
$circle = "Elipse";
$poly = "Polígono";
$status1 = "Dibujar una zona interactiva.";
$status2_poly = "Use el botón derecho del ratón para cerrar el polígono.";
$status2_other = "Suelte el botón del ratón para guardar la zona interactiva.";
$status3 = "Zona interactiva guardada";
$showUserPoints = "Mostrar/Ocultar clicks";
$showHotspots = "Mostrar/Ocultar zonas interactivas";
$labelPolyMenu = "Cerrar polígono";
$triesleft = "Intentos restantes";
$exeFinished = "Todas las zonas han sido seleccionadas. Ahora puede reasignar sus respuestas o pulsar el botón inferior y dar por finalizada la pregunta.";
$nextAnswer = "Haga clic sobre: &done=done";
$delineation = "Delimitación";
$labelDelineationMenu = "Cerrar delimitación";
$oar = "Zona de riesgo";
?>

@ -7607,4 +7607,19 @@ $SocialWallWriteNewPostToFriend = "Escribe algo interesante en el muro de tu ami
$EmptyTemplate = "Plantilla vacía"; $EmptyTemplate = "Plantilla vacía";
$BaseCourse = "Curso base"; $BaseCourse = "Curso base";
$BaseCourses = "Cursos base"; $BaseCourses = "Cursos base";
$Square = "Cuadrado/rectángulo";
$Ellipse = "Elipse";
$Polygon = "Polígono";
$HotspotStatus1 = "Dibuje una zona interactiva";
$HotspotStatus2Polygon = "Use el botón derecho del ratón para cerrar el polígono";
$HotspotStatus2Other = "Suelte el botón del ratón para guardar la zona interactiva";
$HotspotStatus3 = "Zona interactiva guardada";
$HotspotShowUserPoints = "Mostrar/Ocultar clicks";
$ShowHotspots = "Mostrar/Ocultar zonas interactivas";
$Triesleft = "Intentos restantes";
$NextAnswer = "Haga clic sobre:";
$CloseDelineation = "Cerrar delimitación";
$Oar = "Zona de riesgo";
$HotspotExerciseFinished = "Todas las zonas han sido seleccionadas. Ahora puede reasignar sus respuestas o pulsar el botón inferior y dar por finalizada la pregunta.";
$ClosePolygon = "Cerrar polígono";
?> ?>

@ -1,5 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
?>

@ -1,5 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
?>

@ -1,13 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
$square = "Kvadrat";
$circle = "Elips";
$poly = "Polygon";
$status2_poly = "Högerklicka för att stänga polygonen.";
$status3 = "Hotspot sparad";
$showHotspots = "Visa/Döj hotspots";
$triesleft = "Försök kvar";
$exeFinished = "Klicka på knappen nedan för att bekräfta dina svar.";
?>

@ -1,5 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
?>

@ -1,5 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
?>

@ -1,5 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
?>

@ -1,9 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
$square = "正方形";
$circle = "橢圓形";
$poly = "多邊形";
$status2_poly = "點擊滑鼠右鍵以封閉多邊形";
?>

@ -1,21 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
$square = "Kare";
$circle = "Elips";
$poly = "Çokgen";
$status1 = "Hotspot çizin";
$status2_poly = "Çokgeni kapatmak için sağ tuşa basın";
$status2_other = "Hotspotu kaydetmek için farenin tuşunu bırakın";
$status3 = "Hotspot kaydedildi";
$showUserPoints = "Kullanıcı tıklamalarını Göster/Gizle";
$showHotspots = "Hotspotları göster/gizle";
$labelPolyMenu = "Çokgeni kapat";
$triesleft = "Kalan denemeler";
$exeFinished = "Cevabınızın geçerli olması için aşağıdaki tuşu şimdi tıklayınız";
$nextAnswer = "Şimdi yapıldıya tıklayınız &done=done";
$delineation = "Çizim";
$labelDelineationMenu = "Çizimi kapat";
$oar = "Riskli alan";
?>

@ -1,6 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
$exeFinished = "Всі відповіді визначено. Зараз ви можете перевпорядкувати або відправити хотспоти";
?>

@ -1,5 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
?>

@ -1,5 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
?>

@ -1,5 +0,0 @@
<?php
/*
for more information: see languages.txt in the lang folder.
*/
?>

@ -1,455 +0,0 @@
/*
Macromedia(r) Flash(r) JavaScript Integration Kit License
Copyright (c) 2005 Macromedia, inc. All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.
3. The end-user documentation included with the redistribution, if any, must
include the following acknowledgment:
"This product includes software developed by Macromedia, Inc.
(http://www.macromedia.com)."
Alternately, this acknowledgment may appear in the software itself, if and
wherever such third-party acknowledgments normally appear.
4. The name Macromedia must not be used to endorse or promote products derived
from this software without prior written permission. For written permission,
please contact devrelations@macromedia.com.
5. Products derived from this software may not be called "Macromedia" or
"Macromedia Flash", nor may "Macromedia" or "Macromedia Flash" appear in their
name.
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MACROMEDIA OR
ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
--
This code is part of the Flash / JavaScript Integration Kit:
http://www.macromedia.com/go/flashjavascript/
Created by:
Christian Cantrell
http://weblogs.macromedia.com/cantrell/
mailto:cantrell@macromedia.com
Mike Chambers
http://weblogs.macromedia.com/mesh/
mailto:mesh@macromedia.com
Macromedia
*/
/**
* Create a new Exception object.
* name: The name of the exception.
* message: The exception message.
*/
function Exception(name, message)
{
if (name)
this.name = name;
if (message)
this.message = message;
}
/**
* Set the name of the exception.
*/
Exception.prototype.setName = function(name)
{
this.name = name;
}
/**
* Get the exception's name.
*/
Exception.prototype.getName = function()
{
return this.name;
}
/**
* Set a message on the exception.
*/
Exception.prototype.setMessage = function(msg)
{
this.message = msg;
}
/**
* Get the exception message.
*/
Exception.prototype.getMessage = function()
{
return this.message;
}
/**
* Generates a browser-specific Flash tag. Create a new instance, set whatever
* properties you need, then call either toString() to get the tag as a string, or
* call write() to write the tag out.
*/
/**
* Creates a new instance of the FlashTag.
* src: The path to the SWF file.
* width: The width of your Flash content.
* height: the height of your Flash content.
*/
function FlashTag(src, width, height)
{
this.src = src;
this.width = width;
this.height = height;
this.version = '7,0,14,0';
this.id = null;
this.bgcolor = 'ffffff';
this.flashVars = null;
}
/**
* Sets the Flash version used in the Flash tag.
*/
FlashTag.prototype.setVersion = function(v)
{
this.version = v;
}
/**
* Sets the ID used in the Flash tag.
*/
FlashTag.prototype.setId = function(id)
{
this.id = id;
}
/**
* Sets the background color used in the Flash tag.
*/
FlashTag.prototype.setBgcolor = function(bgc)
{
this.bgcolor = bgc;
}
/**
* Sets any variables to be passed into the Flash content.
*/
FlashTag.prototype.setFlashvars = function(fv)
{
this.flashVars = fv;
}
/**
* Get the Flash tag as a string.
*/
FlashTag.prototype.toString = function()
{
var ie = (navigator.appName.indexOf ("Microsoft") != -1) ? 1 : 0;
var flashTag = new String();
if (ie)
{
flashTag += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
if (this.id != null)
{
flashTag += 'id="'+this.id+'" ';
}
flashTag += 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+this.version+'" ';
flashTag += 'width="'+this.width+'" ';
flashTag += 'height="'+this.height+'">';
flashTag += '<param name="movie" value="'+this.src+'"/>';
flashTag += '<param name="quality" value="high"/>';
flashTag += '<param name="bgcolor" value="#'+this.bgcolor+'"/>';
if (this.flashVars != null)
{
flashTag += '<param name="flashvars" value="'+this.flashVars+'"/>';
}
flashTag += '</object>';
}
else
{
flashTag += '<embed src="'+this.src+'" ';
flashTag += 'quality="high" ';
flashTag += 'bgcolor="#'+this.bgcolor+'" ';
flashTag += 'width="'+this.width+'" ';
flashTag += 'height="'+this.height+'" ';
flashTag += 'type="application/x-shockwave-flash" ';
if (this.flashVars != null)
{
flashTag += 'flashvars="'+this.flashVars+'" ';
}
if (this.id != null)
{
flashTag += 'name="'+this.id+'" ';
}
flashTag += 'pluginspage="http://www.macromedia.com/go/getflashplayer">';
flashTag += '</embed>';
}
return flashTag;
}
/**
* Write the Flash tag out. Pass in a reference to the document to write to.
*/
FlashTag.prototype.write = function(doc)
{
doc.write(this.toString());
}
/**
* The FlashSerializer serializes JavaScript variables of types object, array, string,
* number, date, boolean, null or undefined into XML.
*/
/**
* Create a new instance of the FlashSerializer.
* useCdata: Whether strings should be treated as character data. If false, strings are simply XML encoded.
*/
function FlashSerializer(useCdata)
{
this.useCdata = useCdata;
}
/**
* Serialize an array into a format that can be deserialized in Flash. Supported data types are object,
* array, string, number, date, boolean, null, and undefined. Returns a string of serialized data.
*/
FlashSerializer.prototype.serialize = function(args)
{
var qs = new String();
for (var i = 0; i < args.length; ++i)
{
switch(typeof(args[i]))
{
case 'undefined':
qs += 't'+(i)+'=undf';
break;
case 'string':
qs += 't'+(i)+'=str&d'+(i)+'='+escape(args[i]);
break;
case 'number':
qs += 't'+(i)+'=num&d'+(i)+'='+escape(args[i]);
break;
case 'boolean':
qs += 't'+(i)+'=bool&d'+(i)+'='+escape(args[i]);
break;
case 'object':
if (args[i] == null)
{
qs += 't'+(i)+'=null';
}
else if (args[i] instanceof Date)
{
qs += 't'+(i)+'=date&d'+(i)+'='+escape(args[i].getTime());
}
else // array or object
{
try
{
qs += 't'+(i)+'=xser&d'+(i)+'='+escape(this._serializeXML(args[i]));
}
catch (exception)
{
throw new Exception("FlashSerializationException",
"The following error occurred during complex object serialization: " + exception.getMessage());
}
}
break;
default:
throw new Exception("FlashSerializationException",
"You can only serialize strings, numbers, booleans, dates, objects, arrays, nulls, and undefined.");
}
if (i != (args.length - 1))
{
qs += '&';
}
}
return qs;
}
/**
* Private
*/
FlashSerializer.prototype._serializeXML = function(obj)
{
var doc = new Object();
doc.xml = '<fp>';
this._serializeNode(obj, doc, null);
doc.xml += '</fp>';
return doc.xml;
}
/**
* Private
*/
FlashSerializer.prototype._serializeNode = function(obj, doc, name)
{
switch(typeof(obj))
{
case 'undefined':
doc.xml += '<undf'+this._addName(name)+'/>';
break;
case 'string':
doc.xml += '<str'+this._addName(name)+'>'+this._escapeXml(obj)+'</str>';
break;
case 'number':
doc.xml += '<num'+this._addName(name)+'>'+obj+'</num>';
break;
case 'boolean':
doc.xml += '<bool'+this._addName(name)+' val="'+obj+'"/>';
break;
case 'object':
if (obj == null)
{
doc.xml += '<null'+this._addName(name)+'/>';
}
else if (obj instanceof Date)
{
doc.xml += '<date'+this._addName(name)+'>'+obj.getTime()+'</date>';
}
else if (obj instanceof Array)
{
doc.xml += '<array'+this._addName(name)+'>';
for (var i = 0; i < obj.length; ++i)
{
this._serializeNode(obj[i], doc, null);
}
doc.xml += '</array>';
}
else
{
doc.xml += '<obj'+this._addName(name)+'>';
for (var n in obj)
{
if (typeof(obj[n]) == 'function')
continue;
this._serializeNode(obj[n], doc, n);
}
doc.xml += '</obj>';
}
break;
default:
throw new Exception("FlashSerializationException",
"You can only serialize strings, numbers, booleans, objects, dates, arrays, nulls and undefined");
break;
}
}
/**
* Private
*/
FlashSerializer.prototype._addName= function(name)
{
if (name != null)
{
return ' name="'+name+'"';
}
return '';
}
/**
* Private
*/
FlashSerializer.prototype._escapeXml = function(str)
{
if (this.useCdata)
return '<![CDATA['+str+']]>';
else
return str.replace(/&/g,'&amp;').replace(/</g,'&lt;');
}
/**
* The FlashProxy object is what proxies function calls between JavaScript and Flash.
* It handles all argument serialization issues.
*/
/**
* Instantiates a new FlashProxy object. Pass in a uniqueID and the name (including the path)
* of the Flash proxy SWF. The ID is the same ID that needs to be passed into your Flash content as lcId.
*/
function FlashProxy(uid, proxySwfName)
{
this.uid = uid;
this.proxySwfName = proxySwfName;
this.flashSerializer = new FlashSerializer(false);
}
/**
* Call a function in your Flash content. Arguments should be:
* 1. ActionScript function name to call,
* 2. any number of additional arguments of type object,
* array, string, number, boolean, date, null, or undefined.
*/
FlashProxy.prototype.call = function()
{
if (arguments.length == 0)
{
throw new Exception("Flash Proxy Exception",
"The first argument should be the function name followed by any number of additional arguments.");
}
var qs = 'lcId=' + escape(this.uid) + '&functionName=' + escape(arguments[0]);
if (arguments.length > 1)
{
var justArgs = new Array();
for (var i = 1; i < arguments.length; ++i)
{
justArgs.push(arguments[i]);
}
qs += ('&' + this.flashSerializer.serialize(justArgs));
}
var divName = '_flash_proxy_' + this.uid;
if(!document.getElementById(divName))
{
var newTarget = document.createElement("div");
newTarget.id = divName;
document.body.appendChild(newTarget);
}
var target = document.getElementById(divName);
var ft = new FlashTag(this.proxySwfName, 1, 1);
ft.setVersion('6,0,65,0');
ft.setFlashvars(qs);
target.innerHTML = ft.toString();
}
/**
* This is the function that proxies function calls from Flash to JavaScript.
* It is called implicitly.
*/
FlashProxy.callJS = function()
{
var functionToCall = eval(arguments[0]);
var argArray = new Array();
for (var i = 1; i < arguments.length; ++i)
{
argArray.push(arguments[i]);
}
functionToCall.apply(functionToCall, argArray);
}

@ -1,199 +0,0 @@
/*
JavaScriptProxy.as
Part of the Flash / JavaScript Integration Kit
http://www.macromedia.com/go/flashjavascript
Created by:
Mike Chambers
http://weblogs.macromedia.com/mesh/
mesh@macromedia.com
Christian Cantrell
http://weblogs.macromedia.com/cantrell/
cantrell@macromedia.com
----
Macromedia(r) Flash(r)./ JavaScript Integration Kit License
Copyright (c) 2005 Macromedia, inc. All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.
3. The end-user documentation included with the redistribution, if any, must
include the following acknowledgment:
"This product includes software developed by Macromedia, Inc.
(http://www.macromedia.com)."
Alternately, this acknowledgment may appear in the software itself, if and
wherever such third-party acknowledgments normally appear.
4. The name Macromedia must not be used to endorse or promote products derived
from this software without prior written permission. For written permission,
please contact devrelations@macromedia.com.
5. Products derived from this software may not be called "Macromedia" or
Macromedia Flash, nor may "Macromedia" or Macromedia Flash appear in their
name.
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MACROMEDIA OR
ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
*/
//import the serializer class
import com.macromedia.javascript.JavaScriptSerializer;
class com.macromedia.javascript.JavaScriptProxy
{
private var instance:Object;
private var lcId:String;
private var receiving_lc:LocalConnection
/*
Constructor for Class
Public
Takes two arguments.
lcId : REQUIRED : an id passed in from HTML / Javascript that is used to
communicate with the gateway swf. The same id must be passed into
the gateway swf.
instance : the object / class instance that function call will be proxied to.
This is required if function calls will be made from JavaScript
to Flash
*/
function JavaScriptProxy(lcId:String, instance:Object)
{
//if either argument is undefined, JavaScript to Flash calls won't work.
//So we just return.
//
//Flash to JavaScript calls will still work
if(lcId == undefined || instance == undefined)
{
return;
}
this.instance = instance;
this.lcId = lcId;
receiving_lc = new LocalConnection();
//the incoming function call will occur in the scope of receiving_lc, so we have
//to set a property to let us get back to the correct scope.
receiving_lc.controller = this;
receiving_lc.callFlash = callFlash;
//listen for incoming function calls
receiving_lc.connect(this.lcId);
}
/*
callFlash
Private
This is called by the FlashProxy in JavaScript to make a functon call into
the Flash content.
*/
private function callFlash(args:Array):Void
{
//get a reference to the correct scope (this method is called in the scope
//of the local connection object)
var con:Object = this["controller"];
var functionName:Object = args.shift();
var f:Function = con.instance[functionName];
//call the function in the correct scope, passing the arguments
f.apply(con.instance, args);
}
/*
This proxies function calls to the server, which allows you to call JavaScript
functions as if they were functions on JavaScriptProxy instance.
i.e.
var j:JavaScriptProxy = new JavaScriptProxy();
j.jsFunction("foo", [1, 2]);
*/
public function __resolve(functionName:String):Function
{
var f:Function = function()
{
arguments.splice(0,0, functionName);
var f:Function = call;
f.apply(this, arguments);
};
return f;
}
/*
call
public
This is used to call functions within JavaScript.
functionName : A string of the name of the function being called in JavaScript.
a1, a2 ... an : subsequesnt arguments will be passed to the JavaScript function.
Example:
var j:JavaScriptProxy = new JavaScriptProxy();
j.call("jsFunction", "foo", [1, 2]);
*/
public function call(functionName:String):Void
{
var len:Number = arguments.length;
var argsString:String = "";
//Serialize the arguments
for(var i:Number = 0; i < len; i++)
{
argsString += JavaScriptSerializer.serializeItem(arguments[i]);
if(i != len - 1)
{
argsString += ",";
}
}
//Created the javascript URL
var callString:String = "javascript:FlashProxy.callJS(" + argsString + ");";
//call out into the HTML / JavaScript environment
getURL(callString);
}
}

@ -1,478 +0,0 @@
/*
JavaScriptSerializer.as
Part of the Flash / JavaScript Integration Kit
http://www.macromedia.com/go/flashjavascript
Created by:
Mike Chambers
http://weblogs.macromedia.com/mesh/
mesh@macromedia.com
Christian Cantrell
http://weblogs.macromedia.com/cantrell/
cantrell@macromedia.com
----
Macromedia(r) Flash(r)./ JavaScript Integration Kit License
Copyright (c) 2005 Macromedia, inc. All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.
3. The end-user documentation included with the redistribution, if any, must
include the following acknowledgment:
"This product includes software developed by Macromedia, Inc.
(http://www.macromedia.com)."
Alternately, this acknowledgment may appear in the software itself, if and
wherever such third-party acknowledgments normally appear.
4. The name Macromedia must not be used to endorse or promote products derived
from this software without prior written permission. For written permission,
please contact devrelations@macromedia.com.
5. Products derived from this software may not be called "Macromedia" or
Macromedia Flash, nor may "Macromedia" or Macromedia Flash appear in their
name.
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MACROMEDIA OR
ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
*/
class com.macromedia.javascript.JavaScriptSerializer
{
/**************** Serialization Methods ****************/
/*
Static function that serializes any supported data types.
Returns a String
*/
public static function serializeItem(item:Object):String
{
var type:String = typeof(item);
var out:String;
switch (type)
{
case "string":
{
out = JavaScriptSerializer.serializeString(String(item));
break;
}
case "number":
{
out = JavaScriptSerializer.serializeNumber(Number(item));
break;
}
case "boolean":
{
out = JavaScriptSerializer.serializeBoolean(Boolean(item));
break;
}
case "null":
{
out = JavaScriptSerializer.serializeNull();
break;
}
case "undefined":
{
out = JavaScriptSerializer.serializeUndefined();
break;
}
case "object":
{
if(item instanceof Date)
{
out = JavaScriptSerializer.serializeDate(new Date(item.getTime()));
}
else if(item instanceof Array)
{
out = JavaScriptSerializer.serializeArray(item);
}
else
{
//treat it as regular Object
out = JavaScriptSerializer.serializeObject(item);
}
break;
}
}
return out;
}
/* Serializes an Object */
public static function serializeObject(o:Object):String
{
var sb:String = "{";
for(var x:String in o)
{
//dont include functions
if(typeof(x[o]) == "function")
{
continue;
}
sb += x + ":" + serializeItem(o[x]) + ",";
}
//remove the trailing ","
if(sb.substring(sb.length - 1) == ",")
{
sb = sb.substring(0, sb.length - 1);
}
sb += "}";
return sb;
}
/* Serializes an Array */
//not typed since I can't cast an object to Array
public static function serializeArray(o):String
{
var len:Number = o.length;
var sb:String = "[";
for(var i:Number = 0; i < len; i++)
{
sb += serializeItem(o[i]);
if(i != len - 1)
{
sb += ",";
}
}
sb += "]";
return sb;
}
/* Serializes a String */
public static function serializeString(s:String):String
{
return "'" + s + "'";
}
/* Serializes a Number */
public static function serializeNumber(n:Number):String
{
return String(n);
}
/* Serializes a Boolean value */
public static function serializeBoolean(b:Boolean):String
{
return String(b);
}
/* Serializes undefined */
public static function serializeUndefined(Void):String
{
return "undefined";
}
/* Serializes null */
public static function serializeNull(Void):String
{
return "null";
}
/* Serializes a Date */
public static function serializeDate(d:Date):String
{
return "new Date(" + d.getTime() + ")";
}
/**************** De-Serialization Methods ****************/
/*
Static function that de-serializes any supported data types.
Returns a String
*/
public static function deserializeItem(type:String, data:String):Object
{
var out:Object;
switch (type)
{
case "str":
{
out = JavaScriptSerializer.deserializeString(data);
break;
}
case "num":
{
out = JavaScriptSerializer.deserializeNumber(data);
break;
}
case "bool":
{
out = JavaScriptSerializer.deserializeBoolean(data);
break;
}
case "null":
{
out = JavaScriptSerializer.deserializeNull();
break;
}
case "undf":
{
out = JavaScriptSerializer.deserializeUndefined();
break;
}
case "date":
{
out = JavaScriptSerializer.deserializeDate(data);
break;
}
case "xser":
{
out = JavaScriptSerializer.deserializeXMLSerializedItem(data);
trace(data);
break;
}
}
return out;
}
/* Deserializes a String */
public static function deserializeString(s:String):String
{
return s;
}
/* Deserializes a Number */
public static function deserializeNumber(s:String):Number
{
return Number(s);
}
/* Deserializes a Boolean Value */
public static function deserializeBoolean(s:String):String
{
return Boolean(s);
}
/* Deserializes undefined */
//returns undefined
public static function deserializeUndefined(s:String)
{
return undefined;
}
/* Deserializes null */
//returns null
public static function deserializeNull(s:String)
{
return null;
}
/* Deserializes a Date */
public static function deserializeDate(s:String):Date
{
return new Date(Number(s));
}
/**************** De-Serialization XML Methods ****************/
/*
The methods below are for deserializing data serialized in XML format.
This is used for serializing Objects and Arrays
*/
/*
Static function that de-serializes any supported XML serialized data types.
Returns a String
*/
public static function deserializeXMLSerializedItem(data:String):Object
{
var x:XML = new XML();
x.ignoreWhite = true;
x.parseXML(data);
var out:Object = parseNode(x.firstChild.firstChild, new Object);
return out;
}
/* recursive function that parses the xml tree */
public static function parseNode(x:XMLNode, o:Object):Object
{
var nodeName:String = x.nodeName;
var nodeValue:String = x.firstChild.nodeValue;
var varName:String = x.attributes["name"];
var children:Array = x.childNodes;
var len:Number = children.length;
switch(nodeName)
{
case "obj":
{
if(varName == null)
{
o = new Object();
}
else
{
o[varName] = new Object();
}
break;
}
case "str":
{
if(varName == undefined)
{
o = String(nodeValue);
}
else
{
o[varName] = nodeValue;
}
break;
}
case "num":
{
if(varName == null)
{
o = Number(nodeValue);
}
else
{
o[varName] = Number(nodeValue);
}
break;
}
case "bool":
{
if(varName == null)
{
o = Boolean(nodeValue);
}
else
{
o[varName] = Boolean(nodeValue);
}
break;
}
case "null":
{
if(varName == null)
{
o = null;
}
else
{
o[varName] = null;
}
break;
}
case "undf":
{
if(varName == null)
{
o = undefined;
}
else
{
o[varName] = undefined;
}
break;
}
case "date":
{
if(varName == null)
{
o = new Date(Number(nodeValue));
}
else
{
o[varName] = new Date(Number(nodeValue));
}
break;
}
case "array":
{
//this is not typed because the compiler gets confused about
//the explicit type change for o below.
var arr;
if(varName == null)
{
o = new Array();
arr = o;
}
else
{
o[varName] = new Array();
arr = o[varName];
}
for(var x:Number = 0; x < len; x++)
{
arr.push(parseNode(children[x], o));
}
return arr;
}
}
for(var i:Number = 0; i < len; i++)
{
parseNode(children[i], o);
}
return o;
}
}

@ -1,104 +0,0 @@
// in je FORM-tag voor de hotspots: onSubmit="return validateFlashVar('MINIMUM_AANTAL_CLICKS');
var flashVar = 1;
var lcId = new Date().getTime();
//var flashProxy = new FlashProxy(lcId, "JavaScriptFlashGateway.swf");
function validateFlashVar(counter, lang_1, lang_2)
{
return true;
//alert(counter);
//alert(flashVar);
if(counter != flashVar)
{
alert(lang_1 + counter + lang_2);
return false;
}
else
{
return true;
}
}
function updateFlashVar()
{
//alert('updateFlashVar: ' + flashVar);
flashVar++;
}
/*
* Save the results of the positioning of a point by the user on top of
* the answer area.
* @param int Question ID
* @param int ID of the area (square or ellipse)
* @param int Whether the answer is correct or not
* @param int X-coordinate (horizontal) of the answer point
* @param int Y-coordinate (vertical) of the answer point
*/
function saveHotspot(question_id, hotspot_id, answer, hotspot_x, hotspot_y)
{
newHotspot = document.createElement("input");
newHotspot.type = "hidden";
newHotspot.name = "hotspot["+question_id+"]["+hotspot_id+"]";
newHotspot.value = hotspot_x + ";" + hotspot_y;
document.frm_exercise.appendChild(newHotspot);
newHotspot = document.createElement("input");
newHotspot.type = "hidden";
newHotspot.name = "choice["+question_id+"]["+hotspot_id+"]";
newHotspot.value = answer;
document.frm_exercise.appendChild(newHotspot);
}
/*
* Save the results of the positioning of a point by the user on top of
* the answer area ( for polygons and delineation )
* @param int Question ID
* @param int ID of the area (square or ellipse)
* @param int Whether the answer is correct or not
* @param array Coordinates (horizontal+vertical) of the answer points, in an array
*/
function saveDelineationUserAnswer(question_id, hotspot_id, answer, coordinates)
{
newHotspot = document.createElement("input");
newHotspot.type = "hidden";
newHotspot.name = "hotspot["+question_id+"]["+hotspot_id+"]";
newHotspot.value = coordinates;
document.frm_exercise.appendChild(newHotspot);
newHotspot = document.createElement("input");
newHotspot.type = "hidden";
newHotspot.name = "choice["+question_id+"]["+hotspot_id+"]";
newHotspot.value = answer;
document.frm_exercise.appendChild(newHotspot);
}
function saveShapeHotspot(question_id, hotspot_id, type, x, y, w, h)
{
document.frm_exercise["hotspot_coordinates["+hotspot_id+"]"].value = x + ";" + y + "|" + w + "|" + h;
document.frm_exercise["hotspot_type["+hotspot_id+"]"].value = type;
}
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";
}
function saveOARHotspot(question_id, hotspot_id, coordinates)
{
document.frm_exercise["hotspot_coordinates["+hotspot_id+"]"].value = coordinates;
document.frm_exercise["hotspot_type["+hotspot_id+"]"].value = "oar";
}
function jsdebug(debug_string)
{
alert(debug_string);
}

@ -1,349 +0,0 @@
// javascript Proxy
import com.macromedia.javascript.JavaScriptProxy;
var JS_proxy:JavaScriptProxy = new JavaScriptProxy();
System.useCodepage = true;
// get id from querystring
myURL = this._url;
//myURL = "http://localhost/dokeosSVN/main/plugin/hotspot/hotspot_solution.swf?modifyAnswers=1&exe_id=2&from_db=3";
tmpAr = myURL.split("?");
tmpAr = tmpAr[1].split("&");
id = tmpAr[0].split("=");
id = id[1];
exe_id = tmpAr[1].split("=");
exe_id = exe_id[1];
from_db = tmpAr[2].split("=");
from_db = from_db[1];
// get URL to load lang and hotspot variables
//myURL = this._url;
myPos = myURL.lastIndexOf("/");
myURL = myURL.substring(0, myPos);
myPos = myURL.lastIndexOf("/");
myURL = myURL.substring(0, myPos);
myPos = myURL.lastIndexOf("/");
myURL = myURL.substring(0, myPos);
// movie properties
var movieWidth:Number = 380;
var movieHeight:Number = 400;
// hotspot properties
var startWidth:Number = 0; // \__ if these values are set, shape will be drawn right and down from the mouse;
var startHeight:Number = 0; // /
var pType:String = ""; // possible values: circle, square, poly;
// other settings
var i:Number = 1;
var isDrawing:Boolean = false;
var hotspots_c:Array = new Array('0x4271B5','0xFE8E16','0x45C7F0','0xBCD631','0xD63173','0xD7D7D7','0x90AFDD','0xAF8640','0x4F9242','0xF4EB24','0xED2024','0x3B3B3B');
// make array with all elements
var hotspots:Array = new Array();
// get data from database
this.createEmptyMovieClip("target_mc", 2000);
//_answers
loadVariables(myURL + "/exercice/hotspot_answers.as.php?modifyAnswers="+id+"&exe_id="+exe_id+"&from_db="+from_db, target_mc);
var param_interval:Number = setInterval(checkParamsLoaded, 100);
// language variables
var str_choose:String = "";
var lang_interval:Number
// counter for language (if language can't be loaded after 2 sec,
// english will be loaded
var counter:Number = 0;
// booleans for loading
var langLoaded:Boolean = false;
var varsLoaded:Boolean = false;
var imageLoaded:Boolean = false;
// image preloader
var loadListener:Object = new Object();
loadListener.onLoadComplete = function(){
_root.imageLoaded = true;
_root.showInterface();
}
var mcLoader:MovieClipLoader = new MovieClipLoader();
mcLoader.addListener(loadListener);
var mc:MovieClip = _root.image_mc;
/////////////////////////////////////////////////////////////////////////////////
// FUNCTIONS
/////////////////////////////////////////////////////////////////////////////////
// show hotspots, user can't click anymore
function showHotspots(num){
for(j=1;j<=_root.hotspots.length;j++){
_root.map_mc["hotspot"+j]._alpha = num;
}
}
function showUserpoints(num){
for(j=1;j<=_root.hotspots.length;j++){
_root["hotspot_answer"+j]._alpha = num;
if(num==0){
_root["hotspot_answer"+j].hotspot_mc._visible = false;
}else{
_root["hotspot_answer"+j].hotspot_mc._visible = true;
}
}
}
function showInterface(){
if((_root.langLoaded == true) and (_root.varsLoaded == true) and (_root.imageLoaded == true)){
_root.showUserpoints(100);
_root.showHotspots(100);
_root.loading_mc._visible = false;
}
}
// get language file
function getLang(){
counter++;
if (_root.lang_mc.done != undefined) {
_root.show_userPoints_btn.label = _root.lang_mc.showUserPoints;
_root.show_hotspots_btn.label = _root.lang_mc.showHotspots;
// check if interface can be showed (if everything else is loaded)
_root.langLoaded = true;
_root.showInterface();
// clear interval
clearInterval(_root.lang_interval);
}else if(counter==20){
// clear interval
clearInterval(_root.lang_interval);
// set counter to zero
_root.counter = 0;
// set new interval (get english version)
loadVariables(myURL + "/lang/english/hotspot.inc.php", _root.lang_mc);
_root.lang_interval = setInterval(getLang, 100);
}
}
function checkParamsLoaded() {
if (target_mc.done != undefined) {
// once we know the language, get language-variables from language file
language = target_mc["hotspot_lang"];
_root.createEmptyMovieClip("lang_mc", 2001);
//loadVariables(myURL + "/lang/" + language + "/hotspot.inc.php", _root.lang_mc);
loadVariables(myURL + "/exercice/hotspot.inc.php", _root.lang_mc);
_root.lang_interval = setInterval(getLang, 100);
// start loading external image
_root.mcLoader.loadClip("../../courses/" + target_mc["courseCode"] + "/document/images/" + target_mc["hotspot_image"], mc);
// make needed array's: filled if hotspot exists, empty if not
for(m = 1; m <= 12; m++){
// make seperate lists
if(target_mc["hotspot_" + m]=="true"){
// add to general list
tmpAr = Array();
tmpAr.push(m);
tmpAr.push(target_mc["hotspot_" + m + "_type"]);
_root.hotspots.push(tmpAr);
if (target_mc["hotspot_" + m + "_type"] != 'poly' && target_mc["hotspot_" + m + "_type"] != 'delineation'){
// x;y|height|width
_root["p_hotspot_" + m] = new Array;
$coordinates = target_mc["hotspot_" + m + "_coord"].split("|");
$tmp_xy = $coordinates[0].split(";");
$x = $tmp_xy[0];
$y = $tmp_xy[1];
$height = $coordinates[1];
$widht = $coordinates[2];
_root["p_hotspot_" + m].push($x);
_root["p_hotspot_" + m].push($y);
_root["p_hotspot_" + m].push($height);
_root["p_hotspot_" + m].push($widht);
}else{
// p1_x;p1_y|p2_x;p2_y|...
_root["p_hotspot_" + m] = new Array();
$coordinates = target_mc["hotspot_" + m + "_coord"].split("|");
for(k=0;k<$coordinates.length;k++){
$tmp_xy = $coordinates[k].split(";");
tempArray = Array();
tempArray.push($tmp_xy[0]);
tempArray.push($tmp_xy[1]);
_root["p_hotspot_" + m].push(tempArray);
}
}
}else{
_root["p_hotspot_" + m] = Array();
}
}
// set border around image
_root.map_mc._width = int(target_mc.hotspot_image_width) + 1;
_root.map_mc._height = int(target_mc.hotspot_image_height) + 1;
// draw the hotspots
drawShapes();
// check if interface can be showed (if everything else is loaded)
_root.varsLoaded = true;
_root.showInterface();
// clear interval
clearInterval(param_interval);
}
}
// draw the shapes that are given from the database
function drawShapes(){
// draw points where user clicked
_root.drawPoints();
// draw hotspots
for (var j:String in hotspots) {
if(j <> ""){
// +1 because array names starts from 1
_root.i = int(j) + 1;
// -1 because array values starts from 0
_root.pType = _root.hotspots[_root.i - 1][1];
if(_root.pType=="poly" || _root.pType=="delineation"){
drawPoly();
}
else{
drawShape(true);
}
_root.map_mc["hotspot" + _root.i]._alpha = 0;
}
}
}
function drawPoints(){
answers = _root.target_mc.p_hotspot_answers.split("|");
if(answers[0]!=''){
j = 1;
k = 500;
for(var z:String in answers){
if(target_mc["hotspot_"+j+"_type"]=="delineation")
{
// trace poly
delineation_coords = answers[j-1].split("/");
drawDelineation(j, delineation_coords);
}
else
{
xy = answers[j-1].split(";");
$x = xy[0];
$y = xy[1];
// create new hotspot
_root.createEmptyMovieClip("hotspot_answer" + j, k);
// attach correct type of hotspot
_root["hotspot_answer" + j].attachMovie("numbers", "hotspot_mc", _root["hotspot_answer" + j].getNextHighestDepth());
_root["hotspot_answer" + j].hotspot_mc._width = 33;
_root["hotspot_answer" + j].hotspot_mc._height = 22;
_root["hotspot_answer" + j].hotspot_mc._x = int($x) + _root.map_mc._x;
_root["hotspot_answer" + j].hotspot_mc._y = int($y) + _root.map_mc._y;
_root["hotspot_answer" + j].hotspot_mc.order_txt.text = int(j);
_root["hotspot_answer" + j].hotspot_mc._visible = false;
_root["hotspot_answer" + j]._alpha = 0;
}
j++;
k++;
}
}
}
function drawShape(userDrawing){
// create new hotspot
_root.map_mc.createEmptyMovieClip("hotspot" + _root.i, _root.i);
// attach correct type of hotspot
_root.map_mc["hotspot" + _root.i].attachMovie(_root.pType, "hotspot_mc", _root.map_mc["hotspot" + _root.i].getNextHighestDepth());
_root.map_mc["hotspot" + _root.i].hotspot_mc._visible = true;
_root.map_mc["hotspot" + _root.i].hotspot_mc.center_mc._alpha = 60;
_root.map_mc["hotspot" + _root.i].hotspot_mc._x = _root["p_hotspot_"+ _root.i][0];
_root.map_mc["hotspot" + _root.i].hotspot_mc._y = _root["p_hotspot_"+ _root.i][1];
_root.map_mc["hotspot" + _root.i].hotspot_mc._width = _root["p_hotspot_"+ _root.i][2];
_root.map_mc["hotspot" + _root.i].hotspot_mc._height = _root["p_hotspot_"+ _root.i][3];
colorchange = new Color(_root.map_mc["hotspot" + _root.i].hotspot_mc);
colorchange.setRGB(_root.hotspots_c[_root.i - 1]);
}
// when black lines of hotspots are deleted, draw the exact same poly with coordinates
// that are saved in the array
function drawPoly(){
// create empty movieclip
_root.map_mc.createEmptyMovieClip("hotspot" + _root.i, _root.i);
// begin filling the movieclip
_root.map_mc["hotspot" + _root.i].beginFill(_root.hotspots_c[_root.i - 1], 60);
// set linestyle
_root.map_mc["hotspot" + _root.i].lineStyle(1, _root.hotspots_c[_root.i - 1], 100);
// move mouse to first coordinate
_root.map_mc["hotspot" + _root.i].moveTo(_root["p_hotspot_"+_root.i][0][0],_root["p_hotspot_"+_root.i][0][1]);
// draw lines to all coordinates
v = _root["p_hotspot_"+_root.i].length;
for (k=1;k<v;k++){
_root.map_mc["hotspot" + _root.i].lineTo(_root["p_hotspot_"+_root.i][k][0],_root["p_hotspot_"+_root.i][k][1]);
}
// attach first and last coordinates
_root.map_mc["hotspot" + _root.i].lineTo(_root["p_hotspot_"+_root.i][0][0],_root["p_hotspot_"+_root.i][0][1]);
// stop filling the movieclip
_root.map_mc["hotspot" + _root.i].endFill();
}
function drawDelineation(level, coords){
// create empty movieclip
_root.map_mc.createEmptyMovieClip("hotspot_delineation" + level, 2000+level);
// begin filling the movieclip
_root.map_mc["hotspot_delineation" + level].beginFill(0xFFFFFF, 60);
// set linestyle
_root.map_mc["hotspot_delineation" + level].lineStyle(1,0x000000, 100);
// move mouse to first coordinate
xy_origin = coords[0].split(";");
_root.map_mc["hotspot_delineation" + level].moveTo(xy_origin[0],xy_origin[1]);
// draw lines to all coordinates
v = coords.length;
for (k=1;k<v;k++){
xy = coords[k].split(";");
_root.map_mc["hotspot_delineation" + level].lineTo(xy[0],xy[1]);
}
// attach first and last coordinates
_root.map_mc["hotspot_delineation" + level].lineTo(xy_origin[0],xy_origin[1]);
// stop filling the movieclip
_root.map_mc["hotspot_delineation" + level].endFill();
}
function jsdebug(debug_string){
_root.JS_proxy.jsdebug(debug_string);
}

@ -1,86 +0,0 @@
// Globals
// Major version of Flash required
var requiredMajorVersion = 7;
// Minor version of Flash required
var requiredMinorVersion = 0;
// Minor version of Flash required
var requiredRevision = 0;
// the version of javascript supported
var jsVersion = 1.0;
//
var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
jsVersion = 1.1;
// JavaScript helper required to detect Flash Player PlugIn version information
function JSGetSwfVer(i){
// NS/Opera version >= 3 check for Flash plugin in plugin array
if (navigator.plugins != null && navigator.plugins.length > 0) {
if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
descArray = flashDescription.split(" ");
tempArrayMajor = descArray[2].split(".");
versionMajor = tempArrayMajor[0];
versionMinor = tempArrayMajor[1];
if ( descArray[3] != "" ) {
tempArrayMinor = descArray[3].split("r");
} else {
tempArrayMinor = descArray[4].split("r");
}
versionRevision = tempArrayMinor[1] > 0 ? tempArrayMinor[1] : 0;
flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
} else {
flashVer = -1;
}
}
// MSN/WebTV 2.6 supports Flash 4
else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
// WebTV 2.5 supports Flash 3
else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
// older WebTV supports Flash 2
else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
// Can\'t detect in all other cases
else {
flashVer = -1;
}
return flashVer;
}
// When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available
function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision)
{
reqVer = parseFloat(reqMajorVer + "." + reqRevision);
// loop backwards through the versions until we find the newest version
for (i=25;i>0;i--) {
if (isIE && isWin && !isOpera) {
versionStr = VBGetSwfVer(i);
} else {
versionStr = JSGetSwfVer(i);
}
if (versionStr == -1 ) {
return false;
} else if (versionStr != 0) {
if(isIE && isWin && !isOpera) {
tempArray = versionStr.split(" ");
tempString = tempArray[1];
versionArray = tempString .split(",");
} else {
versionArray = versionStr.split(".");
}
versionMajor = versionArray[0];
versionMinor = versionArray[1];
versionRevision = versionArray[2];
versionString = versionMajor + "." + versionRevision; // 7.0r24 == 7.24
versionNum = parseFloat(versionString);
// is the major.revision >= requested major.revision AND the minor version >= requested minor
if ( (versionMajor > reqMajorVer) && (versionNum >= reqVer) ) {
return true;
} else {
return ((versionNum >= reqVer && versionMinor >= reqMinorVer) ? true : false );
}
}
}
}

@ -1,13 +0,0 @@
Function VBGetSwfVer(i)
on error resume next
Dim swControl, swVersion
swVersion = 0
set swControl = CreateObject(\"ShockwaveFlash.ShockwaveFlash.\" + CStr(i))
if (IsObject(swControl)) then
swVersion = swControl.GetVariable(\"\$version\")
end if
VBGetSwfVer = swVersion
End Function

@ -44,7 +44,7 @@ $server->wsdl->addComplexType(
'SOAP-ENC:Array', 'SOAP-ENC:Array',
array(), array(),
array( array(
array('ref'=>'SOAP:ENC:arrayType', array('ref'=>'SOAP-ENC:arrayType',
'wsdl:arrayType'=>'tns:courseDetails[]') 'wsdl:arrayType'=>'tns:courseDetails[]')
), ),
'tns:courseDetails' 'tns:courseDetails'

@ -6299,7 +6299,7 @@ $server->wsdl->addComplexType(
'SOAP-ENC:Array', 'SOAP-ENC:Array',
array(), array(),
array( array(
array('ref'=>'SOAP:ENC:arrayType', array('ref'=>'SOAP-ENC:arrayType',
'wsdl:arrayType'=>'tns:certificateDetails[]') 'wsdl:arrayType'=>'tns:certificateDetails[]')
), ),
'tns:certificateDetails' 'tns:certificateDetails'

@ -42,7 +42,7 @@ $server->wsdl->addComplexType(
'SOAP-ENC:Array', 'SOAP-ENC:Array',
array(), array(),
array( array(
array('ref'=>'SOAP:ENC:arrayType', array('ref'=>'SOAP-ENC:arrayType',
'wsdl:arrayType'=>'tns:courseDetails[]') 'wsdl:arrayType'=>'tns:courseDetails[]')
), ),
'tns:courseDetails' 'tns:courseDetails'
@ -120,7 +120,7 @@ $server->wsdl->addComplexType(
'SOAP-ENC:Array', 'SOAP-ENC:Array',
array(), array(),
array( array(
array('ref'=>'SOAP:ENC:arrayType', array('ref'=>'SOAP-ENC:arrayType',
'wsdl:arrayType'=>'tns:eventDetails[]') 'wsdl:arrayType'=>'tns:eventDetails[]')
), ),
'tns:eventDetails' 'tns:eventDetails'

Loading…
Cancel
Save