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)
143 $this->
object->createAuthResource();
162 if($ilAccess->checkAccess(
'visible',
'',$this->object->getRefId()))
164 $tabs_gui->addTarget(
"info_short",
165 $this->ctrl->getLinkTarget($this,
"infoScreen"));
168 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
170 $tabs_gui->addTarget(
"edit",
171 $this->ctrl->getLinkTarget($this,
"edit"),
175 if ($ilAccess->checkAccess(
'edit_permission',
'',$this->object->getRefId()))
177 $tabs_gui->addTarget(
"perm_settings",
178 $this->ctrl->getLinkTargetByClass(array(get_class($this),
'ilpermissiongui'),
"perm"),
179 array(
"perm",
"info",
"owner"),
'ilpermissiongui');
192 if($this->object->createAuthResource())
212 $this->ctrl->setCmd(
"showSummary");
213 $this->ctrl->setCmdClass(
"ilinfoscreengui");
227 global
$ilErr,$ilAccess,$ilUser;
229 if(!$ilAccess->checkAccess(
'visible',
'',$this->object->getRefId()))
231 $ilErr->raiseError($this->lng->txt(
'msg_no_perm_read'),$ilErr->MESSAGE);
234 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
237 include_once(
'./Services/WebServices/ECS/classes/class.ilECSImport.php');
238 include_once(
'./Services/WebServices/ECS/classes/class.ilECSExport.php');
240 if($ilUser->getId() == ANONYMOUS_USER_ID)
242 $info->addButton($this->lng->txt(
'rcrs_call'),
243 $this->
object->getRemoteLink(),
248 $info->addButton($this->lng->txt(
'rcrs_call'),
249 $this->ctrl->getLinkTarget($this,
'call'),
254 $info->addButton($this->lng->txt(
'rcrs_call'),
255 $this->
object->getRemoteLink());
258 $info->addSection($this->lng->txt(
'crs_general_info'));
259 $info->addProperty($this->lng->txt(
'title'),$this->
object->getTitle());
260 if(strlen($this->object->getOrganization()))
262 $info->addProperty($this->lng->txt(
'organization'),$this->
object->getOrganization());
264 if(strlen($this->object->getDescription()))
266 $info->addProperty($this->lng->txt(
'description'),$this->
object->getDescription());
268 if(strlen($loc = $this->object->getLocalInformation()))
270 $info->addProperty($this->lng->txt(
'rcrs_local_informations'),$this->
object->getLocalInformation());
277 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
279 'rcrs',$this->object->getId());
281 $record_gui->parse();
283 $this->ctrl->forwardCommand($info);
295 if(!$ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
297 $ilErr->raiseError($this->lng->txt(
'msg_no_perm_read'),$ilErr->MESSAGE);
299 $this->tabs_gui->setTabActive(
'edit');
302 $this->tpl->addBlockFile(
'ADM_CONTENT',
'adm_content',
'tpl.edit.html',
'Modules/RemoteCourse');
303 $this->tpl->setVariable(
'EDIT_TABLE',$this->form->getHTML());
317 if(!$ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
319 $ilErr->raiseError($this->lng->txt(
'msg_no_perm_read'),$ilErr->MESSAGE);
323 #$this->object->setAvailabilityType($_POST['activation_type']);
324 #$this->object->setStartingTime($_POST['start']);
325 #$this->object->setEndingTime($_POST['end']);
326 $this->
object->update();
329 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
331 'rcrs',$this->object->getId());
333 $record_gui->saveValues();
347 if(is_object($this->form))
352 $this->lng->loadLanguageModule(
'crs');
354 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
356 $this->form->setFormAction($this->ctrl->getFormAction($this));
357 $this->form->setTitle($this->lng->txt(
'rcrs_general_info'));
358 $this->form->addCommandButton(
'update',$this->lng->txt(
'save'));
359 $this->form->addCommandButton(
'edit',$this->lng->txt(
'cancel'));
362 $text->
setValue($this->object->getTitle());
364 $text->setMaxLength(128);
365 $text->setDisabled(
true);
366 $this->form->addItem($text);
377 $area =
new ilTextAreaInputGUI($this->lng->txt(
'rcrs_local_informations'),
'local_info');
378 $area->
setValue($this->object->getLocalInformation());
381 $this->form->addItem($area);
384 $radio_grp->
setValue($this->object->getAvailabilityType());
385 $radio_grp->setDisabled(
true);
388 $radio_grp->addOption($radio_opt);
391 $radio_grp->addOption($radio_opt);
398 $start->setShowTime(
true);
402 $end->setDisabled(
true);
403 $end->setShowTime(
true);
404 $radio_opt->addSubItem($end);
406 $radio_grp->addOption($radio_opt);
407 $this->form->addItem($radio_grp);
409 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
412 $record_gui->parse();
424 switch($this->object->getAvailabilityType())
427 return $this->lng->txt(
'offline');
430 return $this->lng->txt(
'crs_unlimited');