4include_once(
"./Services/Table/classes/class.ilTable2GUI.php");
 
   47    public function __construct($a_parent_obj, $a_parent_cmd, $a_handler, $a_parent_node_id = 
null, $a_load_data = 
false)
 
   51        $this->ctrl = 
$DIC->ctrl();
 
   52        $this->lng = 
$DIC->language();
 
   54        $this->
user = $DIC->user();
 
   55        $ilCtrl = 
$DIC->ctrl();
 
   58        $this->handler = $a_handler;
 
   60        if (stristr(get_class($a_parent_obj), 
"portfolio")) {
 
   61            $this->parent_node_id = $a_parent_node_id;
 
   62            $this->portfolio_mode = 
true;
 
   67        $this->
setId(
"il_tbl_wspsh" . (
int) $this->portfolio_mode);
 
   71        $this->
addColumn($this->lng->txt(
"lastname"), 
"lastname");
 
   72        $this->
addColumn($this->lng->txt(
"firstname"), 
"firstname");
 
   73        $this->
addColumn($this->lng->txt(
"login"), 
"login");
 
   75        if (!$this->portfolio_mode) {
 
   76            $this->
addColumn($this->lng->txt(
"wsp_shared_object_type"), 
"obj_type");
 
   79        $this->
addColumn($this->lng->txt(
"wsp_shared_date"), 
"acl_date");
 
   80        $this->
addColumn($this->lng->txt(
"wsp_shared_title"), 
"title");
 
   81        $this->
addColumn($this->lng->txt(
"wsp_shared_type"));
 
   83        if (!$this->portfolio_mode) {
 
   84            $this->
addColumn($this->lng->txt(
"action"));
 
   91        $this->
setRowTemplate(
"tpl.shared_row.html", 
"Services/PersonalWorkspace");
 
   94        $this->
setResetCommand(
"resetsharefilter", $this->lng->txt(
"wsp_shared_filter_reset_button"));
 
   95        $this->
setFilterCommand(
"applysharefilter", $this->lng->txt(
"wsp_shared_filter_button"));
 
  100        if ($this->portfolio_mode &&
 
  101            !$this->
filter[
"obj_type"]) {
 
  102            $this->
filter[
"obj_type"] = 
"prtf";
 
  119            include_once 
"Services/User/classes/class.ilUserUtil.php";
 
  136        include_once 
"Services/Membership/classes/class.ilParticipants.php";
 
  140        $lng->loadLanguageModule(
"search");
 
  143        $this->
filter[
"user"] = $item->getValue();
 
  146        if ((
int) $_REQUEST[
"shr_id"] &&
 
  151            $item->setValue($this->
filter[
"user"]);
 
  155        $this->
filter[
"title"] = $item->getValue();
 
  158        $this->
filter[
"acl_date"] = $item->getDate();
 
  160        if (!$this->portfolio_mode) {
 
  162            $options = array(
"" => 
$lng->txt(
"search_any"));
 
  163            $settings_map = array(
"blog" => 
"blogs",
 
  166            foreach (array(
"file", 
"blog") as 
$type) {
 
  173            $options = array(
"prtf" => 
$lng->txt(
"obj_prtf"));
 
  175        if (
sizeof($options)) {
 
  178            $item->setOptions($options);
 
  179            $this->
filter[
"obj_type"] = $item->getValue();
 
  184        $options[
"user"] = 
$lng->txt(
"wsp_set_permission_single_user");
 
  186        if (
sizeof($this->grp_ids)) {
 
  187            $options[
"group"] = 
$lng->txt(
"wsp_set_permission_group");
 
  190        if (
sizeof($this->crs_ids)) {
 
  191            $options[
"course"] = 
$lng->txt(
"wsp_set_permission_course");
 
  194        if (!$this->handler->hasRegisteredPermission($this->parent_node_id)) {
 
  195            $options[
"registered"] = 
$lng->txt(
"wsp_set_permission_registered");
 
  198        if (
$ilSetting->get(
"enable_global_profiles")) {
 
  199            if (!$this->handler->hasGlobalPasswordPermission($this->parent_node_id)) {
 
  200                $options[
"password"] = $this->lng->txt(
"wsp_set_permission_all_password");
 
  203            if (!$this->handler->hasGlobalPermission($this->parent_node_id)) {
 
  204                $options[
"all"] = $this->lng->txt(
"wsp_set_permission_all");
 
  208        if (
sizeof($options)) {
 
  211            $item->setOptions(array(
"" => 
$lng->txt(
"search_any")) + $options);
 
  212            $this->
filter[
"acl_type"] = $item->getValue();
 
  215        if (
sizeof($this->crs_ids) || 
sizeof($this->grp_ids)) {
 
  217            foreach ($this->crs_ids as $crs_id) {
 
  220            foreach ($this->grp_ids as $grp_id) {
 
  225            $item->setOptions(array(
"" => 
$lng->txt(
"search_any")) + $options);
 
  226            $this->
filter[
"crsgrp"] = $item->getValue();
 
  236        $user_data = array();
 
  238        $objects = $this->handler->findSharedObjects($this->
filter, $this->crs_ids, $this->grp_ids);
 
  240            foreach ($objects as $wsp_id => $item) {
 
  241                if (!isset($user_data[$item[
"owner"]])) {
 
  246                if (!$user_data[$item[
"owner"]][
"login"]) {
 
  252                    "obj_id" => $item[
"obj_id"],
 
  253                    "type" => $item[
"type"],
 
  254                    "obj_type" => 
$lng->txt(
"wsp_type_" . $item[
"type"]),
 
  255                    "title" => $item[
"title"],
 
  256                    "owner_id" => $item[
"owner"],
 
  257                    "lastname" => $user_data[$item[
"owner"]][
"lastname"],
 
  258                    "firstname" => $user_data[$item[
"owner"]][
"firstname"],
 
  259                    "login" => $user_data[$item[
"owner"]][
"login"],
 
  260                    "acl_type" => $item[
"acl_type"],
 
  261                    "acl_date" => $item[
"acl_date"]
 
  268        include_once(
'./Services/Link/classes/class.ilLink.php');
 
  281        $this->tpl->setVariable(
"LASTNAME", $node[
"lastname"]);
 
  282        $this->tpl->setVariable(
"FIRSTNAME", $node[
"firstname"]);
 
  283        $this->tpl->setVariable(
"LOGIN", $node[
"login"]);
 
  285        $this->tpl->setVariable(
"TITLE", $node[
"title"]);
 
  287        if (!$this->portfolio_mode) {
 
  288            $this->tpl->setVariable(
"TYPE", $node[
"obj_type"]);
 
  289            $this->tpl->setVariable(
"ICON_ALT", $node[
"obj_type"]);
 
  292            $url = $this->handler->getGotoLink($node[
"wsp_id"], $node[
"obj_id"]);
 
  296        $this->tpl->setVariable(
"URL_TITLE", 
$url);
 
  298        $this->tpl->setVariable(
 
  303        asort($node[
"acl_type"]);
 
  304        foreach ($node[
"acl_type"] as $obj_id) {
 
  309                    $type = 
"registered";
 
  313                    $title = 
$icon_alt = $this->lng->txt(
"wsp_set_permission_all_password");
 
  314                    $type = 
"all_password";
 
  319                    $type = 
"all_password";
 
  328                    if (
$type != 
"usr") {
 
  346            $this->tpl->setCurrentBlock(
"acl_type_bl");
 
  347            $this->tpl->setVariable(
"ACL_TYPE", 
$title);
 
  348            $this->tpl->parseCurrentBlock();
 
  351        if (!$this->portfolio_mode) {
 
  353            if ($node[
"type"] == 
"file") {
 
  354                $ilCtrl->setParameter(
 
  357                    $this->parent_node_id
 
  359                $ilCtrl->setParameter(
 
  364                $url = $ilCtrl->getLinkTarget($this->parent_obj, 
"copyshared");
 
  366                $this->tpl->setCurrentBlock(
"action_bl");
 
  367                $this->tpl->setVariable(
"URL_ACTION", 
$url);
 
  368                $this->tpl->setVariable(
"ACTION", 
$lng->txt(
"copy"));
 
  369                $this->tpl->parseCurrentBlock();
 
  371                $this->tpl->touchBlock(
"action_col_bl");
 
An exception for terminatinating execution or to throw for unit testing.
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date @access public.
@classDescription Date and time handling
static _getStaticLink( $a_ref_id, $a_type='', $a_fallback_goto=true, $append="")
Get static link.
static _lookupName($a_user_id)
lookup user name
static _lookupTitle($a_id)
lookup object title
static _getIcon( $a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
static _lookupType($a_id, $a_reference=false)
lookup object type
static _getMembershipByType($a_usr_id, $a_type, $a_only_member_role=false)
get membership by type Get course or group membership
setDisableFilterHiding($a_val=true)
Set disable filter hiding.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
setData($a_data)
set table data @access public
setResetCommand($a_val, $a_caption=null)
Set reset filter command.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
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.
addFilterItemByMetaType($id, $type=self::FILTER_TEXT, $a_optional=false, $caption=null)
Add filter by standard type.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
setFilterCommand($a_val, $a_caption=null)
Set filter command.
disable($a_module_name)
diesables particular modules of table
static getNamePresentation( $a_user_id, $a_user_image=false, $a_profile_link=false, $a_profile_back_link="", $a_force_first_lastname=false, $a_omit_login=false, $a_sortable=true, $a_return_data_array=false, $a_ctrl_path="ilpublicuserprofilegui")
Default behaviour is:
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
const PERMISSION_REGISTERED
const PERMISSION_ALL_PASSWORD
Workspace share handler table GUI class.
__construct($a_parent_obj, $a_parent_cmd, $a_handler, $a_parent_node_id=null, $a_load_data=false)
Constructor.
fillRow($node)
Fill table row.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc