4include_once 
'./Services/Table/classes/class.ilTable2GUI.php';
 
    5require_once(
'./Services/Repository/classes/class.ilObjectPlugin.php');
 
   23    public function __construct($a_parent_obj, $a_parent_cmd = 
"", $a_node_id, $a_mode)
 
   25        parent::__construct($a_parent_obj, $a_parent_cmd);
 
   30        $this->node_id = $a_node_id;
 
   31        $this->mode = $a_mode;
 
   53        $this->
setData($a_collection->getTableGUIData($this->getNode()));
 
   59            $this->
addMultiCommand(
'releaseMaterials', $this->lng->txt(
'trac_release_materials'));
 
   61            foreach ($this->row_data as $item) {
 
   62                if ($item[
"grouped"]) {
 
   63                    $this->
addCommandButton(
'saveObligatoryMaterials', $this->lng->txt(
'trac_group_materials_save'));
 
   76        global $objDefinition, $ilAccess;
 
   78        include_once 
'./Services/Link/classes/class.ilLink.php';
 
   80        $this->tpl->setCurrentBlock(
'item_row');
 
   81        $this->tpl->setVariable(
'ITEM_ID', $a_set[
'id']);
 
   82        $this->tpl->setVariable(
'COLL_TITLE', $a_set[
'title']);
 
   83        $this->tpl->setVariable(
'COLL_DESC', $a_set[
'description']);
 
   85        if ($objDefinition->isPluginTypeName($a_set[
"type"])) {
 
   88            $alt = $this->lng->txt(
'obj_' . $a_set[
'type']);
 
   90        $this->tpl->setVariable(
'ALT_IMG', $alt);
 
   95            if ($a_set[
'ref_id']) {
 
   96                $this->tpl->setVariable(
'COLL_LINK', 
ilLink::_getLink($a_set[
'ref_id'], $a_set[
'type']));
 
   99                include_once 
'./Services/Tree/classes/class.ilPathGUI.php';
 
  101                $this->tpl->setVariable(
'COLL_PATH', $this->lng->txt(
'path') . 
': ' . 
$path->getPath($this->getNode(), $a_set[
'ref_id']));
 
  104                if ($a_set[
'grouped'] ||
 
  105                    $a_set[
'group_item']) {
 
  107                    $mode_suffix = 
'_INLINE';
 
  109                    if (!$a_set[
'group_item']) {
 
  110                        $this->tpl->setVariable(
"COLL_MODE", 
"");
 
  113                include_once 
'./Services/Tracking/classes/class.ilLearningProgressAccess.php';
 
  115                    $lp_settings_link = 
ilLink::_getLink($a_set[
'ref_id'], $a_set[
'type'], array(
'gotolp'=>1));
 
  116                    $a_set[
"mode"] = 
'<a href="' . $lp_settings_link . 
'">' . $a_set[
'mode'] . 
'</a>'; 
 
  119                $mode = $a_set[
'mode_id'];
 
  121                    $this->tpl->setVariable(
"COLL_MODE" . $mode_suffix, $a_set[
'mode']);
 
  123                    $this->tpl->setVariable(
"COLL_MODE" . $mode_suffix, 
"");
 
  124                    $this->tpl->setVariable(
"COLL_MODE_DEACTIVATED" . $mode_suffix, $a_set[
'mode']);
 
  126                if ($a_set[
"anonymized"]) {
 
  127                    $this->tpl->setVariable(
"ANONYMIZED" . $mode_suffix, $this->lng->txt(
'trac_anonymized_info_short'));
 
  131                    $this->tpl->setVariable(
"COLL_MODE_LABEL", $this->lng->txt(
"trac_mode"));
 
  135            $this->tpl->setVariable(
'COLL_LINK', $a_set[
'url']);
 
  139                $this->tpl->setCurrentBlock(
"tlt");
 
  140                $this->tpl->setVariable(
"TXT_MONTH", $this->lng->txt(
'md_months'));
 
  141                $this->tpl->setVariable(
"TXT_DAYS", $this->lng->txt(
'md_days'));
 
  142                $this->tpl->setVariable(
"TXT_TIME", $this->lng->txt(
'md_time'));
 
  143                $this->tpl->setVariable(
"TLT_HINT", 
'(hh:mm)');
 
  146                $mon = floor($a_set[
"tlt"]/(60*60*24*30));
 
  147                $tlt = $a_set[
"tlt"]%(60*60*24*30);
 
  148                $day = floor($tlt/(60*60*24));
 
  149                $tlt = $tlt%(60*60*24);
 
  150                $hr = floor($tlt/(60*60));
 
  152                $min = floor($tlt/60);
 
  155                for (
$i = 0;
$i <= 24;
$i++) {
 
  158                $this->tpl->setVariable(
 
  163                for (
$i = 0;
$i <= 31;
$i++) {
 
  166                $this->tpl->setVariable(
 
  172                    'tlt[' . $a_set[
'id'] . 
']',
 
  180                $this->tpl->parseCurrentBlock();
 
  185        $this->tpl->setVariable(
 
  191        $this->tpl->setVariable(
 
  194                ? $this->lng->txt(
'trac_assigned')
 
  195                : $this->lng->txt(
'trac_not_assigned')
 
  197        $this->tpl->parseCurrentBlock();
 
  201        foreach ((array) $a_set[
'grouped'] as $item) {
 
  202            $item[
'group_item'] = 
true;
 
  207        if (is_array($a_set[
'grouped']) && count($a_set[
'grouped'])) {
 
  208            $this->tpl->setCurrentBlock(
'num_passed_items');
 
  209            $this->tpl->setVariable(
'MIN_PASSED_TXT', $this->lng->txt(
'trac_min_passed'));
 
  210            $this->tpl->setVariable(
'NUM_OBLIGATORY', $a_set[
'num_obligatory']);
 
  211            $this->tpl->setVariable(
'GRP_ID', $a_set[
'grouping_id']);
 
  212            $this->tpl->parseCurrentBlock();
 
  220        $this->
setFormAction($ilCtrl->getFormAction($this->getParentObject()));
 
  224                $this->
setRowTemplate(
'tpl.lp_collection_row.html', 
'Services/Tracking');
 
  225                $this->
setTitle($this->lng->txt(
'trac_lp_determination'));
 
  226                $this->
setDescription($this->lng->txt(
'trac_lp_determination_info_crs'));
 
  230                $this->
setRowTemplate(
'tpl.lp_collection_row.html', 
'Services/Tracking');
 
  231                $this->
setTitle($this->lng->txt(
'trac_lp_determination_tutor'));
 
  232                $this->
setDescription($this->lng->txt(
'trac_lp_determination_info_crs_tutor'));
 
  236                $this->
setRowTemplate(
'tpl.lp_collection_scorm_row.html', 
'Services/Tracking');
 
  237                $this->
setTitle($this->lng->txt(
'trac_lp_determination'));
 
  238                $this->
setDescription($this->lng->txt(
'trac_lp_determination_info_sco'));
 
  242                $this->
setRowTemplate(
'tpl.lp_collection_subitem_row.html', 
'Services/Tracking');
 
  243                $this->
setTitle($this->lng->txt(
'trac_lp_determination'));
 
  244                $this->
setDescription($this->lng->txt(
'trac_lp_determination_info_crs'));
 
  245                $this->lng->loadLanguageModule(
"meta");
 
  251                $this->
setRowTemplate(
'tpl.lp_collection_subitem_row.html', 
'Services/Tracking');
 
  252                $this->
setTitle($this->lng->txt(
'trac_lp_determination'));
 
  253                $this->
setDescription($this->lng->txt(
'trac_lp_determination_info_mob'));
 
  258        $this->
addColumn($this->lng->txt(
'item'), 
'title', 
'50%');
 
  264            $this->
addColumn($this->lng->txt(
'trac_mode'), 
'mode');
 
  266            $this->
addColumn($this->lng->txt(
'meta_typical_learning_time'), 
'tlt');
 
  270            $this->
addMultiCommand(
'assign', $this->lng->txt(
'trac_collection_assign'));
 
  271            $this->
addMultiCommand(
'deassign', $this->lng->txt(
'trac_collection_deassign'));
 
  272            $this->
addColumn($this->lng->txt(
'trac_determines_learning_progress'), 
'status');
 
  274            $this->
addMultiCommand(
'assign', $this->lng->txt(
'trac_manual_display'));
 
  275            $this->
addMultiCommand(
'deassign', $this->lng->txt(
'trac_manual_no_display'));
 
  276            $this->
addColumn($this->lng->txt(
'trac_manual_is_displayed'), 
'status');
 
  279        $this->
enable(
'select_all');
 
  283            $this->
addMultiCommand(
'groupMaterials', $this->lng->txt(
'trac_group_materials'));
 
sprintf('%.4f', $callTime)
if(!isset( $_REQUEST[ 'ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
An exception for terminatinating execution or to throw for unit testing.
static hasGroupedItems($a_obj_id)
parse(ilLPCollection $a_collection)
Read and parse items.
fillRow($a_set)
Fill template row.
__construct($a_parent_obj, $a_parent_cmd="", $a_node_id, $a_mode)
Constructor.
getNode()
Get node id of current learning progress item.
LP collection base class.
const LP_MODE_COLLECTION_TLT
const LP_MODE_DEACTIVATED
const LP_MODE_COLLECTION_MANUAL
const LP_MODE_MANUAL_BY_TUTOR
const LP_MODE_COLLECTION_MOBS
static checkPermission($a_permission, $a_ref_id, $a_user_id=null)
wrapper for rbac access checks
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
static lookupTxtById($plugin_id, $lang_var)
static _lookupObjId($a_id)
static _getIcon( $a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
Creates a path for a start and endnode.
setShowRowsSelector($a_value)
Toggle rows-per-page selector.
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.
addMultiCommand($a_cmd, $a_text)
Add Command button.
setSelectAllCheckbox($a_select_all_checkbox)
Set the name of the checkbox that should be toggled with a select all button.
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.
setDescription($a_val)
Set description.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
enable($a_module_name)
enables particular modules of table
static formSelect( $selected, $varname, $options, $multiple=false, $direct_text=false, $size="0", $style_class="", $attribs="", $disabled=false)
Builds a select form field with options and shows the selected option first.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static makeTimeSelect($prefix, $short=true, $hour="", $minute="", $second="", $a_use_default=true, $a_further_options=array())
Creates a combination of HTML selects for time inputs.