/** * Constructor */ function __construct($a_parent_obj, $a_parent_cmd, array $a_preselect = null, $a_load_items = true) { global $ilCtrl, $lng; $this->preselected = $a_preselect; $this->setId("lpobjstatdlytbl"); parent::__construct($a_parent_obj, $a_parent_cmd); $this->setShowRowsSelector(true); // $this->setLimit(ilSearchSettings::getInstance()->getMaxHits()); $this->initFilter(); $this->addColumn("", "", "1", true); $this->addColumn($lng->txt("trac_title"), "title"); $this->addColumn($lng->txt("object_id"), "obj_id"); for ($loop = 0; $loop < 24; $loop += 2) { $this->addColumn(str_pad($loop, 2, "0", STR_PAD_LEFT) . ":00-<br />" . str_pad($loop + 2, 2, "0", STR_PAD_LEFT) . ":00 ", "hour" . $loop, "", false, "ilRight"); } $this->addColumn($lng->txt("total"), "sum", "", false, "ilRight"); $this->setTitle($this->lng->txt("trac_object_stat_daily")); // $this->setSelectAllCheckbox("item_id"); $this->addMultiCommand("showDailyGraph", $lng->txt("trac_show_graph")); $this->setResetCommand("resetDailyFilter"); $this->setFilterCommand("applyDailyFilter"); $this->setFormAction($ilCtrl->getFormAction($a_parent_obj, $a_parent_cmd)); $this->setRowTemplate("tpl.lp_object_statistics_daily_row.html", "Services/Tracking"); $this->setEnableHeader(true); $this->setEnableNumInfo(true); $this->setEnableTitle(true); $this->setDefaultOrderField("title"); $this->setDefaultOrderDirection("asc"); $this->setExportFormats(array(self::EXPORT_EXCEL, self::EXPORT_CSV)); if ($a_load_items) { $this->getItems(); } }
/** * Constructor */ function __construct($a_parent_obj, $a_parent_cmd, array $a_preselect = null, $a_load_items = true) { global $ilCtrl, $lng; $this->preselected = $a_preselect; $this->setId("lpobjstattypetbl"); parent::__construct($a_parent_obj, $a_parent_cmd); $this->initFilter(); $this->addColumn("", "", "1", true); $this->addColumn($lng->txt("type"), "title"); foreach ($this->getMonthsYear() as $num => $caption) { $this->addColumn($caption, "month_" . $num, "", false, "ilRight"); } if ($this->filter["year"] == date("Y")) { $this->addColumn($lng->txt("trac_current"), "month_live", "", false, "ilRight"); } $this->setTitle($this->lng->txt("trac_object_stat_types")); // $this->setSelectAllCheckbox("item_id"); $this->addMultiCommand("showTypesGraph", $lng->txt("trac_show_graph")); $this->setResetCommand("resetTypesFilter"); $this->setFilterCommand("applyTypesFilter"); $this->setFormAction($ilCtrl->getFormAction($a_parent_obj, $a_parent_cmd)); $this->setRowTemplate("tpl.lp_object_statistics_types_row.html", "Services/Tracking"); $this->setEnableHeader(true); $this->setEnableNumInfo(true); $this->setEnableTitle(true); $this->setDefaultOrderField("title"); $this->setDefaultOrderDirection("asc"); $this->setLimit(9999); $this->setExportFormats(array(self::EXPORT_EXCEL, self::EXPORT_CSV)); include_once "./Services/Tracking/classes/class.ilLPObjSettings.php"; if ($a_load_items) { $this->getItems(); } }
/** * Constructor */ function __construct($a_parent_obj, $a_parent_cmd, array $a_preselect = null, $a_load_items = true) { global $ilCtrl, $lng; $this->preselected = $a_preselect; $this->setId("lpobjstattbl"); parent::__construct($a_parent_obj, $a_parent_cmd); $this->setShowRowsSelector(true); // $this->setLimit(ilSearchSettings::getInstance()->getMaxHits()); $this->initFilter(); $this->addColumn("", "", "1", true); $this->addColumn($lng->txt("trac_title"), "title"); $this->addColumn($lng->txt("object_id"), "obj_id"); if (strpos($this->filter["yearmonth"], "-") === false) { foreach ($this->getMonthsYear($this->filter["yearmonth"]) as $num => $caption) { $this->addColumn($caption, "month_" . $num, "", false, "ilRight"); } } $this->addColumn($lng->txt("total"), "total", "", false, "ilRight"); $this->setTitle($this->lng->txt("trac_object_stat_access")); // $this->setSelectAllCheckbox("item_id"); $this->addMultiCommand("showAccessGraph", $lng->txt("trac_show_graph")); $this->setResetCommand("resetAccessFilter"); $this->setFilterCommand("applyAccessFilter"); $this->setFormAction($ilCtrl->getFormAction($a_parent_obj, $a_parent_cmd)); $this->setRowTemplate("tpl.lp_object_statistics_row.html", "Services/Tracking"); $this->setEnableHeader(true); $this->setEnableNumInfo(true); $this->setEnableTitle(true); $this->setDefaultOrderField("title"); $this->setDefaultOrderDirection("asc"); $this->setExportFormats(array(self::EXPORT_EXCEL, self::EXPORT_CSV)); if ($a_load_items) { $this->getItems(); } }
/** * Constructor */ function __construct($a_parent_obj, $a_parent_cmd, $ref_id) { global $ilCtrl, $lng, $tree; $this->setId("trsmtx_" . $ref_id); $this->ref_id = $ref_id; $this->obj_id = ilObject::_lookupObjId($ref_id); $this->in_group = $tree->checkForParentType($this->ref_id, "grp"); if ($this->in_group) { $this->in_group = ilObject::_lookupObjId($this->in_group); } else { $this->in_course = $tree->checkForParentType($this->ref_id, "crs"); if ($this->in_course) { $this->in_course = ilObject::_lookupObjId($this->in_course); } } // has to be before constructor to work $this->initFilter(); parent::__construct($a_parent_obj, $a_parent_cmd); $this->setLimit(9999); $this->parseTitle($this->obj_id, "trac_matrix"); $this->setEnableHeader(true); $this->setFormAction($ilCtrl->getFormActionByClass(get_class($this))); $this->setRowTemplate("tpl.user_object_matrix_row.html", "Services/Tracking"); $this->setDefaultOrderField("login"); $this->setDefaultOrderDirection("asc"); $this->setShowTemplates(true); $this->addColumn($this->lng->txt("login"), "login"); $labels = $this->getSelectableColumns(); $selected = $this->getSelectedColumns(); foreach ($selected as $c) { $title = $labels[$c]["txt"]; if (isset($labels[$c]["no_permission"]) && (bool) $labels[$c]["no_permission"]) { $title .= " (" . $lng->txt("status_no_permission") . ")"; } $tooltip = ""; if (isset($labels[$c]["icon"])) { $alt = $lng->txt($labels[$c]["type"]); $icon = '<img src="' . $labels[$c]["icon"] . '" alt="' . $alt . '" />'; if (sizeof($selected) > 5) { $tooltip = $title; $title = $icon; } else { $title = $icon . ' ' . $title; } } if (isset($labels[$c]["id"])) { $sort_id = $labels[$c]["id"]; } else { // list cannot be sorted by udf fields (separate query) $sort_id = substr($c, 0, 4) == "udf_" ? "" : $c; } $this->addColumn($title, $sort_id, "", false, "", $tooltip); } $this->setExportFormats(array(self::EXPORT_CSV, self::EXPORT_EXCEL)); }
/** * Constructor */ function __construct($a_parent_obj, $a_parent_cmd, $a_obj_id, $a_ref_id, $a_print_view = false) { global $ilCtrl, $lng, $tree, $rbacsystem; $this->setId("troup"); $this->obj_id = $a_obj_id; $this->ref_id = $a_ref_id; $this->type = ilObject::_lookupType($a_obj_id); $this->in_group = $tree->checkForParentType($this->ref_id, "grp"); if ($this->in_group) { $this->in_group = ilObject::_lookupObjId($this->in_group); } else { $this->in_course = $tree->checkForParentType($this->ref_id, "crs"); if ($this->in_course) { $this->in_course = ilObject::_lookupObjId($this->in_course); } } parent::__construct($a_parent_obj, $a_parent_cmd); $this->parseTitle($a_obj_id, "trac_participants"); if ($a_print_view) { $this->setPrintMode(true); } $labels = $this->getSelectableColumns(); foreach ($this->getSelectedColumns() as $c) { $first = $c; // list cannot be sorted by udf fields (separate query) // because of pagination only core fields can be sorted $sort_id = substr($c, 0, 4) == "udf_" ? "" : $c; $this->addColumn($labels[$c]["txt"], $sort_id); } if (!$this->getPrintMode()) { $this->addColumn($this->lng->txt("actions"), ""); } $this->setExternalSorting(true); $this->setExternalSegmentation(true); $this->setEnableHeader(true); $this->setFormAction($ilCtrl->getFormActionByClass(get_class($this))); $this->setRowTemplate("tpl.object_users_props_row.html", "Services/Tracking"); $this->setEnableTitle(true); $this->setShowTemplates(true); $this->setExportFormats(array(self::EXPORT_CSV, self::EXPORT_EXCEL)); if ($first) { $this->setDefaultOrderField($first); $this->setDefaultOrderDirection("asc"); } $this->initFilter(); $this->getItems(); // #13807 $this->has_edit = $rbacsystem->checkAccess('edit_learning_progress', $this->ref_id); }
/** * Constructor */ function __construct($a_parent_obj, $a_parent_cmd) { global $ilCtrl, $lng; $this->setId("lpobjstattbl"); parent::__construct($a_parent_obj, $a_parent_cmd); $this->addColumn("", "", "1", true); $this->addColumn($lng->txt("month"), "month"); $this->addColumn($lng->txt("count"), "count", "", false, "ilRight"); $this->setTitle($this->lng->txt("trac_object_stat_admin")); // $this->setSelectAllCheckbox("item_id"); $this->addMultiCommand("confirmDeleteData", $lng->txt("trac_delete_data")); $this->setFormAction($ilCtrl->getFormAction($a_parent_obj, $a_parent_cmd)); $this->setRowTemplate("tpl.lp_object_statistics_admin_row.html", "Services/Tracking"); $this->setEnableHeader(true); $this->setEnableNumInfo(true); $this->setEnableTitle(true); $this->setDefaultOrderField("month"); $this->setDefaultOrderDirection("desc"); $this->getItems(); }
/** * Constructor */ function __construct($a_parent_obj, $a_parent_cmd, $a_user_id, $a_obj_id, $a_ref_id, $a_print_view = false) { global $ilCtrl, $lng, $ilAccess, $lng, $rbacsystem; $this->setId("truop"); $this->user_id = $a_user_id; $this->obj_id = $a_obj_id; $this->ref_id = $a_ref_id; parent::__construct($a_parent_obj, $a_parent_cmd); $this->setLimit(9999); $this->parseTitle($this->obj_id, "details", $this->user_id); if ($a_print_view) { $this->setPrintMode(true); } $this->addColumn($this->lng->txt("title"), "title"); foreach ($this->getSelectedColumns() as $c) { $l = $c; if (in_array($l, array("last_access", "first_access", "read_count", "spent_seconds", "mark", "status", "percentage"))) { $l = "trac_" . $l; } if ($l == "u_comment") { $l = "trac_comment"; } $this->addColumn($this->lng->txt($l), $c); } if (!$this->getPrintMode()) { $this->addColumn($this->lng->txt("actions"), ""); } $this->setExternalSorting(true); $this->setExternalSegmentation(true); $this->setEnableHeader(true); $this->setFormAction($ilCtrl->getFormActionByClass(get_class($this))); $this->setRowTemplate("tpl.user_objects_props_row.html", "Services/Tracking"); $this->setEnableTitle(true); $this->setDefaultOrderField("title"); $this->setDefaultOrderDirection("asc"); $this->setShowTemplates(true); $this->setExportFormats(array(self::EXPORT_CSV, self::EXPORT_EXCEL)); $this->initFilter(); $this->getItems(); }
/** * Constructor */ function __construct($a_parent_obj, $a_parent_cmd, $ref_id) { global $ilCtrl, $lng, $ilAccess, $lng, $ilObjDataCache; $this->setId("trsmtx_" . $ref_id); $this->ref_id = $ref_id; $this->obj_id = ilObject::_lookupObjId($ref_id); $this->initFilter(); parent::__construct($a_parent_obj, $a_parent_cmd); $this->setLimit(9999); $this->parseTitle($this->obj_id, "trac_matrix"); $this->setEnableHeader(true); $this->setFormAction($ilCtrl->getFormActionByClass(get_class($this))); $this->setRowTemplate("tpl.user_object_matrix_row.html", "Services/Tracking"); $this->setDefaultOrderField("login"); $this->setDefaultOrderDirection("asc"); $this->setShowTemplates(true); $this->addColumn($this->lng->txt("login"), "login"); $labels = $this->getSelectableColumns(); $selected = $this->getSelectedColumns(); foreach ($selected as $c) { $title = $labels[$c]["txt"]; $tooltip = ""; if (isset($labels[$c]["icon"])) { $alt = $lng->txt($labels[$c]["type"]); $icon = '<img src="' . $labels[$c]["icon"] . '" alt="' . $alt . '" />'; if (sizeof($selected) > 5) { $tooltip = $title; $title = $icon; } else { $title = $icon . ' ' . $title; } } $this->addColumn($title, $labels[$c]["id"], "", false, "", $tooltip); } $this->setExportFormats(array(self::EXPORT_CSV, self::EXPORT_EXCEL)); }
/** * Constructor */ function __construct($a_parent_obj, $a_parent_cmd, array $a_preselect = null, $a_load_items = true, $a_is_chart = false, $a_is_details = false) { global $ilCtrl, $lng; $this->preselected = $a_preselect; $this->is_chart = (bool) $a_is_chart; $this->is_details = (bool) $a_is_details; $this->setId("lpobjstatlptbl"); parent::__construct($a_parent_obj, $a_parent_cmd); if (!$this->is_details) { $this->setShowRowsSelector(true); // $this->setLimit(ilSearchSettings::getInstance()->getMaxHits()); $this->addColumn("", "", "1%", true); $this->addColumn($lng->txt("trac_title"), "title"); $this->addColumn($lng->txt("object_id"), "obj_id"); } else { $this->setLimit(20); $this->addColumn($lng->txt("trac_figure")); } $this->initFilter(); if (strpos($this->filter["yearmonth"], "-") === false) { foreach ($this->getMonthsYear($this->filter["yearmonth"]) as $num => $caption) { $this->addColumn($caption, "month_" . $num, "", false, "ilRight"); } } else { foreach ($this->types as $type) { if ($type != "avg") { $caption = " " . $this->lng->txt("trac_object_stat_lp_" . $type); } else { $caption = " Ø"; } $this->addColumn($lng->txt("trac_members_short") . $caption, "mem_cnt_" . $type, "", false, "ilRight"); } include_once "./Services/Tracking/classes/class.ilLearningProgressBaseGUI.php"; foreach ($this->status as $status) { $path = ilLearningProgressBaseGUI::_getImagePathForStatus($status); $text = ilLearningProgressBaseGUI::_getStatusText($status); $icon = ilUtil::img($path, $text); foreach ($this->types as $type) { if ($type != "avg") { $caption = $icon . $this->lng->txt("trac_object_stat_lp_" . $type); } else { $caption = $icon . " Ø"; } $this->addColumn($caption, $status . "_" . $type, "", false, "ilRight"); } } } if (!$this->is_details) { $this->setTitle($this->lng->txt("trac_object_stat_lp")); // $this->setSelectAllCheckbox("item_id"); $this->addMultiCommand("showLearningProgressGraph", $lng->txt("trac_show_graph")); $this->setResetCommand("resetLearningProgressFilter"); $this->setFilterCommand("applyLearningProgressFilter"); } $this->setFormAction($ilCtrl->getFormAction($a_parent_obj, $a_parent_cmd)); $this->setRowTemplate("tpl.lp_object_statistics_lp_row.html", "Services/Tracking"); $this->setEnableHeader(true); $this->setEnableNumInfo(true); $this->setEnableTitle(true); $this->setDefaultOrderField("title"); $this->setDefaultOrderDirection("asc"); $this->status_map = array(ilLPStatus::LP_STATUS_NOT_ATTEMPTED_NUM => "not_attempted", ilLPStatus::LP_STATUS_IN_PROGRESS_NUM => "in_progress", ilLPStatus::LP_STATUS_COMPLETED_NUM => "completed", ilLPStatus::LP_STATUS_FAILED_NUM => "failed"); if ($a_load_items) { if ($this->is_details) { $this->getDetailItems($this->preselected[0]); } else { $this->initLearningProgressDetailsLayer(); $this->getItems(); } } }
/** * Constructor */ function __construct($a_parent_obj, $a_parent_cmd, $a_user = "", $obj_ids = NULL, $details = false, $mode = null, $personal_only = false, $a_parent_id = null) { global $ilCtrl, $lng, $ilAccess, $lng, $ilObjDataCache, $ilUser; $this->tracked_user = $a_user; $this->obj_ids = $obj_ids; $this->details = $details; $this->mode = $mode; $this->parent_obj_id = $a_parent_id; $this->setId("lpprgtbl"); parent::__construct($a_parent_obj, $a_parent_cmd); $this->setLimit(9999); if (!$this->details) { $user = $this->tracked_user; if (!$user) { $user = $ilUser; } $this->addColumn("", "", "1", true); $this->addColumn($this->lng->txt("trac_title"), "title", "26%"); $this->addColumn($this->lng->txt("status"), "status", "7%"); $this->addColumn($this->lng->txt('trac_status_changed'), 'status_changed', '10%'); $this->addColumn($this->lng->txt("trac_percentage"), "percentage", "7%"); $this->addColumn($this->lng->txt("trac_mark"), "", "5%"); $this->addColumn($this->lng->txt("comment"), "", "10%"); $this->addColumn($this->lng->txt("trac_mode"), "", "20%"); $this->addColumn($this->lng->txt("path"), "", "20%"); $this->addColumn($this->lng->txt("actions"), "", "5%"); $this->setTitle(sprintf($this->lng->txt("trac_learning_progress_of"), $user->getFullName())); $this->initFilter(); $this->setSelectAllCheckbox("item_id"); $this->addMultiCommand("hideSelected", $lng->txt("trac_hide_selected")); } else { if (!$personal_only) { $this->parseTitle($a_parent_obj->details_obj_id, "trac_subitems"); } else { $this->parseTitle($a_parent_obj->details_obj_id, "trac_progress"); } $this->addColumn($this->lng->txt("trac_title"), "title", "31%"); $this->addColumn($this->lng->txt("status"), "status", "7%"); if ($this->mode == LP_MODE_SCORM) { $this->lng->loadLanguageModule('content'); $this->addColumn($this->lng->txt('cont_score'), 'score', '10%'); } else { if ($this->mode != LP_MODE_OBJECTIVES) { $this->addColumn($this->lng->txt('trac_status_changed'), 'status_changed', '10%'); $this->addColumn($this->lng->txt("trac_percentage"), "percentage", "7%"); $this->addColumn($this->lng->txt("trac_mark"), "", "5%"); $this->addColumn($this->lng->txt("comment"), "", "10%"); $this->addColumn($this->lng->txt("trac_mode"), "", "20%"); $this->addColumn($this->lng->txt("path"), "", "20%"); } } } $this->setEnableHeader(true); $this->setFormAction($ilCtrl->getFormActionByClass(get_class($this))); $this->setRowTemplate("tpl.lp_progress_list_row.html", "Services/Tracking"); $this->setEnableHeader(true); $this->setEnableNumInfo(true); $this->setEnableTitle(true); $this->setDefaultOrderField("title"); $this->setDefaultOrderDirection("asc"); $this->setShowTemplates(true); if ($this->mode != LP_MODE_SCORM && $this->mode != LP_MODE_OBJECTIVES) { $this->setExportFormats(array(self::EXPORT_CSV, self::EXPORT_EXCEL)); } // area selector gets in the way if ($this->tracked_user) { $this->getItems(); } }
/** * Init filter */ function initFilter() { global $lng, $ilSetting; if ($this->is_root) { return parent::initFilter(true, false); } // show only if extended data was activated in lp settings include_once 'Services/Tracking/classes/class.ilObjUserTracking.php'; $tracking = new ilObjUserTracking(); $item = $this->addFilterItemByMetaType("user_total", ilTable2GUI::FILTER_NUMBER_RANGE, true, "∑ " . $lng->txt("users")); $this->filter["user_total"] = $item->getValue(); if ($tracking->hasExtendedData(ilObjUserTracking::EXTENDED_DATA_READ_COUNT)) { $item = $this->addFilterItemByMetaType("read_count", ilTable2GUI::FILTER_NUMBER_RANGE, true, "∑ " . $lng->txt("trac_read_count")); $this->filter["read_count"] = $item->getValue(); } if ($tracking->hasExtendedData(ilObjUserTracking::EXTENDED_DATA_SPENT_SECONDS)) { $item = $this->addFilterItemByMetaType("spent_seconds", ilTable2GUI::FILTER_DURATION_RANGE, true, "Ø " . $lng->txt("trac_spent_seconds") . " / " . $lng->txt("user")); $this->filter["spent_seconds"]["from"] = $item->getCombinationItem("from")->getValueInSeconds(); $this->filter["spent_seconds"]["to"] = $item->getCombinationItem("to")->getValueInSeconds(); } $item = $this->addFilterItemByMetaType("percentage", ilTable2GUI::FILTER_NUMBER_RANGE, true, "Ø " . $lng->txt("trac_percentage") . " / " . $lng->txt("user")); $this->filter["percentage"] = $item->getValue(); // do not show status if learning progress is deactivated if ($this->olp->isActive()) { include_once "Services/Tracking/classes/class.ilLPStatus.php"; $item = $this->addFilterItemByMetaType("status", ilTable2GUI::FILTER_SELECT, true); $item->setOptions(array("" => $lng->txt("trac_all"), ilLPStatus::LP_STATUS_NOT_ATTEMPTED_NUM + 1 => $lng->txt(ilLPStatus::LP_STATUS_NOT_ATTEMPTED), ilLPStatus::LP_STATUS_IN_PROGRESS_NUM + 1 => $lng->txt(ilLPStatus::LP_STATUS_IN_PROGRESS), ilLPStatus::LP_STATUS_COMPLETED_NUM + 1 => $lng->txt(ilLPStatus::LP_STATUS_COMPLETED), ilLPStatus::LP_STATUS_FAILED_NUM + 1 => $lng->txt(ilLPStatus::LP_STATUS_FAILED))); $this->filter["status"] = $item->getValue(); if ($this->filter["status"]) { $this->filter["status"]--; } $item = $this->addFilterItemByMetaType("trac_status_changed", ilTable2GUI::FILTER_DATE_RANGE, true); $this->filter["status_changed"] = $item->getDate(); } if (ilObject::_lookupType($this->obj_id) != "lm") { $item = $this->addFilterItemByMetaType("mark", ilTable2GUI::FILTER_TEXT, true, $lng->txt("trac_mark")); $this->filter["mark"] = $item->getValue(); } if ($ilSetting->get("usr_settings_course_export_gender")) { $item = $this->addFilterItemByMetaType("gender", ilTable2GUI::FILTER_SELECT, true); $item->setOptions(array("" => $lng->txt("trac_all"), "m" => $lng->txt("gender_m"), "f" => $lng->txt("gender_f"))); $this->filter["gender"] = $item->getValue(); } if ($ilSetting->get("usr_settings_course_export_city")) { $item = $this->addFilterItemByMetaType("city", ilTable2GUI::FILTER_TEXT, true); $this->filter["city"] = $item->getValue(); } if ($ilSetting->get("usr_settings_course_export_country")) { $item = $this->addFilterItemByMetaType("country", ilTable2GUI::FILTER_TEXT, true); $this->filter["country"] = $item->getValue(); } if ($ilSetting->get("usr_settings_course_export_sel_country")) { $item = $this->addFilterItemByMetaType("sel_country", ilTable2GUI::FILTER_SELECT, true); $item->setOptions(array("" => $lng->txt("trac_all")) + $this->getSelCountryCodes()); $this->filter["sel_country"] = $item->getValue(); } $item = $this->addFilterItemByMetaType("language", ilTable2GUI::FILTER_LANGUAGE, true); $this->filter["language"] = $item->getValue(); if ($tracking->hasExtendedData(ilObjUserTracking::EXTENDED_DATA_LAST_ACCESS)) { $item = $this->addFilterItemByMetaType("trac_first_access", ilTable2GUI::FILTER_DATETIME_RANGE, true); $this->filter["first_access"] = $item->getDate(); $item = $this->addFilterItemByMetaType("trac_last_access", ilTable2GUI::FILTER_DATETIME_RANGE, true); $this->filter["last_access"] = $item->getDate(); } $item = $this->addFilterItemByMetaType("registration_filter", ilTable2GUI::FILTER_DATE_RANGE, true); $this->filter["registration"] = $item->getDate(); }
/** * Constructor */ function __construct($a_parent_obj, $a_parent_cmd, $a_user = "", $obj_ids = NULL, $details = false, $mode = null, $personal_only = false, $a_parent_id = null, $a_parent_ref_id = null, $lp_context = null) { global $ilCtrl, $lng, $ilUser; $this->tracked_user = $a_user; $this->obj_ids = $obj_ids; $this->details = $details; $this->mode = $mode; $this->parent_obj_id = $a_parent_id; $this->lp_context = $lp_context; if ($a_parent_id) { // #15042 - needed for export meta $this->obj_id = $this->parent_obj_id; $this->ref_id = $a_parent_ref_id; } $this->setId("lpprgtbl"); parent::__construct($a_parent_obj, $a_parent_cmd); $this->setLimit(9999); if (!$this->details) { $this->has_object_subitems = true; $user = $this->tracked_user; if (!$user) { $user = $ilUser; } $this->addColumn("", "", "1", true); $this->addColumn($this->lng->txt("trac_title"), "title", "26%"); $this->addColumn($this->lng->txt("status"), "status", "7%"); $this->addColumn($this->lng->txt('trac_status_changed'), 'status_changed', '10%'); $this->addColumn($this->lng->txt("trac_percentage"), "percentage", "7%"); $this->addColumn($this->lng->txt("trac_mark"), "", "5%"); $this->addColumn($this->lng->txt("comment"), "", "10%"); $this->addColumn($this->lng->txt("trac_mode"), "", "20%"); $this->addColumn($this->lng->txt("path"), "", "20%"); $this->addColumn($this->lng->txt("actions"), "", "5%"); $this->setTitle(sprintf($this->lng->txt("trac_learning_progress_of"), $user->getFullName())); $this->initFilter(); $this->setSelectAllCheckbox("item_id"); $this->addMultiCommand("hideSelected", $lng->txt("trac_hide_selected")); $this->setShowTemplates(true); } else { include_once './Services/Object/classes/class.ilObjectLP.php'; $olp = ilObjectLP::getInstance($this->parent_obj_id); $collection = $olp->getCollectionInstance(); $this->has_object_subitems = $collection instanceof ilLPCollectionOfRepositoryObjects; /* if(!$personal_only) { $this->parseTitle($a_parent_obj->details_obj_id, "trac_subitems"); } else { $this->parseTitle($a_parent_obj->details_obj_id, "trac_progress"); } */ $this->setTitle($this->lng->txt("details")); // #15247 $this->addColumn($this->lng->txt("trac_title"), "title", "31%"); $this->addColumn($this->lng->txt("status"), "status", "7%"); if ($this->mode == ilLPObjSettings::LP_MODE_SCORM) { $this->lng->loadLanguageModule('content'); $this->addColumn($this->lng->txt('cont_score'), 'score', '10%'); } else { if ($this->has_object_subitems) { $this->addColumn($this->lng->txt('trac_status_changed'), 'status_changed', '10%'); $this->addColumn($this->lng->txt("trac_percentage"), "percentage", "7%"); $this->addColumn($this->lng->txt("trac_mark"), "", "5%"); $this->addColumn($this->lng->txt("comment"), "", "10%"); $this->addColumn($this->lng->txt("trac_mode"), "", "20%"); $this->addColumn($this->lng->txt("path"), "", "20%"); } } } $this->setEnableHeader(true); $this->setFormAction($ilCtrl->getFormActionByClass(get_class($this))); $this->setRowTemplate("tpl.lp_progress_list_row.html", "Services/Tracking"); $this->setEnableHeader(true); $this->setEnableNumInfo(false); $this->setEnableTitle(true); $this->setDefaultOrderField("title"); $this->setDefaultOrderDirection("asc"); if ($this->has_object_subitems) { $this->setExportFormats(array(self::EXPORT_CSV, self::EXPORT_EXCEL)); } // area selector gets in the way if ($this->tracked_user) { $this->getItems(); } }