22        if (is_array($a_areas[
'points'])) {
 
   23            foreach ($this->areas as $idx => 
$name) {
 
   25                    $this->areas[$idx]->setPointsUnchecked($a_areas[
'points_unchecked'][$idx]);
 
   27                    $this->areas[$idx]->setPointsUnchecked(0);
 
   30                $this->areas[$idx]->setPoints($a_areas[
'points'][$idx]);
 
   48                    $this->
setAlert(
$lng->txt(
'form_msg_area_missing_points'));
 
   52                    $this->
setAlert(
$lng->txt(
'form_msg_numeric_value_required'));
 
   62            $this->
setAlert(
$lng->txt(
"enter_enough_positive_points"));
 
   73        $template = 
new ilTemplate(
"tpl.prop_imagemapquestioncorrection_input.html", 
true, 
true, 
"Modules/TestQuestionPool");
 
   78                include_once 
"./Modules/TestQuestionPool/classes/class.ilImagemapPreview.php";
 
   81                    $preview->addArea(
$index, $area->getArea(), $area->getCoords(), $area->getAnswertext(), 
"", 
"", 
true, $this->getLineColor());
 
   85                $template->setVariable(
"SRC_IMAGE", $imagepath);
 
   96            foreach ($this->
getAreas() as $area) {
 
   97                if (strlen($area->getPoints())) {
 
   98                    $template->setCurrentBlock(
'area_points_value');
 
   99                    $template->setVariable(
'VALUE_POINTS', $area->getPoints());
 
  103                    if (strlen($area->getPointsUnchecked())) {
 
  104                        $template->setCurrentBlock(
'area_points_unchecked_value');
 
  105                        $template->setVariable(
'VALUE_POINTS_UNCHECKED', $area->getPointsUnchecked());
 
  109                    $template->setCurrentBlock(
'area_points_unchecked_field');
 
  113                if (strlen($area->getAnswertext())) {
 
  114                    $template->setVariable(
'ANSWER_AREA', $area->getAnswertext());
 
  117                $template->setVariable(
'TEXT_SHAPE', strtoupper($area->getArea()));
 
  118                $template->setVariable(
'VALUE_SHAPE', $area->getArea());
 
  119                $coords = preg_replace(
"/(\d+,\d+,)/", 
"\$1 ", $area->getCoords());
 
  120                $template->setVariable(
'VALUE_COORDINATES', $area->getCoords());
 
  122                $template->setVariable(
'COUNTER', $counter);
 
  127            $template->setVariable(
"TEXT_NAME", 
$lng->txt(
"ass_imap_hint"));
 
  129                $template->setVariable(
"TEXT_POINTS", 
$lng->txt(
"points_checked"));
 
  131                $template->setCurrentBlock(
'area_points_unchecked_head');
 
  132                $template->setVariable(
"TEXT_POINTS_UNCHECKED", 
$lng->txt(
"points_unchecked"));
 
  138            $template->setVariable(
"TEXT_COORDINATES", 
$lng->txt(
"coordinates"));
 
  139            $template->setVariable(
"TEXT_COMMANDS", 
$lng->txt(
"actions"));
 
  145        $template->setVariable(
"TXT_BROWSE", 
$lng->txt(
"select_file"));
 
  146        $template->setVariable(
"TXT_MAX_SIZE", 
$lng->txt(
"file_notice") . 
" " .
 
  147            $this->getMaxFileSizeString());
 
  149        $a_tpl->setCurrentBlock(
"prop_generic");
 
  150        $a_tpl->setVariable(
"PROP_GENERIC", 
$template->get());
 
  151        $a_tpl->parseCurrentBlock();
 
  155        #$tpl->addJavascript("./Services/Form/js/ServiceFormWizardInput.js");
 
  156        #$tpl->addJavascript("./Modules/TestQuestionPool/templates/default/imagemap.js");
 
An exception for terminatinating execution or to throw for unit testing.
Image map image preview creator.
special template class to simplify handling of ITX/PEAR
static stripSlashesRecursive($a_data, $a_strip_html=true, $a_allow="")
Strip slashes from array and sub-arrays.