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

Modules/Scorm2004/classes/adlparser/SeqRollupRule.php

Go to the documentation of this file.
00001 <?php
00002 /*
00003         +-----------------------------------------------------------------------------+
00004         | ILIAS open source                                                           |
00005         +-----------------------------------------------------------------------------+
00006         | Copyright (c) 1998-2007 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         PHP port of ADL SeqRollupRule.java
00025         @author Hendrik Holtmann <holtmann@mac.com>
00026         
00027         This .php file is GPL licensed (see above) but based on
00028         SeqRollupRule.java by ADL Co-Lab, which is licensed as:
00029         
00030         Advanced Distributed Learning Co-Laboratory (ADL Co-Lab) Hub grants you 
00031         ("Licensee") a non-exclusive, royalty free, license to use, modify and 
00032         redistribute this software in source and binary code form, provided that 
00033         i) this copyright notice and license appear on all copies of the software; 
00034         and ii) Licensee does not utilize the software in a manner which is 
00035         disparaging to ADL Co-Lab Hub.
00036 
00037         This software is provided "AS IS," without a warranty of any kind.  ALL 
00038         EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING 
00039         ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE 
00040         OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.  ADL Co-Lab Hub AND ITS LICENSORS 
00041         SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF 
00042         USING, MODIFYING OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES.  IN NO 
00043         EVENT WILL ADL Co-Lab Hub OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, 
00044         PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, 
00045         INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE 
00046         THEORY OF LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE 
00047         SOFTWARE, EVEN IF ADL Co-Lab Hub HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 
00048         DAMAGES.
00049 */
00050 
00051 
00052         define("ROLLUP_ACTION_NOCHANGE",0);
00053         define("ROLLUP_ACTION_SATISFIED",1);
00054         define("ROLLUP_ACTION_NOTSATISFIED",2);
00055         define("ROLLUP_ACTION_COMPLETED",3);
00056         define("ROLLUP_ACTION_INCOMPLETE",4);
00057         
00058         define("ROLLUP_CONSIDER_ALWAYS","always");
00059         define("ROLLUP_CONSIDER_ATTEMPTED","ifAttempted");
00060         define("ROLLUP_CONSIDER_NOTSKIPPED","ifNotSkipped");
00061         define("ROLLUP_CONSIDER_NOTSUSPENDED","ifNotSuspended");
00062 
00063         define("ROLLUP_SET_ALL","all");
00064         define("ROLLUP_SET_ANY","any");
00065         define("ROLLUP_SET_NONE","none");
00066         define("ROLLUP_SET_ATLEASTCOUNT","atLeastCount");
00067         define("ROLLUP_SET_ATLEASTPERCENT","atLeastPercent");
00068         
00069         class SeqRollupRule {
00070                 
00071                 public $mAction = ROLLUP_ACTION_SATISFIED;
00072                 
00073                 public $mChildActivitySet = ROLLUP_SET_ALL;
00074    
00075                 public $mMinCount = 0;
00076                         
00077                 public $mMinPercent = 0.0;
00078                 
00079                 public $mConditions = null;
00080                 
00081                 public function __construct() {
00082                                 //$this->mRules=$iRules;
00083                 }
00084                 
00085                 public function setRollupAction($iAction)  {
00086           if ( $iAction == "satisfied") 
00087               {
00088                  $this->mAction = ROLLUP_ACTION_SATISFIED;
00089               }
00090               else if ( $iAction=="notSatisfied" )
00091               {
00092                  $this->mAction = ROLLUP_ACTION_NOTSATISFIED;
00093               }
00094               else if ( $iAction=="completed" )
00095               {
00096                  $this->mAction = ROLLUP_ACTION_COMPLETED;
00097               }
00098               else if ( $iAction=="incomplete") 
00099               {
00100                  $this->mAction = ROLLUP_ACTION_INCOMPLETE;
00101               }
00102            }
00103                 
00104         }
00105         
00106 ?>

Generated on Fri Dec 13 2013 17:56:52 for ILIAS Release_3_9_x_branch .rev 46835 by  doxygen 1.7.1