Inheritance diagram for ilLPListOfSettingsGUI:
Collaboration diagram for ilLPListOfSettingsGUI:Public Member Functions | |
| ilLPListOfSettingsGUI ($a_mode, $a_ref_id) | |
| & | executeCommand () |
| execute command | |
| show () | |
| saveSettings () | |
| assign () | |
| deassign () | |
| __showTablesByMode () | |
| __showSCOTable () | |
| __showCollectionTable () | |
| __addInfo () | |
| __formatPath ($a_path_arr, $a_ref_id) | |
| __checkItemAnonymized ($a_obj_id, $a_type) | |
Private Member Functions | |
| showModeSelection () | |
| Show mode selection. | |
Definition at line 40 of file class.ilLPListOfSettingsGUI.php.
| ilLPListOfSettingsGUI::__addInfo | ( | ) |
Definition at line 383 of file class.ilLPListOfSettingsGUI.php.
References ilUtil::sendInfo().
Referenced by saveSettings().
{
$message = $this->lng->txt('trac_settings_saved');
if($this->obj_settings->getMode() == $_POST['modus'])
{
ilUtil::sendInfo($message);
return true;
}
switch($_POST['modus'])
{
case LP_MODE_COLLECTION:
$message .= '<br />';
$message .= $this->lng->txt('trac_edit_collection');
break;
case LP_MODE_VISITS:
$message .= '<br />';
$message .= $this->lng->txt('trac_edit_visits');
break;
default:
;
}
ilUtil::sendInfo($message);
return true;
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilLPListOfSettingsGUI::__checkItemAnonymized | ( | $ | a_obj_id, | |
| $ | a_type | |||
| ) |
Definition at line 440 of file class.ilLPListOfSettingsGUI.php.
References ilObjTest::_lookupAnonymity().
Referenced by __showCollectionTable().
{
switch($a_type)
{
case 'tst':
include_once './Modules/Test/classes/class.ilObjTest.php';
if(ilObjTest::_lookupAnonymity($a_obj_id))
{
return true;
}
return false;
default:
return false;
}
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilLPListOfSettingsGUI::__formatPath | ( | $ | a_path_arr, | |
| $ | a_ref_id | |||
| ) |
Definition at line 414 of file class.ilLPListOfSettingsGUI.php.
References $data.
Referenced by __showCollectionTable().
{
global $tree;
#$path = $this->__formatPath($tree->getPathFull($ref_id));
#$tpl->setVariable("COLL_PATH",$this->lng->txt('path').": ".$path);
$counter = 0;
foreach($a_path_arr as $data)
{
if(!$tree->isGrandChild($this->getRefId(),$data['ref_id']))
{
continue;
}
if($a_ref_id == $data['ref_id'])
{
break;
}
if($counter++)
{
$path .= " -> ";
}
$path .= $data['title'];
}
return $path;
}
Here is the caller graph for this function:| ilLPListOfSettingsGUI::__showCollectionTable | ( | ) |
Definition at line 261 of file class.ilLPListOfSettingsGUI.php.
References ilLearningProgressBaseGUI::$ref_id, ilLearningProgressBaseGUI::$tpl, __checkItemAnonymized(), __formatPath(), ilLPCollections::_getCountPossibleItems(), ilEvent::_getEvents(), ilFrameTargetInfo::_getFrame(), ilLink::_getLink(), ilLPCollections::_getPossibleItems(), ilLPObjSettings::_lookupMode(), ilLPObjSettings::_mode2Text(), ilUtil::formCheckbox(), ilUtil::getImagePath(), ilLearningProgressBaseGUI::getObjId(), ilLearningProgressBaseGUI::getRefId(), and ilUtil::switchColor().
Referenced by __showTablesByMode().
{
global $ilObjDataCache,$tree;
include_once 'Services/Tracking/classes/class.ilLPCollections.php';
include_once 'Services/Tracking/classes/class.ilLPEventCollections.php';
include_once 'Modules/Course/classes/Event/class.ilEvent.php';
include_once 'classes/class.ilLink.php';
include_once 'classes/class.ilFrameTargetInfo.php';
// read assigned events
$events = ilEvent::_getEvents($this->getObjId());
$lp_collections = new ilLPCollections($this->getObjId());
$tpl =& new ilTemplate('tpl.trac_collections.html',true,true,'Services/Tracking');
$tpl->setVariable("COLL_TITLE_IMG_ALT",$this->lng->txt('trac_lp_determination'));
$tpl->setVariable("COLL_TITLE_IMG",ilUtil::getImagePath('icon_trac.gif'));
//$tpl->setVariable("TABLE_TITLE",$this->lng->txt('trac_crs_assignments'));
$tpl->setVariable("TABLE_TITLE",$this->lng->txt('trac_lp_determination'));
$tpl->setVariable("TABLE_INFO",$this->lng->txt('trac_lp_determination_info_crs'));
$tpl->setVariable("ITEM_DESC",$this->lng->txt('trac_crs_items'));
$tpl->setVariable("ITEM_ASSIGNED",$this->lng->txt('trac_assigned'));
$tpl->setVariable("IMG_ARROW",ilUtil::getImagePath('arrow_downright.gif'));
$tpl->setVariable("BTN_ASSIGN",$this->lng->txt('trac_collection_assign'));
$tpl->setVariable("BTN_DEASSIGN",$this->lng->txt('trac_collection_deassign'));
if(!ilLPCollections::_getCountPossibleItems($this->getRefId()) and !count($events))
{
$tpl->setCurrentBlock("no_items");
$tpl->setVariable("NO_ITEM_MESSAGE",$this->lng->txt('trac_no_items'));
$tpl->parseCurrentBlock();
}
// Show header
if(count($events))
{
$tpl->setCurrentBlock("header_materials");
$tpl->setVariable("TXT_HEADER_MATERIALS",$this->lng->txt('crs_materials'));
$tpl->parseCurrentBlock();
}
$tpl->addBlockFile('MATERIALS','materials','tpl.trac_collections_row.html','Services/Tracking');
$counter = 0;
// Show materials
foreach(ilLPCollections::_getPossibleItems($this->getRefId()) as $ref_id)
{
$obj_id = $ilObjDataCache->lookupObjId($ref_id);
$type = $ilObjDataCache->lookupType($obj_id);
$anonymized = $this->__checkItemAnonymized($obj_id,$type);
$tpl->setCurrentBlock("materials");
// Link to settings
$tpl->setVariable("COLL_MODE",
$this->lng->txt('trac_mode').": ".
ilLPObjSettings::_mode2Text(ilLPObjSettings::_lookupMode($obj_id)));
if($anonymized)
{
$tpl->setVariable("ANONYMIZED",$this->lng->txt('trac_anonymized_info_short'));
}
$tpl->setVariable("COLL_LINK",ilLink::_getLink($ref_id,$ilObjDataCache->lookupType($obj_id)));
$tpl->setVariable("COLL_FRAME",ilFrameTargetInfo::_getFrame('MainContent',$ilObjDataCache->lookupType($obj_id)));
$tpl->setVariable("COLL_DESC",$ilObjDataCache->lookupDescription($obj_id));
$tpl->setVariable("COLL_TITLE",$ilObjDataCache->lookupTitle($obj_id));
$tpl->setVariable("ROW_CLASS",ilUtil::switchColor(++$counter,'tblrow1','tblrow2'));
if(!$anonymized)
{
$tpl->setVariable("CHECK_TRAC",ilUtil::formCheckbox(0,'item_ids[]',$ref_id));
}
$path = $this->__formatPath($tree->getPathFull($ref_id),$ref_id);
$tpl->setVariable("COLL_PATH",$this->lng->txt('path').": ".$path);
// Assigned
$tpl->setVariable("ASSIGNED_IMG_OK",$lp_collections->isAssigned($ref_id)
? ilUtil::getImagePath('icon_ok.gif')
: ilUtil::getImagePath('icon_not_ok.gif'));
$tpl->setVariable("ASSIGNED_STATUS",$lp_collections->isAssigned($ref_id)
? $this->lng->txt('trac_assigned')
: $this->lng->txt('trac_not_assigned'));
$tpl->parseCurrentBlock();
}
$event_collections = new ilLPEventCollections($this->getObjId());
// show events
if(count($events))
{
$tpl->setCurrentBlock("header_events");
$tpl->setVariable("TXT_HEADER_NAME",$this->lng->txt('events'));
$tpl->parseCurrentBlock();
}
$tpl->addBlockFile('EVENT','event','tpl.trac_collections_event_row.html','Services/Tracking');
foreach($events as $event_obj)
{
$tpl->setCurrentBlock("event");
$tpl->setVariable("EVENT_COLL_DESC",$event_obj->getDescription());
$tpl->setVariable("EVENT_COLL_TITLE",$event_obj->getTitle());
$tpl->setVariable("EVENT_ROW_CLASS",ilUtil::switchColor(++$counter,'tblrow1','tblrow2'));
$tpl->setVariable("EVENT_CHECK_TRAC",ilUtil::formCheckbox(0,'event_ids[]',$event_obj->getEventId()));
$tpl->setVariable("EVENT_ASSIGNED_IMG_OK",$event_collections->isAssigned($event_obj->getEventId())
? ilUtil::getImagePath('icon_ok.gif')
: ilUtil::getImagePath('icon_not_ok.gif'));
$tpl->setVariable("EVENT_ASSIGNED_STATUS",$event_collections->isAssigned($event_obj->getEventId())
? $this->lng->txt('trac_assigned')
: $this->lng->txt('trac_not_assigned'));
$tpl->parseCurrentBlock();
}
$tpl->setVariable("SELECT_ROW",ilUtil::switchColor(++$counter,'tblrow1','tblrow2'));
$tpl->setVariable("SELECT_ALL",$this->lng->txt('select_all'));
$this->tpl->setVariable("COLLECTION_TABLE",$tpl->get());
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilLPListOfSettingsGUI::__showSCOTable | ( | ) |
Definition at line 200 of file class.ilLPListOfSettingsGUI.php.
References $data, ilLearningProgressBaseGUI::$tpl, ilLPCollections::_getPossibleSAHSItems(), ilUtil::formCheckbox(), ilUtil::getImagePath(), ilLearningProgressBaseGUI::getObjId(), ilUtil::sendInfo(), and ilUtil::switchColor().
Referenced by __showTablesByMode().
{
global $ilObjDataCache,$tree;
include_once 'Services/Tracking/classes/class.ilLPCollections.php';
include_once './Modules/ScormAicc/classes/SCORM/class.ilSCORMItem.php';
if(!$items = ilLPCollections::_getPossibleSAHSItems($this->getObjId()))
{
ilUtil::sendInfo($this->lng->txt('trac_no_sahs_items_found'));
return false;
}
$lp_collections = new ilLPCollections($this->getObjId());
$tpl =& new ilTemplate('tpl.trac_collections.html',true,true,'Services/Tracking');
//$tpl->setVariable("COLL_TITLE_IMG_ALT",$this->lng->txt('trac_assignments'));
$tpl->setVariable("COLL_TITLE_IMG_ALT",$this->lng->txt('trac_lp_determination'));
$tpl->setVariable("COLL_TITLE_IMG",ilUtil::getImagePath('icon_trac.gif'));
//$tpl->setVariable("TABLE_TITLE", $this->lng->txt('trac_assignments'));
$tpl->setVariable("TABLE_TITLE", $this->lng->txt('trac_lp_determination'));
$tpl->setVariable("TABLE_INFO", $this->lng->txt('trac_lp_determination_info_sco'));
//$tpl->setVariable("ITEM_DESC",$this->lng->txt('description'));
//$tpl->setVariable("ITEM_ASSIGNED",$this->lng->txt('trac_assigned'));
$tpl->setVariable("IMG_ARROW",ilUtil::getImagePath('arrow_downright.gif'));
$tpl->setVariable("BTN_ASSIGN",$this->lng->txt('trac_collection_assign'));
$tpl->setVariable("BTN_DEASSIGN",$this->lng->txt('trac_collection_deassign'));
$counter = 0;
$tpl->addBlockFile('MATERIALS','materials','tpl.trac_collections_sco_row.html','Services/Tracking');
$counter = 0;
foreach($items as $obj_id => $data)
{
$tpl->setCurrentBlock("materials");
$tpl->setVariable("COLL_TITLE",$data['title']);
$tpl->setVariable("ROW_CLASS",ilUtil::switchColor(++$counter,'tblrow1','tblrow2'));
$tpl->setVariable("CHECK_TRAC",ilUtil::formCheckbox(0,'item_ids[]',$obj_id));
// Assigned
$tpl->setVariable("ASSIGNED_IMG_OK",$lp_collections->isAssigned($obj_id)
? ilUtil::getImagePath('icon_ok.gif')
: ilUtil::getImagePath('icon_not_ok.gif'));
$tpl->setVariable("ASSIGNED_STATUS",$lp_collections->isAssigned($obj_id)
? $this->lng->txt('trac_assigned')
: $this->lng->txt('trac_not_assigned'));
$tpl->parseCurrentBlock();
}
$tpl->setVariable("SELECT_ROW",ilUtil::switchColor(++$counter,'tblrow1','tblrow2'));
$tpl->setVariable("SELECT_ALL",$this->lng->txt('select_all'));
$this->tpl->setVariable("COLLECTION_TABLE",$tpl->get());
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilLPListOfSettingsGUI::__showTablesByMode | ( | ) |
Definition at line 181 of file class.ilLPListOfSettingsGUI.php.
References __showCollectionTable(), and __showSCOTable().
Referenced by show().
{
switch($this->obj_settings->getMode())
{
case LP_MODE_MANUAL_BY_TUTOR:
case LP_MODE_COLLECTION:
$this->__showCollectionTable();
break;
case LP_MODE_SCORM:
$this->__showSCOTable();
break;
}
return true;
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilLPListOfSettingsGUI::assign | ( | ) |
Definition at line 121 of file class.ilLPListOfSettingsGUI.php.
References ilLearningProgressBaseGUI::$ref_id, ilLearningProgressBaseGUI::getObjId(), ilUtil::sendInfo(), and show().
{
if(!$_POST['item_ids'] and !$_POST['event_ids'])
{
ilUtil::sendInfo($this->lng->txt('select_one'));
$this->show();
return false;
}
if(count($_POST['item_ids']))
{
include_once 'Services/Tracking/classes/class.ilLPCollections.php';
$lp_collections = new ilLPCollections($this->getObjId());
foreach($_POST['item_ids'] as $ref_id)
{
$lp_collections->add($ref_id);
}
}
if($_POST['event_ids'])
{
include_once 'Services/Tracking/classes/class.ilLPEventCollections.php';
$event_collections = new ilLPEventCollections($this->getObjId());
foreach($_POST['event_ids'] as $event_id)
{
$event_collections->add($event_id);
}
}
ilUtil::sendInfo($this->lng->txt('trac_settings_saved'));
$this->show();
}
Here is the call graph for this function:| ilLPListOfSettingsGUI::deassign | ( | ) |
Definition at line 151 of file class.ilLPListOfSettingsGUI.php.
References ilLearningProgressBaseGUI::$ref_id, ilLearningProgressBaseGUI::getObjId(), ilUtil::sendInfo(), and show().
{
if(!$_POST['item_ids'] and !$_POST['event_ids'])
{
ilUtil::sendInfo($this->lng->txt('select_one'));
$this->show();
return false;
}
if(count($_POST['item_ids']))
{
include_once 'Services/Tracking/classes/class.ilLPCollections.php';
$lp_collections = new ilLPCollections($this->getObjId());
foreach($_POST['item_ids'] as $ref_id)
{
$lp_collections->delete($ref_id);
}
}
if($_POST['event_ids'])
{
include_once 'Services/Tracking/classes/class.ilLPEventCollections.php';
$event_collections = new ilLPEventCollections($this->getObjId());
foreach($_POST['event_ids'] as $event_id)
{
$event_collections->delete($event_id);
}
}
ilUtil::sendInfo($this->lng->txt('trac_settings_saved'));
$this->show();
}
Here is the call graph for this function:| & ilLPListOfSettingsGUI::executeCommand | ( | ) |
execute command
Definition at line 52 of file class.ilLPListOfSettingsGUI.php.
References $cmd, and ilLearningProgressBaseGUI::__getDefaultCommand().
{
switch($this->ctrl->getNextClass())
{
default:
$cmd = $this->__getDefaultCommand();
$this->$cmd();
}
return true;
}
Here is the call graph for this function:| ilLPListOfSettingsGUI::ilLPListOfSettingsGUI | ( | $ | a_mode, | |
| $ | a_ref_id | |||
| ) |
Definition at line 42 of file class.ilLPListOfSettingsGUI.php.
References ilLearningProgressBaseGUI::getObjId(), and ilLearningProgressBaseGUI::ilLearningProgressBaseGUI().
{
parent::ilLearningProgressBaseGUI($a_mode,$a_ref_id);
$this->obj_settings = new ilLPObjSettings($this->getObjId());
}
Here is the call graph for this function:| ilLPListOfSettingsGUI::saveSettings | ( | ) |
Definition at line 109 of file class.ilLPListOfSettingsGUI.php.
References __addInfo(), and show().
{
$this->__addInfo();
$this->obj_settings->setMode($_POST['modus']);
if((int) $_POST['visits'])
{
$this->obj_settings->setVisits((int) $_POST['visits']);
}
$this->obj_settings->update();
$this->show();
}
Here is the call graph for this function:| ilLPListOfSettingsGUI::show | ( | ) |
Definition at line 64 of file class.ilLPListOfSettingsGUI.php.
References __showTablesByMode(), ilObjUserTracking::_enabledLearningProgress(), ilObjUserTracking::_enabledUserRelatedData(), ilObjUserTracking::_getValidTimeSpan(), ilUtil::getImagePath(), and showModeSelection().
Referenced by assign(), deassign(), and saveSettings().
{
// Sub Tabs
$this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.lp_obj_settings.html','Services/Tracking');
$this->tpl->setVariable("FORMACTION",$this->ctrl->getFormaction($this));
$this->tpl->setVariable("TYPE_IMG",ilUtil::getImagePath('icon_trac.gif'));
$this->tpl->setVariable("ALT_IMG",$this->lng->txt('tracking_settings'));
$this->tpl->setVariable("TXT_TRACKING_SETTINGS", $this->lng->txt("tracking_settings"));
$this->tpl->setVariable("TXT_ACTIVATE_TRACKING", $this->lng->txt("trac_activated"));
$this->tpl->setVariable("ACTIVATED_IMG_OK",$activated = ilObjUserTracking::_enabledLearningProgress()
? ilUtil::getImagePath('icon_ok.gif')
: ilUtil::getImagePath('icon_not_ok.gif'));
$this->tpl->setVariable("ACTIVATED_STATUS",$activated ? $this->lng->txt('yes') : $this->lng->txt('no'));
$this->tpl->setVariable("TXT_USER_RELATED_DATA", $this->lng->txt("trac_anonymized"));
$this->tpl->setVariable("ANONYMIZED_IMG_OK",$anonymized = !ilObjUserTracking::_enabledUserRelatedData()
? ilUtil::getImagePath('icon_ok.gif')
: ilUtil::getImagePath('icon_not_ok.gif'));
$this->tpl->setVariable("ANONYMIZED_STATUS",$anonymized ? $this->lng->txt('no') : $this->lng->txt('yes'));
$this->tpl->setVariable("TXT_VALID_REQUEST",$this->lng->txt('trac_valid_request'));
$this->tpl->setVariable("INFO_VALID_REQUEST",$this->lng->txt('info_valid_request'));
$this->tpl->setVariable("SECONDS",$this->lng->txt('seconds'));
$this->tpl->setVariable("VAL_SECONDS",ilObjUserTracking::_getValidTimeSpan());
$this->showModeSelection();
if($this->obj_settings->getMode() == LP_MODE_VISITS)
{
$this->tpl->setCurrentBlock("visits");
$this->tpl->setVariable("TXT_VISITS",$this->lng->txt('trac_num_visits'));
$this->tpl->setVariable("NUM_VISITS",$this->obj_settings->getVisits());
$this->tpl->setVariable("INFO_VISITS",$this->lng->txt('trac_visits_info'));
$this->tpl->parseCurrentBlock();
}
$this->tpl->setVariable("TXT_SAVE",$this->lng->txt('save'));
// Show additional tables (e.g collection table)
$this->__showTablesByMode();
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilLPListOfSettingsGUI::showModeSelection | ( | ) | [private] |
Show mode selection.
private
Definition at line 464 of file class.ilLPListOfSettingsGUI.php.
References ilLPObjSettings::_mode2InfoText().
Referenced by show().
{
$this->tpl->setVariable('TXT_MODE',$this->lng->txt('trac_mode'));
foreach($this->obj_settings->getValidModes() as $mode_key => $mode_name)
{
$this->tpl->setCurrentBlock('mode_check');
$this->tpl->setVariable('RADIO_ID',$mode_key);
$this->tpl->setVariable('RADIO_CHECKED',$mode_key == $this->obj_settings->getMode() ? ' checked="checked"' : '');
$this->tpl->setVariable('RADIO_VALUE',$mode_key);
$this->tpl->setVariable('MODE_NAME',$mode_name);
$this->tpl->setVariable('MODE_INFO',ilLPObjSettings::_mode2InfoText($mode_key));
$this->tpl->parseCurrentBlock();
}
}
Here is the call graph for this function:
Here is the caller graph for this function:
1.7.1