ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 
20  protected $tpl;
21 
22 
23  function __construct() {
24  global $DIC;
25  $tpl = $DIC['tpl'];
26  $lng = $DIC['lng'];
27  parent::__construct();
28  $this->tpl = $tpl;
29  $this->lng = $lng;
30  $this->lng->loadLanguageModule("prg");
31  //$this->enableComments(false, false);
32  }
33 
34 
38  function init() {
39  $this->static_link_enabled = true;
40  $this->delete_enabled = true;
41  $this->cut_enabled = false;
42  $this->info_screen_enabled = true;
43  $this->copy_enabled = true;
44  $this->subscribe_enabled = false;
45  $this->link_enabled = false;
46 
47  $this->type = "prg";
48  $this->gui_class_name = "ilobjstudyprogrammegui";
49 
50  // general commands array
51  include_once('./Modules/StudyProgramme/classes/class.ilObjStudyProgrammeAccess.php');
52  $this->commands = ilObjStudyProgrammeAccess::_getCommands();
53  }
54 
55 
59  public function insertTimingsCommand() {
60  return;
61  }
62 
63 
67  public function insertCommonSocialCommands($a_header_actions = false) {
68  return;
69  }
70 
71 
75  /*function insertInfoScreenCommand() {
76 
77  if ($this->std_cmd_only) {
78  return;
79  }
80  $cmd_link = $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary");
81  $cmd_frame = $this->getCommandFrame("infoScreen");
82 
83  $this->insertCommand($cmd_link, $this->lng->txt("info_short"), $cmd_frame, ilUtil::getImagePath("icon_info.svg"));
84  }*/
85 
86 
92  public function getCommandLink($a_cmd) {
93  $this->ctrl->setParameterByClass("ilobjstudyprogrammegui", "ref_id", $this->ref_id);
94 
95  return $this->ctrl->getLinkTargetByClass("ilobjstudyprogrammegui", $a_cmd);
96  }
97 
112  function getListItemHTML($a_ref_id, $a_obj_id, $a_title, $a_description,
113  $a_use_asynch = false, $a_get_asynch_commands = false, $a_asynch_url = "", $a_context = self::CONTEXT_REPOSITORY)
114  {
115  $prg = new ilObjStudyProgramme($a_ref_id);
116  $assignments = $prg->getAssignments();
117  if($this->getCheckboxStatus() && count($assignments) > 0) {
118  $this->setAdditionalInformation($this->lng->txt("prg_can_not_manage_in_repo"));
119  $this->enableCheckbox(false);
120  } else {
121  $this->setAdditionalInformation(null);
122  }
123 
124  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);
125  }
126 }
127 
128 
129 ?>
getCommandLink($a_cmd)
insert info screen program
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.
enableCheckbox($a_status)
En/Dis-able checkboxes.
global $lng
Definition: privfeed.php:17
global $DIC
insertTimingsCommand()
no timing commands needed for program.
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.