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

assessment/classes/class.ilQTIDecvar.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 ("VARTYPE_INTEGER", "1");
00025 define ("VARTYPE_STRING", "2");
00026 define ("VARTYPE_DECIMAL", "3");
00027 define ("VARTYPE_SCIENTIFIC", "4");
00028 define ("VARTYPE_BOOLEAN", "5");
00029 define ("VARTYPE_ENUMERATED", "6");
00030 define ("VARTYPE_SET", "7");
00031 
00040 class ilQTIDecvar
00041 {       
00042         var $varname;
00043         var $vartype;
00044         var $defaultval;
00045         var $minvalue;
00046         var $maxvalue;
00047         var $members;
00048         var $cutvalue;
00049         var $content;
00050         var $interpretvar;
00051         
00052         function ilQTIDecvar()
00053         {
00054                 $this->interpretvar = array();
00055         }
00056         
00057         function setVarname($a_varname)
00058         {
00059                 $this->varname = $a_varname;
00060         }
00061         
00062         function getVarname()
00063         {
00064                 return $this->varname;
00065         }
00066 
00067         function setVartype($a_vartype)
00068         {
00069                 switch (strtolower($a_vartype))
00070                 {
00071                         case "integer":
00072                         case "1":
00073                                 $this->vartype = VARTYPE_INTEGER;
00074                                 break;
00075                         case "string":
00076                         case "2":
00077                                 $this->vartype = VARTYPE_STRING;
00078                                 break;
00079                         case "decimal":
00080                         case "3":
00081                                 $this->vartype = VARTYPE_DECIMAL;
00082                                 break;
00083                         case "scientific":
00084                         case "4":
00085                                 $this->vartype = VARTYPE_SCIENTIFIC;
00086                                 break;
00087                         case "boolean":
00088                         case "5":
00089                                 $this->vartype = VARTYPE_BOOLEAN;
00090                                 break;
00091                         case "enumerated":
00092                         case "6":
00093                                 $this->vartype = VARTYPE_ENUMERATED;
00094                                 break;
00095                         case "set":
00096                         case "7":
00097                                 $this->vartype = VARTYPE_SET;
00098                                 break;
00099                 }
00100         }
00101         
00102         function getVartype()
00103         {
00104                 return $this->vartype;
00105         }
00106 
00107         function setDefaultval($a_defaultval)
00108         {
00109                 $this->defaultval = $a_defaultval;
00110         }
00111         
00112         function getDefaultval()
00113         {
00114                 return $this->defaultval;
00115         }
00116 
00117         function setMinvalue($a_minvalue)
00118         {
00119                 $this->minvalue = $a_minvalue;
00120         }
00121         
00122         function getMinvalue()
00123         {
00124                 return $this->minvalue;
00125         }
00126 
00127         function setMaxvalue($a_maxvalue)
00128         {
00129                 $this->maxvalue = $a_maxvalue;
00130         }
00131         
00132         function getMaxvalue()
00133         {
00134                 return $this->maxvalue;
00135         }
00136 
00137         function setMembers($a_members)
00138         {
00139                 $this->members = $a_members;
00140         }
00141         
00142         function getMembers()
00143         {
00144                 return $this->members;
00145         }
00146 
00147         function setCutvalue($a_cutvalue)
00148         {
00149                 $this->cutvalue = $a_cutvalue;
00150         }
00151         
00152         function getCutvalue()
00153         {
00154                 return $this->cutvalue;
00155         }
00156 
00157         function setContent($a_content)
00158         {
00159                 $this->content = $a_content;
00160         }
00161         
00162         function getContent()
00163         {
00164                 return $this->content;
00165         }
00166         
00167         function addInterpretvar($a_interpretvar)
00168         {
00169                 array_push($this->interpretvar, $a_interpretvar);
00170         }
00171 }
00172 ?>

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