ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f87
ilLOEditorGUI Class Reference

Class ilLOEditorGUI. More...

+ Collaboration diagram for ilLOEditorGUI:

Public Member Functions

 __construct ($a_parent_obj)
 Constructor. More...
 
 executeCommand ()
 Execute command. More...
 
 getParentObject ()
 
 getSettings ()
 Settings. More...
 
 setTestType ($a_type)
 
 getTestType ()
 

Data Fields

const TEST_TYPE_IT = 1
 
const TEST_TYPE_QT = 2
 
const TEST_NEW = 1
 
const TEST_ASSIGN = 2
 
const SETTINGS_TEMPLATE_IT = 'il_astpl_loc_initial'
 
const SETTINGS_TEMPLATE_QT = 'il_astpl_loc_qualified'
 

Protected Member Functions

 settings (ilPropertyFormGUI $form=NULL)
 Objective Settings. More...
 
 saveSettings ()
 
 initSettingsForm ()
 Init settings form. More...
 
 materials ()
 
 testOverview ()
 Show test overview. More...
 
 confirmDeleteTest ()
 Show delete confirmation screen. More...
 
 deleteTest ()
 Delete test assignment. More...
 
 testSettings (ilPropertyFormGUI $form=NULL)
 Show test settings. More...
 
 getAssignableTests ()
 Get assignable tests. More...
 
 initTestForm ()
 Show test config form. More...
 
 applySettingsTemplate (ilObjTest $tst)
 Apply auto generated setttings template. More...
 
 updateStartObjects ()
 Add Test as start object. More...
 
 saveTest ()
 Save Test. More...
 
 listObjectives ()
 List all abvailable objectives. More...
 
 showObjectiveCreation (ilPropertyFormGUI $form=NULL)
 Show objective creation form. More...
 
 initSimpleObjectiveForm ()
 Show objective creation form. More...
 
 saveObjectiveCreation ()
 
 saveSorting ()
 save position More...
 
 askDeleteObjectives ()
 Confirm delete objectives. More...
 
 activateObjectives ()
 activate chosen objectives More...
 
 deactivateObjectives ()
 activate chosen objectives More...
 
 deleteObjectives ()
 Delete objectives type $rbacsystem. More...
 
 showStatus ($a_section)
 Show status panel. More...
 
 setTabs ($a_section='')
 Set tabs. More...
 

Private Attributes

 $parent_obj
 
 $settings = NULL
 
 $lng = NULL
 
 $ctrl = NULL
 
 $test_type = 0
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilLOEditorGUI::__construct (   $a_parent_obj)

Constructor.

Parameters
type$a_parent_obj

Definition at line 43 of file class.ilLOEditorGUI.php.

References $GLOBALS, ilLOSettings\getInstanceByObjId(), getParentObject(), and settings().

44  {
45  $this->parent_obj = $a_parent_obj;
46  $this->settings = ilLOSettings::getInstanceByObjId($this->getParentObject()->getId());
47  $this->lng = $GLOBALS['lng'];
48  $this->ctrl = $GLOBALS['ilCtrl'];
49  }
static getInstanceByObjId($a_obj_id)
get singleton instance
$GLOBALS['ct_recipient']
settings(ilPropertyFormGUI $form=NULL)
Objective Settings.
+ Here is the call graph for this function:

Member Function Documentation

◆ activateObjectives()

ilLOEditorGUI::activateObjectives ( )
protected

activate chosen objectives

Definition at line 940 of file class.ilLOEditorGUI.php.

References $_REQUEST, ilCourseObjective\_getObjectiveIds(), ilLPStatusWrapper\_refreshStatus(), getParentObject(), and ilUtil\sendSuccess().

941  {
942  $enabled = (array) $_REQUEST['objective'];
943 
944  include_once './Modules/Course/classes/class.ilCourseObjective.php';
945  $objectives = ilCourseObjective::_getObjectiveIds($this->getParentObject()->getId(),false);
946  foreach((array) $objectives as $objective_id)
947  {
948  $objective = new ilCourseObjective($this->getParentObject(),$objective_id);
949  if(in_array($objective_id, $enabled))
950  {
951  $objective->setActive(true);
952  $objective->update();
953  }
954  }
955 
956  include_once './Services/Tracking/classes/class.ilLPStatusWrapper.php';
958 
959  ilUtil::sendSuccess($this->lng->txt('settings_saved'),true);
960  $this->ctrl->redirect($this,'listObjectives');
961  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static _getObjectiveIds($course_id, $a_activated_only=false)
class ilcourseobjective
_refreshStatus($a_obj_id, $a_users=null)
Set dirty.
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7
+ Here is the call graph for this function:

◆ applySettingsTemplate()

ilLOEditorGUI::applySettingsTemplate ( ilObjTest  $tst)
protected

Apply auto generated setttings template.

Parameters
ilObjTest$tst

Definition at line 670 of file class.ilLOEditorGUI.php.

References ilSettingsTemplate\getAllSettingsTemplates(), ilObjAssessmentFolderGUI\getSettingsTemplateConfig(), getTestType(), and ilObjTest\setTemplate().

Referenced by saveTest().

671  {
672  include_once "Services/Administration/classes/class.ilSettingsTemplate.php";
673  include_once './Modules/Test/classes/class.ilObjAssessmentFolderGUI.php';
674 
675  $tpl_id = 0;
676  foreach(ilSettingsTemplate::getAllSettingsTemplates('tst', true) as $nr => $template)
677  {
678  switch($this->getTestType())
679  {
680  case self::TEST_TYPE_IT:
681  if($template['title'] == self::SETTINGS_TEMPLATE_IT)
682  {
683  $tpl_id = $template['id'];
684  }
685  break;
686  case self::TEST_TYPE_QT:
687  if($template['title'] == self::SETTINGS_TEMPLATE_QT)
688  {
689  $tpl_id = $template['id'];
690  }
691  break;
692  }
693  if($tpl_id)
694  {
695  break;
696  }
697  }
698 
699  if(!$tpl_id)
700  {
701  return false;
702  }
703 
704  include_once "Services/Administration/classes/class.ilSettingsTemplate.php";
705  include_once './Modules/Test/classes/class.ilObjAssessmentFolderGUI.php';
707  $template_settings = $template->getSettings();
708  if($template_settings)
709  {
710  include_once './Modules/Test/classes/class.ilObjTestGUI.php';
711  $tst_gui = new ilObjTestGUI();
712  $tst_gui->applyTemplate($template_settings, $tst);
713  }
714  $tst->setTemplate($tpl_id);
715  return true;
716  }
static getAllSettingsTemplates($a_type, $a_include_auto_generated=false)
Get all settings templates of type.
Class ilObjTestGUI.
setTemplate($template_id)
Settings template application class.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ askDeleteObjectives()

ilLOEditorGUI::askDeleteObjectives ( )
protected

Confirm delete objectives.

Definition at line 910 of file class.ilLOEditorGUI.php.

References $_POST, $GLOBALS, getParentObject(), ilLOEditorStatus\SECTION_OBJECTIVES, and showStatus().

911  {
912  $GLOBALS['ilTabs']->activateSubTab('objectives');
913 
914  include_once './Services/Utilities/classes/class.ilConfirmationGUI.php';
915  $confirm = new ilConfirmationGUI();
916  $confirm->setFormAction($this->ctrl->getFormAction($this));
917  $confirm->setHeaderText($this->lng->txt('crs_delete_objectve_sure'));
918  $confirm->setConfirm($this->lng->txt('delete'), 'deleteObjectives');
919  $confirm->setCancel($this->lng->txt('cancel'), 'listObjectives');
920 
921  foreach($_POST['objective'] as $objective_id)
922  {
923  include_once './Modules/Course/classes/class.ilCourseObjective.php';
924  $obj = new ilCourseObjective($this->getParentObject(),$objective_id);
925  $name = $obj->getTitle();
926 
927  $confirm->addItem(
928  'objective_ids[]',
929  $objective_id,
930  $name
931  );
932  }
933  $GLOBALS['tpl']->setContent($confirm->getHTML());
935  }
$_POST['username']
Definition: cron.php:12
$GLOBALS['ct_recipient']
class ilcourseobjective
showStatus($a_section)
Show status panel.
Confirmation screen class.
+ Here is the call graph for this function:

◆ confirmDeleteTest()

ilLOEditorGUI::confirmDeleteTest ( )
protected

Show delete confirmation screen.

Definition at line 400 of file class.ilLOEditorGUI.php.

References $_REQUEST, $GLOBALS, $settings, ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilLOSettings\getInstanceByObjId(), getParentObject(), getTestType(), ilLOEditorStatus\SECTION_ITES, ilLOEditorStatus\SECTION_QTEST, ilUtil\sendFailure(), setTestType(), showStatus(), TEST_TYPE_IT, ilLOSettings\TYPE_TEST_INITIAL, and ilLOSettings\TYPE_TEST_QUALIFIED.

401  {
402  $this->setTestType((int) $_REQUEST['tt']);
403  $this->ctrl->setParameter($this,'tt',$this->getTestType());
404 
406  switch($this->getTestType())
407  {
409  $GLOBALS['ilTabs']->activateSubTab('itest');
410  break;
411 
413  $GLOBALS['ilTabs']->activateSubTab('qtest');
414  break;
415  }
416 
417  if(!(int) $_REQUEST['tst'])
418  {
419  ilUtil::sendFailure($this->lng->txt('select_one'),true);
420  $this->ctrl->redirect($this,'testOverview');
421  }
422 
423  include_once './Services/Utilities/classes/class.ilConfirmationGUI.php';
424  $confirm = new ilConfirmationGUI();
425  $confirm->setHeaderText($this->lng->txt('crs_loc_confirm_delete_tst'));
426  $confirm->setFormAction($this->ctrl->getFormAction($this));
427  $confirm->setConfirm($this->lng->txt('delete'), 'deleteTest');
428  $confirm->setCancel($this->lng->txt('cancel'), 'testOverview');
429 
430  foreach((array) $_REQUEST['tst'] as $tst_id)
431  {
432  $obj_id = ilObject::_lookupObjId($tst_id);
433  $confirm->addItem('tst[]', $tst_id, ilObject::_lookupTitle($obj_id));
434  }
435 
436  $GLOBALS['tpl']->setContent($confirm->getHTML());
437 
438  $this->showStatus(
442  );
443  }
static getInstanceByObjId($a_obj_id)
get singleton instance
static _lookupTitle($a_id)
lookup object title
$GLOBALS['ct_recipient']
static _lookupObjId($a_id)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
showStatus($a_section)
Show status panel.
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7
Confirmation screen class.
+ Here is the call graph for this function:

◆ deactivateObjectives()

ilLOEditorGUI::deactivateObjectives ( )
protected

activate chosen objectives

Definition at line 966 of file class.ilLOEditorGUI.php.

References $_REQUEST, ilCourseObjective\_getObjectiveIds(), ilLPStatusWrapper\_refreshStatus(), getParentObject(), and ilUtil\sendSuccess().

967  {
968  $disabled = (array) $_REQUEST['objective'];
969 
970  include_once './Modules/Course/classes/class.ilCourseObjective.php';
971  $objectives = ilCourseObjective::_getObjectiveIds($this->getParentObject()->getId(),false);
972  foreach((array) $objectives as $objective_id)
973  {
974  $objective = new ilCourseObjective($this->getParentObject(),$objective_id);
975  if(in_array($objective_id, $disabled))
976  {
977  $objective->setActive(false);
978  $objective->update();
979  }
980  }
981 
982  include_once './Services/Tracking/classes/class.ilLPStatusWrapper.php';
984 
985  ilUtil::sendSuccess($this->lng->txt('settings_saved'),true);
986  $this->ctrl->redirect($this,'listObjectives');
987  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static _getObjectiveIds($course_id, $a_activated_only=false)
class ilcourseobjective
_refreshStatus($a_obj_id, $a_users=null)
Set dirty.
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7
+ Here is the call graph for this function:

◆ deleteObjectives()

ilLOEditorGUI::deleteObjectives ( )
protected

Delete objectives type $rbacsystem.

Returns
boolean

Definition at line 994 of file class.ilLOEditorGUI.php.

References $_POST, ilLPStatusWrapper\_refreshStatus(), getParentObject(), and ilUtil\sendSuccess().

995  {
996  global $rbacsystem;
997 
998  foreach($_POST['objective_ids'] as $objective_id)
999  {
1000  include_once './Modules/Course/classes/class.ilCourseObjective.php';
1001  $objective_obj = new ilCourseObjective($this->getParentObject(),$objective_id);
1002  $objective_obj->delete();
1003  }
1004 
1005  include_once './Services/Tracking/classes/class.ilLPStatusWrapper.php';
1007 
1008  ilUtil::sendSuccess($this->lng->txt('crs_objectives_deleted'),true);
1009  $this->ctrl->redirect($this,'listObjectives');
1010 
1011  return true;
1012  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
class ilcourseobjective
_refreshStatus($a_obj_id, $a_users=null)
Set dirty.
+ Here is the call graph for this function:

◆ deleteTest()

ilLOEditorGUI::deleteTest ( )
protected

Delete test assignment.

Definition at line 448 of file class.ilLOEditorGUI.php.

References $_REQUEST, $GLOBALS, $settings, ilCourseObjectiveQuestion\deleteTest(), ilLOSettings\getInstanceByObjId(), getParentObject(), getTestType(), ilUtil\sendSuccess(), setTestType(), ilLOSettings\TYPE_TEST_INITIAL, and ilLOSettings\TYPE_TEST_QUALIFIED.

449  {
450  $this->setTestType((int) $_REQUEST['tt']);
451  $this->ctrl->setParameter($this,'tt',$this->getTestType());
452 
454  switch($this->getTestType())
455  {
457  $GLOBALS['ilTabs']->activateSubTab('itest');
458  break;
459 
461  $GLOBALS['ilTabs']->activateSubTab('qtest');
462  break;
463  }
464 
465  foreach((array) $_REQUEST['tst'] as $tst_id)
466  {
467  switch($this->getTestType())
468  {
470  $settings->setInitialTest(0);
471  break;
472 
474  $settings->setQualifiedTest(0);
475  break;
476  }
477  $settings->update();
478 
479  // finally delete start object assignment
480  include_once './Services/Container/classes/class.ilContainerStartObjects.php';
481  $start = new ilContainerStartObjects(
482  $this->getParentObject()->getRefId(),
483  $this->getParentObject()->getId()
484  );
485  $start->deleteItem($tst_id);
486 
487  // ... and assigned questions
488  include_once './Modules/Course/classes/class.ilCourseObjectiveQuestion.php';
490  }
491 
492 
493  ilUtil::sendSuccess($this->lng->txt('settings_saved'),true);
494  $this->ctrl->redirect($this,'testOverview');
495  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static getInstanceByObjId($a_obj_id)
get singleton instance
$GLOBALS['ct_recipient']
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7
+ Here is the call graph for this function:

◆ executeCommand()

ilLOEditorGUI::executeCommand ( )

Execute command.

Returns
<type>

Definition at line 55 of file class.ilLOEditorGUI.php.

References $_REQUEST, $cmd, $GLOBALS, $ilCtrl, $ret, ilPageObject\_exists(), ilObjStyleSheet\getContentStylePath(), ilObjStyleSheet\getEffectiveContentStyleId(), ilLOEditorStatus\getInstance(), getParentObject(), ilCourseObjective\lookupObjectiveTitle(), and setTabs().

56  {
57  global $ilCtrl;
58 
59  $next_class = $ilCtrl->getNextClass($this);
60  $cmd = $ilCtrl->getCmd();
61 
62  $this->setTabs();
63  switch($next_class)
64  {
65  case 'ilcourseobjectivesgui':
66 
67  $this->ctrl->setReturn($this,'listObjectives');
68  $GLOBALS['ilTabs']->clearTargets();
69  $GLOBALS['ilTabs']->setBackTarget(
70  $this->lng->txt('back'),
71  $this->ctrl->getLinkTarget($this,'listObjectives'));
72 
73  include_once './Modules/Course/classes/class.ilCourseObjectivesGUI.php';
74  $reg_gui =& new ilCourseObjectivesGUI($this->getParentObject()->getRefId());
75  $this->ctrl->forwardCommand($reg_gui);
76  break;
77 
78  case 'ilcontainerstartobjectsgui':
79 
80  include_once './Services/Container/classes/class.ilContainerStartObjectsGUI.php';
81  $stgui = new ilContainerStartObjectsGUI($this->getParentObject());
82  $ret = $this->ctrl->forwardCommand($stgui);
83 
84  $GLOBALS['ilTabs']->activateSubTab('start');
85  $GLOBALS['ilTabs']->removeSubTab('manage');
86 
87  #$GLOBALS['tpl']->setContent($this->ctrl->getHTML($stgui));
88  break;
89 
90  case 'ilconditionhandlergui':
91 
92  $this->ctrl->saveParameterByClass('ilconditionhandlergui','objective_id');
93 
94  $GLOBALS['ilTabs']->clearTargets();
95  $GLOBALS['ilTabs']->setBackTarget(
96  $this->lng->txt('back'),
97  $this->ctrl->getLinkTarget($this,'listObjectives'));
98 
99  include_once './Services/AccessControl/classes/class.ilConditionHandlerInterface.php';
100  $cond = new ilConditionHandlerGUI($this);
101  $cond->setBackButtons(array());
102  $cond->setAutomaticValidation(false);
103  $cond->setTargetType("lobj");
104  $cond->setTargetRefId($this->getParentObject()->getRefId());
105 
106  $cond->setTargetId((int) $_REQUEST['objective_id']);
107 
108  // objecitve
109  include_once './Modules/Course/classes/class.ilCourseObjective.php';
110  $obj = new ilCourseObjective($this->getParentObject(),(int) $_REQUEST['objective_id']);
111  $cond->setTargetTitle($obj->getTitle());
112  $this->ctrl->forwardCommand($cond);
113  break;
114 
115  case 'illopagegui':
116  $this->ctrl->saveParameterByClass('illopagegui','objective_id');
117 
118  $GLOBALS['ilTabs']->clearTargets();
119  $GLOBALS['ilTabs']->setBackTarget(
120  $this->lng->txt('back'),
121  $this->ctrl->getLinkTarget($this,'listObjectives'));
122 
123  $objtv_id = (int)$_REQUEST['objective_id'];
124 
125  include_once 'Modules/Course/classes/Objectives/class.ilLOPage.php';
126  if(!ilLOPage::_exists('lobj', $objtv_id))
127  {
128  // doesn't exist -> create new one
129  $new_page_object = new ilLOPage();
130  $new_page_object->setParentId($objtv_id);
131  $new_page_object->setId($objtv_id);
132  $new_page_object->createFromXML();
133  unset($new_page_object);
134  }
135 
136  $this->ctrl->setReturn($this, 'listObjectives');
137  include_once 'Modules/Course/classes/Objectives/class.ilLOPageGUI.php';
138  $pgui = new ilLOPageGUI($objtv_id);
139  $pgui->setPresentationTitle(ilCourseObjective::lookupObjectiveTitle($objtv_id));
140 
141  // needed for editor?
142  include_once('./Services/Style/classes/class.ilObjStyleSheet.php');
143  $pgui->setStyleId(ilObjStyleSheet::getEffectiveContentStyleId(0));
144 
145  // #14895
146  $GLOBALS['tpl']->setCurrentBlock("ContentStyle");
147  $GLOBALS['tpl']->setVariable("LOCATION_CONTENT_STYLESHEET",
149  $GLOBALS['tpl']->parseCurrentBlock();
150 
151  $ret = $this->ctrl->forwardCommand($pgui);
152  if($ret)
153  {
154  $GLOBALS['tpl']->setContent($ret);
155  }
156  break;
157 
158  default:
159  if(!$cmd)
160  {
161  // get first unaccomplished step
162  include_once './Modules/Course/classes/Objectives/class.ilLOEditorStatus.php';
163  $cmd = ilLOEditorStatus::getInstance($this->getParentObject())->getFirstFailedStep();
164  }
165  $this->$cmd();
166 
167  break;
168  }
169  return true;
170  }
class ilConditionHandlerGUI
setTabs($a_section='')
Set tabs.
(Course) learning objective page object
$cmd
Definition: sahs_server.php:35
static lookupObjectiveTitle($a_objective_id)
global $ilCtrl
Definition: ilias.php:18
class ilobjcourseobjectivesgui
static _exists($a_parent_type, $a_id, $a_lang="")
Checks whether page exists.
$GLOBALS['ct_recipient']
class ilcourseobjective
static getInstance(ilObject $a_parent)
Get instance.
static getEffectiveContentStyleId($a_style_id, $a_type="")
Get effective Style Id.
(Course) learning objective page GUI class
getContentStylePath($a_style_id)
get content style path
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7
Class ilContainerStartObjectsGUI.
+ Here is the call graph for this function:

◆ getAssignableTests()

ilLOEditorGUI::getAssignableTests ( )
protected

Get assignable tests.

Definition at line 531 of file class.ilLOEditorGUI.php.

References $GLOBALS, $tests, getParentObject(), and getSettings().

Referenced by initTestForm().

532  {
533  $tests = array();
534  foreach($GLOBALS['tree']->getChildsByType($this->getParentObject()->getRefId(),'tst') as $tree_node)
535  {
536  if(!in_array($tree_node['child'], $this->getSettings()->getTests()))
537  {
538  $tests[] = $tree_node['child'];
539  }
540  }
541  return $tests;
542  }
getSettings()
Settings.
$GLOBALS['ct_recipient']
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getParentObject()

◆ getSettings()

ilLOEditorGUI::getSettings ( )

Settings.

Returns
ilLOSettings

Definition at line 184 of file class.ilLOEditorGUI.php.

References $settings.

Referenced by getAssignableTests(), initSettingsForm(), initTestForm(), saveTest(), and updateStartObjects().

185  {
186  return $this->settings;
187  }
+ Here is the caller graph for this function:

◆ getTestType()

ilLOEditorGUI::getTestType ( )

Definition at line 194 of file class.ilLOEditorGUI.php.

References $test_type.

Referenced by applySettingsTemplate(), confirmDeleteTest(), deleteTest(), initTestForm(), saveTest(), testOverview(), and testSettings().

195  {
196  return $this->test_type;
197  }
+ Here is the caller graph for this function:

◆ initSettingsForm()

ilLOEditorGUI::initSettingsForm ( )
protected

Init settings form.

Definition at line 251 of file class.ilLOEditorGUI.php.

References ilLOSettings\getInstanceByObjId(), getParentObject(), getSettings(), ilLOSettings\LOC_INITIAL_ALL, ilLOSettings\LOC_INITIAL_SEL, ilLOSettings\LOC_PRACTISE, ilLOSettings\LOC_QUALIFIED, ilLOSettings\QT_VISIBLE_ALL, ilLOSettings\QT_VISIBLE_OBJECTIVE, ilRadioOption\setInfo(), ilFormPropertyGUI\setRequired(), and ilCheckboxInputGUI\setValue().

Referenced by saveSettings(), and settings().

252  {
253  include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
254  $form = new ilPropertyFormGUI();
255  $form->setFormAction($this->ctrl->getFormAction($this));
256  $form->setTitle($this->lng->txt('crs_loc_settings_tbl'));
257 
258  $type = new ilRadioGroupInputGUI($this->lng->txt('crs_loc_settings_type'), 'type');
259  $type->setRequired(true);
260  $type->setValue(ilLOSettings::getInstanceByObjId($this->getParentObject()->getId())->getType());
261 
262  $type_1 = new ilRadioOption($this->lng->txt('crs_loc_type_initial_all'), ilLOSettings::LOC_INITIAL_ALL);
263  $type_1->setInfo($this->lng->txt('crs_loc_type_initial_all_info'));
264  $type->addOption($type_1);
265 
266  $type_2 = new ilRadioOption($this->lng->txt('crs_loc_type_initial_sel'), ilLOSettings::LOC_INITIAL_SEL);
267  #$type->addOption($type_2);
268 
269  $type_3 = new ilRadioOption($this->lng->txt('crs_loc_type_qualified'), ilLOSettings::LOC_QUALIFIED);
270  $type_3->setInfo($this->lng->txt('crs_loc_type_qualified_info'));
271  $type->addOption($type_3);
272 
273  $type_4 = new ilRadioOption($this->lng->txt('crs_loc_type_practise'), ilLOSettings::LOC_PRACTISE);
274  $type_4->setInfo($this->lng->txt('crs_loc_type_practise_info'));
275  $type->addOption($type_4);
276  $form->addItem($type);
277 
278  $form->addCommandButton('saveSettings', $this->lng->txt('save'));
279 
280  // qualified test visibility
281  $qtv = new ilCheckboxGroupInputGUI($this->lng->txt('crs_loc_qt_visibility'),'qtv');
282 
283  $qtv_values = array();
284  if($this->getSettings()->isGeneralQualifiedTestVisible())
285  {
286  $qtv_values[] = ilLOSettings::QT_VISIBLE_ALL;
287  }
288  if($this->getSettings()->isQualifiedTestPerObjectiveVisible())
289  {
290  $qtv_values[] = ilLOSettings::QT_VISIBLE_OBJECTIVE;
291  }
292  $qtv->setValue($qtv_values);
293  $qtv->setRequired(true);
294 
295  $qtv->addOption(new ilCheckboxOption(
296  $this->lng->txt('crs_loc_qt_visibility_all'),
298  );
299 
300  $qtv->addOption(new ilCheckboxOption(
301  $this->lng->txt('crs_loc_qt_visibility_lo'),
303  );
304  #$form->addItem($qtv);
305 
306  // reset results
307  $reset = new ilCheckboxInputGUI($this->lng->txt('crs_loc_settings_reset'),'reset');
308  $reset->setValue(1);
309  $reset->setChecked($this->getSettings()->isResetResultsEnabled());
310  $reset->setOptionTitle($this->lng->txt('crs_loc_settings_reset_enable'));
311  $reset->setInfo($this->lng->txt('crs_loc_settings_reset_enable_info'));
312  $form->addItem($reset);
313 
314 
315 
316  return $form;
317  }
static getInstanceByObjId($a_obj_id)
get singleton instance
This class represents an option in a radio group.
This class represents an option in a checkbox group.
getSettings()
Settings.
This class represents a property form user interface.
This class represents a checkbox property in a property form.
setInfo($a_info)
Set Info.
This class represents a property in a property form.
setValue($a_value)
Set Value.
This class represents a property in a property form.
setRequired($a_required)
Set Required.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initSimpleObjectiveForm()

ilLOEditorGUI::initSimpleObjectiveForm ( )
protected

Show objective creation form.

Definition at line 845 of file class.ilLOEditorGUI.php.

References $txt.

Referenced by saveObjectiveCreation(), and showObjectiveCreation().

846  {
847  include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
848  $form = new ilPropertyFormGUI();
849  $form->setTitle($this->lng->txt('crs_loc_form_create_objectives'));
850  $form->setFormAction($this->ctrl->getFormAction($this));
851 
852  $txt = new ilTextWizardInputGUI($this->lng->txt('crs_objectives'), 'objectives');
853  $txt->setValues(array(0 => ''));
854  $txt->setRequired(true);
855  $form->addItem($txt);
856 
857  $form->addCommandButton('saveObjectiveCreation', $this->lng->txt('save'));
858 
859  return $form;
860  }
This class represents a property form user interface.
$txt
Definition: error.php:10
This class represents a text wizard property in a property form.
+ Here is the caller graph for this function:

◆ initTestForm()

ilLOEditorGUI::initTestForm ( )
protected

Show test config form.

Returns

Definition at line 548 of file class.ilLOEditorGUI.php.

References $options, ilObject\_lookupDescription(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilRadioOption\addSubItem(), getAssignableTests(), getSettings(), getTestType(), ilObjTest\QUESTION_SET_TYPE_FIXED, ilObjTest\QUESTION_SET_TYPE_RANDOM, ilFormPropertyGUI\setRequired(), ilTextInputGUI\setValue(), ilTextAreaInputGUI\setValue(), ilLOSettings\TYPE_TEST_INITIAL, and ilLOSettings\TYPE_TEST_QUALIFIED.

Referenced by saveTest(), and testSettings().

549  {
550  include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
551  $form = new ilPropertyFormGUI();
552  $form->setFormAction($this->ctrl->getFormAction($this));
553  $form->addCommandButton('saveTest', $this->lng->txt('save'));
554 
555  switch($this->getTestType())
556  {
557  case self::TEST_TYPE_IT:
558  $form->setTitle($this->lng->txt('crs_loc_settings_itest_tbl'));
559  break;
560 
561  case self::TEST_TYPE_QT:
562  $form->setTitle($this->lng->txt('crs_loc_settings_qtest_tbl'));
563  break;
564 
565  }
566 
567  $assignable = $this->getAssignableTests();
568 
569  $cr_mode = new ilRadioGroupInputGUI($this->lng->txt('crs_loc_form_assign_it'),'mode');
570  $cr_mode->setRequired(true);
571  $cr_mode->setValue(self::TEST_NEW);
572 
573  $new = new ilRadioOption($this->lng->txt('crs_loc_form_tst_new'),self::TEST_NEW);
574 
575  switch($this->getTestType())
576  {
578  $new->setInfo($this->lng->txt("crs_loc_form_tst_new_initial_info"));
579  break;
580 
582  $new->setInfo($this->lng->txt("crs_loc_form_tst_new_qualified_info"));
583  break;
584  }
585 
586  // title
587  $ti = new ilTextInputGUI($this->lng->txt("title"), "title");
588  $ti->setValue(
589  ilObject::_lookupTitle(ilObject::_lookupObjId($this->getSettings()->getTestByType($this->getTestType())))
590  );
591  $ti->setMaxLength(128);
592  $ti->setSize(40);
593  $ti->setRequired(true);
594  $new->addSubItem($ti);
595 
596  // description
597  $ta = new ilTextAreaInputGUI($this->lng->txt("description"), "desc");
598  $ta->setValue(
600  );
601  $ta->setCols(40);
602  $ta->setRows(2);
603  $new->addSubItem($ta);
604 
605  // Question assignment type
606  include_once './Modules/Test/classes/class.ilObjTest.php';
607  $this->lng->loadLanguageModule('assessment');
608  $qst = new ilRadioGroupInputGUI($this->lng->txt('tst_question_set_type'),'qtype');
609  $qst->setRequired(true);
610  $qst->setValue(
611  $this->getSettings()->isRandomTestType($this->getTestType()) ?
614  );
615 
616  $random = new ilRadioOption(
617  $this->lng->txt('tst_question_set_type_random'),
619  );
620  $qst->addOption($random);
621 
622  $fixed = new ilRadioOption(
623  $this->lng->txt('tst_question_set_type_fixed'),
625  );
626  $qst->addOption($fixed);
627  $new->addSubItem($qst);
628  $cr_mode->addOption($new);
629 
630  // assign existing
631  $existing = new ilRadioOption($this->lng->txt('crs_loc_form_assign'),self::TEST_ASSIGN);
632 
633  switch($this->getTestType())
634  {
636  $existing->setInfo($this->lng->txt("crs_loc_form_assign_initial_info"));
637  break;
638 
640  $existing->setInfo($this->lng->txt("crs_loc_form_assign_qualified_info"));
641  break;
642  }
643 
644  if(!$assignable)
645  {
646  $existing->setDisabled(true);
647  }
648  $cr_mode->addOption($existing);
649 
650  $options = array();
651  $options[0] = $this->lng->txt('select_one');
652  foreach((array) $assignable as $tst_ref_id)
653  {
654  $tst_obj_id = ilObject::_lookupObjId($tst_ref_id);
655  $options[$tst_ref_id] = ilObject::_lookupTitle($tst_obj_id);
656  }
657  $selectable = new ilSelectInputGUI($this->lng->txt('crs_loc_form_available_tsts'),'tst');
658  $selectable->setRequired(true);
659  $selectable->setOptions($options);
660  $existing->addSubItem($selectable);
661 
662  $form->addItem($cr_mode);
663  return $form;
664  }
This class represents an option in a radio group.
This class represents a selection list property in a property form.
getSettings()
Settings.
This class represents a property form user interface.
const QUESTION_SET_TYPE_RANDOM
type setting value for random question set
setValue($a_value)
Set Value.
static _lookupTitle($a_id)
lookup object title
This class represents a property in a property form.
if(!is_array($argv)) $options
addSubItem($a_item)
Add Subitem.
static _lookupDescription($a_id)
lookup object description
static _lookupObjId($a_id)
This class represents a text property in a property form.
getAssignableTests()
Get assignable tests.
This class represents a text area property in a property form.
const QUESTION_SET_TYPE_FIXED
type setting value for fixed question set
setValue($a_value)
Set Value.
setRequired($a_required)
Set Required.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ listObjectives()

ilLOEditorGUI::listObjectives ( )
protected

List all abvailable objectives.

Definition at line 805 of file class.ilLOEditorGUI.php.

References $GLOBALS, ilCourseObjective\_getObjectiveIds(), getParentObject(), ilLOEditorStatus\SECTION_OBJECTIVES, and showStatus().

Referenced by saveSorting().

806  {
807  global $ilToolbar;
808 
809  $GLOBALS['ilTabs']->activateSubTab('objectives');
810 
811  $ilToolbar->addButton(
812  $this->lng->txt('crs_add_objective'),
813  $this->ctrl->getLinkTargetByClass('ilcourseobjectivesgui', "create"));
814 
815  include_once('./Modules/Course/classes/class.ilCourseObjectivesTableGUI.php');
816  $table = new ilCourseObjectivesTableGUI($this,$this->getParentObject());
817  $table->setTitle($this->lng->txt('crs_objectives'),'',$this->lng->txt('crs_objectives'));
818  $table->parse(ilCourseObjective::_getObjectiveIds($this->getParentObject()->getId(),false));
819  $GLOBALS['tpl']->setContent($table->getHTML());
820 
822  }
static _getObjectiveIds($course_id, $a_activated_only=false)
$GLOBALS['ct_recipient']
showStatus($a_section)
Show status panel.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ materials()

ilLOEditorGUI::materials ( )
protected

Definition at line 319 of file class.ilLOEditorGUI.php.

References $GLOBALS, getParentObject(), ilLOEditorStatus\SECTION_MATERIALS, and showStatus().

320  {
321  $GLOBALS['ilTabs']->activateSubTab('materials');
322 
323  include_once "Services/Object/classes/class.ilObjectAddNewItemGUI.php";
324  $gui = new ilObjectAddNewItemGUI($this->getParentObject()->getRefId());
325  $gui->setDisabledObjectTypes(array("itgr"));
326  #$gui->setAfterCreationCallback($this->getParentObject()->getRefId());
327  $gui->render();
328 
329  include_once './Services/Object/classes/class.ilObjectTableGUI.php';
330  $obj_table = new ilObjectTableGUI(
331  $this,
332  'materials',
333  $this->getParentObject()->getRefId()
334  );
335  $obj_table->init();
336  $obj_table->setObjects($GLOBALS['tree']->getChildIds($this->getParentObject()->getRefId()));
337  $obj_table->parse();
338  $GLOBALS['tpl']->setContent($obj_table->getHTML());
339 
341  }
$GLOBALS['ct_recipient']
Render add new item selector.
Settings for LO courses.
showStatus($a_section)
Show status panel.
+ Here is the call graph for this function:

◆ saveObjectiveCreation()

ilLOEditorGUI::saveObjectiveCreation ( )
protected

Definition at line 862 of file class.ilLOEditorGUI.php.

References $GLOBALS, getParentObject(), initSimpleObjectiveForm(), ilLOEditorStatus\SECTION_OBJECTIVES, ilUtil\sendSuccess(), and showStatus().

863  {
864  $form = $this->initSimpleObjectiveForm();
865  if($form->checkInput())
866  {
867  foreach((array) $form->getInput('objectives') as $idx => $title)
868  {
869  include_once './Modules/Course/classes/class.ilCourseObjective.php';
870  $obj = new ilCourseObjective($this->getParentObject());
871  $obj->setActive(false);
872  $obj->setTitle($title);
873  $obj->add();
874  }
875  ilUtil::sendSuccess($this->lng->txt('settings_saved'),true);
876  $this->ctrl->redirect($this,'');
877  }
878 
879  $form->setValuesByPost();
880  $GLOBALS['ilTabs']->activateSubTab('objectives');
882  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
initSimpleObjectiveForm()
Show objective creation form.
$GLOBALS['ct_recipient']
class ilcourseobjective
showStatus($a_section)
Show status panel.
+ Here is the call graph for this function:

◆ saveSettings()

ilLOEditorGUI::saveSettings ( )
protected

Definition at line 219 of file class.ilLOEditorGUI.php.

References $settings, ilLOSettings\getInstanceByObjId(), getParentObject(), initSettingsForm(), ilLOSettings\QT_VISIBLE_ALL, ilLOSettings\QT_VISIBLE_OBJECTIVE, ilUtil\sendFailure(), ilUtil\sendSuccess(), settings(), and updateStartObjects().

220  {
221  $form = $this->initSettingsForm();
222  if($form->checkInput())
223  {
225  $settings->setType($form->getInput('type'));
226 
227  $qtv_values = (array) $form->getInput('qtv');
228  $settings->setGeneralQualifiedTestVisibility(in_array(ilLOSettings::QT_VISIBLE_ALL, $qtv_values));
229  $settings->setQualifiedTestPerObjectiveVisibility(in_array(ilLOSettings::QT_VISIBLE_OBJECTIVE, $qtv_values));
230  $settings->resetResults($form->getInput('reset'));
231  $settings->update();
232 
233 
234 
235  $this->updateStartObjects();
236 
237  ilUtil::sendSuccess($this->lng->txt('settings_saved'),true);
238  $this->ctrl->redirect($this,'settings');
239  }
240 
241  // Error
242  ilUtil::sendFailure($this->lng->txt('err_check_input'));
243  $form->setValuesByPost();
244  $this->settings($form);
245  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static getInstanceByObjId($a_obj_id)
get singleton instance
initSettingsForm()
Init settings form.
updateStartObjects()
Add Test as start object.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
settings(ilPropertyFormGUI $form=NULL)
Objective Settings.
+ Here is the call graph for this function:

◆ saveSorting()

ilLOEditorGUI::saveSorting ( )
protected

save position

protected

Returns

Definition at line 890 of file class.ilLOEditorGUI.php.

References $_POST, $ilErr, getParentObject(), listObjectives(), and ilUtil\sendSuccess().

891  {
892  global $ilAccess,$ilErr,$ilObjDataCache;
893 
894  asort($_POST['position'],SORT_NUMERIC);
895 
896  $counter = 1;
897  foreach($_POST['position'] as $objective_id => $position)
898  {
899  include_once './Modules/Course/classes/class.ilCourseObjective.php';
900  $objective = new ilCourseObjective($this->getParentObject(),$objective_id);
901  $objective->writePosition($counter++);
902  }
903  ilUtil::sendSuccess($this->lng->txt('crs_objective_saved_sorting'));
904  $this->listObjectives();
905  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
class ilcourseobjective
listObjectives()
List all abvailable objectives.
+ Here is the call graph for this function:

◆ saveTest()

ilLOEditorGUI::saveTest ( )
protected

Save Test.

Definition at line 733 of file class.ilLOEditorGUI.php.

References $_REQUEST, $settings, applySettingsTemplate(), ilLOSettings\getInstanceByObjId(), getParentObject(), getSettings(), getTestType(), initTestForm(), ilUtil\sendFailure(), ilUtil\sendSuccess(), setTestType(), testSettings(), and updateStartObjects().

734  {
735  $this->ctrl->setParameter($this,'tt',(int) $_REQUEST['tt']);
736  $this->setTestType((int) $_REQUEST['tt']);
737 
739 
740  $form = $this->initTestForm();
741  if($form->checkInput())
742  {
743  $mode = $form->getInput('mode');
744 
745  if($mode == self::TEST_NEW)
746  {
747  $tst = new ilObjTest();
748  $tst->setType('tst');
749  $tst->setTitle($form->getInput('title'));
750  $tst->setDescription($form->getInput('desc'));
751  $tst->create();
752  $tst->createReference();
753  $tst->putInTree($this->getParentObject()->getRefId());
754  $tst->setPermissions($this->getParentObject()->getRefId());
755 
756  // apply settings template
757  $this->applySettingsTemplate($tst);
758 
759  $tst->setQuestionSetType($form->getInput('qtype'));
760 
761  $tst->saveToDb();
762 
763  if($this->getTestType() == self::TEST_TYPE_IT)
764  {
765  $this->getSettings()->setInitialTest($tst->getRefId());
766  }
767  else
768  {
769  $this->getSettings()->setQualifiedTest($tst->getRefId());
770  }
771  $this->getSettings()->update();
772  }
773  else
774  {
775  if($this->getTestType() == self::TEST_TYPE_IT)
776  {
777  $this->getSettings()->setInitialTest($form->getInput('tst'));
778  }
779  else
780  {
781  $this->getSettings()->setQualifiedTest($form->getInput('tst'));
782  }
783 
784  $this->getSettings()->update();
785  $tst = new ilObjTest($settings->getTestByType($this->getTestType()),true);
786  $this->applySettingsTemplate($tst);
787  $tst->saveToDb();
788  }
789 
790  $this->updateStartObjects();
791 
792  ilUtil::sendSuccess($this->lng->txt('settings_saved'));
793  $this->ctrl->redirect($this,'testOverview');
794  }
795 
796  // Error
797  ilUtil::sendFailure($this->lng->txt('err_check_input'));
798  $form->setValuesByPost();
799  $this->testSettings($form);
800  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static getInstanceByObjId($a_obj_id)
get singleton instance
getSettings()
Settings.
updateStartObjects()
Add Test as start object.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
testSettings(ilPropertyFormGUI $form=NULL)
Show test settings.
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7
initTestForm()
Show test config form.
applySettingsTemplate(ilObjTest $tst)
Apply auto generated setttings template.
+ Here is the call graph for this function:

◆ setTabs()

ilLOEditorGUI::setTabs (   $a_section = '')
protected

Set tabs.

Parameters
type$a_section

Definition at line 1032 of file class.ilLOEditorGUI.php.

References $GLOBALS, $settings, ilLOSettings\getInstanceByObjId(), and getParentObject().

Referenced by executeCommand().

1033  {
1034  // objective settings
1035  $GLOBALS['ilTabs']->addSubTab(
1036  'settings',
1037  $this->lng->txt('settings'),
1038  $this->ctrl->getLinkTarget($this,'settings')
1039  );
1040  // learning objectives
1041  $GLOBALS['ilTabs']->addSubTab(
1042  'objectives',
1043  $this->lng->txt('crs_loc_tab_objectives'),
1044  $this->ctrl->getLinkTarget($this,'listObjectives')
1045  );
1046  // materials
1047  /*
1048  $GLOBALS['ilTabs']->addTab(
1049  'materials',
1050  $this->lng->txt('crs_loc_tab_materials'),
1051  $this->ctrl->getLinkTarget($this,'materials')
1052  );
1053  */
1054  // tests
1056  if($settings->worksWithInitialTest())
1057  {
1058  $this->ctrl->setParameter($this,'tt',self::TEST_TYPE_IT);
1059  $GLOBALS['ilTabs']->addSubTab(
1060  'itest',
1061  $this->lng->txt('crs_loc_tab_itest'),
1062  $this->ctrl->getLinkTarget($this,'testOverview')
1063  );
1064 
1065  }
1066  $this->ctrl->setParameter($this,'tt',self::TEST_TYPE_QT);
1067  $GLOBALS['ilTabs']->addSubTab(
1068  'qtest',
1069  $this->lng->txt('crs_loc_tab_qtest'),
1070  $this->ctrl->getLinkTarget($this,'testOverview')
1071  );
1072  // start objects
1073  $GLOBALS['ilTabs']->addSubTab(
1074  'start',
1075  $this->lng->txt('crs_loc_tab_start'),
1076  $this->ctrl->getLinkTargetByClass('ilcontainerstartobjectsgui','')
1077  );
1078 
1079  // Member view
1080  #include_once './Services/Container/classes/class.ilMemberViewGUI.php';
1081  #ilMemberViewGUI::showMemberViewSwitch($this->getParentObject()->getRefId());
1082  }
static getInstanceByObjId($a_obj_id)
get singleton instance
$GLOBALS['ct_recipient']
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setTestType()

ilLOEditorGUI::setTestType (   $a_type)

Definition at line 189 of file class.ilLOEditorGUI.php.

Referenced by confirmDeleteTest(), deleteTest(), saveTest(), and testOverview().

190  {
191  $this->test_type = $a_type;
192  }
+ Here is the caller graph for this function:

◆ settings()

ilLOEditorGUI::settings ( ilPropertyFormGUI  $form = NULL)
protected

Objective Settings.

Definition at line 203 of file class.ilLOEditorGUI.php.

References $GLOBALS, initSettingsForm(), ilLOEditorStatus\SECTION_SETTINGS, and showStatus().

Referenced by __construct(), and saveSettings().

204  {
205  if(!$form instanceof ilPropertyFormGUI)
206  {
207  $form = $this->initSettingsForm();
208  }
209 
210  $GLOBALS['ilTabs']->activateSubTab('settings');
211  $GLOBALS['tpl']->setContent($form->getHTML());
212 
214  }
This class represents a property form user interface.
initSettingsForm()
Init settings form.
$GLOBALS['ct_recipient']
showStatus($a_section)
Show status panel.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showObjectiveCreation()

ilLOEditorGUI::showObjectiveCreation ( ilPropertyFormGUI  $form = NULL)
protected

Show objective creation form.

Parameters
ilPropertyFormGUI$form

Definition at line 828 of file class.ilLOEditorGUI.php.

References $GLOBALS, initSimpleObjectiveForm(), ilLOEditorStatus\SECTION_OBJECTIVES_NEW, and showStatus().

829  {
830  $GLOBALS['ilTabs']->activateSubTab('objectives');
831 
832  if(!$form instanceof ilPropertyFormGUI)
833  {
834  $form = $this->initSimpleObjectiveForm();
835  }
836 
837  $GLOBALS['tpl']->setContent($form->getHTML());
838 
840  }
This class represents a property form user interface.
initSimpleObjectiveForm()
Show objective creation form.
$GLOBALS['ct_recipient']
showStatus($a_section)
Show status panel.
+ Here is the call graph for this function:

◆ showStatus()

ilLOEditorGUI::showStatus (   $a_section)
protected

Show status panel.

Definition at line 1017 of file class.ilLOEditorGUI.php.

References $GLOBALS, and getParentObject().

Referenced by askDeleteObjectives(), confirmDeleteTest(), listObjectives(), materials(), saveObjectiveCreation(), settings(), showObjectiveCreation(), testOverview(), and testSettings().

1018  {
1019  include_once './Modules/Course/classes/Objectives/class.ilLOEditorStatus.php';
1020  $status = new ilLOEditorStatus($this->getParentObject());
1021  $status->setSection($a_section);
1022  $status->setCmdClass($this);
1023  $GLOBALS['tpl']->setRightContent($status->getHTML());
1024  }
Presentation of the status of single steps during the configuration process.
$GLOBALS['ct_recipient']
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ testOverview()

ilLOEditorGUI::testOverview ( )
protected

Show test overview.

Definition at line 347 of file class.ilLOEditorGUI.php.

References $_REQUEST, $GLOBALS, $settings, ilLOSettings\getInstanceByObjId(), getParentObject(), getTestType(), ilLOEditorStatus\SECTION_ITES, ilLOEditorStatus\SECTION_QTEST, setTestType(), showStatus(), TEST_TYPE_IT, testSettings(), ilLOSettings\TYPE_TEST_INITIAL, and ilLOSettings\TYPE_TEST_QUALIFIED.

348  {
349  $this->setTestType((int) $_REQUEST['tt']);
350  $this->ctrl->setParameter($this,'tt',$this->getTestType());
351 
353  switch($this->getTestType())
354  {
356  $GLOBALS['ilTabs']->activateSubTab('itest');
357  break;
358 
360  $GLOBALS['ilTabs']->activateSubTab('qtest');
361  break;
362  }
363 
364 
365  // Check if test is assigned
366  if(!$settings->getTestByType($this->getTestType()))
367  {
368  return $this->testSettings();
369  }
370 
371  try {
372  include_once './Modules/Course/classes/Objectives/class.ilLOTestAssignmentTableGUI.php';
373  $table = new ilLOTestAssignmentTableGUI(
374  $this,
375  'testOverview',
376  $this->getParentObject()->getId(),
377  $this->getTestType()
378  );
379  $table->setTitle($this->lng->txt('crs_loc_tst_assignment'));
380  $table->init();
381  $table->parse(ilLOSettings::getInstanceByObjId($this->getParentObject()->getId())->getTestByType($this->getTestType()));
382  $GLOBALS['tpl']->setContent($table->getHTML());
383 
384  $this->showStatus(
388  );
389  }
391  {
392  $GLOBALS['ilLog']->write(__METHOD__.': Show new assignment sceen because of : '. $ex->getMessage());
393  $this->testSettings();
394  }
395  }
static getInstanceByObjId($a_obj_id)
get singleton instance
$GLOBALS['ct_recipient']
Class ilLOTestAssignmentTableGUI.
Class ilLOInvalidConfigurationException.
showStatus($a_section)
Show status panel.
testSettings(ilPropertyFormGUI $form=NULL)
Show test settings.
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7
+ Here is the call graph for this function:

◆ testSettings()

ilLOEditorGUI::testSettings ( ilPropertyFormGUI  $form = NULL)
protected

Show test settings.

Parameters
ilPropertyFormGUI$form

Definition at line 501 of file class.ilLOEditorGUI.php.

References $_REQUEST, $GLOBALS, getTestType(), initTestForm(), ilLOEditorStatus\SECTION_ITES, ilLOEditorStatus\SECTION_QTEST, showStatus(), ilLOSettings\TYPE_TEST_INITIAL, and ilLOSettings\TYPE_TEST_QUALIFIED.

Referenced by saveTest(), and testOverview().

502  {
503  $this->ctrl->setParameter($this,'tt',(int) $_REQUEST['tt']);
504  switch($this->getTestType())
505  {
507  $GLOBALS['ilTabs']->activateSubTab('itest');
508  break;
509 
511  $GLOBALS['ilTabs']->activateSubTab('qtest');
512  break;
513  }
514 
515  if(!$form instanceof ilPropertyFormGUI)
516  {
517  $form = $this->initTestForm();
518  }
519  $GLOBALS['tpl']->setContent($form->getHTML());
520 
521  $this->showStatus(
522  ($this->getTestType() == self::TEST_TYPE_IT) ?
525  );
526  }
This class represents a property form user interface.
$GLOBALS['ct_recipient']
showStatus($a_section)
Show status panel.
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7
initTestForm()
Show test config form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateStartObjects()

ilLOEditorGUI::updateStartObjects ( )
protected

Add Test as start object.

Parameters
ilObjTest$tst

Definition at line 722 of file class.ilLOEditorGUI.php.

References getParentObject(), and getSettings().

Referenced by saveSettings(), and saveTest().

723  {
724  include_once './Services/Container/classes/class.ilContainerStartObjects.php';
725  $start = new ilContainerStartObjects(0, $this->getParentObject()->getId());
726  $this->getSettings()->updateStartObjects($start);
727  return true;
728  }
getSettings()
Settings.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $ctrl

ilLOEditorGUI::$ctrl = NULL
private

Definition at line 34 of file class.ilLOEditorGUI.php.

◆ $lng

ilLOEditorGUI::$lng = NULL
private

Definition at line 33 of file class.ilLOEditorGUI.php.

◆ $parent_obj

ilLOEditorGUI::$parent_obj
private

Definition at line 31 of file class.ilLOEditorGUI.php.

Referenced by getParentObject().

◆ $settings

ilLOEditorGUI::$settings = NULL
private

◆ $test_type

ilLOEditorGUI::$test_type = 0
private

Definition at line 36 of file class.ilLOEditorGUI.php.

Referenced by getTestType().

◆ SETTINGS_TEMPLATE_IT

const ilLOEditorGUI::SETTINGS_TEMPLATE_IT = 'il_astpl_loc_initial'

Definition at line 27 of file class.ilLOEditorGUI.php.

◆ SETTINGS_TEMPLATE_QT

const ilLOEditorGUI::SETTINGS_TEMPLATE_QT = 'il_astpl_loc_qualified'

Definition at line 28 of file class.ilLOEditorGUI.php.

◆ TEST_ASSIGN

const ilLOEditorGUI::TEST_ASSIGN = 2

Definition at line 25 of file class.ilLOEditorGUI.php.

◆ TEST_NEW

const ilLOEditorGUI::TEST_NEW = 1

Definition at line 24 of file class.ilLOEditorGUI.php.

◆ TEST_TYPE_IT

const ilLOEditorGUI::TEST_TYPE_IT = 1

Definition at line 21 of file class.ilLOEditorGUI.php.

Referenced by confirmDeleteTest(), and testOverview().

◆ TEST_TYPE_QT

const ilLOEditorGUI::TEST_TYPE_QT = 2

Definition at line 22 of file class.ilLOEditorGUI.php.


The documentation for this class was generated from the following file: