24 include_once(
'Services/Table/classes/class.ilTable2GUI.php');
25 include_once(
'classes/class.ilFormat.php');
55 $this->
addColumn($this->lng->txt(
'title'),
'title',
'25%');
56 $this->
addColumn($this->lng->txt(
'res_links_short'),
'link',
'25%');
57 $this->
addColumn($this->lng->txt(
'ecs_imported_from'),
'from',
'15%');
58 $this->
addColumn($this->lng->txt(
'ecs_meta_data'),
'md',
'25%');
59 $this->
addColumn($this->lng->txt(
'last_update'),
'last_update',
'10%');
60 $this->
setRowTemplate(
'tpl.content_row.html',
'Services/WebServices/ECS');
63 $this->
setFormAction($this->ctrl->getFormAction($a_parent_obj));
78 include_once(
'./classes/class.ilLink.php');
80 $this->tpl->setVariable(
'VAL_TITLE',$a_set[
'title']);
81 #$this->tpl->setVariable('VAL_LINK',ilLink::_getLink($a_set['ref_id'],'rcrs'));
82 $this->tpl->setVariable(
'VAL_DESC',$a_set[
'desc']);
83 $this->tpl->setVariable(
'VAL_REMOTE',$a_set[
'from']);
84 $this->tpl->setVariable(
'VAL_REMOTE_INFO',$a_set[
'from_info']);
85 $this->tpl->setVariable(
'TXT_EMAIL',$this->lng->txt(
'ecs_email'));
86 $this->tpl->setVariable(
'TXT_DNS',$this->lng->txt(
'ecs_dns'));
87 $this->tpl->setVariable(
'TXT_ABR',$this->lng->txt(
'ecs_abr'));
88 $this->tpl->setVariable(
'VAL_LAST_UPDATE',$a_set[
'last_update']);
93 $parent = $tree->getParentId($ref_id);
97 $this->tpl->setCurrentBlock(
'link');
99 $this->tpl->setVariable(
'LINK_CONTAINER',$p_title);
101 $this->tpl->parseCurrentBlock();
104 $this->tpl->setVariable(
'TXT_TERM',$this->lng->txt(
'ecs_field_term'));
105 $this->tpl->setVariable(
'TXT_CRS_TYPE',$this->lng->txt(
'ecs_field_courseType'));
106 $this->tpl->setVariable(
'TXT_CRS_ID',$this->lng->txt(
'ecs_field_courseID'));
107 $this->tpl->setVariable(
'TXT_CREDITS',$this->lng->txt(
'ecs_field_credits'));
108 $this->tpl->setVariable(
'TXT_ROOM',$this->lng->txt(
'ecs_field_room'));
109 $this->tpl->setVariable(
'TXT_CYCLE',$this->lng->txt(
'ecs_field_cycle'));
110 $this->tpl->setVariable(
'TXT_SWS',$this->lng->txt(
'ecs_field_semester_hours'));
111 $this->tpl->setVariable(
'TXT_START',$this->lng->txt(
'ecs_field_begin'));
112 $this->tpl->setVariable(
'TXT_END',$this->lng->txt(
'ecs_field_end'));
113 $this->tpl->setVariable(
'TXT_LECTURER',$this->lng->txt(
'ecs_field_lecturer'));
115 include_once(
'./Services/WebServices/ECS/classes/class.ilECSDataMappingSettings.php');
118 include_once(
'./Services/AdvancedMetaData/classes/class.ilAdvancedMDValues.php');
122 if($field = $settings->getMappingByECSName(
'lecturer'))
124 $this->tpl->setVariable(
'VAL_LECTURER',isset($values[$field]) ? $values[$field] :
'--');
126 if($field = $settings->getMappingByECSName(
'term'))
128 $this->tpl->setVariable(
'VAL_TERM',isset($values[$field]) ? $values[$field] :
'--');
130 if($field = $settings->getMappingByECSName(
'courseID'))
132 $this->tpl->setVariable(
'VAL_CRS_ID',isset($values[$field]) ? $values[$field] :
'--');
134 if($field = $settings->getMappingByECSName(
'courseType'))
136 $this->tpl->setVariable(
'VAL_CRS_TYPE',isset($values[$field]) ? $values[$field] :
'--');
138 if($field = $settings->getMappingByECSName(
'credits'))
140 $this->tpl->setVariable(
'VAL_CREDITS',isset($values[$field]) ? $values[$field] :
'--');
142 if($field = $settings->getMappingByECSName(
'semester_hours'))
144 $this->tpl->setVariable(
'VAL_SWS',isset($values[$field]) ? $values[$field] :
'--');
146 if($field = $settings->getMappingByECSName(
'room'))
148 $this->tpl->setVariable(
'VAL_ROOM',isset($values[$field]) ? $values[$field] :
'--');
150 if($field = $settings->getMappingByECSName(
'cycle'))
152 $this->tpl->setVariable(
'VAL_CYCLE',isset($values[$field]) ? $values[$field] :
'--');
154 if($field = $settings->getMappingByECSName(
'begin'))
158 if($field = $settings->getMappingByECSName(
'end'))
173 global $ilObjDataCache;
176 $ilObjDataCache->preloadReferenceCache($a_rcrs);
179 include_once(
'./Modules/RemoteCourse/classes/class.ilObjRemoteCourse.php');
180 include_once(
'./Services/WebServices/ECS/classes/class.ilECSCommunityReader.php');
192 foreach($a_rcrs as $rcrs_ref_id)
194 $obj_id = $ilObjDataCache->lookupObjId($rcrs_ref_id);
195 $obj_ids[$obj_id] = $ilObjDataCache->lookupObjId($rcrs_ref_id);
198 foreach($obj_ids as $obj_id => $obj_id)
200 $tmp_arr[
'obj_id'] = $obj_id;
201 $tmp_arr[
'title'] = $ilObjDataCache->lookupTitle($obj_id);
202 $tmp_arr[
'desc'] = $ilObjDataCache->lookupDescription($obj_id);
207 if(
$reader and ($participant =
$reader->getParticipantByMID($mid)))
209 $tmp_arr[
'from'] = $participant->getParticipantName();
210 $tmp_arr[
'from_info'] = $participant->getDescription();
212 $tmp_arr[
'last_update'] = $ilObjDataCache->lookupLastUpdate($obj_id);
213 $content[] = $tmp_arr;
216 $this->
setData($content ? $content : array());