4 require_once
'Services/Form/classes/class.ilFileInputGUI.php';
5 require_once
'Modules/TestQuestionPool/classes/class.assAnswerImagemap.php';
27 if(!parent::checkInput())
32 $tmp_file_name = $_FILES[$this->
getPostVar()][
'tmp_name'];
33 if(strlen($tmp_file_name) == 0)
38 if(!is_readable($tmp_file_name))
40 $this->
setAlert($lng->txt(
'ass_imap_map_file_not_readable'));
44 $contents = file_get_contents($tmp_file_name);
47 !preg_match_all(
'/<area(.+)>/siU',
$contents, $matches) ||
48 !is_array($matches) ||
49 !isset($matches[1]) ||
50 count($matches[1]) == 0
53 $this->
setAlert($lng->txt(
'ass_imap_no_map_found'));
57 for($i = 0; $i< count($matches[1]); $i++)
59 preg_match(
"/alt\s*=\s*\"(.+)\"\s*/siU", $matches[1][$i], $alt);
60 preg_match(
"/coords\s*=\s*\"(.+)\"\s*/siU", $matches[1][$i],
$coords);
61 preg_match(
"/shape\s*=\s*\"(.+)\"\s*/siU", $matches[1][$i], $shape);
Class for true/false or yes/no answers.
Create styles array
The data for the language used.