ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 
4 include_once "./Modules/TestQuestionPool/classes/class.assAnswerBinaryState.php";
5 include_once "./Modules/Test/classes/inc.AssessmentConstants.php";
6 
26  var $coords;
27 
35  var $area;
36 
44  protected $points_unchecked = 0.0;
45 
57  public function __construct(
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.
__construct( $answertext="", $points=0.0, $order=0, $coords="", $area="", $id=-1, $points_unchecked=0)
ASS_AnswerImagemap constructor.
setArea($area="")
Sets the area of an image map.
checkPoints($a_points)
Checks, if the point value is numeric.
setPointsUnchecked($points_unchecked)
Sets the points for an unchecked answer.
getCoords()
Gets the coordinates of an image map.
getArea()
Gets the area of an image map.
getPointsUnchecked()
Returns the points for an unchecked answer Returns the points for an unchecked answer.
setCoords($coords="")
Sets the coordinates of an image map.
Class for true/false or yes/no answers.