ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilObjWikiListGUI.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2012 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5
6include_once "Services/Object/classes/class.ilObjectListGUI.php";
7
17{
21 public function init()
22 {
23 $this->copy_enabled = true;
24 $this->delete_enabled = true;
25 $this->cut_enabled = true;
26 $this->subscribe_enabled = true;
27 $this->link_enabled = true;
28 $this->info_screen_enabled = true;
29 $this->type = "wiki";
30 $this->gui_class_name = "ilobjwikigui";
31
32 // general commands array
33 include_once('./Modules/Wiki/classes/class.ilObjWikiAccess.php');
34 $this->commands = ilObjWikiAccess::_getCommands();
35 }
36
37
38
46 public function getCommandFrame($a_cmd)
47 {
48 switch ($a_cmd) {
49 default:
50 $frame = ilFrameTargetInfo::_getFrame("MainContent");
51 break;
52 }
53
54 return $frame;
55 }
56
57
58
67 public function getProperties()
68 {
70
71 $props = array();
72
73 include_once("./Modules/Wiki/classes/class.ilObjWikiAccess.php");
74
75 if (!ilObjWikiAccess::_lookupOnline($this->obj_id)) {
76 $props[] = array("alert" => true, "property" => $lng->txt("status"),
77 "value" => $lng->txt("offline"));
78 }
79
80 $lng->loadLanguageModule("wiki");
81 include_once("./Modules/Exercise/RepoObjectAssignment/classes/class.ilExcRepoObjAssignment.php");
82 $info = ilExcRepoObjAssignment::getInstance()->getAssignmentInfoOfObj($this->ref_id, $this->user->getId());
83 if (count($info) > 0) {
85 foreach ($sub as $s) {
86 $team = new ilExAssignmentTeam($s["team_id"]);
87 $mem = array_map(function ($id) {
89 return $name["firstname"] . " " . $name["lastname"];
90 }, $team->getMembers());
91 $props[] = array("alert" => false, "property" => $lng->txt("wiki_team_members"),
92 "value" => implode(", ", $mem));
93 }
94 }
95
96
97 return $props;
98 }
99
100
108 public function getCommandLink($a_cmd)
109 {
110 switch ($a_cmd) {
111 case 'downloadFile':
112 $cmd_link = "ilias.php?baseClass=ilWikiHandlerGUI" .
113 "&amp;cmdClass=ilwikipagegui&amp;ref_id=" . $this->ref_id .
114 "&amp;cmd=downloadFile&amp;file_id=" . $this->getChildId();
115 break;
116
117 default:
118 // separate method for this line
119 $cmd_link = "ilias.php?baseClass=ilWikiHandlerGUI&ref_id=" . $this->ref_id . "&cmd=$a_cmd";
120 break;
121
122 }
123
124
125 return $cmd_link;
126 }
127
128 public function setChildId($a_child_id)
129 {
130 $this->child_id = $a_child_id;
131 }
132 public function getChildId()
133 {
134 return $this->child_id;
135 }
136} // END class.ilObjWikiListGUI
user()
Definition: user.php:4
An exception for terminatinating execution or to throw for unit testing.
Exercise assignment team.
static getSubmissionsForFilename($a_filename, $a_assignment_types=array())
Get assignment return entries for a filename.
static _getFrame($a_class, $a_type='')
Get content frame name.
static _lookupName($a_user_id)
lookup user name
static _lookupOnline($a_id)
Check wether wiki cast is online.
static _getCommands()
get commands
ListGUI class for wiki objects.
getCommandLink($a_cmd)
Get command link url.
getCommandFrame($a_cmd)
Get command target frame.
getProperties()
Get item properties.
Class ilObjectListGUI.
if($format !==null) $name
Definition: metadata.php:230