46 $this->tabs_gui =& $ilTabs;
47 $this->gui_object =& $a_gui_object;
49 $this->private_notes_enabled =
false;
50 $this->news_enabled =
false;
51 $this->feedback_enabled =
false;
52 $this->learning_progress_enabled =
false;
53 $this->form_action =
"";
54 $this->top_formbuttons = array();
55 $this->hiddenelements = array();
68 $lng->loadLanguageModule(
"barometer");
70 $next_class = $this->ctrl->getNextClass($this);
72 $cmd = $this->ctrl->getCmd(
"showSummary");
73 $this->ctrl->setReturn($this,
"showSummary");
84 include_once(
"Services/Feedback/classes/class.ilFeedbackGUI.php");
86 $this->ctrl->setParameterByClass(
"ilFeedbackGUI",
"obj_id",$this->gui_object->object->getId());
87 $this->ctrl->setParameterByClass(
"ilFeedbackGUI",
"ref_id",
$_GET[
'ref_id']);
88 $html = $this->ctrl->forwardCommand($fb_gui);
89 $tpl->setContent($html);
96 case "ilpublicuserprofilegui":
97 include_once(
"./Services/User/classes/class.ilPublicUserProfileGUI.php");
99 $user_profile->setBackUrl($ilCtrl->getLinkTarget($this,
"showSummary"));
100 $html = $ilCtrl->forwardCommand($user_profile);
101 $tpl->setContent($html);
105 return $this->
$cmd();
118 $this->table_class = $a_val;
136 $this->private_notes_enabled = $a_enable;
144 $this->learning_progress_enabled = $a_enable;
153 $this->feedback_enabled = $a_enable;
161 $this->news_enabled = $a_enable;
169 $this->news_editing = $a_enable;
181 $this->block_property[$a_block_type][$a_property] = $a_value;
186 return $this->block_property;
195 $this->section[$this->sec_nr][
"title"] = $a_title;
203 $this->form_action = $a_form_action;
211 $this->form_action =
"";
223 $this->section[$this->sec_nr][
"properties"][] =
224 array(
"name" => $a_name,
"value" => $a_value,
231 function addPropertyCheckbox($a_name, $a_checkbox_name, $a_checkbox_value, $a_checkbox_label =
"", $a_checkbox_checked =
false)
233 $checkbox =
"<input type=\"checkbox\" name=\"$a_checkbox_name\" value=\"$a_checkbox_value\" id=\"$a_checkbox_name$a_checkbox_value\"";
234 if ($a_checkbox_checked)
236 $checkbox .=
" checked=\"checked\"";
239 if (strlen($a_checkbox_label))
241 $checkbox .=
" <label for=\"$a_checkbox_name$a_checkbox_value\">$a_checkbox_label</label>";
243 $this->section[$this->sec_nr][
"properties"][] =
244 array(
"name" => $a_name,
"value" => $checkbox);
250 function addPropertyTextinput($a_name, $a_input_name, $a_input_value =
"", $a_input_size =
"", $direct_button_command =
"", $direct_button_label =
"")
252 $input =
"<input type=\"text\" name=\"$a_input_name\" id=\"$a_input_name\"";
253 if (strlen($a_input_value))
257 if (strlen($a_input_size))
259 $input .=
" size=\"" . $a_input_size .
"\"";
262 if (strlen($direct_button_command) && strlen($direct_button_label))
264 $input .=
" <input type=\"submit\" class=\"submit\" name=\"cmd[$direct_button_command]\" value=\"$direct_button_label\" />";
266 $this->section[$this->sec_nr][
"properties"][] =
267 array(
"name" =>
"<label for=\"$a_input_name\">$a_name</label>",
"value" => $input);
273 function addButton($a_title, $a_link, $a_frame =
"", $a_position =
"top")
275 if ($a_position ==
"top")
277 $this->top_buttons[] =
278 array(
"title" => $a_title,
"link" => $a_link,
"target" => $a_frame);
288 if ($a_position ==
"top")
290 array_push($this->top_formbuttons,
291 array(
"command" => $a_command,
"title" => $a_title)
298 array_push($this->hiddenelements, array(
"name" => $a_name,
"value" => $a_value));
308 $lng->loadLanguageModule(
"meta");
310 include_once(
"./Services/MetaData/classes/class.ilMD.php");
311 $md =
new ilMD($a_rep_obj_id,$a_obj_id, $a_type);
313 if ($md_gen = $md->getGeneral())
318 foreach($md_gen->getDescriptionIds() as $id)
320 $md_des = $md_gen->getDescription($id);
321 $description = $md_des->getDescription();
327 foreach($ids = $md_gen->getLanguageIds() as $id)
329 $md_lan = $md_gen->getLanguage($id);
330 if ($md_lan->getLanguageCode() !=
"")
332 $langs[] = $lng->txt(
"meta_l_".$md_lan->getLanguageCode());
335 $langs = implode($langs,
", ");
339 foreach($ids = $md_gen->getKeywordIds() as $id)
341 $md_key = $md_gen->getKeyword($id);
342 $keywords[] = $md_key->getKeyword();
344 $keywords = implode($keywords,
", ");
348 if(is_object($lifecycle = $md->getLifecycle()))
351 foreach(($ids = $lifecycle->getContributeIds()) as $con_id)
353 $md_con = $lifecycle->getContribute($con_id);
354 if ($md_con->getRole() ==
"Author")
356 foreach($ent_ids = $md_con->getEntityIds() as $ent_id)
358 $md_ent = $md_con->getEntity($ent_id);
359 $author = $author.$sep.$md_ent->getEntity();
368 if(is_object($rights = $md->getRights()))
370 include_once(
'Services/MetaData/classes/class.ilMDUtils.php');
375 #if(is_object($educational = $md->getEducational()))
377 # $learning_time = $educational->getTypicalLearningTime();
380 if(is_object($educational = $md->getEducational()))
382 if($seconds = $educational->getTypicalLearningTimeSeconds())
392 if ($description !=
"")
415 if ($copyright !=
"")
420 if ($learning_time !=
"")
422 $this->
addProperty($lng->txt(
"meta_typical_learning_time"),
432 if (KIOSK_MODE)
return;
435 $this->
addSection($lng->txt(
"additional_info"));
436 $a_obj = $this->gui_object->object;
439 if (is_object($a_obj))
442 $type = $a_obj->getType();
445 include_once(
'classes/class.ilLink.php');
450 if (
true || $d_set->get(
"add_info_links") ==
"1")
452 $lng->loadLanguageModule(
"delic");
453 $del_link =
'<br/><a class="small" href="http://del.icio.us/post?desc=nn&url='.
455 '" /> '.$lng->txt(
"delic_add_to_delicious").
459 include_once(
'Services/WebServices/ECS/classes/class.ilECSSettings.php');
461 if($settings->isEnabled())
468 include_once
'Services/PermanentLink/classes/class.ilPermanentLinkGUI.php';
470 $pm->setIncludePermanentLinkText(
false);
471 $pm->setAlignCenter(
false);
479 $title = $ilObjDataCache->lookupTitle($a_obj->getId());
484 if ($ilAccess->checkAccess(
"write",
"",
$ref_id) ||
485 $ilAccess->checkAccess(
"edit_permissions",
"",
$ref_id))
487 $obj_id = $a_obj->getId();
492 if ($tree->isInTree($r))
497 if (count($refs) > 1)
503 $cont_loc->addContextItems($r,
true);
504 $links.= $sep.$cont_loc->getHTML();
509 '<div class="small">'.$links.
'</div>'
518 $lng->txt(
"create_date"),
522 if ($ilUser->getId() != ANONYMOUS_USER_ID and $a_obj->getOwner())
524 include_once
'classes/class.ilObjectFactory.php';
530 if (! is_object($ownerObj))
532 $this->
addProperty($lng->txt(
"owner"), $lng->txt(
"no_owner"));
534 else if ($ownerObj->hasPublicProfile())
536 $ilCtrl->setParameterByClass(
"ilpublicuserprofilegui",
"user_id", $ownerObj->getId());
537 $this->
addProperty($lng->txt(
"owner"),$ownerObj->getPublicName(),$ilCtrl->getLinkTargetByClass(
"ilpublicuserprofilegui",
"getHTML"));
541 $this->
addProperty($lng->txt(
"owner"),$ownerObj->getPublicName());
546 require_once
'Services/WebDAV/classes/class.ilDiskQuotaActivationChecker.php';
547 if ($ilUser->getId() != ANONYMOUS_USER_ID &&
550 $size = $a_obj->getDiskUsage();
551 if ($size !== null) {
556 require_once
'Services/Tracking/classes/class.ilChangeEvent.php';
559 if ($ilUser->getId() != ANONYMOUS_USER_ID)
564 $count_user_reads = 0;
565 $count_anonymous_reads = 0;
566 foreach ($readEvents as $evt)
568 if ($evt[
'usr_id'] == ANONYMOUS_USER_ID)
570 $count_anonymous_reads += $evt[
'read_count'];
574 $count_user_reads += $evt[
'read_count'];
582 if ($count_anonymous_reads > 0)
584 $this->
addProperty($this->lng->txt(
"readcount_anonymous_users"),$count_anonymous_reads);
586 if ($count_user_reads > 0)
588 $this->
addProperty($this->lng->txt(
"readcount_users"),$count_user_reads);
590 if ($count_users > 0)
592 $this->
addProperty($this->lng->txt(
"accesscount_registered_users"),$count_users);
599 require_once(
'Services/WebDAV/classes/class.ilDAVServer.php');
603 if ($ilUser->getId() != ANONYMOUS_USER_ID)
608 if ($ilias->account->getId() != ANONYMOUS_USER_ID)
610 $locks =& $davLocks->getLocksOnObjectObj($a_obj->getId());
611 if (count($locks) > 0)
613 $lockUser =
new ilObjUser($locks[0][
'ilias_owner']);
615 $lockUser->getPublicName()
617 "./ilias.php?user=".$locks[0][
'ilias_owner'].
'&cmd=showUserProfile&cmdClass=ilpersonaldesktopgui&cmdNode=1&baseClass=ilPersonalDesktopGUI'
633 global
$tpl, $ilAccess;
647 include_once(
"Services/Block/classes/class.ilColumnGUI.php");
651 if (!$ilCtrl->isAsynch())
660 $html = $ilCtrl->forwardCommand($column_gui);
667 $html = $ilCtrl->forwardCommand($column_gui);
686 include_once(
"Services/Block/classes/class.ilColumnGUI.php");
690 if ($ilCtrl->getNextClass() ==
"ilcolumngui" &&
694 $html = $ilCtrl->forwardCommand($column_gui);
698 if (!$ilCtrl->isAsynch())
700 if ($this->news_enabled)
702 $html = $ilCtrl->getHTML($column_gui);
715 global
$lng, $ilAccess;
717 $column_gui->setEnableEdit($this->news_editing);
718 $column_gui->setRepositoryMode(
true);
729 $tpl =
new ilTemplate(
"tpl.infoscreen.html" ,
true,
true,
"Services/InfoScreen");
732 if ($this->form_action ==
"")
738 if (count($this->top_buttons) > 0)
740 $tpl->addBlockfile(
"TOP_BUTTONS",
"top_buttons",
"tpl.buttons.html");
742 foreach($this->top_buttons as $button)
745 $tpl->setCurrentBlock(
"btn_cell");
746 $tpl->setVariable(
"BTN_LINK", $button[
"link"]);
747 $tpl->setVariable(
"BTN_TARGET", $button[
"target"]);
748 $tpl->setVariable(
"BTN_TXT", $button[
"title"]);
749 $tpl->parseCurrentBlock();
754 if ((count($this->top_formbuttons) > 0) && (strlen($this->form_action) > 0))
756 $tpl->addBlockfile(
"TOP_FORMBUTTONS",
"top_submitbuttons",
"tpl.submitbuttons.html");
758 foreach($this->top_formbuttons as $button)
761 $tpl->setCurrentBlock(
"btn_submit_cell");
762 $tpl->setVariable(
"BTN_COMMAND", $button[
"command"]);
763 $tpl->setVariable(
"BTN_NAME", $button[
"title"]);
764 $tpl->parseCurrentBlock();
769 if (strlen($this->form_action) > 0)
771 $tpl->setCurrentBlock(
"formtop");
772 $tpl->setVariable(
"FORMACTION", $this->form_action);
773 $tpl->parseCurrentBlock();
774 $tpl->touchBlock(
"formbottom");
777 if (count($this->hiddenelements))
779 foreach ($this->hiddenelements as $hidden)
781 $tpl->setCurrentBlock(
"hidden_element");
782 $tpl->setVariable(
"HIDDEN_NAME", $hidden[
"name"]);
783 $tpl->setVariable(
"HIDDEN_VALUE", $hidden[
"value"]);
784 $tpl->parseCurrentBlock();
791 $tpl->setCurrentBlock(
"learning_progress");
792 $tpl->setVariable(
"LP_TABLE",$html);
793 $tpl->parseCurrentBlock();
797 if ($this->private_notes_enabled && !$ilSetting->get(
'disable_notes'))
800 $tpl->setCurrentBlock(
"notes");
801 $tpl->setVariable(
"NOTES", $html);
802 $tpl->parseCurrentBlock();
806 if (is_object($this->gui_object->object))
809 if ($tags_set->get(
"enable") && $ilUser->getId() != ANONYMOUS_USER_ID)
815 if(is_object($this->gui_object->object))
821 for($i = 1; $i <= $this->sec_nr; $i++)
823 if (is_array($this->section[$i][
"properties"]))
826 $tpl->setCurrentBlock(
"header_row");
827 $tpl->setVariable(
"TXT_SECTION",
828 $this->section[$i][
"title"]);
829 $tpl->parseCurrentBlock();
830 $tpl->touchBlock(
"row");
833 foreach($this->section[$i][
"properties"] as $property)
835 if ($property[
"name"] !=
"")
837 if ($property[
"link"] ==
"")
839 $tpl->setCurrentBlock(
"pv");
840 $tpl->setVariable(
"TXT_PROPERTY_VALUE", $property[
"value"]);
841 $tpl->parseCurrentBlock();
845 $tpl->setCurrentBlock(
"lpv");
846 $tpl->setVariable(
"TXT_PROPERTY_LVALUE", $property[
"value"]);
847 $tpl->setVariable(
"LINK_PROPERTY_VALUE", $property[
"link"]);
848 $tpl->parseCurrentBlock();
850 $tpl->setCurrentBlock(
"property_row");
851 $tpl->setVariable(
"TXT_PROPERTY", $property[
"name"]);
852 $tpl->parseCurrentBlock();
853 $tpl->touchBlock(
"row");
857 $tpl->setCurrentBlock(
"property_full_row");
858 $tpl->setVariable(
"TXT_PROPERTY_FULL_VALUE", $property[
"value"]);
859 $tpl->parseCurrentBlock();
860 $tpl->touchBlock(
"row");
873 global $ilUser,$rbacsystem;
875 if(!$rbacsystem->checkAccess(
'read',$this->gui_object->object->getRefId()))
879 if($ilUser->getId() == ANONYMOUS_USER_ID)
884 include_once(
"Services/Tracking/classes/class.ilObjUserTracking.php");
890 include_once
'Services/Tracking/classes/class.ilLPObjSettings.php';
891 include_once
'Services/Tracking/classes/class.ilLPMarks.php';
900 $this->lng->loadLanguageModule(
'trac');
903 $a_tpl->setCurrentBlock(
"header_row");
904 $a_tpl->setVariable(
"TXT_SECTION",
905 $this->lng->txt(
'learning_progress'));
906 $a_tpl->parseCurrentBlock();
907 $a_tpl->touchBlock(
"row");
910 $i_tpl =
new ilTemplate(
"tpl.lp_edit_manual_info_page.html",
true,
true,
"Services/Tracking");
911 $i_tpl->setVariable(
"INFO_EDITED", $this->lng->txt(
"trac_info_edited"));
913 $this->gui_object->object->getId()),
915 array(0 => $this->lng->txt(
'trac_not_completed'),
916 1 => $this->lng->txt(
'trac_completed')),
919 $i_tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
920 $a_tpl->setCurrentBlock(
"pv");
921 $a_tpl->setVariable(
"TXT_PROPERTY_VALUE", $i_tpl->get());
922 $a_tpl->parseCurrentBlock();
923 $a_tpl->setCurrentBlock(
"property_row");
924 $a_tpl->setVariable(
"TXT_PROPERTY", $this->lng->txt(
'trac_status'));
925 $a_tpl->parseCurrentBlock();
926 $a_tpl->touchBlock(
"row");
930 if($this->gui_object->object->getType() ==
'lm' ||
931 $this->gui_object->object->getType() ==
'htlm')
933 $a_tpl->setCurrentBlock(
"pv");
935 include_once
'Services/Tracking/classes/class.ilLearningProgress.php';
937 if($progress[
'access_time'])
939 $a_tpl->setVariable(
"TXT_PROPERTY_VALUE",
944 $a_tpl->setVariable(
"TXT_PROPERTY_VALUE",
945 $this->lng->txt(
'trac_not_accessed'));
948 $a_tpl->parseCurrentBlock();
949 $a_tpl->setCurrentBlock(
"property_row");
950 $a_tpl->setVariable(
"TXT_PROPERTY", $this->lng->txt(
'trac_last_access'));
951 $a_tpl->parseCurrentBlock();
952 $a_tpl->touchBlock(
"row");
955 $a_tpl->setCurrentBlock(
"pv");
956 $a_tpl->setVariable(
"TXT_PROPERTY_VALUE",
957 (
int) $progress[
'visits']);
958 $a_tpl->parseCurrentBlock();
959 $a_tpl->setCurrentBlock(
"property_row");
960 $a_tpl->setVariable(
"TXT_PROPERTY", $this->lng->txt(
'trac_visits'));
961 $a_tpl->parseCurrentBlock();
962 $a_tpl->touchBlock(
"row");
965 if($this->gui_object->object->getType() ==
'lm')
968 $a_tpl->setCurrentBlock(
"pv");
969 $a_tpl->setVariable(
"TXT_PROPERTY_VALUE",
971 $a_tpl->parseCurrentBlock();
972 $a_tpl->setCurrentBlock(
"property_row");
973 $a_tpl->setVariable(
"TXT_PROPERTY", $this->lng->txt(
'trac_spent_time'));
974 $a_tpl->parseCurrentBlock();
975 $a_tpl->touchBlock(
"row");
984 include_once
'Services/Tracking/classes/class.ilLPObjSettings.php';
985 include_once
'Services/Tracking/classes/class.ilLPMarks.php';
987 $lp_marks =
new ilLPMarks($this->gui_object->object->getId(),$ilUser->getId());
991 require_once
'Services/Tracking/classes/class.ilLPStatusWrapper.php';
994 $this->lng->loadLanguageModule(
'trac');
1008 $next_class = $this->ctrl->getNextClass($this);
1009 include_once(
"Services/Notes/classes/class.ilNoteGUI.php");
1010 $notes_gui =
new ilNoteGUI($this->gui_object->object->getId(), 0,
1011 $this->gui_object->object->getType());
1013 $ref_id = $this->gui_object->object->getRefId();
1014 if ($ilAccess->checkAccess(
"write",
"", $ref_id) ||
1015 $ilAccess->checkAccess(
"edit_permissions",
"", $ref_id))
1017 $notes_gui->enableCommentsSettings();
1020 $notes_gui->enablePrivateNotes();
1023 if ($next_class ==
"ilnotegui")
1025 $html = $this->ctrl->forwardCommand($notes_gui);
1029 $html = $notes_gui->getNotesHTML();
1044 if(strlen($a_section))
1048 include_once(
'Services/LDAP/classes/class.ilLDAPRoleGroupMapping.php');
1050 if($infos = $ldap_mapping->getInfoStrings($this->gui_object->object->getId()))
1052 $info_combined =
'<div style="color:green;">';
1054 foreach($infos as $info_string)
1058 $info_combined .=
'<br />';
1060 $info_combined .= $info_string;
1062 $info_combined .=
'</div>';
1063 $this->
addProperty($this->lng->txt(
'applications'),$info_combined);
1072 $this->
getTabs($this->tabs_gui);
1080 global $rbacsystem,$ilUser,$ilAccess;
1082 $next_class = $this->ctrl->getNextClass($this);
1083 $force_active = ($next_class ==
"ilnotegui")
1087 $tabs_gui->addSubTabTarget(
'summary',
1088 $this->ctrl->getLinkTarget($this,
"showSummary"),
1089 array(
"showSummary",
""),
1090 get_class($this),
"", $force_active);
1092 if ($this->feedback_enabled)
1094 $show_feedback_tab=
false;
1095 if($ilAccess->checkAccess(
'write',
'edit',
$_GET[
'ref_id']))
1097 $show_feedback_tab=
true;
1104 include_once(
'Services/Feedback/classes/class.ilFeedback.php');
1106 $feedback->setRefId(
$_GET[
'ref_id']);
1107 $barometers = $feedback->getAllBarometer(0);
1108 if(count($barometers))
1110 foreach ($barometers as $barometer)
1112 if($barometer->canVote($ilUser->getId(),$barometer->getId())==1)
1114 $show_feedback_tab=
true;
1120 if ($show_feedback_tab)
1122 $tabs_gui->addSubTabTarget(
"feedback",
1123 $this->ctrl->getLinkTargetByClass(
"ilfeedbackgui",
"fbList"),
1124 "",
"ilfeedbackgui");
1142 $lng->loadLanguageModule(
"tagging");
1145 include_once(
"Services/Tagging/classes/class.ilTaggingGUI.php");
1147 $tagging_gui->setObject($this->gui_object->object->getId(),
1148 $this->gui_object->object->getType());
1150 $this->
addSection($lng->txt(
"tagging_tags"));
1152 if ($tags_set->get(
"enable_all_users"))
1154 $this->
addProperty($lng->txt(
"tagging_all_users"),
1155 $tagging_gui->getAllUserTagsForObjectHTML());
1159 $tagging_gui->getTaggingInputHTML());
1166 include_once(
"Services/Tagging/classes/class.ilTaggingGUI.php");
1168 $tagging_gui->setObject($this->gui_object->object->getId(),
1169 $this->gui_object->object->getType());
1170 $tagging_gui->saveInput();