23 include_once(
"./classes/class.ilObjectGUI.php");
45 public function __construct($a_data, $a_id, $a_call_by_reference =
true, $a_prepare_output =
true)
50 $this->lng->loadLanguageModule(
'mcst');
62 global $rbacsystem,
$ilErr,$ilAccess;
64 $next_class = $this->ctrl->getNextClass($this);
65 $cmd = $this->ctrl->getCmd();
69 if(!$ilAccess->checkAccess(
'read',
'',$this->object->getRefId()))
71 $ilErr->raiseError($this->lng->txt(
'no_permission'),$ilErr->WARNING);
76 case 'ilpermissiongui':
77 $this->tabs_gui->setTabActive(
'perm_settings');
78 include_once(
"./classes/class.ilPermissionGUI.php");
80 $ret =& $this->ctrl->forwardCommand($perm_gui);
86 $cmd =
"editSettings";
103 global $rbacsystem, $ilAccess;
105 if ($rbacsystem->checkAccess(
"visible,read",$this->object->getRefId()))
107 $this->tabs_gui->addTarget(
"mcst_edit_settings",
108 $this->ctrl->getLinkTarget($this,
"editSettings"),
109 array(
"editSettings",
"view"));
112 if ($rbacsystem->checkAccess(
'edit_permission',$this->object->getRefId()))
114 $this->tabs_gui->addTarget(
"perm_settings",
115 $this->ctrl->getLinkTargetByClass(
'ilpermissiongui',
"perm"),
116 array(),
'ilpermissiongui');
125 $this->tabs_gui->setTabActive(
'mcst_edit_settings');
136 foreach ($this->settings->getPurposeSuffixes() as $purpose => $filetypes) {
137 $purposeSuffixes[$purpose] = explode(
",", preg_replace(
"/[^\w,]/",
"", strtolower($_POST[$purpose])));
140 $this->settings->setPurposeSuffixes($purposeSuffixes);
141 $this->settings->setDefaultAccess ($_POST[
"defaultaccess"]);
143 $this->settings->save();
147 $ilCtrl->redirect($this,
"view");
157 $ilCtrl->redirect($this,
"view");
166 include_once(
'Modules/MediaCast/classes/class.ilMediaCastSettings.php');
178 include_once(
'Services/Form/classes/class.ilPropertyFormGUI.php');
181 $form->setFormAction($this->ctrl->getFormAction($this));
182 $form->setTitle($this->lng->txt(
'mcst_file_extension_settings'));
183 $form->addCommandButton(
'saveSettings',$this->lng->txt(
'save'));
184 $form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
185 foreach ($this->settings->getPurposeSuffixes() as $purpose => $filetypes)
187 $text =
new ilTextInputGUI($lng->txt(
"mcst_".strtolower($purpose).
"_settings_title"),$purpose);
188 $text->
setValue(implode(
",",$filetypes));
189 $text->setInfo($lng->txt(
"mcst_".strtolower($purpose).
"_settings_info"));
190 $form->addItem($text);
194 $radio_option =
new ilRadioOption($lng->txt(
"mcst_visibility_users"),
"users");
195 $radio_group->addOption($radio_option);
196 $radio_option =
new ilRadioOption($lng->txt(
"mcst_visibility_public"),
"public");
197 $radio_group->addOption($radio_option);
198 $radio_group->
setInfo($lng->txt(
"mcst_news_item_visibility_info"));
199 $radio_group->setRequired(
false);
200 $radio_group->setValue($this->settings->getDefaultAccess());
201 #$ch->addSubItem($radio_group);
202 $form->addItem($radio_group);
203 $this->tpl->setContent($form->getHTML());