4include_once(
'./Services/Table/classes/class.ilTable2GUI.php');
 
   15        public function __construct($a_parent_obj, $a_parent_cmd, $a_content_obj, $a_group_obj)
 
   22                parent::__construct($a_parent_obj, $a_parent_cmd);              
 
   25                $this->lng->loadLanguageModule($this->type);            
 
   31                $this->
addColumn($this->lng->txt(
'title'), 
'title');
 
   32                $this->
addColumn($this->lng->txt(
'path'), 
'path');
 
   37                $this->
setTitle($this->lng->txt(
'crs_grp_assign_crs').
' ('.$a_group_obj->getTitle().
')');               
 
   39                $this->
setRowTemplate(
"tpl.crs_grp_select_crs.html",
"Modules/Course");
 
   40                $this->
setFormAction($this->ctrl->getFormAction($a_parent_obj));
 
   42                $this->
addMultiCommand(
'assignCourse', $this->lng->txt(
'grouping_change_assignment'));                                  
 
   45                $this->
getItems($a_content_obj, $a_group_obj);
 
   48        protected function getItems($a_content_obj, $a_group_obj)
 
   55                $items_obj_id = array();
 
   61                        $items_obj_id[] = $obj_id;
 
   63                $items_obj_id = 
ilUtil::_sortIds($items_obj_id,
'object_data',
'title',
'obj_id');
 
   65                $assigned_ids = array();
 
   66                $assigned = $a_group_obj->getAssignedItems();
 
   69                        foreach($assigned as $item)
 
   71                                $assigned_ids[] = $item[
'target_ref_id'];
 
   76                foreach($items_obj_id as $obj_id)
 
   78                        $item_id = $items_ids[$obj_id];
 
   79                        if($tree->checkForParentType($item_id,
'adm'))
 
   86                        $data[] = array(
'id' => $item_id,
 
   89                                'path' => $this->
__formatPath($tree->getPathFull($item_id)),
 
   90                                'assigned' => in_array($item_id, $assigned_ids));
 
   99                foreach($a_path_arr as 
$data)
 
  117                $this->tpl->setVariable(
"ID", $a_set[
"id"]);
 
  118                $this->tpl->setVariable(
"TXT_TITLE", $a_set[
"title"]);
 
  119                $this->tpl->setVariable(
"TXT_PATH", $a_set[
"path"]);
 
  121                if($a_set[
"assigned"])
 
  123                        $this->tpl->setVariable(
"STATUS_CHECKED", 
" checked=\"checked\"");
 
An exception for terminatinating execution or to throw for unit testing.
fillRow($a_set)
Standard Version of Fill Row.
__formatPath($a_path_arr)
getItems($a_content_obj, $a_group_obj)
__construct($a_parent_obj, $a_parent_cmd, $a_content_obj, $a_group_obj)
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
static _lookupDescription($a_id)
lookup object description
static _lookupType($a_id, $a_reference=false)
lookup object type
addColumn($a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
setData($a_data)
set table data @access public
setRowTemplate($a_template, $a_template_dir="")
Set row template.
setLimit($a_limit=0, $a_default_limit=0)
set max.
addMultiCommand($a_cmd, $a_text)
Add Command button.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
static _sortIds($a_ids, $a_table, $a_field, $a_id_name)
Function that sorts ids by a given table field using WHERE IN E.g: __sort(array(6,...
static _getObjectsByOperations($a_obj_type, $a_operation, $a_usr_id=0, $limit=0)
Get all objects of a specific type and check access This function is not recursive,...