24 include_once
"./Modules/Course/classes/class.ilObjCourseListGUI.php";
48 parent::__construct();
73 $this->copy_enabled =
false;
74 $this->static_link_enabled =
false;
75 $this->delete_enabled =
true;
76 $this->cut_enabled =
true;
77 $this->subscribe_enabled =
true;
78 $this->link_enabled =
false;
79 $this->payment_enabled =
true;
80 $this->info_screen_enabled =
true;
82 $this->gui_class_name =
"ilobjcoursegui";
84 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDSubstitution.php');
86 if($this->substitutions->isActive())
88 $this->substitutions_enabled =
true;
103 function initItem($a_ref_id, $a_obj_id, $a_title =
"", $a_description =
"")
107 $this->reference_ref_id = $a_ref_id;
108 $this->reference_obj_id = $a_obj_id;
111 include_once(
'./Services/ContainerReference/classes/class.ilContainerReference.php');
115 $target_ref_id = current($target_ref_ids);
119 $this->deleted = $tree->isDeleted($target_ref_id);
121 $ilBench->start(
"ilObjCourseListGUI",
"1000_checkAllConditions");
123 $ilBench->stop(
"ilObjCourseListGUI",
"1000_checkAllConditions");
126 parent::initItem($target_ref_id, $target_obj_id,$target_title,$target_description);
129 include_once(
'./Modules/CourseReference/classes/class.ilObjCourseReferenceAccess.php');
132 if($ilAccess->checkAccess(
'write',
'',$this->reference_ref_id) or
$this->deleted)
134 $this->info_screen_enabled =
false;
138 $this->info_screen_enabled =
true;
146 $props = parent::getProperties();
151 $props[] = array(
"alert" =>
true,
"property" => $lng->txt(
"status"),
152 "value" => $lng->txt(
"reference_deleted"));
155 return $props ? $props : array();
168 case 'editReference':
169 return parent::checkCommandAccess($a_permission, $a_cmd, $this->
getCommandId(), $a_type);
172 switch($a_permission)
177 return parent::checkCommandAccess($a_permission, $a_cmd, $this->
getCommandId(), $a_type);
181 return parent::checkCommandAccess($a_permission, $a_cmd, $a_ref_id, $a_type);
198 case 'editReference':
199 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $this->
getCommandId());
200 $cmd_link = $ilCtrl->getLinkTargetByClass(
"ilrepositorygui", $a_cmd);
201 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$_GET[
"ref_id"]);
205 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $this->ref_id);
206 $cmd_link = $ilCtrl->getLinkTargetByClass(
"ilrepositorygui", $a_cmd);
207 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$_GET[
"ref_id"]);
getCommandLink($a_cmd)
get command link
__construct()
Constructor.
checkCommandAccess($a_permission, $a_cmd, $a_ref_id, $a_type)
getCommandId()
get command id
static _getAllReferences($a_id)
get all reference ids of object
static _getInstanceByObjectType($a_type)
Singleton: use this method to get an instance.
_checkAllConditionsOfTarget($a_target_ref_id, $a_target_id, $a_target_type="", $a_usr_id=0)
checks wether all conditions of a target object are fulfilled
initItem($a_ref_id, $a_obj_id, $a_title="", $a_description="")
inititialize new item Course reference inits the course item
static _lookupTitle($a_obj_id)
Overwitten from base class.
static _lookupDescription($a_id)
lookup object description
Class ilObjCourseListGUI.
_getCommands()
get commands
static _lookupTargetId($a_obj_id)
lookup target id