24 include_once(
'Services/Table/classes/class.ilTable2GUI.php');
46 public function __construct($a_parent_obj, $a_parent_cmd =
'')
56 parent::__construct($a_parent_obj, $a_parent_cmd);
57 $this->
addColumn($this->lng->txt(
'title'),
'title',
'25%');
58 $this->
addColumn($this->lng->txt(
'res_links_short'),
'link',
'25%');
59 $this->
addColumn($this->lng->txt(
'ecs_imported_from'),
'from',
'15%');
60 $this->
addColumn($this->lng->txt(
'ecs_meta_data'),
'md',
'25%');
61 $this->
addColumn($this->lng->txt(
'last_update'),
'last_update',
'10%');
62 $this->
setRowTemplate(
'tpl.content_row.html',
'Services/WebServices/ECS');
65 $this->
setFormAction($this->ctrl->getFormAction($a_parent_obj));
81 include_once(
'./Services/Link/classes/class.ilLink.php');
83 $this->tpl->setVariable(
'VAL_TITLE', $a_set[
'title']);
84 #$this->tpl->setVariable('VAL_LINK',ilLink::_getLink($a_set['ref_id'],'rcrs')); 85 $this->tpl->setVariable(
'VAL_DESC', $a_set[
'desc']);
86 $this->tpl->setVariable(
'VAL_REMOTE', $a_set[
'from']);
87 $this->tpl->setVariable(
'VAL_REMOTE_INFO', $a_set[
'from_info']);
88 $this->tpl->setVariable(
'TXT_EMAIL', $this->lng->txt(
'ecs_email'));
89 $this->tpl->setVariable(
'TXT_DNS', $this->lng->txt(
'ecs_dns'));
90 $this->tpl->setVariable(
'TXT_ABR', $this->lng->txt(
'ecs_abr'));
91 $this->tpl->setVariable(
98 $parent =
$tree->getParentId($ref_id);
102 $this->tpl->setCurrentBlock(
'link');
104 $this->tpl->setVariable(
'LINK_CONTAINER', $p_title);
106 $this->tpl->parseCurrentBlock();
109 $this->tpl->setVariable(
'TXT_TERM', $this->lng->txt(
'ecs_field_term'));
110 $this->tpl->setVariable(
'TXT_CRS_TYPE', $this->lng->txt(
'ecs_field_courseType'));
111 $this->tpl->setVariable(
'TXT_CRS_ID', $this->lng->txt(
'ecs_field_courseID'));
112 $this->tpl->setVariable(
'TXT_CREDITS', $this->lng->txt(
'ecs_field_credits'));
113 $this->tpl->setVariable(
'TXT_ROOM', $this->lng->txt(
'ecs_field_room'));
114 $this->tpl->setVariable(
'TXT_CYCLE', $this->lng->txt(
'ecs_field_cycle'));
115 $this->tpl->setVariable(
'TXT_SWS', $this->lng->txt(
'ecs_field_semester_hours'));
116 $this->tpl->setVariable(
'TXT_START', $this->lng->txt(
'ecs_field_begin'));
117 $this->tpl->setVariable(
'TXT_END', $this->lng->txt(
'ecs_field_end'));
118 $this->tpl->setVariable(
'TXT_LECTURER', $this->lng->txt(
'ecs_field_lecturer'));
120 include_once(
'./Services/WebServices/ECS/classes/class.ilECSDataMappingSettings.php');
123 include_once
"Services/WebServices/ECS/classes/class.ilECSUtils.php";
127 $this->tpl->setVariable(
'VAL_LECTURER', isset(
$values[$field]) ?
$values[$field] :
'--');
130 $this->tpl->setVariable(
'VAL_TERM', isset(
$values[$field]) ?
$values[$field] :
'--');
133 $this->tpl->setVariable(
'VAL_CRS_ID', isset(
$values[$field]) ?
$values[$field] :
'--');
136 $this->tpl->setVariable(
'VAL_CRS_TYPE', isset(
$values[$field]) ?
$values[$field] :
'--');
139 $this->tpl->setVariable(
'VAL_CREDITS', isset(
$values[$field]) ?
$values[$field] :
'--');
142 $this->tpl->setVariable(
'VAL_SWS', isset(
$values[$field]) ?
$values[$field] :
'--');
145 $this->tpl->setVariable(
'VAL_ROOM', isset(
$values[$field]) ?
$values[$field] :
'--');
148 $this->tpl->setVariable(
'VAL_CYCLE', isset(
$values[$field]) ?
$values[$field] :
'--');
169 $ilObjDataCache = $DIC[
'ilObjDataCache'];
172 $ilObjDataCache->preloadReferenceCache($a_rcrs);
175 include_once(
'./Modules/RemoteCourse/classes/class.ilObjRemoteCourse.php');
176 include_once(
'./Services/WebServices/ECS/classes/class.ilECSCommunityReader.php');
177 include_once
'./Services/WebServices/ECS/classes/class.ilECSImport.php';
181 foreach ($a_rcrs as $rcrs_ref_id) {
182 $obj_id = $ilObjDataCache->lookupObjId($rcrs_ref_id);
183 $obj_ids[$obj_id] = $ilObjDataCache->lookupObjId($rcrs_ref_id);
186 foreach ($obj_ids as $obj_id => $obj_id) {
187 $tmp_arr[
'obj_id'] = $obj_id;
189 $tmp_arr[
'title'] = $ilObjDataCache->lookupTitle($obj_id);
190 $tmp_arr[
'desc'] = $ilObjDataCache->lookupDescription($obj_id);
195 if ($tmp_arr[
'sid']) {
203 $tmp_arr[
'from'] = $participant->getParticipantName();
204 $tmp_arr[
'from_info'] = $participant->getDescription();
207 $tmp_arr[
'from'] = $this->lng->txt(
"ecs_server_deleted");
210 $tmp_arr[
'last_update'] = $ilObjDataCache->lookupLastUpdate($obj_id);
211 $content[] = $tmp_arr;
214 $this->
setData($content ? $content : array());
static getInstanceByServerId($a_server_id)
Get singleton instance.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
const MAPPING_IMPORT_RCRS
static _lookupMID($a_obj_id)
lookup owner mid
static _lookupTitle($a_id)
lookup object title
static getTypeIconPath($a_type, $a_obj_id, $a_size='small')
Get type icon path path Return image path for icon_xxx.pngs Or (if enabled) path to custom icon Depre...
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date public.
static _getAllReferences($a_id)
get all reference ids of object
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
static getAdvancedMDValuesForObjId($a_obj_id)
Get advanced metadata values for object id.
static _lookupObjId($a_id)
static lookupServerId($a_obj_id)
Lookup server id of imported content <type> $ilDB.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
static _lookupType($a_id, $a_reference=false)
lookup object type
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
addColumn( $a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
__construct($a_parent_obj, $a_parent_cmd='')
constructor