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"),
434 $this->
addSection($lng->txt(
"additional_info"));
435 $a_obj = $this->gui_object->object;
438 if (is_object($a_obj))
441 $type = $a_obj->getType();
444 include_once(
'classes/class.ilLink.php');
449 if (
true || $d_set->get(
"add_info_links") ==
"1")
451 $lng->loadLanguageModule(
"delic");
452 $del_link =
'<br/><a class="small" href="http://del.icio.us/post?desc=nn&url='.
454 '" /> '.$lng->txt(
"delic_add_to_delicious").
458 include_once(
'Services/WebServices/ECS/classes/class.ilECSSettings.php');
460 if($settings->isEnabled())
467 include_once
'Services/PermanentLink/classes/class.ilPermanentLinkGUI.php';
469 $pm->setIncludePermanentLinkText(
false);
470 $pm->setAlignCenter(
false);
478 $title = $ilObjDataCache->lookupTitle($a_obj->getId());
483 if ($ilAccess->checkAccess(
"write",
"",
$ref_id) ||
484 $ilAccess->checkAccess(
"edit_permissions",
"",
$ref_id))
486 $obj_id = $a_obj->getId();
491 if ($tree->isInTree($r))
496 if (count($refs) > 1)
502 $cont_loc->addContextItems($r,
true);
503 $links.= $sep.$cont_loc->getHTML();
508 '<div class="small">'.$links.
'</div>'
517 $lng->txt(
"create_date"),
521 if ($ilUser->getId() != ANONYMOUS_USER_ID and $a_obj->getOwner())
523 include_once
'classes/class.ilObjectFactory.php';
529 if (! is_object($ownerObj))
531 $this->
addProperty($lng->txt(
"owner"), $lng->txt(
"no_owner"));
533 else if ($ownerObj->hasPublicProfile())
535 $ilCtrl->setParameterByClass(
"ilpublicuserprofilegui",
"user_id", $ownerObj->getId());
536 $this->
addProperty($lng->txt(
"owner"),$ownerObj->getPublicName(),$ilCtrl->getLinkTargetByClass(
"ilpublicuserprofilegui",
"getHTML"));
540 $this->
addProperty($lng->txt(
"owner"),$ownerObj->getPublicName());
545 require_once
'Services/WebDAV/classes/class.ilDiskQuotaActivationChecker.php';
546 if ($ilUser->getId() != ANONYMOUS_USER_ID &&
549 $size = $a_obj->getDiskUsage();
550 if (
$size !== null) {
555 require_once
'Services/Tracking/classes/class.ilChangeEvent.php';
558 if ($ilUser->getId() != ANONYMOUS_USER_ID)
563 $count_user_reads = 0;
564 $count_anonymous_reads = 0;
565 foreach ($readEvents as $evt)
567 if ($evt[
'usr_id'] == ANONYMOUS_USER_ID)
569 $count_anonymous_reads += $evt[
'read_count'];
573 $count_user_reads += $evt[
'read_count'];
581 if ($count_anonymous_reads > 0)
583 $this->
addProperty($this->lng->txt(
"readcount_anonymous_users"),$count_anonymous_reads);
585 if ($count_user_reads > 0)
587 $this->
addProperty($this->lng->txt(
"readcount_users"),$count_user_reads);
589 if ($count_users > 0)
591 $this->
addProperty($this->lng->txt(
"accesscount_registered_users"),$count_users);
598 require_once(
'Services/WebDAV/classes/class.ilDAVServer.php');
602 if ($ilUser->getId() != ANONYMOUS_USER_ID)
607 if ($ilias->account->getId() != ANONYMOUS_USER_ID)
609 $locks =& $davLocks->getLocksOnObjectObj($a_obj->getId());
610 if (count($locks) > 0)
612 $lockUser =
new ilObjUser($locks[0][
'ilias_owner']);
614 $lockUser->getPublicName()
616 "./ilias.php?user=".$locks[0][
'ilias_owner'].
'&cmd=showUserProfile&cmdClass=ilpersonaldesktopgui&cmdNode=1&baseClass=ilPersonalDesktopGUI'
632 global
$tpl, $ilAccess;
646 include_once(
"Services/Block/classes/class.ilColumnGUI.php");
650 if (!$ilCtrl->isAsynch())
659 $html = $ilCtrl->forwardCommand($column_gui);
666 $html = $ilCtrl->forwardCommand($column_gui);
685 include_once(
"Services/Block/classes/class.ilColumnGUI.php");
689 if ($ilCtrl->getNextClass() ==
"ilcolumngui" &&
693 $html = $ilCtrl->forwardCommand($column_gui);
697 if (!$ilCtrl->isAsynch())
699 if ($this->news_enabled)
701 $html = $ilCtrl->getHTML($column_gui);
714 global
$lng, $ilAccess;
716 $column_gui->setEnableEdit($this->news_editing);
717 $column_gui->setRepositoryMode(
true);
728 $tpl =
new ilTemplate(
"tpl.infoscreen.html" ,
true,
true,
"Services/InfoScreen");
731 if ($this->form_action ==
"")
737 if (count($this->top_buttons) > 0)
739 $tpl->addBlockfile(
"TOP_BUTTONS",
"top_buttons",
"tpl.buttons.html");
741 foreach($this->top_buttons as $button)
744 $tpl->setCurrentBlock(
"btn_cell");
745 $tpl->setVariable(
"BTN_LINK", $button[
"link"]);
746 $tpl->setVariable(
"BTN_TARGET", $button[
"target"]);
747 $tpl->setVariable(
"BTN_TXT", $button[
"title"]);
748 $tpl->parseCurrentBlock();
753 if ((count($this->top_formbuttons) > 0) && (strlen($this->form_action) > 0))
755 $tpl->addBlockfile(
"TOP_FORMBUTTONS",
"top_submitbuttons",
"tpl.submitbuttons.html");
757 foreach($this->top_formbuttons as $button)
760 $tpl->setCurrentBlock(
"btn_submit_cell");
761 $tpl->setVariable(
"BTN_COMMAND", $button[
"command"]);
762 $tpl->setVariable(
"BTN_NAME", $button[
"title"]);
763 $tpl->parseCurrentBlock();
768 if (strlen($this->form_action) > 0)
770 $tpl->setCurrentBlock(
"formtop");
771 $tpl->setVariable(
"FORMACTION", $this->form_action);
772 $tpl->parseCurrentBlock();
773 $tpl->touchBlock(
"formbottom");
776 if (count($this->hiddenelements))
778 foreach ($this->hiddenelements as $hidden)
780 $tpl->setCurrentBlock(
"hidden_element");
781 $tpl->setVariable(
"HIDDEN_NAME", $hidden[
"name"]);
782 $tpl->setVariable(
"HIDDEN_VALUE", $hidden[
"value"]);
783 $tpl->parseCurrentBlock();
790 $tpl->setCurrentBlock(
"learning_progress");
791 $tpl->setVariable(
"LP_TABLE",$html);
792 $tpl->parseCurrentBlock();
796 if ($this->private_notes_enabled && !$ilSetting->get(
'disable_notes'))
799 $tpl->setCurrentBlock(
"notes");
800 $tpl->setVariable(
"NOTES", $html);
801 $tpl->parseCurrentBlock();
805 if (is_object($this->gui_object->object))
808 if ($tags_set->get(
"enable") && $ilUser->getId() != ANONYMOUS_USER_ID)
814 if(is_object($this->gui_object->object))
820 for($i = 1; $i <= $this->sec_nr; $i++)
822 if (is_array($this->section[$i][
"properties"]))
825 $tpl->setCurrentBlock(
"header_row");
826 $tpl->setVariable(
"TXT_SECTION",
827 $this->section[$i][
"title"]);
828 $tpl->parseCurrentBlock();
829 $tpl->touchBlock(
"row");
832 foreach($this->section[$i][
"properties"] as $property)
834 if ($property[
"name"] !=
"")
836 if ($property[
"link"] ==
"")
838 $tpl->setCurrentBlock(
"pv");
839 $tpl->setVariable(
"TXT_PROPERTY_VALUE", $property[
"value"]);
840 $tpl->parseCurrentBlock();
844 $tpl->setCurrentBlock(
"lpv");
845 $tpl->setVariable(
"TXT_PROPERTY_LVALUE", $property[
"value"]);
846 $tpl->setVariable(
"LINK_PROPERTY_VALUE", $property[
"link"]);
847 $tpl->parseCurrentBlock();
849 $tpl->setCurrentBlock(
"property_row");
850 $tpl->setVariable(
"TXT_PROPERTY", $property[
"name"]);
851 $tpl->parseCurrentBlock();
852 $tpl->touchBlock(
"row");
856 $tpl->setCurrentBlock(
"property_full_row");
857 $tpl->setVariable(
"TXT_PROPERTY_FULL_VALUE", $property[
"value"]);
858 $tpl->parseCurrentBlock();
859 $tpl->touchBlock(
"row");
872 global $ilUser,$rbacsystem;
874 if(!$rbacsystem->checkAccess(
'read',$this->gui_object->object->getRefId()))
878 if($ilUser->getId() == ANONYMOUS_USER_ID)
883 include_once(
"Services/Tracking/classes/class.ilObjUserTracking.php");
889 include_once
'Services/Tracking/classes/class.ilLPObjSettings.php';
890 include_once
'Services/Tracking/classes/class.ilLPMarks.php';
899 $this->lng->loadLanguageModule(
'trac');
902 $a_tpl->setCurrentBlock(
"header_row");
903 $a_tpl->setVariable(
"TXT_SECTION",
904 $this->lng->txt(
'learning_progress'));
905 $a_tpl->parseCurrentBlock();
906 $a_tpl->touchBlock(
"row");
909 $i_tpl =
new ilTemplate(
"tpl.lp_edit_manual_info_page.html",
true,
true,
"Services/Tracking");
910 $i_tpl->setVariable(
"INFO_EDITED", $this->lng->txt(
"trac_info_edited"));
912 $this->gui_object->object->getId()),
914 array(0 => $this->lng->txt(
'trac_not_completed'),
915 1 => $this->lng->txt(
'trac_completed')),
918 $i_tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
919 $a_tpl->setCurrentBlock(
"pv");
920 $a_tpl->setVariable(
"TXT_PROPERTY_VALUE", $i_tpl->get());
921 $a_tpl->parseCurrentBlock();
922 $a_tpl->setCurrentBlock(
"property_row");
923 $a_tpl->setVariable(
"TXT_PROPERTY", $this->lng->txt(
'trac_status'));
924 $a_tpl->parseCurrentBlock();
925 $a_tpl->touchBlock(
"row");
929 if($this->gui_object->object->getType() ==
'lm' ||
930 $this->gui_object->object->getType() ==
'htlm')
932 $a_tpl->setCurrentBlock(
"pv");
934 include_once
'Services/Tracking/classes/class.ilLearningProgress.php';
936 if($progress[
'access_time'])
938 $a_tpl->setVariable(
"TXT_PROPERTY_VALUE",
943 $a_tpl->setVariable(
"TXT_PROPERTY_VALUE",
944 $this->lng->txt(
'trac_not_accessed'));
947 $a_tpl->parseCurrentBlock();
948 $a_tpl->setCurrentBlock(
"property_row");
949 $a_tpl->setVariable(
"TXT_PROPERTY", $this->lng->txt(
'trac_last_access'));
950 $a_tpl->parseCurrentBlock();
951 $a_tpl->touchBlock(
"row");
954 $a_tpl->setCurrentBlock(
"pv");
955 $a_tpl->setVariable(
"TXT_PROPERTY_VALUE",
956 (
int) $progress[
'visits']);
957 $a_tpl->parseCurrentBlock();
958 $a_tpl->setCurrentBlock(
"property_row");
959 $a_tpl->setVariable(
"TXT_PROPERTY", $this->lng->txt(
'trac_visits'));
960 $a_tpl->parseCurrentBlock();
961 $a_tpl->touchBlock(
"row");
964 if($this->gui_object->object->getType() ==
'lm')
967 $a_tpl->setCurrentBlock(
"pv");
968 $a_tpl->setVariable(
"TXT_PROPERTY_VALUE",
970 $a_tpl->parseCurrentBlock();
971 $a_tpl->setCurrentBlock(
"property_row");
972 $a_tpl->setVariable(
"TXT_PROPERTY", $this->lng->txt(
'trac_spent_time'));
973 $a_tpl->parseCurrentBlock();
974 $a_tpl->touchBlock(
"row");
983 include_once
'Services/Tracking/classes/class.ilLPObjSettings.php';
984 include_once
'Services/Tracking/classes/class.ilLPMarks.php';
986 $lp_marks =
new ilLPMarks($this->gui_object->object->getId(),$ilUser->getId());
990 require_once
'Services/Tracking/classes/class.ilLPStatusWrapper.php';
993 $this->lng->loadLanguageModule(
'trac');
1007 $next_class = $this->ctrl->getNextClass($this);
1008 include_once(
"Services/Notes/classes/class.ilNoteGUI.php");
1009 $notes_gui =
new ilNoteGUI($this->gui_object->object->getId(), 0,
1010 $this->gui_object->object->getType());
1012 $ref_id = $this->gui_object->object->getRefId();
1013 if ($ilAccess->checkAccess(
"write",
"", $ref_id) ||
1014 $ilAccess->checkAccess(
"edit_permissions",
"", $ref_id))
1016 $notes_gui->enableCommentsSettings();
1019 $notes_gui->enablePrivateNotes();
1022 if ($next_class ==
"ilnotegui")
1024 $html = $this->ctrl->forwardCommand($notes_gui);
1028 $html = $notes_gui->getNotesHTML();
1043 if(strlen($a_section))
1047 include_once(
'Services/LDAP/classes/class.ilLDAPRoleGroupMapping.php');
1049 if($infos = $ldap_mapping->getInfoStrings($this->gui_object->object->getId()))
1051 $info_combined =
'<div style="color:green;">';
1053 foreach($infos as $info_string)
1057 $info_combined .=
'<br />';
1059 $info_combined .= $info_string;
1061 $info_combined .=
'</div>';
1062 $this->
addProperty($this->lng->txt(
'applications'),$info_combined);
1071 $this->
getTabs($this->tabs_gui);
1079 global $rbacsystem,$ilUser,$ilAccess;
1081 $next_class = $this->ctrl->getNextClass($this);
1082 $force_active = ($next_class ==
"ilnotegui")
1086 $tabs_gui->addSubTabTarget(
'summary',
1087 $this->ctrl->getLinkTarget($this,
"showSummary"),
1088 array(
"showSummary",
""),
1089 get_class($this),
"", $force_active);
1091 if ($this->feedback_enabled)
1093 $show_feedback_tab=
false;
1094 if($ilAccess->checkAccess(
'write',
'edit',
$_GET[
'ref_id']))
1096 $show_feedback_tab=
true;
1103 include_once(
'Services/Feedback/classes/class.ilFeedback.php');
1105 $feedback->setRefId(
$_GET[
'ref_id']);
1106 $barometers = $feedback->getAllBarometer(0);
1107 if(count($barometers))
1109 foreach ($barometers as $barometer)
1111 if($barometer->canVote($ilUser->getId(),$barometer->getId())==1)
1113 $show_feedback_tab=
true;
1119 if ($show_feedback_tab)
1121 $tabs_gui->addSubTabTarget(
"feedback",
1122 $this->ctrl->getLinkTargetByClass(
"ilfeedbackgui",
"fbList"),
1123 "",
"ilfeedbackgui");
1141 $lng->loadLanguageModule(
"tagging");
1144 include_once(
"Services/Tagging/classes/class.ilTaggingGUI.php");
1146 $tagging_gui->setObject($this->gui_object->object->getId(),
1147 $this->gui_object->object->getType());
1149 $this->
addSection($lng->txt(
"tagging_tags"));
1151 if ($tags_set->get(
"enable_all_users"))
1153 $this->
addProperty($lng->txt(
"tagging_all_users"),
1154 $tagging_gui->getAllUserTagsForObjectHTML());
1158 $tagging_gui->getTaggingInputHTML());
1165 include_once(
"Services/Tagging/classes/class.ilTaggingGUI.php");
1167 $tagging_gui->setObject($this->gui_object->object->getId(),
1168 $this->gui_object->object->getType());
1169 $tagging_gui->saveInput();