ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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
5require_once("./Services/Object/classes/class.ilObjectListGUI.php");
6include_once('./Modules/StudyProgramme/classes/class.ilObjStudyProgramme.php');
7
16
20 protected $tpl;
21
22
23 function __construct() {
24 global $tpl, $lng;
25 $this->ilObjectListGUI();
26 $this->tpl = $tpl;
27 $this->lng = $lng;
28 $this->lng->loadLanguageModule("prg");
29 //$this->enableComments(false, false);
30 }
31
32
36 function init() {
37 $this->static_link_enabled = true;
38 $this->delete_enabled = true;
39 $this->cut_enabled = true;
40 $this->info_screen_enabled = true;
41 $this->copy_enabled = true;
42 $this->subscribe_enabled = false;
43 $this->link_enabled = false;
44 $this->payment_enabled = false;
45
46 $this->type = "prg";
47 $this->gui_class_name = "ilobjstudyprogrammegui";
48
49 // general commands array
50 include_once('./Modules/StudyProgramme/classes/class.ilObjStudyProgrammeAccess.php');
52 }
53
54
58 public function insertTimingsCommand() {
59 return;
60 }
61
62
66 public function insertCommonSocialCommands() {
67 return;
68 }
69
70
74 /*function insertInfoScreenCommand() {
75
76 if ($this->std_cmd_only) {
77 return;
78 }
79 $cmd_link = $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary");
80 $cmd_frame = $this->getCommandFrame("infoScreen");
81
82 $this->insertCommand($cmd_link, $this->lng->txt("info_short"), $cmd_frame, ilUtil::getImagePath("icon_info.svg"));
83 }*/
84
85
91 public function getCommandLink($a_cmd) {
92 $this->ctrl->setParameterByClass("ilobjstudyprogrammegui", "ref_id", $this->ref_id);
93
94 return $this->ctrl->getLinkTargetByClass("ilobjstudyprogrammegui", $a_cmd);
95 }
96
111 function getListItemHTML($a_ref_id, $a_obj_id, $a_title, $a_description,
112 $a_use_asynch = false, $a_get_asynch_commands = false, $a_asynch_url = "", $a_context = self::CONTEXT_REPOSITORY)
113 {
114 $prg = new ilObjStudyProgramme($a_ref_id);
115 $assignments = $prg->getAssignments();
116 if($this->getCheckboxStatus() && count($assignments) > 0) {
117 $this->setAdditionalInformation($this->lng->txt("prg_can_not_manage_in_repo"));
118 $this->enableCheckbox(false);
119 } else {
120 $this->setAdditionalInformation(null);
121 }
122
123 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);
124 }
125}
126
127
128?>
Class ilObjStudyProgrammeListGUI.
insertTimingsCommand()
no timing commands needed for program.
getCommandLink($a_cmd)
insert info screen 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.
insertCommonSocialCommands()
no social commands needed in program.
Class ilObjStudyProgramme.
Class ilObjectListGUI.
enableCheckbox($a_status)
En/Dis-able checkboxes.
getCheckboxStatus()
Are checkboxes enabled?
setAdditionalInformation($a_val)
Set additional information.
ilObjectListGUI()
constructor
global $lng
Definition: privfeed.php:40