4 require_once
'Services/Form/classes/class.ilFileInputGUI.php';
5 require_once
'Modules/TestQuestionPool/classes/class.assAnswerImagemap.php';
28 if (!parent::checkInput()) {
32 $tmp_file_name = $_FILES[$this->
getPostVar()][
'tmp_name'];
33 if (strlen($tmp_file_name) == 0) {
37 if (!is_readable($tmp_file_name)) {
38 $this->
setAlert(
$lng->txt(
'ass_imap_map_file_not_readable'));
42 $contents = file_get_contents($tmp_file_name);
45 !preg_match_all(
'/<area(.+)>/siU', $contents, $matches) ||
46 !is_array($matches) ||
47 !isset($matches[1]) ||
48 count($matches[1]) == 0
54 for (
$i = 0;
$i < count($matches[1]);
$i++) {
55 preg_match(
"/alt\s*=\s*\"(.+)\"\s*/siU", $matches[1][
$i], $alt);
56 preg_match(
"/coords\s*=\s*\"(.+)\"\s*/siU", $matches[1][
$i],
$coords);
57 preg_match(
"/shape\s*=\s*\"(.+)\"\s*/siU", $matches[1][
$i], $shape);
Class for true/false or yes/no answers.