35 include_once
"./Services/Object/classes/class.ilObjectGUI.php";
36 include_once
"./Modules/ILinc/classes/class.ilObjiLincClassroom.php";
52 $this->
id = $a_icla_id;
53 $this->parent = $a_icrs_id;
64 $this->lng->loadLanguageModule(
'ilinc');
66 $this->formaction = array();
67 $this->return_location = array();
68 $this->target_frame = array();
71 $this->sub_objects =
"";
93 return $this->tpl->setVariable(
'ADM_CONTENT', $this->form_gui->getHtml());
101 'instructoruserid' => 0,
106 include_once
'Modules/ILinc/classes/class.ilObjiLincCourse.php';
108 $data[
'akclassvalue1'] = $akclassvalues[0];
109 $data[
'akclassvalue2'] = $akclassvalues[1];
111 $this->form_gui->setValuesByArray(
$data );
123 if($this->form_gui->checkInput())
125 $_POST[
'Fobject'][
'title'] = $this->form_gui->getInput(
'title');
126 $_POST[
'Fobject'][
'desc'] = $this->form_gui->getInput(
'desc');
127 $_POST[
'Fobject'][
'instructoruserid'] = $this->form_gui->getInput(
'instructoruserid');
128 $_POST[
'Fobject'][
'alwaysopen'] = $this->form_gui->getInput(
'alwaysopen');
131 if($this->
ilias->getSetting(
'ilinc_akclassvalues_active'))
134 include_once
'Modules/ILinc/classes/class.ilObjiLincCourse.php';
137 $_POST[
'Fobject'][
'akclassvalue1'] = $akclassvalues[0];
138 $_POST[
'Fobject'][
'akclassvalue2'] = $akclassvalues[1];
143 $this->
object->ilincAPI->addClass($ilinc_course_id,
$_POST[
'Fobject']);
144 $response = $this->
object->ilincAPI->sendRequest(
'addClass');
145 if($response->isError())
147 $this->ilErr->raiseError($response->getErrorMsg(), $this->ilErr->MESSAGE);
153 $this->ctrl->redirectByClass(
'ilobjilinccoursegui');
157 if($this->
ilias->getSetting(
'ilinc_akclassvalues_active'))
160 include_once
'Modules/ILinc/classes/class.ilObjiLincCourse.php';
163 $_POST[
'akclassvalue1'] = $akclassvalues[0];
164 $_POST[
'akclassvalue2'] = $akclassvalues[1];
167 $this->form_gui->setValuesByPost();
168 return $this->tpl->setVariable(
'ADM_CONTENT', $this->form_gui->getHtml());
175 $url = $this->
object->joinClass($this->
ilias->account,
$_GET[
'class_id']);
179 $this->
ilias->raiseError($this->object->getErrorMsg(),$this->
ilias->error_obj->FATAL);
189 return $this->tpl->setVariable(
'ADM_CONTENT', $this->form_gui->getHtml());
195 'title' => $this->object->getTitle(),
196 'desc' => $this->
object->getDescription(),
197 'alwaysopen' => $this->
object->getStatus(),
198 'instructoruserid' => $this->
object->getDocentId()
202 include_once
'Modules/ILinc/classes/class.ilObjiLincCourse.php';
204 $data[
'akclassvalue1'] = $akclassvalues[0];
205 $data[
'akclassvalue2'] = $akclassvalues[1];
207 $this->form_gui->setValuesByArray(
$data );
212 include_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
215 $this->form_gui->setTableWidth(
'600');
216 if($a_mode ==
'create')
218 $this->form_gui->setTitle($this->lng->txt(
'icla_add'));
222 $this->form_gui->setTitle($this->lng->txt(
'icla_edit'));
227 $text_input =
new ilTextInputGUI($this->lng->txt(
'title'),
'title');
229 $this->form_gui->addItem($text_input);
233 $this->form_gui->addItem($text_area);
236 $sel =
new ilSelectInputGUI($this->lng->txt(ILINC_MEMBER_DOCENT),
'instructoruserid');
237 $docentlist = $this->
object->getDocentList();
238 $docent_options = array();
239 $docent_options[0] = $this->lng->txt(
'please_choose');
240 foreach((array)$docentlist as $id =>
$data)
242 $docent_options[$id] =
$data[
'fullname'];
244 $sel->setOptions($docent_options);
245 $this->form_gui->addItem($sel);
250 $ro =
new ilRadioOption($this->lng->txt(
'ilinc_classroom_open'), 1);
252 $ro =
new ilRadioOption($this->lng->txt(
'ilinc_classroom_closed'), 0);
254 $this->form_gui->addItem($rg);
257 if($this->
ilias->getSetting(
'ilinc_akclassvalues_active'))
259 $text_input =
new ilTextInputGUI($this->lng->txt(
'akclassvalue1'),
'akclassvalue1');
261 $this->form_gui->addItem($text_input);
263 $text_input =
new ilTextInputGUI($this->lng->txt(
'akclassvalue2'),
'akclassvalue2');
265 $this->form_gui->addItem($text_input);
269 if($a_mode ==
'create')
271 $this->ctrl->setParameter($this,
'mode',
'create');
272 $this->ctrl->setParameter($this,
'new_type',
'icla');
274 $this->form_gui->addCommandButton(
'save', $this->lng->txt(
'icla_add'));
275 $this->form_gui->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
276 $this->form_gui->setFormAction($this->ctrl->getFormAction($this,
'save'));
280 $this->ctrl->setParameter($this,
'class_id', $this->object->id);
282 $this->form_gui->addCommandButton(
'updateClassroom', $this->lng->txt(
'save'));
283 $this->form_gui->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
284 $this->form_gui->setFormAction($this->ctrl->getFormAction($this,
'updateClassroom'));
309 $obj_str =
"&class_id=".$this->object->id;
310 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
312 $cgui->setFormAction($this->
getFormAction(
"delete",$this->ctrl->getFormAction($this).$obj_str));
313 $cgui->setHeaderText($this->lng->txt(
"info_delete_sure"));
314 $cgui->setCancel($this->lng->txt(
"cancelDeleteClassroom"),
"cancel");
315 $cgui->setConfirm($this->lng->txt(
"confirmedDeleteClassroom"),
"confirm");
318 " ".$this->object->getTitle().
319 " ".$this->object->getDescription();
321 $cgui->addItem(
"id[]", $this->object->getId(), $caption);
332 if($this->form_gui->checkInput())
334 $this->
object->setTitle( $this->form_gui->getInput(
'title' ));
335 $this->
object->setDescription( $this->form_gui->getInput(
'desc') );
336 $this->
object->setDocentId( $this->form_gui->getInput(
'instructoruserid') );
337 $this->
object->setStatus( $this->form_gui->getInput(
'alwaysopen') );
339 if(!$this->object->update())
341 $this->ilErr->raiseError($this->object->getErrorMsg(), $this->ilErr->MESSAGE);
346 $this->ctrl->redirectByClass(
'ilobjilinccoursegui');
350 if($this->
ilias->getSetting(
'ilinc_akclassvalues_active'))
353 include_once
'Modules/ILinc/classes/class.ilObjiLincCourse.php';
356 $_POST[
'akclassvalue1'] = $akclassvalues[0];
357 $_POST[
'akclassvalue2'] = $akclassvalues[1];
360 $this->form_gui->setValuesByPost();
361 return $this->tpl->setVariable(
'ADM_CONTENT', $this->form_gui->getHtml());
367 $next_class = $this->ctrl->getNextClass($this);
368 $cmd = $this->ctrl->getCmd();
391 $this->ctrl->redirectByClass(
"ilobjilinccoursegui");
399 if (!$this->object->delete())
401 $msg = $this->
object->getErrorMsg();
405 $msg = $this->lng->txt(
'icla_deleted');
411 $this->ctrl->redirectByClass(
"ilobjilinccoursegui");
416 return $this->
object->result_msg;
427 $this->ctrl->redirectByClass(
"ilobjilinccoursegui");
This class represents an option in a radio group.
Class ilObjiLincClassroom.
confirmedDeleteClassroom()
public
static getImageTagByType($a_type, $a_path, $a_big=false)
Builds an html image tag TODO: function still in use, but in future use getImagePath and move HTML-Co...
cancel()
cancel is called when an operation is canceled, method links back public
updateClassroom()
updates class room on ilinc server
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...
getTabs(&$tabs_gui)
get tabs public
static _lookupObjectId($a_ref_id)
lookup object id
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
_lookupiCourseId($a_ref_id)
cancelDeleteClassroom()
cancel deletion of classroom object
Class ilObjectGUI Basic methods of all Output classes.
This class represents a text property in a property form.
redirection script todo: (a better solution should control the processing via a xml file) ...
static clear($a_var)
Unset a value.
Class ilObjiLincClassroomGUI.
prepareOutput()
prepare output
initSettingsForm($a_mode='create')
_getAKClassValues($a_course_obj_id)
This class represents a text area property in a property form.
ilObjiLincClassroomGUI($a_icla_id, $a_icrs_id, $a_call_by_reference=false, $a_prepare_output=false)
Constructor public 2 last parameters actually not used.
static redirect($a_script)
http redirect to other script
getFormAction($a_cmd, $a_formaction="")
get form action for command (command is method name without "Object", e.g.
removeClassroom($a_error=false)
display deletion confirmation screen only for referenced objects.
Confirmation screen class.