ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
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  function ASS_AnswerImagemap (
58  $answertext = "",
59  $points = 0.0,
60  $order = 0,
61  $coords = "",
62  $area = "",
63  $id = -1,
65  )
66  {
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 }