ILIAS  release_4-4 Revision
ilObjiLincClassroomGUI Class Reference

Class ilObjiLincClassroomGUI. More...

+ Inheritance diagram for ilObjiLincClassroomGUI:
+ Collaboration diagram for ilObjiLincClassroomGUI:

Public Member Functions

 ilObjiLincClassroomGUI ($a_icla_id, $a_icrs_id, $a_call_by_reference=false, $a_prepare_output=false)
 Constructor public 2 last parameters actually not used. More...
 
 assignObject ()
 
 create ()
 
 save ()
 save object public More...
 
 joinClassroom ()
 
 editClassroom ()
 
 getTabs (&$tabs_gui)
 get tabs public More...
 
 removeClassroom ($a_error=false)
 display deletion confirmation screen only for referenced objects. More...
 
 updateClassroom ()
 updates class room on ilinc server More...
 
executeCommand ()
 
 cancelDeleteClassroom ()
 cancel deletion of classroom object More...
 
 confirmedDeleteClassroom ()
 public More...
 
 getResultMsg ()
 
 cancel ()
 cancel is called when an operation is canceled, method links back public More...
 
- Public Member Functions inherited from ilObjectGUI
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public. More...
 
executeCommand ()
 execute command More...
 
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 getAdminTabs (&$tabs_gui)
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ($in_rep=false)
 cancel action and go back to previous page public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 editObject ()
 edit object More...
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 list childs of current object More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 

Protected Member Functions

 getDefaultValues ()
 
 getObjectValues ()
 
 initSettingsForm ($a_mode='create')
 
- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 
 prepareOutput ()
 prepare output More...
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 showMountWebfolderIcon ()
 
 setTabs ()
 set admin tabs public More...
 
 setAdminTabs ()
 set admin tabs public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste More...
 
 getTabs (&$tabs_gui)
 get tabs abstract method. More...
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table More...
 
 redirectToRefId ($a_ref_id, $a_cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current $_GET["ref_id"] value More...
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 setColumnSettings ($column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 

Private Attributes

 $form_gui = null
 

Additional Inherited Members

- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root. More...
 
- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 
 $ilias
 
 $objDefinition
 
 $tpl
 
 $tree
 
 $lng
 
 $data
 
 $object
 
 $ref_id
 
 $obj_id
 
 $maxcount
 
 $formaction
 
 $return_location
 
 $target_frame
 
 $tab_target_script
 
 $actions
 
 $sub_objects
 
 $omit_locator = false
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 

Detailed Description

Member Function Documentation

◆ assignObject()

ilObjiLincClassroomGUI::assignObject ( )

Definition at line 82 of file class.ilObjiLincClassroomGUI.php.

Referenced by ilObjiLincClassroomGUI().

83  {
84  $this->object = new ilObjiLincClassroom($this->id, $this->parent);
85  }
Class ilObjiLincClassroom.
+ Here is the caller graph for this function:

◆ cancel()

ilObjiLincClassroomGUI::cancel ( )

cancel is called when an operation is canceled, method links back public

Definition at line 423 of file class.ilObjiLincClassroomGUI.php.

References ilUtil\sendInfo().

424  {
425  ilUtil::sendInfo($this->lng->txt("msg_cancel"),true);
426 
427  $this->ctrl->redirectByClass("ilobjilinccoursegui");
428  }
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
+ Here is the call graph for this function:

◆ cancelDeleteClassroom()

ilObjiLincClassroomGUI::cancelDeleteClassroom ( )

cancel deletion of classroom object

public

Definition at line 385 of file class.ilObjiLincClassroomGUI.php.

References ilSession\clear(), and ilUtil\sendInfo().

386  {
387  ilSession::clear("saved_post");
388 
389  ilUtil::sendInfo($this->lng->txt("msg_cancel"),true);
390 
391  $this->ctrl->redirectByClass("ilobjilinccoursegui");
392  }
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static clear($a_var)
Unset a value.
+ Here is the call graph for this function:

◆ confirmedDeleteClassroom()

ilObjiLincClassroomGUI::confirmedDeleteClassroom ( )

public

Definition at line 397 of file class.ilObjiLincClassroomGUI.php.

References ilUtil\sendInfo().

398  {
399  if (!$this->object->delete())
400  {
401  $msg = $this->object->getErrorMsg();
402  }
403  else
404  {
405  $msg = $this->lng->txt('icla_deleted');
406  }
407 
408  // Feedback
409  ilUtil::sendInfo($msg,true);
410 
411  $this->ctrl->redirectByClass("ilobjilinccoursegui");
412  }
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
+ Here is the call graph for this function:

◆ create()

ilObjiLincClassroomGUI::create ( )

Definition at line 87 of file class.ilObjiLincClassroomGUI.php.

References getDefaultValues(), initSettingsForm(), and ilObjectGUI\prepareOutput().

88  {
89  $this->prepareOutput();
90 
91  $this->initSettingsForm('create');
92  $this->getDefaultValues();
93  return $this->tpl->setVariable('ADM_CONTENT', $this->form_gui->getHtml());
94  }
prepareOutput()
prepare output
+ Here is the call graph for this function:

◆ editClassroom()

ilObjiLincClassroomGUI::editClassroom ( )

Definition at line 185 of file class.ilObjiLincClassroomGUI.php.

References getObjectValues(), and initSettingsForm().

186  {
187  $this->initSettingsForm('edit');
188  $this->getObjectValues();
189  return $this->tpl->setVariable('ADM_CONTENT', $this->form_gui->getHtml());
190  }
+ Here is the call graph for this function:

◆ executeCommand()

& ilObjiLincClassroomGUI::executeCommand ( )

Definition at line 365 of file class.ilObjiLincClassroomGUI.php.

References $cmd.

366  {
367  $next_class = $this->ctrl->getNextClass($this);
368  $cmd = $this->ctrl->getCmd();
369 
370  switch($next_class)
371  {
372  default:
373  $this->$cmd();
374  break;
375  }
376 
377  return true;
378  }
$cmd
Definition: sahs_server.php:35

◆ getDefaultValues()

ilObjiLincClassroomGUI::getDefaultValues ( )
protected

Definition at line 96 of file class.ilObjiLincClassroomGUI.php.

References ilObjectGUI\$data, ilObjiLincCourse\_getAKClassValues(), and ilObject\_lookupObjectId().

Referenced by create().

97  {
98  $data = array(
99  'title' => '',
100  'desc' => '',
101  'instructoruserid' => 0,
102  'alwaysopen' => 1
103  );
104 
105  $icrs_obj_id = ilObject::_lookupObjectId( $this->parent );
106  include_once 'Modules/ILinc/classes/class.ilObjiLincCourse.php';
107  $akclassvalues = ilObjiLincCourse::_getAKClassValues( $icrs_obj_id );
108  $data['akclassvalue1'] = $akclassvalues[0];
109  $data['akclassvalue2'] = $akclassvalues[1];
110 
111  $this->form_gui->setValuesByArray( $data );
112  }
static _lookupObjectId($a_ref_id)
lookup object id
_getAKClassValues($a_course_obj_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getObjectValues()

ilObjiLincClassroomGUI::getObjectValues ( )
protected

Definition at line 192 of file class.ilObjiLincClassroomGUI.php.

References ilObjectGUI\$data, ilObjiLincCourse\_getAKClassValues(), and ilObject\_lookupObjectId().

Referenced by editClassroom().

193  {
194  $data = array(
195  'title' => $this->object->getTitle(),
196  'desc' => $this->object->getDescription(),
197  'alwaysopen' => $this->object->getStatus(),
198  'instructoruserid' => $this->object->getDocentId()
199  );
200 
201  $icrs_obj_id = ilObject::_lookupObjectId( $this->parent );
202  include_once 'Modules/ILinc/classes/class.ilObjiLincCourse.php';
203  $akclassvalues = ilObjiLincCourse::_getAKClassValues( $icrs_obj_id );
204  $data['akclassvalue1'] = $akclassvalues[0];
205  $data['akclassvalue2'] = $akclassvalues[1];
206 
207  $this->form_gui->setValuesByArray( $data );
208  }
static _lookupObjectId($a_ref_id)
lookup object id
_getAKClassValues($a_course_obj_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getResultMsg()

ilObjiLincClassroomGUI::getResultMsg ( )

Definition at line 414 of file class.ilObjiLincClassroomGUI.php.

Referenced by updateClassroom().

415  {
416  return $this->object->result_msg;
417  }
+ Here is the caller graph for this function:

◆ getTabs()

ilObjiLincClassroomGUI::getTabs ( $tabs_gui)

get tabs public

Parameters
objecttabs gui object

Definition at line 293 of file class.ilObjiLincClassroomGUI.php.

294  {
295  // tabs are defined manually here. The autogeneration via objects.xml will be deprecated in future
296  // for usage examples see ilObjGroupGUI or ilObjSystemFolderGUI
297  }

◆ ilObjiLincClassroomGUI()

ilObjiLincClassroomGUI::ilObjiLincClassroomGUI (   $a_icla_id,
  $a_icrs_id,
  $a_call_by_reference = false,
  $a_prepare_output = false 
)

Constructor public 2 last parameters actually not used.

Definition at line 47 of file class.ilObjiLincClassroomGUI.php.

References $ilCtrl, $ilErr, ilObjectGUI\$ilias, ilObjectGUI\$lng, ilObjectGUI\$objDefinition, ilObjectGUI\$tpl, ilObjectGUI\$tree, assignObject(), and ilObjectGUI\prepareOutput().

48  {
50 
51  $this->type = "icla";
52  $this->id = $a_icla_id;
53  $this->parent = $a_icrs_id;
54  $this->ilias =& $ilias;
55  $this->objDefinition =& $objDefinition;
56  $this->tpl =& $tpl;
57  $this->html = "";
58  $this->ctrl =& $ilCtrl;
59  $this->lng =& $lng;
60  $this->tree =& $tree;
61  $this->ilErr =& $ilErr;
62 
63  //$this->ctrl->saveParameter($this,'parent');
64  $this->lng->loadLanguageModule('ilinc');
65 
66  $this->formaction = array();
67  $this->return_location = array();
68  $this->target_frame = array();
69  //$this->tab_target_script = "adm_object.php";
70  $this->actions = "";
71  $this->sub_objects = "";
72 
73  //prepare output
74  if (false)
75  {
76  $this->prepareOutput();
77  }
78 
79  $this->assignObject();
80  }
global $ilCtrl
Definition: ilias.php:18
redirection script todo: (a better solution should control the processing via a xml file) ...
prepareOutput()
prepare output
+ Here is the call graph for this function:

◆ initSettingsForm()

ilObjiLincClassroomGUI::initSettingsForm (   $a_mode = 'create')
protected

Definition at line 210 of file class.ilObjiLincClassroomGUI.php.

References ilObjectGUI\$data, ilUtil\getTypeIconPath(), ilFormPropertyGUI\setDisabled(), ilFormPropertyGUI\setRequired(), and ilRadioGroupInputGUI\setValue().

Referenced by create(), editClassroom(), save(), and updateClassroom().

211  {
212  include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
213 
214  $this->form_gui = new ilPropertyFormGUI();
215  $this->form_gui->setTableWidth('600');
216  if($a_mode == 'create')
217  {
218  $this->form_gui->setTitle($this->lng->txt('icla_add'));
219  }
220  else
221  {
222  $this->form_gui->setTitle($this->lng->txt('icla_edit'));
223  }
224  $this->form_gui->setTitleIcon(ilUtil::getTypeIconPath('icla', 0));
225 
226  // Title
227  $text_input = new ilTextInputGUI($this->lng->txt('title'), 'title');
228  $text_input->setRequired(true);
229  $this->form_gui->addItem($text_input);
230 
231  // Description
232  $text_area = new ilTextAreaInputGUI($this->lng->txt('desc'), 'desc');
233  $this->form_gui->addItem($text_area);
234 
235  // Docentselection
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)
241  {
242  $docent_options[$id] = $data['fullname'];
243  }
244  $sel->setOptions($docent_options);
245  $this->form_gui->addItem($sel);
246 
247  // Open
248  $rg = new ilRadioGroupInputGUI($this->lng->txt('access'), 'alwaysopen');
249  $rg->setValue(0);
250  $ro = new ilRadioOption($this->lng->txt('ilinc_classroom_open'), 1);
251  $rg->addOption($ro);
252  $ro = new ilRadioOption($this->lng->txt('ilinc_classroom_closed'), 0);
253  $rg->addOption($ro);
254  $this->form_gui->addItem($rg);
255 
256  // Display akclassvalues
257  if($this->ilias->getSetting('ilinc_akclassvalues_active'))
258  {
259  $text_input = new ilTextInputGUI($this->lng->txt('akclassvalue1'), 'akclassvalue1');
260  $text_input->setDisabled(true);
261  $this->form_gui->addItem($text_input);
262 
263  $text_input = new ilTextInputGUI($this->lng->txt('akclassvalue2'), 'akclassvalue2');
264  $text_input->setDisabled(true);
265  $this->form_gui->addItem($text_input);
266  }
267 
268  // save and cancel commands
269  if($a_mode == 'create')
270  {
271  $this->ctrl->setParameter($this, 'mode', 'create');
272  $this->ctrl->setParameter($this, 'new_type', 'icla');
273 
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'));
277  }
278  else
279  {
280  $this->ctrl->setParameter($this, 'class_id', $this->object->id);
281 
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'));
285  }
286  }
This class represents an option in a radio group.
This class represents a selection list property in a property form.
This class represents a property form user interface.
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...
This class represents a property in a property form.
This class represents a text property in a property form.
redirection script todo: (a better solution should control the processing via a xml file) ...
This class represents a text area property in a property form.
setDisabled($a_disabled)
Set Disabled.
setRequired($a_required)
Set Required.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ joinClassroom()

ilObjiLincClassroomGUI::joinClassroom ( )

Definition at line 172 of file class.ilObjiLincClassroomGUI.php.

References $_GET, and ilUtil\redirect().

173  {
174  // join class
175  $url = $this->object->joinClass($this->ilias->account,$_GET['class_id']);
176 
177  if (!$url)
178  {
179  $this->ilias->raiseError($this->object->getErrorMsg(),$this->ilias->error_obj->FATAL);
180  }
181 
182  ilUtil::redirect(trim($url));
183  }
$_GET["client_id"]
redirection script todo: (a better solution should control the processing via a xml file) ...
static redirect($a_script)
http redirect to other script
+ Here is the call graph for this function:

◆ removeClassroom()

ilObjiLincClassroomGUI::removeClassroom (   $a_error = false)

display deletion confirmation screen only for referenced objects.

For user,role & rolt overwrite this function in the appropriate Object folders classes (ilObjUserFolderGUI,ilObjRoleFolderGUI)

public

Definition at line 306 of file class.ilObjiLincClassroomGUI.php.

References ilObjectGUI\getFormAction(), and ilUtil\getImageTagByType().

307  {
308  // display confirmation message
309  $obj_str = "&class_id=".$this->object->id;
310  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
311  $cgui = new ilConfirmationGUI();
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");
316 
317  $caption = ilUtil::getImageTagByType($this->object->getType(), $this->tpl->tplPath).
318  " ".$this->object->getTitle().
319  " ".$this->object->getDescription();
320 
321  $cgui->addItem("id[]", $this->object->getId(), $caption);
322  }
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...
getFormAction($a_cmd, $a_formaction="")
get form action for command (command is method name without "Object", e.g.
Confirmation screen class.
+ Here is the call graph for this function:

◆ save()

ilObjiLincClassroomGUI::save ( )

save object public

Definition at line 118 of file class.ilObjiLincClassroomGUI.php.

References $_POST, ilObjiLincCourse\_getAKClassValues(), ilObjiLincClassroom\_lookupiCourseId(), ilObject\_lookupObjectId(), initSettingsForm(), ilObjectGUI\prepareOutput(), and ilUtil\sendInfo().

119  {
120  $this->prepareOutput();
121 
122  $this->initSettingsForm('create');
123  if($this->form_gui->checkInput())
124  {
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');
129 
130  // Akclassvalues
131  if($this->ilias->getSetting('ilinc_akclassvalues_active'))
132  {
133  $icrs_obj_id = ilObject::_lookupObjectId( $this->parent );
134  include_once 'Modules/ILinc/classes/class.ilObjiLincCourse.php';
135  $akclassvalues = ilObjiLincCourse::_getAKClassValues( $icrs_obj_id );
136 
137  $_POST['Fobject']['akclassvalue1'] = $akclassvalues[0];
138  $_POST['Fobject']['akclassvalue2'] = $akclassvalues[1];
139  }
140 
141  $ilinc_course_id = ilObjiLincClassroom::_lookupiCourseId( $this->parent );
142 
143  $this->object->ilincAPI->addClass($ilinc_course_id, $_POST['Fobject']);
144  $response = $this->object->ilincAPI->sendRequest('addClass');
145  if($response->isError())
146  {
147  $this->ilErr->raiseError($response->getErrorMsg(), $this->ilErr->MESSAGE);
148  }
149 
150  // Always send a message
151  ilUtil::sendInfo($response->getResultMsg(), true);
152 
153  $this->ctrl->redirectByClass('ilobjilinccoursegui');
154  }
155  else
156  {
157  if($this->ilias->getSetting('ilinc_akclassvalues_active'))
158  {
159  $icrs_obj_id = ilObject::_lookupObjectId( $this->parent );
160  include_once 'Modules/ILinc/classes/class.ilObjiLincCourse.php';
161  $akclassvalues = ilObjiLincCourse::_getAKClassValues( $icrs_obj_id );
162 
163  $_POST['akclassvalue1'] = $akclassvalues[0];
164  $_POST['akclassvalue2'] = $akclassvalues[1];
165  }
166 
167  $this->form_gui->setValuesByPost();
168  return $this->tpl->setVariable('ADM_CONTENT', $this->form_gui->getHtml());
169  }
170  }
$_POST['username']
Definition: cron.php:12
static _lookupObjectId($a_ref_id)
lookup object id
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
redirection script todo: (a better solution should control the processing via a xml file) ...
prepareOutput()
prepare output
_getAKClassValues($a_course_obj_id)
+ Here is the call graph for this function:

◆ updateClassroom()

ilObjiLincClassroomGUI::updateClassroom ( )

updates class room on ilinc server

public

Definition at line 329 of file class.ilObjiLincClassroomGUI.php.

References $_POST, ilObjiLincCourse\_getAKClassValues(), ilObject\_lookupObjectId(), getResultMsg(), initSettingsForm(), and ilUtil\sendInfo().

330  {
331  $this->initSettingsForm('edit');
332  if($this->form_gui->checkInput())
333  {
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') );
338 
339  if(!$this->object->update())
340  {
341  $this->ilErr->raiseError($this->object->getErrorMsg(), $this->ilErr->MESSAGE);
342  }
343 
344  ilUtil::sendInfo($this->getResultMsg(), true);
345 
346  $this->ctrl->redirectByClass('ilobjilinccoursegui');
347  }
348  else
349  {
350  if($this->ilias->getSetting('ilinc_akclassvalues_active'))
351  {
352  $icrs_obj_id = ilObject::_lookupObjectId( $this->parent );
353  include_once 'Modules/ILinc/classes/class.ilObjiLincCourse.php';
354  $akclassvalues = ilObjiLincCourse::_getAKClassValues( $icrs_obj_id );
355 
356  $_POST['akclassvalue1'] = $akclassvalues[0];
357  $_POST['akclassvalue2'] = $akclassvalues[1];
358  }
359 
360  $this->form_gui->setValuesByPost();
361  return $this->tpl->setVariable('ADM_CONTENT', $this->form_gui->getHtml());
362  }
363  }
$_POST['username']
Definition: cron.php:12
static _lookupObjectId($a_ref_id)
lookup object id
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
redirection script todo: (a better solution should control the processing via a xml file) ...
_getAKClassValues($a_course_obj_id)
+ Here is the call graph for this function:

Field Documentation

◆ $form_gui

ilObjiLincClassroomGUI::$form_gui = null
private

Definition at line 40 of file class.ilObjiLincClassroomGUI.php.


The documentation for this class was generated from the following file: