1<?php 2/* 3 +-----------------------------------------------------------------------------+ 4 | ILIAS open source | 5 +-----------------------------------------------------------------------------+ 6 | Copyright (c) 1998-2001 ILIAS open source, University of Cologne | 7 | | 8 | This program is free software; you can redistribute it and/or | 9 | modify it under the terms of the GNU General Public License | 10 | as published by the Free Software Foundation; either version 2 | 11 | of the License, or (at your option) any later version. | 12 | | 13 | This program is distributed in the hope that it will be useful, | 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 16 | GNU General Public License for more details. | 17 | | 18 | You should have received a copy of the GNU General Public License | 19 | along with this program; if not, write to the Free Software | 20 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 21 +-----------------------------------------------------------------------------+ 22*/ 23 24/** 25* QTI presentation class 26* 27* @author Helmut Schottmüller <hschottm@gmx.de> 28* @version $Id$ 29* 30* @package assessment 31*/ 32class ilQTIPresentation 33{ 34 public $label; 35 public $xmllang; 36 public $x0; 37 public $y0; 38 public $width; 39 public $height; 40 41 public $material; 42 public $response; 43 public $order; 44 45 public function __construct() 46 { 47 $this->response = array(); 48 $this->material = array(); 49 $this->order = array(); 50 } 51 52 public function setLabel($a_label) 53 { 54 $this->label = $a_label; 55 } 56 57 public function getLabel() 58 { 59 return $this->label; 60 } 61 62 public function setXmllang($a_xmllang) 63 { 64 $this->xmllang = $a_xmllang; 65 } 66 67 public function getXmllang() 68 { 69 return $this->xmllang; 70 } 71 72 public function setX0($a_x0) 73 { 74 $this->x0 = $a_x0; 75 } 76 77 public function getX0() 78 { 79 return $this->x0; 80 } 81 82 public function setY0($a_y0) 83 { 84 $this->y0 = $a_y0; 85 } 86 87 public function getY0() 88 { 89 return $this->y0; 90 } 91 92 public function setWidth($a_width) 93 { 94 $this->width = $a_width; 95 } 96 97 public function getWidth() 98 { 99 return $this->width; 100 } 101 102 public function setHeight($a_height) 103 { 104 $this->height = $a_height; 105 } 106 107 public function getHeight() 108 { 109 return $this->height; 110 } 111 112 public function addMaterial($a_material) 113 { 114 $count = array_push($this->material, $a_material); 115 array_push($this->order, array("type" => "material", "index" => $count - 1)); 116 } 117 118 public function addResponse($a_response) 119 { 120 $count = array_push($this->response, $a_response); 121 array_push($this->order, array("type" => "response", "index" => $count - 1)); 122 } 123} 124