47 $this->tabs_gui =& $ilTabs;
48 $this->gui_object =& $a_gui_object;
50 $this->private_notes_enabled =
false;
51 $this->news_enabled =
false;
52 $this->feedback_enabled =
false;
53 $this->learning_progress_enabled =
false;
54 $this->form_action =
"";
55 $this->top_formbuttons = array();
56 $this->hiddenelements = array();
64 global $rbacsystem,
$tpl, $ilAccess;
67 $this->lng->loadLanguageModule(
"barometer");
69 $next_class = $this->ctrl->getNextClass($this);
71 $cmd = $this->ctrl->getCmd(
"showSummary");
72 $this->ctrl->setReturn($this,
"showSummary");
83 include_once(
"Services/Feedback/classes/class.ilFeedbackGUI.php");
85 $this->ctrl->setParameterByClass(
"ilFeedbackGUI",
"obj_id",$this->gui_object->object->getId());
86 $this->ctrl->setParameterByClass(
"ilFeedbackGUI",
"ref_id",
$_GET[
'ref_id']);
87 $html = $this->ctrl->forwardCommand($fb_gui);
88 $tpl->setContent($html);
95 case "ilpublicuserprofilegui":
96 include_once(
"./Services/User/classes/class.ilPublicUserProfileGUI.php");
98 $user_profile->setBackUrl($this->ctrl->getLinkTarget($this,
"showSummary"));
99 $html = $this->ctrl->forwardCommand($user_profile);
100 $tpl->setContent($html);
103 case "ilcommonactiondispatchergui":
104 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
106 $this->ctrl->forwardCommand($gui);
110 return $this->
$cmd();
123 $this->table_class = $a_val;
141 $this->private_notes_enabled = $a_enable;
149 $this->learning_progress_enabled = $a_enable;
158 $this->feedback_enabled = $a_enable;
166 $this->news_enabled = $a_enable;
174 $this->news_editing = $a_enable;
186 $this->block_property[$a_block_type][$a_property] = $a_value;
191 return $this->block_property;
200 $this->section[$this->sec_nr][
"title"] = $a_title;
201 $this->section[$this->sec_nr][
"hidden"] = (bool)$this->hidden;
209 $this->form_action = $a_form_action;
210 $this->form_target = $a_form_target;
219 $this->form_action =
"";
231 $this->section[$this->sec_nr][
"properties"][] =
232 array(
"name" => $a_name,
"value" => $a_value,
239 function addPropertyCheckbox($a_name, $a_checkbox_name, $a_checkbox_value, $a_checkbox_label =
"", $a_checkbox_checked =
false)
241 $checkbox =
"<input type=\"checkbox\" name=\"$a_checkbox_name\" value=\"$a_checkbox_value\" id=\"$a_checkbox_name$a_checkbox_value\"";
242 if ($a_checkbox_checked)
244 $checkbox .=
" checked=\"checked\"";
247 if (strlen($a_checkbox_label))
249 $checkbox .=
" <label for=\"$a_checkbox_name$a_checkbox_value\">$a_checkbox_label</label>";
251 $this->section[$this->sec_nr][
"properties"][] =
252 array(
"name" => $a_name,
"value" => $checkbox);
258 function addPropertyTextinput($a_name, $a_input_name, $a_input_value =
"", $a_input_size =
"", $direct_button_command =
"", $direct_button_label =
"")
260 $input =
"<input type=\"text\" name=\"$a_input_name\" id=\"$a_input_name\"";
261 if (strlen($a_input_value))
265 if (strlen($a_input_size))
267 $input .=
" size=\"" . $a_input_size .
"\"";
270 if (strlen($direct_button_command) && strlen($direct_button_label))
272 $input .=
" <input type=\"submit\" class=\"submit\" name=\"cmd[$direct_button_command]\" value=\"$direct_button_label\" />";
274 $this->section[$this->sec_nr][
"properties"][] =
275 array(
"name" =>
"<label for=\"$a_input_name\">$a_name</label>",
"value" => $input);
281 function addButton($a_title, $a_link, $a_frame =
"", $a_position =
"top")
283 if ($a_position ==
"top")
285 $this->top_buttons[] =
286 array(
"title" => $a_title,
"link" => $a_link,
"target" => $a_frame);
296 if ($a_position ==
"top")
298 array_push($this->top_formbuttons,
299 array(
"command" => $a_command,
"title" => $a_title)
306 array_push($this->hiddenelements, array(
"name" => $a_name,
"value" => $a_value));
316 $lng->loadLanguageModule(
"meta");
318 include_once(
"./Services/MetaData/classes/class.ilMD.php");
319 $md =
new ilMD($a_rep_obj_id,$a_obj_id, $a_type);
321 if ($md_gen = $md->getGeneral())
326 foreach($md_gen->getDescriptionIds() as $id)
328 $md_des = $md_gen->getDescription($id);
329 $description = $md_des->getDescription();
335 foreach($ids = $md_gen->getLanguageIds() as $id)
337 $md_lan = $md_gen->getLanguage($id);
338 if ($md_lan->getLanguageCode() !=
"")
340 $langs[] = $lng->txt(
"meta_l_".$md_lan->getLanguageCode());
343 $langs = implode($langs,
", ");
347 foreach($ids = $md_gen->getKeywordIds() as $id)
349 $md_key = $md_gen->getKeyword($id);
350 $keywords[] = $md_key->getKeyword();
352 $keywords = implode($keywords,
", ");
356 if(is_object($lifecycle = $md->getLifecycle()))
359 foreach(($ids = $lifecycle->getContributeIds()) as $con_id)
361 $md_con = $lifecycle->getContribute($con_id);
362 if ($md_con->getRole() ==
"Author")
364 foreach($ent_ids = $md_con->getEntityIds() as $ent_id)
366 $md_ent = $md_con->getEntity($ent_id);
367 $author = $author.$sep.$md_ent->getEntity();
376 if(is_object($rights = $md->getRights()))
378 include_once(
'Services/MetaData/classes/class.ilMDUtils.php');
383 #if(is_object($educational = $md->getEducational()))
385 # $learning_time = $educational->getTypicalLearningTime();
388 if(is_object($educational = $md->getEducational()))
390 if($seconds = $educational->getTypicalLearningTimeSeconds())
400 if ($description !=
"")
423 if ($copyright !=
"")
428 if ($learning_time !=
"")
430 $this->
addProperty($lng->txt(
"meta_typical_learning_time"),
442 $this->
addSection($lng->txt(
"additional_info"));
443 $a_obj = $this->gui_object->object;
446 if (is_object($a_obj))
449 $type = $a_obj->getType();
454 include_once(
'classes/class.ilLink.php');
459 if (
true || $d_set->get(
"add_info_links") ==
"1")
461 $lng->loadLanguageModule(
"delic");
462 $del_link =
'<br/><a class="small" href="http://del.icio.us/post?desc=nn&url='.
464 '" /> '.$lng->txt(
"delic_add_to_delicious").
468 include_once
'Services/WebServices/ECS/classes/class.ilECSServerSettings.php';
476 include_once
'Services/PermanentLink/classes/class.ilPermanentLinkGUI.php';
478 $pm->setIncludePermanentLinkText(
false);
479 $pm->setAlignCenter(
false);
487 $title = $ilObjDataCache->lookupTitle($a_obj->getId());
492 if ($ilAccess->checkAccess(
"write",
"",
$ref_id) ||
493 $ilAccess->checkAccess(
"edit_permissions",
"",
$ref_id))
495 $obj_id = $a_obj->getId();
500 if ($tree->isInTree($r))
505 if (count($refs) > 1)
511 $cont_loc->addContextItems($r,
true);
512 $links.= $sep.$cont_loc->getHTML();
517 '<div class="small">'.$links.
'</div>'
527 $lng->txt(
"create_date"),
531 if ($ilUser->getId() != ANONYMOUS_USER_ID and $a_obj->getOwner())
533 include_once
'classes/class.ilObjectFactory.php';
539 if (! is_object($ownerObj))
541 $this->
addProperty($lng->txt(
"owner"), $lng->txt(
"no_owner"));
543 else if ($ownerObj->hasPublicProfile())
545 $ilCtrl->setParameterByClass(
"ilpublicuserprofilegui",
"user_id", $ownerObj->getId());
546 $this->
addProperty($lng->txt(
"owner"),$ownerObj->getPublicName(),$ilCtrl->getLinkTargetByClass(
"ilpublicuserprofilegui",
"getHTML"));
550 $this->
addProperty($lng->txt(
"owner"),$ownerObj->getPublicName());
555 require_once
'Services/WebDAV/classes/class.ilDiskQuotaActivationChecker.php';
556 if ($ilUser->getId() != ANONYMOUS_USER_ID &&
559 $size = $a_obj->getDiskUsage();
560 if (
$size !== null) {
565 require_once
'Services/Tracking/classes/class.ilChangeEvent.php';
568 if ($ilUser->getId() != ANONYMOUS_USER_ID)
573 $count_user_reads = 0;
574 $count_anonymous_reads = 0;
575 foreach ($readEvents as $evt)
577 if ($evt[
'usr_id'] == ANONYMOUS_USER_ID)
579 $count_anonymous_reads += $evt[
'read_count'];
583 $count_user_reads += $evt[
'read_count'];
591 if ($count_anonymous_reads > 0)
593 $this->
addProperty($this->lng->txt(
"readcount_anonymous_users"),$count_anonymous_reads);
595 if ($count_user_reads > 0)
597 $this->
addProperty($this->lng->txt(
"readcount_users"),$count_user_reads);
599 if ($count_users > 0)
601 $this->
addProperty($this->lng->txt(
"accesscount_registered_users"),$count_users);
608 require_once(
'Services/WebDAV/classes/class.ilDAVServer.php');
612 if ($ilUser->getId() != ANONYMOUS_USER_ID)
617 if ($ilias->account->getId() != ANONYMOUS_USER_ID)
619 $locks =& $davLocks->getLocksOnObjectObj($a_obj->getId());
620 if (count($locks) > 0)
622 $lockUser =
new ilObjUser($locks[0][
'ilias_owner']);
624 $lockUser->getPublicName()
626 "./ilias.php?user=".$locks[0][
'ilias_owner'].
'&cmd=showUserProfile&cmdClass=ilpersonaldesktopgui&cmdNode=1&baseClass=ilPersonalDesktopGUI'
642 global
$tpl, $ilAccess;
656 include_once(
"Services/Block/classes/class.ilColumnGUI.php");
660 if (!$ilCtrl->isAsynch())
669 $html = $ilCtrl->forwardCommand($column_gui);
676 $html = $ilCtrl->forwardCommand($column_gui);
695 include_once(
"Services/Block/classes/class.ilColumnGUI.php");
699 if ($ilCtrl->getNextClass() ==
"ilcolumngui" &&
703 $html = $ilCtrl->forwardCommand($column_gui);
707 if (!$ilCtrl->isAsynch())
709 if ($this->news_enabled)
711 $html = $ilCtrl->getHTML($column_gui);
724 global
$lng, $ilAccess;
726 $column_gui->setEnableEdit($this->news_editing);
727 $column_gui->setRepositoryMode(
true);
738 $tpl =
new ilTemplate(
"tpl.infoscreen.html" ,
true,
true,
"Services/InfoScreen");
741 if ($this->form_action ==
"")
748 $tpl->touchBlock(
"hidden_js");
749 if($this->show_hidden_toggle)
751 $this->
addButton($lng->txt(
"toggle_hidden_sections"),
"JavaScript:toggleSections();");
756 if (count($this->top_buttons) > 0)
758 $tpl->addBlockfile(
"TOP_BUTTONS",
"top_buttons",
"tpl.buttons.html");
760 foreach($this->top_buttons as $button)
763 $tpl->setCurrentBlock(
"btn_cell");
764 $tpl->setVariable(
"BTN_LINK", $button[
"link"]);
765 $tpl->setVariable(
"BTN_TARGET", $button[
"target"]);
766 $tpl->setVariable(
"BTN_TXT", $button[
"title"]);
767 $tpl->parseCurrentBlock();
772 if ((count($this->top_formbuttons) > 0) && (strlen($this->form_action) > 0))
774 $tpl->addBlockfile(
"TOP_FORMBUTTONS",
"top_submitbuttons",
"tpl.submitbuttons.html");
776 foreach($this->top_formbuttons as $button)
779 $tpl->setCurrentBlock(
"btn_submit_cell");
780 $tpl->setVariable(
"BTN_COMMAND", $button[
"command"]);
781 $tpl->setVariable(
"BTN_NAME", $button[
"title"]);
782 $tpl->parseCurrentBlock();
787 if (strlen($this->form_action) > 0)
789 if(strlen($this->form_target))
791 $tpl->setCurrentBlock(
'formtarg');
792 $tpl->setVariable(
'FORMTARGET',$this->form_target);
793 $tpl->parseCurrentBlock();
796 $tpl->setCurrentBlock(
"formtop");
797 $tpl->setVariable(
"FORMACTION", $this->form_action);
798 $tpl->parseCurrentBlock();
799 $tpl->touchBlock(
"formbottom");
802 if (count($this->hiddenelements))
804 foreach ($this->hiddenelements as $hidden)
806 $tpl->setCurrentBlock(
"hidden_element");
807 $tpl->setVariable(
"HIDDEN_NAME", $hidden[
"name"]);
808 $tpl->setVariable(
"HIDDEN_VALUE", $hidden[
"value"]);
809 $tpl->parseCurrentBlock();
816 $tpl->setCurrentBlock(
"learning_progress");
817 $tpl->setVariable(
"LP_TABLE",$html);
818 $tpl->parseCurrentBlock();
822 if ($this->private_notes_enabled && !$ilSetting->get(
'disable_notes'))
825 $tpl->setCurrentBlock(
"notes");
826 $tpl->setVariable(
"NOTES", $html);
827 $tpl->parseCurrentBlock();
831 if (is_object($this->gui_object->object))
834 if ($tags_set->get(
"enable") && $ilUser->getId() != ANONYMOUS_USER_ID)
840 if(is_object($this->gui_object->object))
846 for($i = 1; $i <= $this->sec_nr; $i++)
848 if (is_array($this->section[$i][
"properties"]))
851 foreach($this->section[$i][
"properties"] as $property)
853 if ($property[
"name"] !=
"")
855 if ($property[
"link"] ==
"")
857 $tpl->setCurrentBlock(
"pv");
858 $tpl->setVariable(
"TXT_PROPERTY_VALUE", $property[
"value"]);
859 $tpl->parseCurrentBlock();
863 $tpl->setCurrentBlock(
"lpv");
864 $tpl->setVariable(
"TXT_PROPERTY_LVALUE", $property[
"value"]);
865 $tpl->setVariable(
"LINK_PROPERTY_VALUE", $property[
"link"]);
866 $tpl->parseCurrentBlock();
868 $tpl->setCurrentBlock(
"property_row");
869 $tpl->setVariable(
"TXT_PROPERTY", $property[
"name"]);
870 $tpl->parseCurrentBlock();
874 $tpl->setCurrentBlock(
"property_full_row");
875 $tpl->setVariable(
"TXT_PROPERTY_FULL_VALUE", $property[
"value"]);
876 $tpl->parseCurrentBlock();
881 if($this->section[$i][
"hidden"])
883 $tpl->setVariable(
"SECTION_HIDDEN",
" style=\"display:none;\"");
884 $tpl->setVariable(
"SECTION_ID",
"hidable_".$i);
888 $tpl->setVariable(
"SECTION_ID", $i);
891 $tpl->setVariable(
"TXT_SECTION", $this->section[$i][
"title"]);
892 $tpl->touchBlock(
"row");
901 global $ilUser,$rbacsystem;
903 if(!$rbacsystem->checkAccess(
'read',$this->gui_object->object->getRefId()))
907 if($ilUser->getId() == ANONYMOUS_USER_ID)
912 include_once(
"Services/Tracking/classes/class.ilObjUserTracking.php");
918 include_once
'Services/Tracking/classes/class.ilLPObjSettings.php';
919 include_once
'Services/Tracking/classes/class.ilLPMarks.php';
928 $this->lng->loadLanguageModule(
'trac');
932 $a_tpl->setVariable(
"TXT_SECTION",
933 $this->lng->txt(
'learning_progress'));
934 $a_tpl->parseCurrentBlock();
935 $a_tpl->touchBlock(
"row");
938 $i_tpl =
new ilTemplate(
"tpl.lp_edit_manual_info_page.html",
true,
true,
"Services/Tracking");
939 $i_tpl->setVariable(
"INFO_EDITED", $this->lng->txt(
"trac_info_edited"));
941 $this->gui_object->object->getId()),
943 array(0 => $this->lng->txt(
'trac_not_completed'),
944 1 => $this->lng->txt(
'trac_completed')),
947 $i_tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
948 $a_tpl->setCurrentBlock(
"pv");
949 $a_tpl->setVariable(
"TXT_PROPERTY_VALUE", $i_tpl->get());
950 $a_tpl->parseCurrentBlock();
951 $a_tpl->setCurrentBlock(
"property_row");
952 $a_tpl->setVariable(
"TXT_PROPERTY", $this->lng->txt(
'trac_status'));
953 $a_tpl->parseCurrentBlock();
954 $a_tpl->touchBlock(
"row");
958 if($this->gui_object->object->getType() ==
'lm' ||
959 $this->gui_object->object->getType() ==
'htlm')
961 $a_tpl->setCurrentBlock(
"pv");
963 include_once
'Services/Tracking/classes/class.ilLearningProgress.php';
965 if($progress[
'access_time'])
967 $a_tpl->setVariable(
"TXT_PROPERTY_VALUE",
972 $a_tpl->setVariable(
"TXT_PROPERTY_VALUE",
973 $this->lng->txt(
'trac_not_accessed'));
976 $a_tpl->parseCurrentBlock();
977 $a_tpl->setCurrentBlock(
"property_row");
978 $a_tpl->setVariable(
"TXT_PROPERTY", $this->lng->txt(
'trac_last_access'));
979 $a_tpl->parseCurrentBlock();
980 $a_tpl->touchBlock(
"row");
983 $a_tpl->setCurrentBlock(
"pv");
984 $a_tpl->setVariable(
"TXT_PROPERTY_VALUE",
985 (
int) $progress[
'visits']);
986 $a_tpl->parseCurrentBlock();
987 $a_tpl->setCurrentBlock(
"property_row");
988 $a_tpl->setVariable(
"TXT_PROPERTY", $this->lng->txt(
'trac_visits'));
989 $a_tpl->parseCurrentBlock();
990 $a_tpl->touchBlock(
"row");
993 if($this->gui_object->object->getType() ==
'lm')
996 $a_tpl->setCurrentBlock(
"pv");
997 $a_tpl->setVariable(
"TXT_PROPERTY_VALUE",
999 $a_tpl->parseCurrentBlock();
1000 $a_tpl->setCurrentBlock(
"property_row");
1001 $a_tpl->setVariable(
"TXT_PROPERTY", $this->lng->txt(
'trac_spent_time'));
1002 $a_tpl->parseCurrentBlock();
1003 $a_tpl->touchBlock(
"row");
1012 include_once
'Services/Tracking/classes/class.ilLPObjSettings.php';
1013 include_once
'Services/Tracking/classes/class.ilLPMarks.php';
1015 $lp_marks =
new ilLPMarks($this->gui_object->object->getId(),$ilUser->getId());
1017 $lp_marks->update();
1019 require_once
'Services/Tracking/classes/class.ilLPStatusWrapper.php';
1022 $this->lng->loadLanguageModule(
'trac');
1036 $next_class = $this->ctrl->getNextClass($this);
1037 include_once(
"Services/Notes/classes/class.ilNoteGUI.php");
1038 $notes_gui =
new ilNoteGUI($this->gui_object->object->getId(), 0,
1039 $this->gui_object->object->getType());
1042 if($ilSetting->get(
"disable_comments"))
1052 $ref_id = $this->gui_object->object->getRefId();
1053 if ($ilAccess->checkAccess(
"write",
"",
$ref_id) ||
1054 $ilAccess->checkAccess(
"edit_permissions",
"",
$ref_id))
1056 $notes_gui->enableCommentsSettings();
1064 if ($next_class ==
"ilnotegui")
1066 $html = $this->ctrl->forwardCommand($notes_gui);
1070 $html = $notes_gui->getNotesHTML();
1085 if(strlen($a_section))
1089 include_once(
'Services/LDAP/classes/class.ilLDAPRoleGroupMapping.php');
1091 if($infos = $ldap_mapping->getInfoStrings($this->gui_object->object->getId()))
1093 $info_combined =
'<div style="color:green;">';
1095 foreach($infos as $info_string)
1099 $info_combined .=
'<br />';
1101 $info_combined .= $info_string;
1103 $info_combined .=
'</div>';
1104 $this->
addProperty($this->lng->txt(
'applications'),$info_combined);
1113 $this->
getTabs($this->tabs_gui);
1121 global $rbacsystem,$ilUser,$ilAccess;
1123 $next_class = $this->ctrl->getNextClass($this);
1124 $force_active = ($next_class ==
"ilnotegui")
1128 $tabs_gui->addSubTabTarget(
'summary',
1129 $this->ctrl->getLinkTarget($this,
"showSummary"),
1130 array(
"showSummary",
""),
1131 get_class($this),
"", $force_active);
1133 if ($this->feedback_enabled)
1135 $show_feedback_tab=
false;
1136 if($ilAccess->checkAccess(
'write',
'edit',
$_GET[
'ref_id']))
1138 $show_feedback_tab=
true;
1145 include_once(
'Services/Feedback/classes/class.ilFeedback.php');
1147 $feedback->setRefId(
$_GET[
'ref_id']);
1148 $barometers = $feedback->getAllBarometer(0);
1149 if(count($barometers))
1151 foreach ($barometers as $barometer)
1153 if($barometer->canVote($ilUser->getId(),$barometer->getId())==1)
1155 $show_feedback_tab=
true;
1161 if ($show_feedback_tab)
1163 $tabs_gui->addSubTabTarget(
"feedback",
1164 $this->ctrl->getLinkTargetByClass(
"ilfeedbackgui",
"fbList"),
1165 "",
"ilfeedbackgui");
1183 $lng->loadLanguageModule(
"tagging");
1186 include_once(
"Services/Tagging/classes/class.ilTaggingGUI.php");
1188 $tagging_gui->setObject($this->gui_object->object->getId(),
1189 $this->gui_object->object->getType());
1191 $this->
addSection($lng->txt(
"tagging_tags"));
1193 if ($tags_set->get(
"enable_all_users"))
1195 $this->
addProperty($lng->txt(
"tagging_all_users"),
1196 $tagging_gui->getAllUserTagsForObjectHTML());
1200 $tagging_gui->getTaggingInputHTML());
1207 include_once(
"Services/Tagging/classes/class.ilTaggingGUI.php");
1209 $tagging_gui->setObject($this->gui_object->object->getId(),
1210 $this->gui_object->object->getType());
1211 $tagging_gui->saveInput();
1218 $this->hidden =
true;
1219 $this->show_hidden_toggle = (bool)$a_add_toggle;
1226 return "<a class=\"submit\" onClick=\"toggleSections();\" href=\"#\">".$lng->txt(
"toggle_hidden_sections").
"</a>";