44 $this->tabs_gui =& $ilTabs;
45 $this->gui_object =& $a_gui_object;
47 $this->private_notes_enabled =
false;
48 $this->news_enabled =
false;
49 $this->feedback_enabled =
false;
50 $this->learning_progress_enabled =
false;
51 $this->form_action =
"";
52 $this->top_formbuttons = array();
53 $this->hiddenelements = array();
66 $lng->loadLanguageModule(
"barometer");
68 $next_class = $this->ctrl->getNextClass($this);
70 $cmd = $this->ctrl->getCmd(
"showSummary");
71 $this->ctrl->setReturn($this,
"showSummary");
82 include_once(
"Services/Feedback/classes/class.ilFeedbackGUI.php");
84 $this->ctrl->setParameterByClass(
"ilFeedbackGUI",
"obj_id",$this->gui_object->object->getId());
85 $this->ctrl->setParameterByClass(
"ilFeedbackGUI",
"ref_id",
$_GET[
'ref_id']);
86 $html = $this->ctrl->forwardCommand($fb_gui);
87 $tpl->setContent($html);
94 case "ilpublicuserprofilegui":
95 include_once(
"./Services/User/classes/class.ilPublicUserProfileGUI.php");
97 $user_profile->setBackUrl($ilCtrl->getLinkTarget($this,
"showSummary"));
98 $html = $ilCtrl->forwardCommand($user_profile);
99 $tpl->setContent($html);
103 return $this->
$cmd();
114 $this->private_notes_enabled = $a_enable;
122 $this->learning_progress_enabled = $a_enable;
131 $this->feedback_enabled = $a_enable;
139 $this->news_enabled = $a_enable;
147 $this->news_editing = $a_enable;
159 $this->block_property[$a_block_type][$a_property] = $a_value;
164 return $this->block_property;
173 $this->section[$this->sec_nr][
"title"] = $a_title;
181 $this->form_action = $a_form_action;
189 $this->form_action =
"";
201 $this->section[$this->sec_nr][
"properties"][] =
202 array(
"name" => $a_name,
"value" => $a_value,
209 function addPropertyCheckbox($a_name, $a_checkbox_name, $a_checkbox_value, $a_checkbox_label =
"", $a_checkbox_checked =
false)
211 $checkbox =
"<input type=\"checkbox\" name=\"$a_checkbox_name\" value=\"$a_checkbox_value\" id=\"$a_checkbox_name$a_checkbox_value\"";
212 if ($a_checkbox_checked)
214 $checkbox .=
" checked=\"checked\"";
217 if (strlen($a_checkbox_label))
219 $checkbox .=
" <label for=\"$a_checkbox_name$a_checkbox_value\">$a_checkbox_label</label>";
221 $this->section[$this->sec_nr][
"properties"][] =
222 array(
"name" => $a_name,
"value" => $checkbox);
228 function addPropertyTextinput($a_name, $a_input_name, $a_input_value =
"", $a_input_size =
"", $direct_button_command =
"", $direct_button_label =
"")
230 $input =
"<input type=\"text\" name=\"$a_input_name\" id=\"$a_input_name\"";
231 if (strlen($a_input_value))
235 if (strlen($a_input_size))
237 $input .=
" size=\"" . $a_input_size .
"\"";
240 if (strlen($direct_button_command) && strlen($direct_button_label))
242 $input .=
" <input type=\"submit\" class=\"submit\" name=\"cmd[$direct_button_command]\" value=\"$direct_button_label\" />";
244 $this->section[$this->sec_nr][
"properties"][] =
245 array(
"name" =>
"<label for=\"$a_input_name\">$a_name</label>",
"value" => $input);
251 function addButton($a_title, $a_link, $a_frame =
"", $a_position =
"top")
253 if ($a_position ==
"top")
255 $this->top_buttons[] =
256 array(
"title" => $a_title,
"link" => $a_link,
"target" => $a_frame);
266 if ($a_position ==
"top")
268 array_push($this->top_formbuttons,
269 array(
"command" => $a_command,
"title" => $a_title)
276 array_push($this->hiddenelements, array(
"name" => $a_name,
"value" => $a_value));
286 $lng->loadLanguageModule(
"meta");
288 include_once(
"./Services/MetaData/classes/class.ilMD.php");
289 $md =
new ilMD($a_rep_obj_id,$a_obj_id, $a_type);
291 if ($md_gen = $md->getGeneral())
296 foreach($md_gen->getDescriptionIds() as $id)
298 $md_des = $md_gen->getDescription($id);
299 $description = $md_des->getDescription();
305 foreach($ids = $md_gen->getLanguageIds() as $id)
307 $md_lan = $md_gen->getLanguage($id);
308 if ($md_lan->getLanguageCode() !=
"")
310 $langs[] = $lng->txt(
"meta_l_".$md_lan->getLanguageCode());
313 $langs = implode($langs,
", ");
317 foreach($ids = $md_gen->getKeywordIds() as $id)
319 $md_key = $md_gen->getKeyword($id);
320 $keywords[] = $md_key->getKeyword();
322 $keywords = implode($keywords,
", ");
326 if(is_object($lifecycle = $md->getLifecycle()))
329 foreach(($ids = $lifecycle->getContributeIds()) as $con_id)
331 $md_con = $lifecycle->getContribute($con_id);
332 if ($md_con->getRole() ==
"Author")
334 foreach($ent_ids = $md_con->getEntityIds() as $ent_id)
336 $md_ent = $md_con->getEntity($ent_id);
337 $author = $author.$sep.$md_ent->getEntity();
346 if(is_object($rights = $md->getRights()))
348 include_once(
'Services/MetaData/classes/class.ilMDUtils.php');
353 #if(is_object($educational = $md->getEducational()))
355 # $learning_time = $educational->getTypicalLearningTime();
358 if(is_object($educational = $md->getEducational()))
360 if($seconds = $educational->getTypicalLearningTimeSeconds())
370 if ($description !=
"")
393 if ($copyright !=
"")
398 if ($learning_time !=
"")
400 $this->
addProperty($lng->txt(
"meta_typical_learning_time"),
412 $this->
addSection($lng->txt(
"additional_info"));
413 $a_obj = $this->gui_object->object;
416 if (is_object($a_obj))
419 $type = $a_obj->getType();
422 include_once(
'classes/class.ilLink.php');
427 if (
true || $d_set->get(
"add_info_links") ==
"1")
429 $lng->loadLanguageModule(
"delic");
430 $del_link =
'<br/><a class="small" href="http://del.icio.us/post?desc=nn&url='.
432 '" /> '.$lng->txt(
"delic_add_to_delicious").
436 include_once(
'Services/WebServices/ECS/classes/class.ilECSSettings.php');
438 if($settings->isEnabled())
445 include_once
'Services/PermanentLink/classes/class.ilPermanentLinkGUI.php';
447 $pm->setIncludePermanentLinkText(
false);
448 $pm->setAlignCenter(
false);
456 $title = $ilObjDataCache->lookupTitle($a_obj->getId());
461 if ($ilAccess->checkAccess(
"write",
"",
$ref_id) ||
462 $ilAccess->checkAccess(
"edit_permissions",
"",
$ref_id))
464 $obj_id = $a_obj->getId();
469 if ($tree->isInTree($r))
474 if (count($refs) > 1)
480 $cont_loc->addContextItems($r,
true);
481 $links.= $sep.$cont_loc->getHTML();
486 '<div class="small">'.$links.
'</div>'
495 $lng->txt(
"create_date"),
499 if ($ilUser->getId() != ANONYMOUS_USER_ID)
501 include_once
'classes/class.ilObjectFactory.php';
507 if (! is_object($ownerObj))
509 $this->
addProperty($lng->txt(
"owner"), $lng->txt(
"no_owner"));
511 else if ($ownerObj->hasPublicProfile())
513 $ilCtrl->setParameterByClass(
"ilpublicuserprofilegui",
"user_id", $ownerObj->getId());
514 $this->
addProperty($lng->txt(
"owner"),$ownerObj->getPublicName(),$ilCtrl->getLinkTargetByClass(
"ilpublicuserprofilegui",
"getHTML"));
518 $this->
addProperty($lng->txt(
"owner"),$ownerObj->getPublicName());
523 require_once
'Services/WebDAV/classes/class.ilDiskQuotaActivationChecker.php';
524 if ($ilUser->getId() != ANONYMOUS_USER_ID &&
527 $size = $a_obj->getDiskUsage();
528 if (
$size !== null) {
533 require_once
'Services/Tracking/classes/class.ilChangeEvent.php';
536 if ($ilUser->getId() != ANONYMOUS_USER_ID)
541 $count_user_reads = 0;
542 $count_anonymous_reads = 0;
543 foreach ($readEvents as $evt)
545 if ($evt[
'usr_id'] == ANONYMOUS_USER_ID)
547 $count_anonymous_reads += $evt[
'read_count'];
551 $count_user_reads += $evt[
'read_count'];
559 if ($count_anonymous_reads > 0)
561 $this->
addProperty($this->lng->txt(
"readcount_anonymous_users"),$count_anonymous_reads);
563 if ($count_user_reads > 0)
565 $this->
addProperty($this->lng->txt(
"readcount_users"),$count_user_reads);
567 if ($count_users > 0)
569 $this->
addProperty($this->lng->txt(
"accesscount_registered_users"),$count_users);
576 require_once(
'Services/WebDAV/classes/class.ilDAVServer.php');
580 if ($ilUser->getId() != ANONYMOUS_USER_ID)
585 if ($ilias->account->getId() != ANONYMOUS_USER_ID)
587 $locks =& $davLocks->getLocksOnObjectObj($a_obj->getId());
588 if (count($locks) > 0)
590 $lockUser =
new ilObjUser($locks[0][
'ilias_owner']);
592 $lockUser->getPublicName()
594 "./ilias.php?user=".$locks[0][
'ilias_owner'].
'&cmd=showUserProfile&cmdClass=ilpersonaldesktopgui&cmdNode=1&baseClass=ilPersonalDesktopGUI'
610 global
$tpl, $ilAccess;
624 include_once(
"Services/Block/classes/class.ilColumnGUI.php");
628 if (!$ilCtrl->isAsynch())
637 $html = $ilCtrl->forwardCommand($column_gui);
644 $html = $ilCtrl->forwardCommand($column_gui);
663 include_once(
"Services/Block/classes/class.ilColumnGUI.php");
667 if ($ilCtrl->getNextClass() ==
"ilcolumngui" &&
671 $html = $ilCtrl->forwardCommand($column_gui);
675 if (!$ilCtrl->isAsynch())
677 if ($this->news_enabled)
679 $html = $ilCtrl->getHTML($column_gui);
692 global
$lng, $ilAccess;
694 $column_gui->setEnableEdit($this->news_editing);
695 $column_gui->setRepositoryMode(
true);
706 $tpl =
new ilTemplate(
"tpl.infoscreen.html" ,
true,
true,
"Services/InfoScreen");
709 if ($this->form_action ==
"")
715 if (count($this->top_buttons) > 0)
717 $tpl->addBlockfile(
"TOP_BUTTONS",
"top_buttons",
"tpl.buttons.html");
719 foreach($this->top_buttons as $button)
722 $tpl->setCurrentBlock(
"btn_cell");
723 $tpl->setVariable(
"BTN_LINK", $button[
"link"]);
724 $tpl->setVariable(
"BTN_TARGET", $button[
"target"]);
725 $tpl->setVariable(
"BTN_TXT", $button[
"title"]);
726 $tpl->parseCurrentBlock();
731 if ((count($this->top_formbuttons) > 0) && (strlen($this->form_action) > 0))
733 $tpl->addBlockfile(
"TOP_FORMBUTTONS",
"top_submitbuttons",
"tpl.submitbuttons.html");
735 foreach($this->top_formbuttons as $button)
738 $tpl->setCurrentBlock(
"btn_submit_cell");
739 $tpl->setVariable(
"BTN_COMMAND", $button[
"command"]);
740 $tpl->setVariable(
"BTN_NAME", $button[
"title"]);
741 $tpl->parseCurrentBlock();
746 if (strlen($this->form_action) > 0)
748 $tpl->setCurrentBlock(
"formtop");
749 $tpl->setVariable(
"FORMACTION", $this->form_action);
750 $tpl->parseCurrentBlock();
751 $tpl->touchBlock(
"formbottom");
754 if (count($this->hiddenelements))
756 foreach ($this->hiddenelements as $hidden)
758 $tpl->setCurrentBlock(
"hidden_element");
759 $tpl->setVariable(
"HIDDEN_NAME", $hidden[
"name"]);
760 $tpl->setVariable(
"HIDDEN_VALUE", $hidden[
"value"]);
761 $tpl->parseCurrentBlock();
768 $tpl->setCurrentBlock(
"learning_progress");
769 $tpl->setVariable(
"LP_TABLE",$html);
770 $tpl->parseCurrentBlock();
774 if ($this->private_notes_enabled && !$ilSetting->get(
'disable_notes'))
777 $tpl->setCurrentBlock(
"notes");
778 $tpl->setVariable(
"NOTES", $html);
779 $tpl->parseCurrentBlock();
783 if (is_object($this->gui_object->object))
786 if ($tags_set->get(
"enable") && $ilUser->getId() != ANONYMOUS_USER_ID)
792 if(is_object($this->gui_object->object))
798 for($i = 1; $i <= $this->sec_nr; $i++)
800 if (is_array($this->section[$i][
"properties"]))
803 $tpl->setCurrentBlock(
"header_row");
804 $tpl->setVariable(
"TXT_SECTION",
805 $this->section[$i][
"title"]);
806 $tpl->parseCurrentBlock();
807 $tpl->touchBlock(
"row");
810 foreach($this->section[$i][
"properties"] as $property)
812 if ($property[
"name"] !=
"")
814 if ($property[
"link"] ==
"")
816 $tpl->setCurrentBlock(
"pv");
817 $tpl->setVariable(
"TXT_PROPERTY_VALUE", $property[
"value"]);
818 $tpl->parseCurrentBlock();
822 $tpl->setCurrentBlock(
"lpv");
823 $tpl->setVariable(
"TXT_PROPERTY_LVALUE", $property[
"value"]);
824 $tpl->setVariable(
"LINK_PROPERTY_VALUE", $property[
"link"]);
825 $tpl->parseCurrentBlock();
827 $tpl->setCurrentBlock(
"property_row");
828 $tpl->setVariable(
"TXT_PROPERTY", $property[
"name"]);
829 $tpl->parseCurrentBlock();
830 $tpl->touchBlock(
"row");
834 $tpl->setCurrentBlock(
"property_full_row");
835 $tpl->setVariable(
"TXT_PROPERTY_FULL_VALUE", $property[
"value"]);
836 $tpl->parseCurrentBlock();
837 $tpl->touchBlock(
"row");
848 global $ilUser,$rbacsystem;
850 if(!$rbacsystem->checkAccess(
'read',$this->gui_object->object->getRefId()))
854 if($ilUser->getId() == ANONYMOUS_USER_ID)
859 include_once(
"Services/Tracking/classes/class.ilObjUserTracking.php");
865 include_once
'Services/Tracking/classes/class.ilLPObjSettings.php';
866 include_once
'Services/Tracking/classes/class.ilLPMarks.php';
875 $this->lng->loadLanguageModule(
'trac');
878 $a_tpl->setCurrentBlock(
"header_row");
879 $a_tpl->setVariable(
"TXT_SECTION",
880 $this->lng->txt(
'learning_progress'));
881 $a_tpl->parseCurrentBlock();
882 $a_tpl->touchBlock(
"row");
885 $i_tpl =
new ilTemplate(
"tpl.lp_edit_manual_info_page.html",
true,
true,
"Services/Tracking");
886 $i_tpl->setVariable(
"INFO_EDITED", $this->lng->txt(
"trac_info_edited"));
888 $this->gui_object->object->getId()),
890 array(0 => $this->lng->txt(
'trac_not_completed'),
891 1 => $this->lng->txt(
'trac_completed')),
894 $i_tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
895 $a_tpl->setCurrentBlock(
"pv");
896 $a_tpl->setVariable(
"TXT_PROPERTY_VALUE", $i_tpl->get());
897 $a_tpl->parseCurrentBlock();
898 $a_tpl->setCurrentBlock(
"property_row");
899 $a_tpl->setVariable(
"TXT_PROPERTY", $this->lng->txt(
'trac_status'));
900 $a_tpl->parseCurrentBlock();
901 $a_tpl->touchBlock(
"row");
905 if($this->gui_object->object->getType() ==
'lm' ||
906 $this->gui_object->object->getType() ==
'htlm')
908 $a_tpl->setCurrentBlock(
"pv");
910 include_once
'Services/Tracking/classes/class.ilLearningProgress.php';
912 if($progress[
'access_time'])
914 $a_tpl->setVariable(
"TXT_PROPERTY_VALUE",
919 $a_tpl->setVariable(
"TXT_PROPERTY_VALUE",
920 $this->lng->txt(
'trac_not_accessed'));
923 $a_tpl->parseCurrentBlock();
924 $a_tpl->setCurrentBlock(
"property_row");
925 $a_tpl->setVariable(
"TXT_PROPERTY", $this->lng->txt(
'trac_last_access'));
926 $a_tpl->parseCurrentBlock();
927 $a_tpl->touchBlock(
"row");
930 $a_tpl->setCurrentBlock(
"pv");
931 $a_tpl->setVariable(
"TXT_PROPERTY_VALUE",
932 (
int) $progress[
'visits']);
933 $a_tpl->parseCurrentBlock();
934 $a_tpl->setCurrentBlock(
"property_row");
935 $a_tpl->setVariable(
"TXT_PROPERTY", $this->lng->txt(
'trac_visits'));
936 $a_tpl->parseCurrentBlock();
937 $a_tpl->touchBlock(
"row");
940 if($this->gui_object->object->getType() ==
'lm')
943 $a_tpl->setCurrentBlock(
"pv");
944 $a_tpl->setVariable(
"TXT_PROPERTY_VALUE",
946 $a_tpl->parseCurrentBlock();
947 $a_tpl->setCurrentBlock(
"property_row");
948 $a_tpl->setVariable(
"TXT_PROPERTY", $this->lng->txt(
'trac_spent_time'));
949 $a_tpl->parseCurrentBlock();
950 $a_tpl->touchBlock(
"row");
959 include_once
'Services/Tracking/classes/class.ilLPObjSettings.php';
960 include_once
'Services/Tracking/classes/class.ilLPMarks.php';
962 $lp_marks =
new ilLPMarks($this->gui_object->object->getId(),$ilUser->getId());
966 $this->lng->loadLanguageModule(
'trac');
980 $next_class = $this->ctrl->getNextClass($this);
981 include_once(
"Services/Notes/classes/class.ilNoteGUI.php");
982 $notes_gui =
new ilNoteGUI($this->gui_object->object->getId(), 0,
983 $this->gui_object->object->getType());
985 $ref_id = $this->gui_object->object->getRefId();
986 if ($ilAccess->checkAccess(
"write",
"", $ref_id) ||
987 $ilAccess->checkAccess(
"edit_permissions",
"", $ref_id))
989 $notes_gui->enableCommentsSettings();
992 $notes_gui->enablePrivateNotes();
995 if ($next_class ==
"ilnotegui")
997 $html = $this->ctrl->forwardCommand($notes_gui);
1001 $html = $notes_gui->getNotesHTML();
1016 if(strlen($a_section))
1020 include_once(
'Services/LDAP/classes/class.ilLDAPRoleGroupMapping.php');
1022 if($infos = $ldap_mapping->getInfoStrings($this->gui_object->object->getId()))
1024 $info_combined =
'<div style="color:green;">';
1026 foreach($infos as $info_string)
1030 $info_combined .=
'<br />';
1032 $info_combined .= $info_string;
1034 $info_combined .=
'</div>';
1035 $this->
addProperty($this->lng->txt(
'applications'),$info_combined);
1044 $this->
getTabs($this->tabs_gui);
1052 global $rbacsystem,$ilUser,$ilAccess;
1054 $next_class = $this->ctrl->getNextClass($this);
1055 $force_active = ($next_class ==
"ilnotegui")
1059 $tabs_gui->addSubTabTarget(
'summary',
1060 $this->ctrl->getLinkTarget($this,
"showSummary"),
1061 array(
"showSummary",
""),
1062 get_class($this),
"", $force_active);
1064 if ($this->feedback_enabled)
1066 $show_feedback_tab=
false;
1067 if($ilAccess->checkAccess(
'write',
'edit',
$_GET[
'ref_id']))
1069 $show_feedback_tab=
true;
1076 include_once(
'Services/Feedback/classes/class.ilFeedback.php');
1078 $feedback->setRefId(
$_GET[
'ref_id']);
1079 $barometers = $feedback->getAllBarometer(0);
1080 if(count($barometers))
1082 foreach ($barometers as $barometer)
1084 if($barometer->canVote($ilUser->getId(),$barometer->getId())==1)
1086 $show_feedback_tab=
true;
1092 if ($show_feedback_tab)
1094 $tabs_gui->addSubTabTarget(
"feedback",
1095 $this->ctrl->getLinkTargetByClass(
"ilfeedbackgui",
"fbList"),
1096 "",
"ilfeedbackgui");
1114 $lng->loadLanguageModule(
"tagging");
1117 include_once(
"Services/Tagging/classes/class.ilTaggingGUI.php");
1119 $tagging_gui->setObject($this->gui_object->object->getId(),
1120 $this->gui_object->object->getType());
1122 $this->
addSection($lng->txt(
"tagging_tags"));
1124 if ($tags_set->get(
"enable_all_users"))
1126 $this->
addProperty($lng->txt(
"tagging_all_users"),
1127 $tagging_gui->getAllUserTagsForObjectHTML());
1131 $tagging_gui->getTaggingInputHTML());
1138 include_once(
"Services/Tagging/classes/class.ilTaggingGUI.php");
1140 $tagging_gui->setObject($this->gui_object->object->getId(),
1141 $this->gui_object->object->getType());
1142 $tagging_gui->saveInput();