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

assessment/classes/class.ilQTIRenderFib.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 ("PROMPT_BOX", "1");
00025 define ("PROMPT_DASHLINE", "2");
00026 define ("PROMPT_ASTERISK", "3");
00027 define ("PROMPT_UNDERLINE", "4");
00028 
00029 define ("FIBTYPE_STRING", "1");
00030 define ("FIBTYPE_INTEGER", "2");
00031 define ("FIBTYPE_DECIMAL", "3");
00032 define ("FIBTYPE_SCIENTIFIC", "4");
00033 
00042 class ilQTIRenderFib
00043 {
00044         var $minnumber;
00045         var $maxnumber;
00046         var $response_labels;
00047         var $material;
00048         var $prompt;
00049         var $encoding;
00050         var $fibtype;
00051         var $rows;
00052         var $maxchars;
00053         var $columns;
00054         var $charset;
00055 
00056         function ilQTIRenderFib()
00057         {
00058                 $this->showdraw = SHOWDRAW_NO;
00059                 $this->response_labels = array();
00060                 $this->material = array();
00061                 $this->encoding = "UTF-8";
00062         }
00063         
00064         function setPrompt($a_prompt)
00065         {
00066                 switch (strtolower($a_prompt))
00067                 {
00068                         case "1":
00069                         case "box":
00070                                 $this->prompt = PROMPT_BOX;
00071                                 break;
00072                         case "2":
00073                         case "dashline":
00074                                 $this->prompt = PROMPT_DASHLINE;
00075                                 break;
00076                         case "3":
00077                         case "asterisk":
00078                                 $this->prompt = PROMPT_ASTERISK;
00079                                 break;
00080                         case "4":
00081                         case "underline":
00082                                 $this->prompt = PROMPT_UNDERLINE;
00083                                 break;
00084                 }
00085         }
00086         
00087         function getPrompt()
00088         {
00089                 return $this->prompt;
00090         }
00091         
00092         function setFibtype($a_fibtype)
00093         {
00094                 switch (strtolower($a_fibtype))
00095                 {
00096                         case "1":
00097                         case "string":
00098                                 $this->fibtype = FIBTYPE_STRING;
00099                                 break;
00100                         case "2":
00101                         case "integer":
00102                                 $this->fibtype = FIBTYPE_INTEGER;
00103                                 break;
00104                         case "3":
00105                         case "decimal":
00106                                 $this->fibtype = FIBTYPE_DECIMAL;
00107                                 break;
00108                         case "4":
00109                         case "scientific":
00110                                 $this->fibtype = FIBTYPE_SCIENTIFIC;
00111                                 break;
00112                 }
00113         }
00114         
00115         function getFibtype()
00116         {
00117                 return $this->fibtype;
00118         }
00119         
00120         function setMinnumber($a_minnumber)
00121         {
00122                 $this->minnumber = $a_minnumber;
00123         }
00124         
00125         function getMinnumber()
00126         {
00127                 return $this->minnumber;
00128         }
00129         
00130         function setMaxnumber($a_maxnumber)
00131         {
00132                 $this->maxnumber = $a_maxnumber;
00133         }
00134         
00135         function getMaxnumber()
00136         {
00137                 return $this->maxnumber;
00138         }
00139         
00140         function addResponseLabel($a_response_label)
00141         {
00142                 array_push($this->response_labels, $a_response_label);
00143         }
00144 
00145         function addMaterial($a_material)
00146         {
00147                 array_push($this->material, $a_material);
00148         }
00149         
00150         function setEncoding($a_encoding)
00151         {
00152                 $this->encoding = $a_encoding;
00153         }
00154         
00155         function getEncoding()
00156         {
00157                 return $this->encoding;
00158         }
00159 
00160         function setRows($a_rows)
00161         {
00162                 $this->rows = $a_rows;
00163         }
00164         
00165         function getRows()
00166         {
00167                 return $this->rows;
00168         }
00169 
00170         function setMaxchars($a_maxchars)
00171         {
00172                 $this->maxchars = $a_maxchars;
00173         }
00174         
00175         function getMaxchars()
00176         {
00177                 return $this->maxchars;
00178         }
00179 
00180         function setColumns($a_columns)
00181         {
00182                 $this->columns = $a_columns;
00183         }
00184         
00185         function getColumns()
00186         {
00187                 return $this->columns;
00188         }
00189 
00190         function setCharset($a_charset)
00191         {
00192                 $this->charset = $a_charset;
00193         }
00194         
00195         function getCharset()
00196         {
00197                 return $this->charset;
00198         }
00199 }
00200 ?>

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