24 include_once(
'classes/class.ilObjectGUI.php');
43 public function __construct($a_data, $a_id, $a_call_by_reference =
true, $a_prepare_output =
true)
48 $this->lng->loadLanguageModule(
'rcrs');
49 $this->lng->loadLanguageModule(
'crs');
58 public static function _goto($a_target)
62 if ($ilAccess->checkAccess(
"visible",
"", $a_target))
64 $_GET[
"cmd"] =
"infoScreen";
65 $_GET[
"ref_id"] = $a_target;
66 include(
"repository.php");
69 else if ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID))
71 $_GET[
"cmd"] =
"frameset";
73 $_GET[
"ref_id"] = ROOT_FOLDER_ID;
76 include(
"repository.php");
80 $ilErr->raiseError($lng->txt(
"msg_no_perm_read"), $ilErr->FATAL);
92 global $rbacsystem,
$ilErr,$ilAccess;
94 $next_class = $this->ctrl->getNextClass($this);
95 $cmd = $this->ctrl->getCmd();
101 case 'ilinfoscreengui':
105 case 'ilpermissiongui':
106 $this->tabs_gui->setTabActive(
'perm_settings');
107 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
114 $cmd =
"editSettings";
134 include_once(
'./Services/WebServices/ECS/classes/class.ilECSExport.php');
135 include_once(
'./Services/WebServices/ECS/classes/class.ilECSImport.php');
137 if($ilUser->getId() == ANONYMOUS_USER_ID)
146 $this->
object->createAuthResource();
165 if($ilAccess->checkAccess(
'visible',
'',$this->object->getRefId()))
167 $tabs_gui->addTarget(
"info_short",
168 $this->ctrl->getLinkTarget($this,
"infoScreen"));
171 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
173 $tabs_gui->addTarget(
"edit",
174 $this->ctrl->getLinkTarget($this,
"edit"),
178 if ($ilAccess->checkAccess(
'edit_permission',
'',$this->object->getRefId()))
180 $tabs_gui->addTarget(
"perm_settings",
181 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"),
182 array(
"perm",
"info",
"owner"),
'ilpermissiongui');
195 if($this->object->createAuthResource())
215 $this->ctrl->setCmd(
"showSummary");
216 $this->ctrl->setCmdClass(
"ilinfoscreengui");
230 global
$ilErr,$ilAccess,$ilUser;
232 if(!$ilAccess->checkAccess(
'visible',
'',$this->object->getRefId()))
234 $ilErr->raiseError($this->lng->txt(
'msg_no_perm_read'),$ilErr->MESSAGE);
237 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
240 include_once(
'./Services/WebServices/ECS/classes/class.ilECSImport.php');
241 include_once(
'./Services/WebServices/ECS/classes/class.ilECSExport.php');
243 if($ilUser->getId() == ANONYMOUS_USER_ID)
245 $info->addButton($this->lng->txt(
'rcrs_call'),
246 $this->
object->getRemoteLink(),
253 $info->addButton($this->lng->txt(
'rcrs_call'),
254 $this->ctrl->getLinkTarget($this,
'call'),
259 $info->addButton($this->lng->txt(
'rcrs_call'),
260 $this->
object->getRemoteLink());
263 $info->addSection($this->lng->txt(
'crs_general_info'));
264 $info->addProperty($this->lng->txt(
'title'),$this->
object->getTitle());
265 if(strlen($this->object->getOrganization()))
267 $info->addProperty($this->lng->txt(
'organization'),$this->
object->getOrganization());
269 if(strlen($this->object->getDescription()))
271 $info->addProperty($this->lng->txt(
'description'),$this->
object->getDescription());
273 if(strlen($loc = $this->object->getLocalInformation()))
275 $info->addProperty($this->lng->txt(
'rcrs_local_informations'),$this->
object->getLocalInformation());
282 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
284 'rcrs',$this->object->getId());
286 $record_gui->parse();
288 $this->ctrl->forwardCommand($info);
300 if(!$ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
302 $ilErr->raiseError($this->lng->txt(
'msg_no_perm_read'),$ilErr->MESSAGE);
304 $this->tabs_gui->setTabActive(
'edit');
307 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.edit.html',
'Modules/RemoteCourse');
308 $this->tpl->setVariable(
'EDIT_TABLE',$this->form->getHTML());
322 if(!$ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
324 $ilErr->raiseError($this->lng->txt(
'msg_no_perm_read'),$ilErr->MESSAGE);
328 #$this->object->setAvailabilityType($_POST['activation_type']);
329 #$this->object->setStartingTime($_POST['start']);
330 #$this->object->setEndingTime($_POST['end']);
331 $this->
object->update();
334 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
336 'rcrs',$this->object->getId());
338 $record_gui->saveValues();
352 if(is_object($this->form))
357 $this->lng->loadLanguageModule(
'crs');
359 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
361 $this->form->setFormAction($this->ctrl->getFormAction($this));
362 $this->form->setTitle($this->lng->txt(
'rcrs_general_info'));
363 $this->form->addCommandButton(
'update',$this->lng->txt(
'save'));
364 $this->form->addCommandButton(
'edit',$this->lng->txt(
'cancel'));
367 $text->
setValue($this->object->getTitle());
369 $text->setMaxLength(128);
370 $text->setDisabled(
true);
371 $this->form->addItem($text);
382 $area =
new ilTextAreaInputGUI($this->lng->txt(
'rcrs_local_informations'),
'local_info');
383 $area->
setValue($this->object->getLocalInformation());
386 $this->form->addItem($area);
389 $radio_grp->
setValue($this->object->getAvailabilityType());
390 $radio_grp->setDisabled(
true);
393 $radio_grp->addOption($radio_opt);
396 $radio_grp->addOption($radio_opt);
403 $start->setShowTime(
true);
407 $end->setDisabled(
true);
408 $end->setShowTime(
true);
409 $radio_opt->addSubItem($end);
411 $radio_grp->addOption($radio_opt);
412 $this->form->addItem($radio_grp);
414 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
417 $record_gui->parse();
429 switch($this->object->getAvailabilityType())
432 return $this->lng->txt(
'offline');
435 return $this->lng->txt(
'crs_unlimited');