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

Services/Tracking/classes/class.ilLearningProgressGUI.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 
00038 include_once './Services/Tracking/classes/class.ilLearningProgressBaseGUI.php';
00039 
00040 class ilLearningProgressGUI extends ilLearningProgressBaseGUI
00041 {
00042         function ilLearningProgressGUI($a_mode,$a_ref_id = 0,$a_user_id = 0)
00043         {
00044                 parent::ilLearningProgressBaseGUI($a_mode,$a_ref_id,$a_user_id);
00045         }
00046 
00050         function &executeCommand()
00051         {
00052                 global $ilBench;
00053                 
00054                 $ilBench->start('LearningProgress','0000_Start');
00055 
00056 
00057                 $this->ctrl->setReturn($this, "");
00058 
00059                 // E.g personal desktop mode needs locator header icon ...
00060                 $this->__buildHeader();
00061                 switch($this->__getNextClass())
00062                 {
00063                         case 'illplistofprogressgui':
00064                                 include_once 'Services/Tracking/classes/class.ilLPListOfProgressGUI.php';
00065 
00066                                 $this->__setSubTabs(LP_ACTIVE_PROGRESS);
00067                                 $this->__setCmdClass('illplistofprogressgui');
00068                                 $lop_gui = new ilLPListOfProgressGUI($this->getMode(),$this->getRefId(),$this->getUserId());
00069                                 $this->ctrl->forwardCommand($lop_gui);
00070                                 break;
00071 
00072                         case 'illplistofobjectsgui':
00073                                 include_once 'Services/Tracking/classes/class.ilLPListOfObjectsGUI.php';
00074 
00075                                 $this->__setSubTabs(LP_ACTIVE_OBJECTS);
00076                                 $loo_gui = new ilLPListOfObjectsGUI($this->getMode(),$this->getRefId());
00077                                 $this->__setCmdClass('illplistofobjectsgui');
00078                                 $this->ctrl->forwardCommand($loo_gui);
00079                                 break;
00080 
00081                         case 'illplistofsettingsgui':
00082                                 include_once 'Services/Tracking/classes/class.ilLPListOfSettingsGUI.php';
00083 
00084                                 $this->__setSubTabs(LP_ACTIVE_SETTINGS);
00085                                 $los_gui = new ilLPListOfSettingsGUI($this->getMode(),$this->getRefId());
00086                                 $this->__setCmdClass('illplistofsettingsgui');
00087                                 $this->ctrl->forwardCommand($los_gui);
00088                                 break;
00089                                 
00090                         case 'illmstatisticsgui':
00091                                 include_once 'Services/Tracking/classes/class.ilLMStatisticsGUI.php';
00092 
00093                                 $this->__setSubTabs(LP_ACTIVE_LM_STATISTICS);
00094                                 $los_gui = new ilLMStatisticsGUI($this->getMode(),$this->getRefId());
00095                                 $this->__setCmdClass('illmstatisticsgui');
00096                                 $this->ctrl->forwardCommand($los_gui);
00097                                 break;
00098                                 
00099 
00100                         default:
00101                                 die("No mode given");
00102                 }
00103 
00104                 // E.G personal desktop mode needs $tpl->show();
00105                 $this->__buildFooter();
00106 
00107 
00108                 $ilBench->stop('LearningProgress','0000_Start');
00109 
00110                 return true;
00111         }
00112 
00113         function __setCmdClass($a_class)
00114         {
00115                 // If cmd class == 'illearningprogressgui' the cmd class is set to the the new forwarded class
00116                 // otherwise e.g illplistofprogressgui tries to forward (back) to illearningprogressgui.
00117 
00118                 if($this->ctrl->getCmdClass() == strtolower(get_class($this)))
00119                 {
00120                         $this->ctrl->setCmdClass(strtolower($a_class));
00121                 }
00122                 return true;
00123         }
00124 
00125         function __getNextClass()
00126         {
00127                 global $ilAccess;
00128 
00129                 if(strlen($next_class = $this->ctrl->getNextClass()))
00130                 {
00131                         if($this->getMode() == LP_MODE_PERSONAL_DESKTOP)
00132                         {
00133                                 $_SESSION['il_lp_history'] = $next_class;
00134                         }
00135                         return $next_class;
00136                 }
00137                 switch($this->getMode())
00138                 {
00139                         case LP_MODE_ADMINISTRATION:
00140                                 return 'illplistofobjectsgui';
00141 
00142                         case LP_MODE_REPOSITORY:
00143                                 if(!$this->anonymized and 
00144                                    !$this->isObjectAnonymized() and 
00145                                    $ilAccess->checkAccess('edit_learning_progress','',$this->getRefId()))
00146                                 {
00147                                         return 'illplistofobjectsgui';
00148                                 }
00149                                 return 'illplistofprogressgui';
00150 
00151                         case LP_MODE_PERSONAL_DESKTOP:
00152                                 if(strlen($_SESSION['il_lp_history']))
00153                                 {
00154                                         return $_SESSION['il_lp_history'];
00155                                 }
00156                                 return 'illplistofprogressgui';
00157 
00158                         case LP_MODE_USER_FOLDER:
00159                                 return 'illplistofprogressgui';
00160                 }
00161         }
00162 }
00163 ?>

Generated on Fri Dec 13 2013 13:52:12 for ILIAS Release_3_7_x_branch .rev 46817 by  doxygen 1.7.1