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

assessment/classes/class.ilQTIConditionvar.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 
00032 class ilQTIConditionvar
00033 {       
00034         var $arr_not;
00035         var $arr_and;
00036         var $arr_or;
00037         var $unanswered;
00038         var $other;
00039         var $varequal;
00040         var $varlt;
00041         var $varlte;
00042         var $vargt;
00043         var $vargte;
00044         var $varsubset;
00045         var $varinside;
00046         var $varsubstring;
00047         var $durequal;
00048         var $durlt;
00049         var $durlte;
00050         var $durgt;
00051         var $durgte;
00052         var $varextension;
00053         var $order;
00054         
00055         function ilQTIConditionvar()
00056         {
00057                 $this->arr_not = array();
00058                 $this->arr_and = array();
00059                 $this->arr_or = array();
00060                 $this->unanswered = array();
00061                 $this->other = array();
00062                 $this->varequal = array();
00063                 $this->varlt = array();
00064                 $this->varlte = array();
00065                 $this->vargt = array();
00066                 $this->vargte = array();
00067                 $this->varsubset = array();
00068                 $this->varinside = array();
00069                 $this->varsubstring = array();
00070                 $this->durequal = array();
00071                 $this->durlt = array();
00072                 $this->durlte = array();
00073                 $this->durgt = array();
00074                 $this->durgte = array();
00075                 $this->varextension = array();
00076                 $this->order = array();
00077         }
00078         
00079         function addNot()
00080         {
00081                 array_push($this->arr_not, 1);
00082                 array_push($this->order, array("field" => "arr_not", "index" => count($this->arr_not) - 1));
00083         }
00084         
00085         function addAnd()
00086         {
00087                 array_push($this->arr_and, 1);
00088                 array_push($this->order, array("field" => "arr_and", "index" => count($this->arr_and) - 1));
00089         }
00090 
00091         function addOr()
00092         {
00093                 array_push($this->arr_or, 1);
00094                 array_push($this->order, array("field" => "arr_or", "index" => count($this->arr_or) - 1));
00095         }
00096         
00097         function addUnanswered($a_unanswered)
00098         {
00099                 array_push($this->unanswered, $a_unanswered);
00100                 array_push($this->order, array("field" => "unanswered", "index" => count($this->unanswered) - 1));
00101         }
00102         
00103         function addOther($a_other)
00104         {
00105                 array_push($this->other, $a_other);
00106                 array_push($this->order, array("field" => "other", "index" => count($this->other) - 1));
00107         }
00108         
00109         function addVarequal($a_varequal)
00110         {
00111                 array_push($this->varequal, $a_varequal);
00112                 array_push($this->order, array("field" => "varequal", "index" => count($this->varequal) - 1));
00113         }
00114         
00115         function addVarlt($a_varlt)
00116         {
00117                 array_push($this->varlt, $a_varlt);
00118                 array_push($this->order, array("field" => "varlt", "index" => count($this->varlt) - 1));
00119         }
00120         
00121         function addVarlte($a_varlte)
00122         {
00123                 array_push($this->varlte, $a_varlte);
00124                 array_push($this->order, array("field" => "varlte", "index" => count($this->varlte) - 1));
00125         }
00126         
00127         function addVargt($a_vargt)
00128         {
00129                 array_push($this->vargt, $a_vargt);
00130                 array_push($this->order, array("field" => "vargt", "index" => count($this->vargt) - 1));
00131         }
00132         
00133         function addVargte($a_vargte)
00134         {
00135                 array_push($this->vargte, $a_vargte);
00136                 array_push($this->order, array("field" => "vargte", "index" => count($this->vargte) - 1));
00137         }
00138         
00139         function addVarsubset($a_varsubset)
00140         {
00141                 array_push($this->varsubset, $a_varsubset);
00142                 array_push($this->order, array("field" => "varsubset", "index" => count($this->varsubset) - 1));
00143         }
00144         
00145         function addVarinside($a_varinside)
00146         {
00147                 array_push($this->varinside, $a_varinside);
00148                 array_push($this->order, array("field" => "varinside", "index" => count($this->varinside) - 1));
00149         }
00150         
00151         function addVarsubstring($a_varsubstring)
00152         {
00153                 array_push($this->varsubstring, $a_varsubstring);
00154                 array_push($this->order, array("field" => "varsubstring", "index" => count($this->varsubstring) - 1));
00155         }
00156         
00157         function addDurequal($a_durequal)
00158         {
00159                 array_push($this->durequal, $a_durequal);
00160                 array_push($this->order, array("field" => "durequal", "index" => count($this->durequal) - 1));
00161         }
00162         
00163         function addDurlt($a_durlt)
00164         {
00165                 array_push($this->durlt, $a_durlt);
00166                 array_push($this->order, array("field" => "durlt", "index" => count($this->durlt) - 1));
00167         }
00168         
00169         function addDurlte($a_durlte)
00170         {
00171                 array_push($this->durlte, $a_durlte);
00172                 array_push($this->order, array("field" => "durlte", "index" => count($this->durlte) - 1));
00173         }
00174         
00175         function addDurgt($a_durgt)
00176         {
00177                 array_push($this->durgt, $a_durgt);
00178                 array_push($this->order, array("field" => "durgt", "index" => count($this->durgt) - 1));
00179         }
00180         
00181         function addDurgte($a_durgte)
00182         {
00183                 array_push($this->durgte, $a_durgte);
00184                 array_push($this->order, array("field" => "durgte", "index" => count($this->durgte) - 1));
00185         }
00186         
00187         function addVarextension($a_varextension)
00188         {
00189                 array_push($this->varextension, $a_varextension);
00190                 array_push($this->order, array("field" => "varextension", "index" => count($this->varextension) - 1));
00191         }
00192         
00193         function addResponseVar($a_responsevar)
00194         {
00195                 switch ($a_responsevar->getVartype())
00196                 {
00197                         case RESPONSEVAR_EQUAL:
00198                                 $this->addVarequal($a_responsevar);
00199                                 break;
00200                         case RESPONSEVAR_LT:
00201                                 $this->addVarlt($a_responsevar);
00202                                 break;                  
00203                         case RESPONSEVAR_LTE:
00204                                 $this->addVarlte($a_responsevar);
00205                                 break;
00206                         case RESPONSEVAR_GT:
00207                                 $this->addVargt($a_responsevar);
00208                                 break;
00209                         case RESPONSEVAR_GTE:
00210                                 $this->addVargte($a_responsevar);
00211                                 break;
00212                         case RESPONSEVAR_SUBSET:
00213                                 $this->addVarsubset($a_responsevar);
00214                                 break;
00215                         case RESPONSEVAR_INSIDE:
00216                                 $this->addVarinside($a_responsevar);
00217                                 break;
00218                         case RESPONSEVAR_SUBSTRING:
00219                                 $this->addVarsubstring($a_responsevar);
00220                                 break;
00221                 }
00222         }
00223 }
00224 ?>

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