Go to the documentation of this file.00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
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
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
00105 $this->__buildFooter();
00106
00107
00108 $ilBench->stop('LearningProgress','0000_Start');
00109
00110 return true;
00111 }
00112
00113 function __setCmdClass($a_class)
00114 {
00115
00116
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 ?>