ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilObjStudyProgrammeListGUI.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 2015 Richard Klees <richard.klees@concepts-and-training.de> Extended GPL, see docs/LICENSE */
4 
5 require_once("./Services/Object/classes/class.ilObjectListGUI.php");
6 include_once('./Modules/StudyProgramme/classes/class.ilObjStudyProgramme.php');
7 
16 {
17 
21  protected $tpl;
22 
23 
24  public function __construct()
25  {
26  global $DIC;
27  $tpl = $DIC['tpl'];
28  $lng = $DIC['lng'];
29  parent::__construct();
30  $this->tpl = $tpl;
31  $this->lng = $lng;
32  $this->lng->loadLanguageModule("prg");
33  //$this->enableComments(false, false);
34  }
35 
36 
40  public function init()
41  {
42  $this->static_link_enabled = true;
43  $this->delete_enabled = true;
44  $this->cut_enabled = false;
45  $this->info_screen_enabled = true;
46  $this->copy_enabled = true;
47  $this->subscribe_enabled = false;
48  $this->link_enabled = false;
49 
50  $this->type = "prg";
51  $this->gui_class_name = "ilobjstudyprogrammegui";
52 
53  // general commands array
54  include_once('./Modules/StudyProgramme/classes/class.ilObjStudyProgrammeAccess.php');
55  $this->commands = ilObjStudyProgrammeAccess::_getCommands();
56  }
57 
58 
62  public function insertTimingsCommand()
63  {
64  return;
65  }
66 
67 
71  public function insertCommonSocialCommands($a_header_actions = false)
72  {
73  return;
74  }
75 
76 
80  /*function insertInfoScreenCommand() {
81 
82  if ($this->std_cmd_only) {
83  return;
84  }
85  $cmd_link = $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary");
86  $cmd_frame = $this->getCommandFrame("infoScreen");
87 
88  $this->insertCommand($cmd_link, $this->lng->txt("info_short"), $cmd_frame, ilUtil::getImagePath("icon_info.svg"));
89  }*/
90 
91 
97  public function getCommandLink($a_cmd)
98  {
99  $this->ctrl->setParameterByClass("ilobjstudyprogrammegui", "ref_id", $this->ref_id);
100 
101  return $this->ctrl->getLinkTargetByClass("ilobjstudyprogrammegui", $a_cmd);
102  }
103 
118  public function getListItemHTML(
119  $a_ref_id,
120  $a_obj_id,
121  $a_title,
122  $a_description,
123  $a_use_asynch = false,
124  $a_get_asynch_commands = false,
125  $a_asynch_url = "",
126  $a_context = self::CONTEXT_REPOSITORY
127  ) {
128  $prg = new ilObjStudyProgramme($a_ref_id);
129  $assignments = $prg->getAssignments();
130  if ($this->getCheckboxStatus() && count($assignments) > 0) {
131  $this->setAdditionalInformation($this->lng->txt("prg_can_not_manage_in_repo"));
132  $this->enableCheckbox(false);
133  } else {
134  $this->setAdditionalInformation(null);
135  }
136 
137  return parent::getListItemHTML($a_ref_id, $a_obj_id, $a_title, $a_description, $a_use_asynch, $a_get_asynch_commands, $a_asynch_url, $a_context);
138  }
139 }
getCommandLink($a_cmd)
insert info screen program
global $DIC
Definition: saml.php:7
getCheckboxStatus()
Are checkboxes enabled?
insertCommonSocialCommands($a_header_actions=false)
no social commands needed in program.
Class ilObjStudyProgramme.
setAdditionalInformation($a_val)
Set additional information.
Class ilObjectListGUI.
Class ilObjStudyProgrammeListGUI.
getListItemHTML( $a_ref_id, $a_obj_id, $a_title, $a_description, $a_use_asynch=false, $a_get_asynch_commands=false, $a_asynch_url="", $a_context=self::CONTEXT_REPOSITORY)
Get all item information (title, commands, description) in HTML.
enableCheckbox($a_status)
En/Dis-able checkboxes.
insertTimingsCommand()
no timing commands needed for program.