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");
86 case "ilpublicuserprofilegui":
87 include_once(
"./Services/User/classes/class.ilPublicUserProfileGUI.php");
89 $user_profile->setBackUrl($this->ctrl->getLinkTarget($this,
"showSummary"));
90 $html = $this->ctrl->forwardCommand($user_profile);
91 $tpl->setContent($html);
94 case "ilcommonactiondispatchergui":
95 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
97 $this->ctrl->forwardCommand($gui);
101 return $this->
$cmd();
114 $this->table_class = $a_val;
132 $this->private_notes_enabled = $a_enable;
140 $this->learning_progress_enabled = $a_enable;
149 $this->feedback_enabled = $a_enable;
157 $this->news_enabled = $a_enable;
165 $this->news_editing = $a_enable;
177 $this->block_property[$a_block_type][$a_property] = $a_value;
182 return $this->block_property;
191 $this->section[$this->sec_nr][
"title"] = $a_title;
192 $this->section[$this->sec_nr][
"hidden"] = (bool)$this->hidden;
200 $this->form_action = $a_form_action;
208 $this->form_action =
"";
220 $this->section[$this->sec_nr][
"properties"][] =
221 array(
"name" => $a_name,
"value" => $a_value,
228 function addPropertyCheckbox($a_name, $a_checkbox_name, $a_checkbox_value, $a_checkbox_label =
"", $a_checkbox_checked =
false)
230 $checkbox =
"<input type=\"checkbox\" name=\"$a_checkbox_name\" value=\"$a_checkbox_value\" id=\"$a_checkbox_name$a_checkbox_value\"";
231 if ($a_checkbox_checked)
233 $checkbox .=
" checked=\"checked\"";
236 if (strlen($a_checkbox_label))
238 $checkbox .=
" <label for=\"$a_checkbox_name$a_checkbox_value\">$a_checkbox_label</label>";
240 $this->section[$this->sec_nr][
"properties"][] =
241 array(
"name" => $a_name,
"value" => $checkbox);
247 function addPropertyTextinput($a_name, $a_input_name, $a_input_value =
"", $a_input_size =
"", $direct_button_command =
"", $direct_button_label =
"")
249 $input =
"<input type=\"text\" name=\"$a_input_name\" id=\"$a_input_name\"";
250 if (strlen($a_input_value))
254 if (strlen($a_input_size))
256 $input .=
" size=\"" . $a_input_size .
"\"";
259 if (strlen($direct_button_command) && strlen($direct_button_label))
261 $input .=
" <input type=\"submit\" class=\"submit\" name=\"cmd[$direct_button_command]\" value=\"$direct_button_label\" />";
263 $this->section[$this->sec_nr][
"properties"][] =
264 array(
"name" =>
"<label for=\"$a_input_name\">$a_name</label>",
"value" => $input);
270 function addButton($a_title, $a_link, $a_frame =
"", $a_position =
"top")
272 if ($a_position ==
"top")
274 $this->top_buttons[] =
275 array(
"title" => $a_title,
"link" => $a_link,
"target" => $a_frame);
285 if ($a_position ==
"top")
287 array_push($this->top_formbuttons,
288 array(
"command" => $a_command,
"title" => $a_title)
295 array_push($this->hiddenelements, array(
"name" => $a_name,
"value" => $a_value));
305 $lng->loadLanguageModule(
"meta");
307 include_once(
"./Services/MetaData/classes/class.ilMD.php");
308 $md =
new ilMD($a_rep_obj_id,$a_obj_id, $a_type);
310 if ($md_gen = $md->getGeneral())
315 foreach($md_gen->getDescriptionIds() as $id)
317 $md_des = $md_gen->getDescription($id);
318 $description = $md_des->getDescription();
324 foreach($ids = $md_gen->getLanguageIds() as $id)
326 $md_lan = $md_gen->getLanguage($id);
327 if ($md_lan->getLanguageCode() !=
"")
329 $langs[] = $lng->txt(
"meta_l_".$md_lan->getLanguageCode());
332 $langs = implode($langs,
", ");
336 foreach($ids = $md_gen->getKeywordIds() as $id)
338 $md_key = $md_gen->getKeyword($id);
339 $keywords[] = $md_key->getKeyword();
341 $keywords = implode($keywords,
", ");
345 if(is_object($lifecycle = $md->getLifecycle()))
348 foreach(($ids = $lifecycle->getContributeIds()) as $con_id)
350 $md_con = $lifecycle->getContribute($con_id);
351 if ($md_con->getRole() ==
"Author")
353 foreach($ent_ids = $md_con->getEntityIds() as $ent_id)
355 $md_ent = $md_con->getEntity($ent_id);
356 $author = $author.$sep.$md_ent->getEntity();
365 if(is_object($rights = $md->getRights()))
367 include_once(
'Services/MetaData/classes/class.ilMDUtils.php');
372 #if(is_object($educational = $md->getEducational()))
374 # $learning_time = $educational->getTypicalLearningTime();
377 if(is_object($educational = $md->getEducational()))
379 if($seconds = $educational->getTypicalLearningTimeSeconds())
389 if ($description !=
"")
412 if ($copyright !=
"")
417 if ($learning_time !=
"")
419 $this->
addProperty($lng->txt(
"meta_typical_learning_time"),
431 $this->
addSection($lng->txt(
"additional_info"));
432 $a_obj = $this->gui_object->object;
435 if (is_object($a_obj))
438 $type = $a_obj->getType();
443 include_once(
'./Services/Link/classes/class.ilLink.php');
448 if (
true || $d_set->get(
"add_info_links") ==
"1")
450 $lng->loadLanguageModule(
"delic");
451 $del_link =
'<br/><a class="small" href="http://del.icio.us/post?desc=nn&url='.
453 '" /> '.$lng->txt(
"delic_add_to_delicious").
457 include_once
'Services/WebServices/ECS/classes/class.ilECSServerSettings.php';
465 include_once
'Services/PermanentLink/classes/class.ilPermanentLinkGUI.php';
467 $pm->setIncludePermanentLinkText(
false);
468 $pm->setAlignCenter(
false);
476 $title = $ilObjDataCache->lookupTitle($a_obj->getId());
481 if ($ilAccess->checkAccess(
"write",
"",
$ref_id) ||
482 $ilAccess->checkAccess(
"edit_permissions",
"",
$ref_id))
484 $obj_id = $a_obj->getId();
489 if ($tree->isInTree($r))
494 if (count($refs) > 1)
500 $cont_loc->addContextItems($r,
true);
501 $links.= $sep.$cont_loc->getHTML();
506 '<div class="small">'.$links.
'</div>'
516 $lng->txt(
"create_date"),
520 if ($ilUser->getId() != ANONYMOUS_USER_ID and $a_obj->getOwner())
522 include_once
'./Services/Object/classes/class.ilObjectFactory.php';
528 if (!is_object($ownerObj) || $ownerObj->getType() !=
"usr")
530 $this->
addProperty($lng->txt(
"owner"), $lng->txt(
"no_owner"));
532 else if ($ownerObj->hasPublicProfile())
534 $ilCtrl->setParameterByClass(
"ilpublicuserprofilegui",
"user_id", $ownerObj->getId());
535 $this->
addProperty($lng->txt(
"owner"),$ownerObj->getPublicName(),$ilCtrl->getLinkTargetByClass(
"ilpublicuserprofilegui",
"getHTML"));
539 $this->
addProperty($lng->txt(
"owner"),$ownerObj->getPublicName());
544 require_once
'Services/WebDAV/classes/class.ilDiskQuotaActivationChecker.php';
545 if ($ilUser->getId() != ANONYMOUS_USER_ID &&
548 $size = $a_obj->getDiskUsage();
549 if (
$size !== null) {
554 require_once
'Services/Tracking/classes/class.ilChangeEvent.php';
557 if ($ilUser->getId() != ANONYMOUS_USER_ID)
562 $count_user_reads = 0;
563 $count_anonymous_reads = 0;
564 foreach ($readEvents as $evt)
566 if ($evt[
'usr_id'] == ANONYMOUS_USER_ID)
568 $count_anonymous_reads += $evt[
'read_count'];
572 $count_user_reads += $evt[
'read_count'];
580 if ($count_anonymous_reads > 0)
582 $this->
addProperty($this->lng->txt(
"readcount_anonymous_users"),$count_anonymous_reads);
584 if ($count_user_reads > 0)
586 $this->
addProperty($this->lng->txt(
"readcount_users"),$count_user_reads);
588 if ($count_users > 0)
590 $this->
addProperty($this->lng->txt(
"accesscount_registered_users"),$count_users);
597 require_once(
'Services/WebDAV/classes/class.ilDAVServer.php');
601 if ($ilUser->getId() != ANONYMOUS_USER_ID)
606 if ($ilias->account->getId() != ANONYMOUS_USER_ID)
608 $locks =& $davLocks->getLocksOnObjectObj($a_obj->getId());
609 if (count($locks) > 0)
611 $lockUser =
new ilObjUser($locks[0][
'ilias_owner']);
613 $lockUser->getPublicName()
615 "./ilias.php?user=".$locks[0][
'ilias_owner'].
'&cmd=showUserProfile&cmdClass=ilpersonaldesktopgui&cmdNode=1&baseClass=ilPersonalDesktopGUI'
631 global
$tpl, $ilAccess;
645 include_once(
"Services/Block/classes/class.ilColumnGUI.php");
649 if (!$ilCtrl->isAsynch())
658 $html = $ilCtrl->forwardCommand($column_gui);
665 $html = $ilCtrl->forwardCommand($column_gui);
684 include_once(
"Services/Block/classes/class.ilColumnGUI.php");
688 if ($ilCtrl->getNextClass() ==
"ilcolumngui" &&
692 $html = $ilCtrl->forwardCommand($column_gui);
696 if (!$ilCtrl->isAsynch())
698 if ($this->news_enabled)
700 $html = $ilCtrl->getHTML($column_gui);
713 global
$lng, $ilAccess;
715 $column_gui->setEnableEdit($this->news_editing);
716 $column_gui->setRepositoryMode(
true);
727 $tpl =
new ilTemplate(
"tpl.infoscreen.html" ,
true,
true,
"Services/InfoScreen");
730 if ($this->form_action ==
"")
735 require_once
'Services/jQuery/classes/class.iljQueryUtil.php';
740 $tpl->touchBlock(
"hidden_js");
741 if($this->show_hidden_toggle)
743 $this->
addButton($lng->txt(
"show_hidden_sections"),
"JavaScript:toggleSections(this, '".$lng->txt(
"show_hidden_sections") .
"', '".$lng->txt(
"hide_visible_sections") .
"');");
747 if (count($this->top_buttons) > 0)
749 $tpl->addBlockfile(
"TOP_BUTTONS",
"top_buttons",
"tpl.buttons.html");
751 foreach($this->top_buttons as $button)
754 $tpl->setCurrentBlock(
"btn_cell");
755 $tpl->setVariable(
"BTN_LINK", $button[
"link"]);
756 $tpl->setVariable(
"BTN_TARGET", $button[
"target"]);
757 $tpl->setVariable(
"BTN_TXT", $button[
"title"]);
758 $tpl->parseCurrentBlock();
763 if ((count($this->top_formbuttons) > 0) && (strlen($this->form_action) > 0))
765 $tpl->addBlockfile(
"TOP_FORMBUTTONS",
"top_submitbuttons",
"tpl.submitbuttons.html",
"Services/InfoScreen");
767 foreach($this->top_formbuttons as $button)
770 $tpl->setCurrentBlock(
"btn_submit_cell");
771 $tpl->setVariable(
"BTN_COMMAND", $button[
"command"]);
772 $tpl->setVariable(
"BTN_NAME", $button[
"title"]);
773 $tpl->parseCurrentBlock();
778 if (strlen($this->form_action) > 0)
780 $tpl->setCurrentBlock(
"formtop");
781 $tpl->setVariable(
"FORMACTION", $this->form_action);
782 $tpl->parseCurrentBlock();
783 $tpl->touchBlock(
"formbottom");
786 if (count($this->hiddenelements))
788 foreach ($this->hiddenelements as $hidden)
790 $tpl->setCurrentBlock(
"hidden_element");
791 $tpl->setVariable(
"HIDDEN_NAME", $hidden[
"name"]);
792 $tpl->setVariable(
"HIDDEN_VALUE", $hidden[
"value"]);
793 $tpl->parseCurrentBlock();
800 $tpl->setCurrentBlock(
"learning_progress");
801 $tpl->setVariable(
"LP_TABLE",$html);
802 $tpl->parseCurrentBlock();
806 if ($this->private_notes_enabled && !$ilSetting->get(
'disable_notes'))
809 $tpl->setCurrentBlock(
"notes");
810 $tpl->setVariable(
"NOTES", $html);
811 $tpl->parseCurrentBlock();
815 if (is_object($this->gui_object->object))
818 if ($tags_set->get(
"enable") && $ilUser->getId() != ANONYMOUS_USER_ID)
824 if(is_object($this->gui_object->object))
830 for($i = 1; $i <= $this->sec_nr; $i++)
832 if (is_array($this->section[$i][
"properties"]))
835 foreach($this->section[$i][
"properties"] as $property)
837 if ($property[
"name"] !=
"")
839 if ($property[
"link"] ==
"")
841 $tpl->setCurrentBlock(
"pv");
842 $tpl->setVariable(
"TXT_PROPERTY_VALUE", $property[
"value"]);
843 $tpl->parseCurrentBlock();
847 $tpl->setCurrentBlock(
"lpv");
848 $tpl->setVariable(
"TXT_PROPERTY_LVALUE", $property[
"value"]);
849 $tpl->setVariable(
"LINK_PROPERTY_VALUE", $property[
"link"]);
850 $tpl->parseCurrentBlock();
852 $tpl->setCurrentBlock(
"property_row");
853 $tpl->setVariable(
"TXT_PROPERTY", $property[
"name"]);
854 $tpl->parseCurrentBlock();
858 $tpl->setCurrentBlock(
"property_full_row");
859 $tpl->setVariable(
"TXT_PROPERTY_FULL_VALUE", $property[
"value"]);
860 $tpl->parseCurrentBlock();
865 if($this->section[$i][
"hidden"])
867 $tpl->setVariable(
"SECTION_HIDDEN",
" style=\"display:none;\"");
868 $tpl->setVariable(
"SECTION_ID",
"hidable_".$i);
872 $tpl->setVariable(
"SECTION_ID", $i);
875 $tpl->setVariable(
"TXT_SECTION", $this->section[$i][
"title"]);
876 $tpl->touchBlock(
"row");
887 if(!$rbacsystem->checkAccess(
'read',$this->gui_object->object->getRefId()))
891 if($ilUser->getId() == ANONYMOUS_USER_ID)
896 include_once(
"Services/Tracking/classes/class.ilObjUserTracking.php");
902 include_once
'Services/Tracking/classes/class.ilLPObjSettings.php';
903 include_once
'Services/Tracking/classes/class.ilLPMarks.php';
912 $this->lng->loadLanguageModule(
'trac');
916 $a_tpl->setVariable(
"TXT_SECTION",
917 $this->lng->txt(
'learning_progress'));
918 $a_tpl->parseCurrentBlock();
922 $i_tpl =
new ilTemplate(
"tpl.lp_edit_manual_info_page.html",
true,
true,
"Services/Tracking");
923 $i_tpl->setVariable(
"INFO_EDITED", $this->lng->txt(
"trac_info_edited"));
925 $this->gui_object->object->getId()),
927 array(0 => $this->lng->txt(
'trac_not_completed'),
928 1 => $this->lng->txt(
'trac_completed')),
931 $i_tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
932 $a_tpl->setCurrentBlock(
"pv");
933 $a_tpl->setVariable(
"TXT_PROPERTY_VALUE", $i_tpl->get());
934 $a_tpl->parseCurrentBlock();
935 $a_tpl->setCurrentBlock(
"property_row");
936 $a_tpl->setVariable(
"TXT_PROPERTY", $this->lng->txt(
'trac_status'));
937 $a_tpl->parseCurrentBlock();
942 if($this->gui_object->object->getType() ==
'lm' ||
943 $this->gui_object->object->getType() ==
'htlm')
945 $a_tpl->setCurrentBlock(
"pv");
947 include_once
'Services/Tracking/classes/class.ilLearningProgress.php';
949 if($progress[
'access_time'])
951 $a_tpl->setVariable(
"TXT_PROPERTY_VALUE",
956 $a_tpl->setVariable(
"TXT_PROPERTY_VALUE",
957 $this->lng->txt(
'trac_not_accessed'));
960 $a_tpl->parseCurrentBlock();
961 $a_tpl->setCurrentBlock(
"property_row");
962 $a_tpl->setVariable(
"TXT_PROPERTY", $this->lng->txt(
'trac_last_access'));
963 $a_tpl->parseCurrentBlock();
967 $a_tpl->setCurrentBlock(
"pv");
968 $a_tpl->setVariable(
"TXT_PROPERTY_VALUE",
969 (
int) $progress[
'visits']);
970 $a_tpl->parseCurrentBlock();
971 $a_tpl->setCurrentBlock(
"property_row");
972 $a_tpl->setVariable(
"TXT_PROPERTY", $this->lng->txt(
'trac_visits'));
973 $a_tpl->parseCurrentBlock();
977 if($this->gui_object->object->getType() ==
'lm')
980 $a_tpl->setCurrentBlock(
"pv");
981 $a_tpl->setVariable(
"TXT_PROPERTY_VALUE",
983 $a_tpl->parseCurrentBlock();
984 $a_tpl->setCurrentBlock(
"property_row");
985 $a_tpl->setVariable(
"TXT_PROPERTY", $this->lng->txt(
'trac_spent_time'));
986 $a_tpl->parseCurrentBlock();
992 $a_tpl->touchBlock(
"row");
999 include_once
'Services/Tracking/classes/class.ilLPObjSettings.php';
1000 include_once
'Services/Tracking/classes/class.ilLPMarks.php';
1002 $lp_marks =
new ilLPMarks($this->gui_object->object->getId(),$ilUser->getId());
1004 $lp_marks->update();
1006 require_once
'Services/Tracking/classes/class.ilLPStatusWrapper.php';
1009 $this->lng->loadLanguageModule(
'trac');
1023 $next_class = $this->ctrl->getNextClass($this);
1024 include_once(
"Services/Notes/classes/class.ilNoteGUI.php");
1025 $notes_gui =
new ilNoteGUI($this->gui_object->object->getId(), 0,
1026 $this->gui_object->object->getType());
1029 if($ilSetting->get(
"disable_comments"))
1039 $ref_id = $this->gui_object->object->getRefId();
1040 if ($ilAccess->checkAccess(
"write",
"",
$ref_id) ||
1041 $ilAccess->checkAccess(
"edit_permissions",
"",
$ref_id))
1043 $notes_gui->enableCommentsSettings();
1051 if ($next_class ==
"ilnotegui")
1053 $html = $this->ctrl->forwardCommand($notes_gui);
1057 $html = $notes_gui->getNotesHTML();
1072 if(strlen($a_section))
1076 include_once(
'Services/LDAP/classes/class.ilLDAPRoleGroupMapping.php');
1078 if($infos = $ldap_mapping->getInfoStrings($this->gui_object->object->getId()))
1080 $info_combined =
'<div style="color:green;">';
1082 foreach($infos as $info_string)
1086 $info_combined .=
'<br />';
1088 $info_combined .= $info_string;
1090 $info_combined .=
'</div>';
1091 $this->
addProperty($this->lng->txt(
'applications'),$info_combined);
1100 $this->
getTabs($this->tabs_gui);
1108 global $rbacsystem,
$ilUser,$ilAccess;
1110 $next_class = $this->ctrl->getNextClass($this);
1111 $force_active = ($next_class ==
"ilnotegui")
1115 $tabs_gui->addSubTabTarget(
'summary',
1116 $this->ctrl->getLinkTarget($this,
"showSummary"),
1117 array(
"showSummary",
""),
1118 get_class($this),
"", $force_active);
1129 $lng->loadLanguageModule(
"tagging");
1132 include_once(
"Services/Tagging/classes/class.ilTaggingGUI.php");
1134 $tagging_gui->setObject($this->gui_object->object->getId(),
1135 $this->gui_object->object->getType());
1137 $this->
addSection($lng->txt(
"tagging_tags"));
1139 if ($tags_set->get(
"enable_all_users"))
1141 $this->
addProperty($lng->txt(
"tagging_all_users"),
1142 $tagging_gui->getAllUserTagsForObjectHTML());
1146 $tagging_gui->getTaggingInputHTML());
1153 include_once(
"Services/Tagging/classes/class.ilTaggingGUI.php");
1155 $tagging_gui->setObject($this->gui_object->object->getId(),
1156 $this->gui_object->object->getType());
1157 $tagging_gui->saveInput();
1164 $this->hidden =
true;
1165 $this->show_hidden_toggle = (bool)$a_add_toggle;
1171 return "<a class=\"submit\" onClick=\"toggleSections(this, '".$lng->txt(
"show_hidden_sections") .
"', '".$lng->txt(
"hide_visible_sections") .
"');\" href=\"#\">".$lng->txt(
"show_hidden_sections").
"</a>";