49 $this->tabs_gui =& $ilTabs;
50 $this->gui_object =& $a_gui_object;
52 $this->private_notes_enabled =
false;
53 $this->news_enabled =
false;
54 $this->feedback_enabled =
false;
55 $this->learning_progress_enabled =
false;
56 $this->form_action =
"";
57 $this->top_formbuttons = array();
58 $this->hiddenelements = array();
66 global $rbacsystem,
$tpl, $ilAccess;
69 $this->lng->loadLanguageModule(
"barometer");
71 $next_class = $this->ctrl->getNextClass($this);
73 $cmd = $this->ctrl->getCmd(
"showSummary");
74 $this->ctrl->setReturn($this,
"showSummary");
88 case "ilpublicuserprofilegui":
89 include_once(
"./Services/User/classes/class.ilPublicUserProfileGUI.php");
91 $user_profile->setBackUrl($this->ctrl->getLinkTarget($this,
"showSummary"));
92 $html = $this->ctrl->forwardCommand($user_profile);
93 $tpl->setContent($html);
96 case "ilcommonactiondispatchergui":
97 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
99 $this->ctrl->forwardCommand($gui);
103 return $this->
$cmd();
116 $this->table_class = $a_val;
134 $this->private_notes_enabled = $a_enable;
142 $this->learning_progress_enabled = $a_enable;
151 $this->feedback_enabled = $a_enable;
159 $this->news_enabled = $a_enable;
167 $this->news_editing = $a_enable;
179 $this->block_property[$a_block_type][$a_property] = $a_value;
184 return $this->block_property;
193 $this->section[$this->sec_nr][
"title"] = $a_title;
194 $this->section[$this->sec_nr][
"hidden"] = (bool)$this->hidden;
202 $this->form_action = $a_form_action;
210 $this->form_action =
"";
222 $this->section[$this->sec_nr][
"properties"][] =
223 array(
"name" => $a_name,
"value" => $a_value,
230 function addPropertyCheckbox($a_name, $a_checkbox_name, $a_checkbox_value, $a_checkbox_label =
"", $a_checkbox_checked =
false)
232 $checkbox =
"<input type=\"checkbox\" name=\"$a_checkbox_name\" value=\"$a_checkbox_value\" id=\"$a_checkbox_name$a_checkbox_value\"";
233 if ($a_checkbox_checked)
235 $checkbox .=
" checked=\"checked\"";
238 if (strlen($a_checkbox_label))
240 $checkbox .=
" <label for=\"$a_checkbox_name$a_checkbox_value\">$a_checkbox_label</label>";
242 $this->section[$this->sec_nr][
"properties"][] =
243 array(
"name" => $a_name,
"value" => $checkbox);
249 function addPropertyTextinput($a_name, $a_input_name, $a_input_value =
"", $a_input_size =
"", $direct_button_command =
"", $direct_button_label =
"", $direct_button_primary =
false)
251 $input =
"<input type=\"text\" name=\"$a_input_name\" id=\"$a_input_name\"";
252 if (strlen($a_input_value))
256 if (strlen($a_input_size))
258 $input .=
" size=\"" . $a_input_size .
"\"";
261 if (strlen($direct_button_command) && strlen($direct_button_label))
264 if($direct_button_primary)
266 $css =
" emphsubmit";
268 $input .=
" <input type=\"submit\" class=\"submit".$css.
"\" name=\"cmd[$direct_button_command]\" value=\"$direct_button_label\" />";
270 $this->section[$this->sec_nr][
"properties"][] =
271 array(
"name" =>
"<label for=\"$a_input_name\">$a_name</label>",
"value" => $input);
277 function addButton($a_title, $a_link, $a_frame =
"", $a_position =
"top", $a_primary =
false)
279 if ($a_position ==
"top")
281 $this->top_buttons[] =
282 array(
"title" => $a_title,
"link" => $a_link,
"target" => $a_frame,
"primary" => $a_primary);
292 if ($a_position ==
"top")
294 array_push($this->top_formbuttons,
295 array(
"command" => $a_command,
"title" => $a_title)
302 array_push($this->hiddenelements, array(
"name" => $a_name,
"value" => $a_value));
312 $lng->loadLanguageModule(
"meta");
314 include_once(
"./Services/MetaData/classes/class.ilMD.php");
315 $md =
new ilMD($a_rep_obj_id,$a_obj_id, $a_type);
317 if ($md_gen = $md->getGeneral())
322 foreach($md_gen->getDescriptionIds() as $id)
324 $md_des = $md_gen->getDescription($id);
325 $description = $md_des->getDescription();
331 foreach($ids = $md_gen->getLanguageIds() as $id)
333 $md_lan = $md_gen->getLanguage($id);
334 if ($md_lan->getLanguageCode() !=
"")
336 $langs[] = $lng->txt(
"meta_l_".$md_lan->getLanguageCode());
339 $langs = implode($langs,
", ");
343 foreach($ids = $md_gen->getKeywordIds() as $id)
345 $md_key = $md_gen->getKeyword($id);
346 $keywords[] = $md_key->getKeyword();
348 $keywords = implode($keywords,
", ");
352 if(is_object($lifecycle = $md->getLifecycle()))
355 foreach(($ids = $lifecycle->getContributeIds()) as $con_id)
357 $md_con = $lifecycle->getContribute($con_id);
358 if ($md_con->getRole() ==
"Author")
360 foreach($ent_ids = $md_con->getEntityIds() as $ent_id)
362 $md_ent = $md_con->getEntity($ent_id);
363 $author = $author.$sep.$md_ent->getEntity();
372 if(is_object($rights = $md->getRights()))
374 include_once(
'Services/MetaData/classes/class.ilMDUtils.php');
379 #if(is_object($educational = $md->getEducational()))
381 # $learning_time = $educational->getTypicalLearningTime();
384 if(is_object($educational = $md->getEducational()))
386 if($seconds = $educational->getTypicalLearningTimeSeconds())
396 if ($description !=
"")
419 if ($copyright !=
"")
424 if ($learning_time !=
"")
426 $this->
addProperty($lng->txt(
"meta_typical_learning_time"),
438 $this->
addSection($lng->txt(
"additional_info"));
439 $a_obj = $this->gui_object->object;
442 if (is_object($a_obj))
445 $type = $a_obj->getType();
450 include_once(
'./Services/Link/classes/class.ilLink.php');
455 if (
true || $d_set->get(
"add_info_links") ==
"1")
457 $lng->loadLanguageModule(
"delic");
458 $del_link =
'<br/><a class="small" href="http://del.icio.us/post?desc=nn&url='.
460 '" /> '.$lng->txt(
"delic_add_to_delicious").
464 include_once
'Services/WebServices/ECS/classes/class.ilECSServerSettings.php';
472 include_once
'Services/PermanentLink/classes/class.ilPermanentLinkGUI.php';
474 $pm->setIncludePermanentLinkText(
false);
475 $pm->setAlignCenter(
false);
483 $title = $ilObjDataCache->lookupTitle($a_obj->getId());
488 if ($ilAccess->checkAccess(
"write",
"",
$ref_id) ||
489 $ilAccess->checkAccess(
"edit_permissions",
"",
$ref_id))
491 $obj_id = $a_obj->getId();
496 if ($tree->isInTree($r))
501 if (count($refs) > 1)
507 $cont_loc->addContextItems($r,
true);
508 $links.= $sep.$cont_loc->getHTML();
513 '<div class="small">'.$links.
'</div>'
523 $lng->txt(
"create_date"),
527 if ($ilUser->getId() != ANONYMOUS_USER_ID and $a_obj->getOwner())
529 include_once
'./Services/Object/classes/class.ilObjectFactory.php';
530 include_once
'./Services/User/classes/class.ilObjUser.php';
541 if (!is_object($ownerObj) || $ownerObj->getType() !=
"usr")
543 $this->
addProperty($lng->txt(
"owner"), $lng->txt(
"no_owner"));
545 else if ($ownerObj->hasPublicProfile())
547 $ilCtrl->setParameterByClass(
"ilpublicuserprofilegui",
"user_id", $ownerObj->getId());
548 $this->
addProperty($lng->txt(
"owner"),$ownerObj->getPublicName(),$ilCtrl->getLinkTargetByClass(
"ilpublicuserprofilegui",
"getHTML"));
552 $this->
addProperty($lng->txt(
"owner"),$ownerObj->getPublicName());
557 require_once
'Services/WebDAV/classes/class.ilDiskQuotaActivationChecker.php';
558 if ($ilUser->getId() != ANONYMOUS_USER_ID &&
561 $size = $a_obj->getDiskUsage();
562 if (
$size !== null) {
567 require_once
'Services/Tracking/classes/class.ilChangeEvent.php';
570 if ($ilUser->getId() != ANONYMOUS_USER_ID)
575 $count_user_reads = 0;
576 $count_anonymous_reads = 0;
577 foreach ($readEvents as $evt)
579 if ($evt[
'usr_id'] == ANONYMOUS_USER_ID)
581 $count_anonymous_reads += $evt[
'read_count'];
585 $count_user_reads += $evt[
'read_count'];
593 if ($count_anonymous_reads > 0)
595 $this->
addProperty($this->lng->txt(
"readcount_anonymous_users"),$count_anonymous_reads);
597 if ($count_user_reads > 0)
599 $this->
addProperty($this->lng->txt(
"readcount_users"),$count_user_reads);
601 if ($count_users > 0)
603 $this->
addProperty($this->lng->txt(
"accesscount_registered_users"),$count_users);
610 require_once(
'Services/WebDAV/classes/class.ilDAVServer.php');
614 if ($ilUser->getId() != ANONYMOUS_USER_ID)
619 if ($ilias->account->getId() != ANONYMOUS_USER_ID)
621 $locks =& $davLocks->getLocksOnObjectObj($a_obj->getId());
622 if (count($locks) > 0)
624 $lockUser =
new ilObjUser($locks[0][
'ilias_owner']);
626 $lockUser->getPublicName()
628 "./ilias.php?user=".$locks[0][
'ilias_owner'].
'&cmd=showUserProfile&cmdClass=ilpersonaldesktopgui&cmdNode=1&baseClass=ilPersonalDesktopGUI'
644 global
$tpl, $ilAccess;
658 include_once(
"Services/Block/classes/class.ilColumnGUI.php");
662 if (!$ilCtrl->isAsynch())
671 $html = $ilCtrl->forwardCommand($column_gui);
678 $html = $ilCtrl->forwardCommand($column_gui);
697 include_once(
"Services/Block/classes/class.ilColumnGUI.php");
701 if ($ilCtrl->getNextClass() ==
"ilcolumngui" &&
705 $html = $ilCtrl->forwardCommand($column_gui);
709 if (!$ilCtrl->isAsynch())
711 if ($this->news_enabled)
713 $html = $ilCtrl->getHTML($column_gui);
726 global
$lng, $ilAccess;
728 $column_gui->setEnableEdit($this->news_editing);
729 $column_gui->setRepositoryMode(
true);
735 $this->open_form_tag = $a_val;
740 $this->close_form_tag = $a_val;
750 $tpl =
new ilTemplate(
"tpl.infoscreen.html" ,
true,
true,
"Services/InfoScreen");
753 if ($this->form_action ==
"")
758 require_once
'Services/jQuery/classes/class.iljQueryUtil.php';
763 $tpl->touchBlock(
"hidden_js");
764 if($this->show_hidden_toggle)
766 $this->
addButton($lng->txt(
"show_hidden_sections"),
"JavaScript:toggleSections(this, '".$lng->txt(
"show_hidden_sections") .
"', '".$lng->txt(
"hide_visible_sections") .
"');");
770 if (count($this->top_buttons) > 0)
772 $tpl->addBlockfile(
"TOP_BUTTONS",
"top_buttons",
"tpl.buttons.html");
774 foreach($this->top_buttons as $button)
777 $tpl->setCurrentBlock(
"btn_cell");
778 $tpl->setVariable(
"BTN_LINK", $button[
"link"]);
779 $tpl->setVariable(
"BTN_TARGET", $button[
"target"]);
780 $tpl->setVariable(
"BTN_TXT", $button[
"title"]);
781 if($button[
"primary"])
783 $tpl->setVariable(
"BTN_CLASS",
" emphsubmit");
785 $tpl->parseCurrentBlock();
790 if ((count($this->top_formbuttons) > 0) && (strlen($this->form_action) > 0))
792 $tpl->addBlockfile(
"TOP_FORMBUTTONS",
"top_submitbuttons",
"tpl.submitbuttons.html",
"Services/InfoScreen");
794 foreach($this->top_formbuttons as $button)
797 $tpl->setCurrentBlock(
"btn_submit_cell");
798 $tpl->setVariable(
"BTN_COMMAND", $button[
"command"]);
799 $tpl->setVariable(
"BTN_NAME", $button[
"title"]);
800 $tpl->parseCurrentBlock();
805 if (strlen($this->form_action) > 0)
807 if($this->open_form_tag)
809 $tpl->setCurrentBlock(
"formtop");
810 $tpl->setVariable(
"FORMACTION", $this->form_action);
811 $tpl->parseCurrentBlock();
814 if($this->close_form_tag)
816 $tpl->touchBlock(
"formbottom");
820 if (count($this->hiddenelements))
822 foreach ($this->hiddenelements as $hidden)
824 $tpl->setCurrentBlock(
"hidden_element");
825 $tpl->setVariable(
"HIDDEN_NAME", $hidden[
"name"]);
826 $tpl->setVariable(
"HIDDEN_VALUE", $hidden[
"value"]);
827 $tpl->parseCurrentBlock();
834 $tpl->setCurrentBlock(
"learning_progress");
835 $tpl->setVariable(
"LP_TABLE",$html);
836 $tpl->parseCurrentBlock();
840 if ($this->private_notes_enabled && !$ilSetting->get(
'disable_notes'))
843 $tpl->setCurrentBlock(
"notes");
844 $tpl->setVariable(
"NOTES", $html);
845 $tpl->parseCurrentBlock();
849 if (is_object($this->gui_object->object))
852 if ($tags_set->get(
"enable") && $ilUser->getId() != ANONYMOUS_USER_ID)
858 if(is_object($this->gui_object->object))
864 for($i = 1; $i <= $this->sec_nr; $i++)
866 if (is_array($this->section[$i][
"properties"]))
869 foreach($this->section[$i][
"properties"] as $property)
871 if ($property[
"name"] !=
"")
873 if ($property[
"link"] ==
"")
875 $tpl->setCurrentBlock(
"pv");
876 $tpl->setVariable(
"TXT_PROPERTY_VALUE", $property[
"value"]);
877 $tpl->parseCurrentBlock();
881 $tpl->setCurrentBlock(
"lpv");
882 $tpl->setVariable(
"TXT_PROPERTY_LVALUE", $property[
"value"]);
883 $tpl->setVariable(
"LINK_PROPERTY_VALUE", $property[
"link"]);
884 $tpl->parseCurrentBlock();
886 $tpl->setCurrentBlock(
"property_row");
887 $tpl->setVariable(
"TXT_PROPERTY", $property[
"name"]);
888 $tpl->parseCurrentBlock();
892 $tpl->setCurrentBlock(
"property_full_row");
893 $tpl->setVariable(
"TXT_PROPERTY_FULL_VALUE", $property[
"value"]);
894 $tpl->parseCurrentBlock();
899 if($this->section[$i][
"hidden"])
901 $tpl->setVariable(
"SECTION_HIDDEN",
" style=\"display:none;\"");
902 $tpl->setVariable(
"SECTION_ID",
"hidable_".$i);
906 $tpl->setVariable(
"SECTION_ID", $i);
909 $tpl->setVariable(
"TXT_SECTION", $this->section[$i][
"title"]);
910 $tpl->touchBlock(
"row");
921 if(!$rbacsystem->checkAccess(
'read',$this->gui_object->object->getRefId()))
925 if($ilUser->getId() == ANONYMOUS_USER_ID)
930 include_once(
"Services/Tracking/classes/class.ilObjUserTracking.php");
936 include_once
'./Services/Object/classes/class.ilObjectLP.php';
943 include_once
'Services/Tracking/classes/class.ilLPMarks.php';
945 $this->lng->loadLanguageModule(
'trac');
949 $a_tpl->setVariable(
"TXT_SECTION",
950 $this->lng->txt(
'learning_progress'));
951 $a_tpl->parseCurrentBlock();
955 $i_tpl =
new ilTemplate(
"tpl.lp_edit_manual_info_page.html",
true,
true,
"Services/Tracking");
956 $i_tpl->setVariable(
"INFO_EDITED", $this->lng->txt(
"trac_info_edited"));
958 $this->gui_object->object->getId()),
960 array(0 => $this->lng->txt(
'trac_not_completed'),
961 1 => $this->lng->txt(
'trac_completed')),
964 $i_tpl->setVariable(
"TXT_SAVE", $this->lng->txt(
"save"));
965 $a_tpl->setCurrentBlock(
"pv");
966 $a_tpl->setVariable(
"TXT_PROPERTY_VALUE", $i_tpl->get());
967 $a_tpl->parseCurrentBlock();
968 $a_tpl->setCurrentBlock(
"property_row");
969 $a_tpl->setVariable(
"TXT_PROPERTY", $this->lng->txt(
'trac_status'));
970 $a_tpl->parseCurrentBlock();
975 if($this->gui_object->object->getType() ==
'lm' ||
976 $this->gui_object->object->getType() ==
'htlm')
978 $a_tpl->setCurrentBlock(
"pv");
980 include_once
'Services/Tracking/classes/class.ilLearningProgress.php';
982 if($progress[
'access_time'])
984 $a_tpl->setVariable(
"TXT_PROPERTY_VALUE",
989 $a_tpl->setVariable(
"TXT_PROPERTY_VALUE",
990 $this->lng->txt(
'trac_not_accessed'));
993 $a_tpl->parseCurrentBlock();
994 $a_tpl->setCurrentBlock(
"property_row");
995 $a_tpl->setVariable(
"TXT_PROPERTY", $this->lng->txt(
'trac_last_access'));
996 $a_tpl->parseCurrentBlock();
1000 $a_tpl->setCurrentBlock(
"pv");
1001 $a_tpl->setVariable(
"TXT_PROPERTY_VALUE",
1002 (
int) $progress[
'visits']);
1003 $a_tpl->parseCurrentBlock();
1004 $a_tpl->setCurrentBlock(
"property_row");
1005 $a_tpl->setVariable(
"TXT_PROPERTY", $this->lng->txt(
'trac_visits'));
1006 $a_tpl->parseCurrentBlock();
1010 if($this->gui_object->object->getType() ==
'lm')
1013 $a_tpl->setCurrentBlock(
"pv");
1014 $a_tpl->setVariable(
"TXT_PROPERTY_VALUE",
1016 $a_tpl->parseCurrentBlock();
1017 $a_tpl->setCurrentBlock(
"property_row");
1018 $a_tpl->setVariable(
"TXT_PROPERTY", $this->lng->txt(
'trac_spent_time'));
1019 $a_tpl->parseCurrentBlock();
1025 $a_tpl->touchBlock(
"row");
1032 include_once
'Services/Tracking/classes/class.ilLPMarks.php';
1034 $lp_marks =
new ilLPMarks($this->gui_object->object->getId(),$ilUser->getId());
1036 $lp_marks->update();
1038 require_once
'Services/Tracking/classes/class.ilLPStatusWrapper.php';
1041 $this->lng->loadLanguageModule(
'trac');
1055 $next_class = $this->ctrl->getNextClass($this);
1056 include_once(
"Services/Notes/classes/class.ilNoteGUI.php");
1057 $notes_gui =
new ilNoteGUI($this->gui_object->object->getId(), 0,
1058 $this->gui_object->object->getType());
1061 if($ilSetting->get(
"disable_comments"))
1071 $ref_id = $this->gui_object->object->getRefId();
1072 if ($ilAccess->checkAccess(
"write",
"",
$ref_id) ||
1073 $ilAccess->checkAccess(
"edit_permissions",
"",
$ref_id))
1075 $notes_gui->enableCommentsSettings();
1083 if ($next_class ==
"ilnotegui")
1085 $html = $this->ctrl->forwardCommand($notes_gui);
1089 $html = $notes_gui->getNotesHTML();
1104 if(strlen($a_section))
1108 include_once(
'Services/LDAP/classes/class.ilLDAPRoleGroupMapping.php');
1110 if($infos = $ldap_mapping->getInfoStrings($this->gui_object->object->getId()))
1112 $info_combined =
'<div style="color:green;">';
1114 foreach($infos as $info_string)
1118 $info_combined .=
'<br />';
1120 $info_combined .= $info_string;
1122 $info_combined .=
'</div>';
1123 $this->
addProperty($this->lng->txt(
'applications'),$info_combined);
1132 $this->
getTabs($this->tabs_gui);
1140 global $rbacsystem,
$ilUser,$ilAccess;
1142 $next_class = $this->ctrl->getNextClass($this);
1143 $force_active = ($next_class ==
"ilnotegui")
1147 $tabs_gui->addSubTabTarget(
'summary',
1148 $this->ctrl->getLinkTarget($this,
"showSummary"),
1149 array(
"showSummary",
""),
1150 get_class($this),
"", $force_active);
1161 $lng->loadLanguageModule(
"tagging");
1164 include_once(
"Services/Tagging/classes/class.ilTaggingGUI.php");
1166 $tagging_gui->setObject($this->gui_object->object->getId(),
1167 $this->gui_object->object->getType());
1169 $this->
addSection($lng->txt(
"tagging_tags"));
1171 if ($tags_set->get(
"enable_all_users"))
1173 $this->
addProperty($lng->txt(
"tagging_all_users"),
1174 $tagging_gui->getAllUserTagsForObjectHTML());
1178 $tagging_gui->getTaggingInputHTML());
1185 include_once(
"Services/Tagging/classes/class.ilTaggingGUI.php");
1187 $tagging_gui->setObject($this->gui_object->object->getId(),
1188 $this->gui_object->object->getType());
1189 $tagging_gui->saveInput();
1196 $this->hidden =
true;
1197 $this->show_hidden_toggle = (bool)$a_add_toggle;
1204 return "<a onClick=\"toggleSections(this, '".$lng->txt(
"show_hidden_sections") .
"', '".$lng->txt(
"hide_visible_sections") .
"');\" href=\"#\">".$lng->txt(
"show_hidden_sections").
"</a>";