• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • File List
  • Globals

assessment/classes/class.ilQTIResponseVar.php

Go to the documentation of this file.
00001 <?php
00002 /*
00003         +-----------------------------------------------------------------------------+
00004         | ILIAS open source                                                           |
00005         +-----------------------------------------------------------------------------+
00006         | Copyright (c) 1998-2001 ILIAS open source, University of Cologne            |
00007         |                                                                             |
00008         | This program is free software; you can redistribute it and/or               |
00009         | modify it under the terms of the GNU General Public License                 |
00010         | as published by the Free Software Foundation; either version 2              |
00011         | of the License, or (at your option) any later version.                      |
00012         |                                                                             |
00013         | This program is distributed in the hope that it will be useful,             |
00014         | but WITHOUT ANY WARRANTY; without even the implied warranty of              |
00015         | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               |
00016         | GNU General Public License for more details.                                |
00017         |                                                                             |
00018         | You should have received a copy of the GNU General Public License           |
00019         | along with this program; if not, write to the Free Software                 |
00020         | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. |
00021         +-----------------------------------------------------------------------------+
00022 */
00023 
00024 define ("RESPONSEVAR_EQUAL", "1");
00025 define ("RESPONSEVAR_LT", "2");
00026 define ("RESPONSEVAR_LTE", "3");
00027 define ("RESPONSEVAR_GT", "4");
00028 define ("RESPONSEVAR_GTE", "5");
00029 define ("RESPONSEVAR_SUBSET", "6");
00030 define ("RESPONSEVAR_INSIDE", "7");
00031 define ("RESPONSEVAR_SUBSTRING", "8");
00032 
00033 define ("CASE_YES", "1");
00034 define ("CASE_NO", "2");
00035 
00036 define ("SETMATCH_PARTIAL", "1");
00037 define ("SETMATCH_EXACT", "2");
00038 
00039 define ("AREATYPE_ELLIPSE", "1");
00040 define ("AREATYPE_RECTANGLE", "2");
00041 define ("AREATYPE_BOUNDED", "3");
00042 
00051 class ilQTIResponseVar
00052 {       
00053         var $vartype;
00054         var $case;
00055         var $respident;
00056         var $index;
00057         var $setmatch;
00058         var $areatype;
00059         var $content;
00060         
00061         function ilQTIResponseVar($a_vartype)
00062         {
00063                 $this->setVartype($a_vartype);
00064         }
00065         
00066         function setVartype($a_vartype)
00067         {
00068                 $this->vartype = $a_vartype;
00069         }
00070         
00071         function getVartype()
00072         {
00073                 return $this->vartype;
00074         }
00075         
00076         function setCase($a_case)
00077         {
00078                 switch (strtolower($a_case))
00079                 {
00080                         case "1":
00081                         case "yes":
00082                                 $this->case = CASE_YES;
00083                                 break;
00084                         case "2":
00085                         case "no":
00086                                 $this->case = CASE_NO;
00087                                 break;
00088                 }
00089         }
00090         
00091         function getCase()
00092         {
00093                 return $this->case;
00094         }
00095         
00096         function setRespident($a_respident)
00097         {
00098                 $this->respident = $a_respident;
00099         }
00100         
00101         function getRespident()
00102         {
00103                 return $this->respident;
00104         }
00105         
00106         function setIndex($a_index)
00107         {
00108                 $this->index = $a_index;
00109         }
00110         
00111         function getIndex()
00112         {
00113                 return $this->index;
00114         }
00115         
00116         function setSetmatch($a_setmatch)
00117         {
00118                 switch (strtolower($a_setmatch))
00119                 {
00120                         case "1":
00121                         case "partial":
00122                                 $this->setmatch = SETMATCH_PARTIAL;
00123                                 break;
00124                         case "2":
00125                         case "exact":
00126                                 $this->setmatch = SETMATCH_EXACT;
00127                                 break;
00128                 }
00129         }
00130         
00131         function getSetmatch()
00132         {
00133                 return $this->setmatch;
00134         }
00135         
00136         function setAreatype($a_areatype)
00137         {
00138                 switch (strtolower($a_areatype))
00139                 {
00140                         case "1":
00141                         case "ellipse":
00142                                 $this->areatype = AREATYPE_ELLIPSE;
00143                                 break;
00144                         case "2":
00145                         case "rectangle":
00146                                 $this->areatype = AREATYPE_RECTANGLE;
00147                                 break;
00148                         case "3":
00149                         case "bounded":
00150                                 $this->areatype = AREATYPE_BOUNDED;
00151                                 break;
00152                 }
00153         }
00154         
00155         function getAreatype()
00156         {
00157                 return $this->areatype;
00158         }
00159         
00160         function setContent($a_content)
00161         {
00162                 $this->content = $a_content;
00163         }
00164         
00165         function getContent()
00166         {
00167                 return $this->content;
00168         }
00169 }
00170 ?>

Generated on Fri Dec 13 2013 10:18:26 for ILIAS Release_3_5_x_branch .rev 46805 by  doxygen 1.7.1