ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.assAnswerImagemap.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4include_once "./Modules/TestQuestionPool/classes/class.assAnswerBinaryState.php";
5include_once "./Modules/Test/classes/inc.AssessmentConstants.php";
6
27
35 var $area;
36
44 protected $points_unchecked = 0.0;
45
58 $answertext = "",
59 $points = 0.0,
60 $order = 0,
61 $coords = "",
62 $area = "",
63 $id = -1,
65 )
66 {
67 parent::__construct($answertext, $points, 1, $id);
68 $this->coords = $coords;
69 $this->area = $area;
70 $this->points_unchecked = $points_unchecked;
71 }
72
73
81 function getCoords() {
82 $this->coords = preg_replace("/\s/", "", $this->coords);
83 return $this->coords;
84 }
85
86
94 function setCoords($coords="") {
95 $coords = preg_replace("/\s/", "", $coords);
96 $this->coords=$coords;
97 }
98
106 function getArea() {
107 return $this->area;
108 }
109
110
118 function setArea($area="") {
119 $this->area=$area;
120 }
121
129 public function getPointsUnchecked()
130 {
132 }
133
143 {
144 $new_points = str_replace(",", ".", $points_unchecked);
145
146 if($this->checkPoints($new_points))
147 {
148 $this->points_unchecked = $new_points;
149 }
150 else
151 {
152 $this->points_unchecked = 0.0;
153 }
154 }
155}
Class for true/false or yes/no answers.
Class for true/false or yes/no answers.
setCoords($coords="")
Sets the coordinates of an image map.
getArea()
Gets the area of an image map.
setArea($area="")
Sets the area of an image map.
getPointsUnchecked()
Returns the points for an unchecked answer Returns the points for an unchecked answer.
ASS_AnswerImagemap( $answertext="", $points=0.0, $order=0, $coords="", $area="", $id=-1, $points_unchecked=0)
ASS_AnswerImagemap constructor.
getCoords()
Gets the coordinates of an image map.
setPointsUnchecked($points_unchecked)
Sets the points for an unchecked answer.
checkPoints($a_points)
Checks, if the point value is numeric.