64 $this->tabs_gui =& $ilTabs;
65 $this->gui_object =& $a_gui_object;
67 $this->private_notes_enabled =
false;
68 $this->news_enabled =
false;
69 $this->feedback_enabled =
false;
70 $this->learning_progress_enabled =
false;
71 $this->form_action =
"";
72 $this->top_formbuttons = array();
73 $this->hiddenelements = array();
86 $lng->loadLanguageModule(
"barometer");
88 $next_class = $this->ctrl->getNextClass($this);
90 $cmd = $this->ctrl->getCmd(
"showSummary");
91 $this->ctrl->setReturn($this,
"showSummary");
101 case "ilfeedbackgui":
102 include_once(
"Services/Feedback/classes/class.ilFeedbackGUI.php");
104 $this->ctrl->setParameterByClass(
"ilFeedbackGUI",
"obj_id",$this->gui_object->object->getId());
105 $this->ctrl->setParameterByClass(
"ilFeedbackGUI",
"ref_id",
$_GET[
'ref_id']);
106 $html = $this->ctrl->forwardCommand($fb_gui);
107 $tpl->setContent($html);
114 case "ilpublicuserprofilegui":
115 include_once(
"./Services/User/classes/class.ilPublicUserProfileGUI.php");
117 $user_profile->setBackUrl($ilCtrl->getLinkTarget($this,
"showSummary"));
118 $html = $ilCtrl->forwardCommand($user_profile);
119 $tpl->setContent($html);
123 return $this->
$cmd();
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;
201 $this->form_action = $a_form_action;
209 $this->form_action =
"";
221 $this->section[$this->sec_nr][
"properties"][] =
222 array(
"name" => $a_name,
"value" => $a_value,
229 function addPropertyCheckbox($a_name, $a_checkbox_name, $a_checkbox_value, $a_checkbox_label =
"", $a_checkbox_checked =
false)
231 $checkbox =
"<input type=\"checkbox\" name=\"$a_checkbox_name\" value=\"$a_checkbox_value\" id=\"$a_checkbox_name$a_checkbox_value\"";
232 if ($a_checkbox_checked)
234 $checkbox .=
" checked=\"checked\"";
237 if (strlen($a_checkbox_label))
239 $checkbox .=
" <label for=\"$a_checkbox_name$a_checkbox_value\">$a_checkbox_label</label>";
241 $this->section[$this->sec_nr][
"properties"][] =
242 array(
"name" => $a_name,
"value" => $checkbox);
248 function addPropertyTextinput($a_name, $a_input_name, $a_input_value =
"", $a_input_size =
"", $direct_button_command =
"", $direct_button_label =
"")
250 $input =
"<input type=\"text\" name=\"$a_input_name\" id=\"$a_input_name\"";
251 if (strlen($a_input_value))
255 if (strlen($a_input_size))
257 $input .=
" size=\"" . $a_input_size .
"\"";
260 if (strlen($direct_button_command) && strlen($direct_button_label))
262 $input .=
" <input type=\"submit\" class=\"submit\" name=\"cmd[$direct_button_command]\" value=\"$direct_button_label\" />";
264 $this->section[$this->sec_nr][
"properties"][] =
265 array(
"name" =>
"<label for=\"$a_input_name\">$a_name</label>",
"value" => $input);
271 function addButton($a_title, $a_link, $a_frame =
"", $a_position =
"top")
273 if ($a_position ==
"top")
275 $this->top_buttons[] =
276 array(
"title" => $a_title,
"link" => $a_link,
"target" => $a_frame);
286 if ($a_position ==
"top")
288 array_push($this->top_formbuttons,
289 array(
"command" => $a_command,
"title" => $a_title)
296 array_push($this->hiddenelements, array(
"name" => $a_name,
"value" => $a_value));
306 $lng->loadLanguageModule(
"meta");
308 include_once(
"./Services/MetaData/classes/class.ilMD.php");
309 $md =
new ilMD($a_rep_obj_id,$a_obj_id, $a_type);
311 if ($md_gen = $md->getGeneral())
314 foreach($md_gen->getDescriptionIds() as $id)
316 $md_des = $md_gen->getDescription($id);
317 $description = $md_des->getDescription();
323 foreach($ids = $md_gen->getLanguageIds() as $id)
325 $md_lan = $md_gen->getLanguage($id);
326 if ($md_lan->getLanguageCode() !=
"")
328 $langs[] = $lng->txt(
"meta_l_".$md_lan->getLanguageCode());
331 $langs = implode($langs,
", ");
335 foreach($ids = $md_gen->getKeywordIds() as $id)
337 $md_key = $md_gen->getKeyword($id);
338 $keywords[] = $md_key->getKeyword();
340 $keywords = implode($keywords,
", ");
344 if(is_object($lifecycle = $md->getLifecycle()))
347 foreach(($ids = $lifecycle->getContributeIds()) as $con_id)
349 $md_con = $lifecycle->getContribute($con_id);
350 if ($md_con->getRole() ==
"Author")
352 foreach($ent_ids = $md_con->getEntityIds() as $ent_id)
354 $md_ent = $md_con->getEntity($ent_id);
355 $author = $author.$sep.$md_ent->getEntity();
364 if(is_object($rights = $md->getRights()))
366 include_once(
'Services/MetaData/classes/class.ilMDUtils.php');
371 #if(is_object($educational = $md->getEducational()))
373 # $learning_time = $educational->getTypicalLearningTime();
376 if(is_object($educational = $md->getEducational()))
378 if($seconds = $educational->getTypicalLearningTimeSeconds())
388 if ($description !=
"")
411 if ($copyright !=
"")
416 if ($learning_time !=
"")
418 $this->
addProperty($lng->txt(
"meta_typical_learning_time"),
430 $this->
addSection($lng->txt(
"additional_info"));
431 $a_obj = $this->gui_object->object;
434 if (is_object($a_obj))
437 $type = $a_obj->getType();
440 include_once(
'classes/class.ilLink.php');
445 if ($d_set->get(
"add_info_links") ==
"1")
447 $lng->loadLanguageModule(
"delic");
448 $del_link =
'<br/><a class="small" href="http://del.icio.us/post?desc=nn&url='.
450 '" /> '.$lng->txt(
"delic_add_to_delicious").
454 include_once(
'Services/WebServices/ECS/classes/class.ilECSSettings.php');
456 if($settings->isEnabled())
469 if ($ilAccess->checkAccess(
"write",
"",
$ref_id) ||
470 $ilAccess->checkAccess(
"edit_permissions",
"",
$ref_id))
472 $obj_id = $a_obj->getId();
477 if ($tree->isInTree($r))
482 if (count($refs) > 1)
488 $cont_loc->addContextItems($r,
true);
489 $links.= $sep.$cont_loc->getHTML();
494 '<div class="small">'.$links.
'</div>'
503 $lng->txt(
"create_date"),
507 if ($ilUser->getId() != ANONYMOUS_USER_ID)
509 include_once
'classes/class.ilObjectFactory.php';
515 if ($ownerObj->hasPublicProfile())
517 $ilCtrl->setParameterByClass(
"ilpublicuserprofilegui",
"user_id", $ownerObj->getId());
518 $this->
addProperty($lng->txt(
"owner"),$ownerObj->getPublicName(),$ilCtrl->getLinkTargetByClass(
"ilpublicuserprofilegui",
"getHTML"));
522 $this->
addProperty($lng->txt(
"owner"),$ownerObj->getPublicName());
527 require_once
'Services/Tracking/classes/class.ilChangeEvent.php';
530 if ($ilUser->getId() != ANONYMOUS_USER_ID)
535 $count_user_reads = 0;
536 $count_anonymous_reads = 0;
537 foreach ($readEvents as $evt)
539 if ($evt[
'usr_id'] == ANONYMOUS_USER_ID)
541 $count_anonymous_reads += $evt[
'read_count'];
545 $count_user_reads += $evt[
'read_count'];
553 if ($count_anonymous_reads > 0)
555 $this->
addProperty($this->lng->txt(
"readcount_anonymous_users"),$count_anonymous_reads);
557 if ($count_user_reads > 0)
559 $this->
addProperty($this->lng->txt(
"readcount_users"),$count_user_reads);
561 if ($count_users > 0)
563 $this->
addProperty($this->lng->txt(
"accesscount_registered_users"),$count_users);
570 require_once(
'Services/WebDAV/classes/class.ilDAVServer.php');
574 if ($ilUser->getId() != ANONYMOUS_USER_ID)
579 if ($ilias->account->getId() != ANONYMOUS_USER_ID)
581 $locks =& $davLocks->getLocksOnObjectObj($a_obj->getId());
582 if (count($locks) > 0)
584 $lockUser =
new ilObjUser($locks[0][
'ilias_owner']);
586 $lockUser->getPublicName()
588 "./ilias.php?user=".$locks[0][
'ilias_owner'].
'&cmd=showUserProfile&cmdClass=ilpersonaldesktopgui&cmdNode=1&baseClass=ilPersonalDesktopGUI'
604 global
$tpl, $ilAccess;
618 include_once(
"Services/Block/classes/class.ilColumnGUI.php");
622 if (!$ilCtrl->isAsynch())
631 $html = $ilCtrl->forwardCommand($column_gui);
638 $html = $ilCtrl->forwardCommand($column_gui);
657 include_once(
"Services/Block/classes/class.ilColumnGUI.php");
661 if ($ilCtrl->getNextClass() ==
"ilcolumngui" &&
665 $html = $ilCtrl->forwardCommand($column_gui);
669 if (!$ilCtrl->isAsynch())
671 if ($this->news_enabled)
673 $html = $ilCtrl->getHTML($column_gui);
686 global
$lng, $ilAccess;
688 $column_gui->setEnableEdit($this->news_editing);
689 $column_gui->setRepositoryMode(
true);
700 $tpl =
new ilTemplate(
"tpl.infoscreen.html" ,
true,
true,
"Services/InfoScreen");
703 if ($this->form_action ==
"")
709 if (count($this->top_buttons) > 0)
711 $tpl->addBlockfile(
"TOP_BUTTONS",
"top_buttons",
"tpl.buttons.html");
713 foreach($this->top_buttons as $button)
716 $tpl->setCurrentBlock(
"btn_cell");
717 $tpl->setVariable(
"BTN_LINK", $button[
"link"]);
718 $tpl->setVariable(
"BTN_TARGET", $button[
"target"]);
719 $tpl->setVariable(
"BTN_TXT", $button[
"title"]);
720 $tpl->parseCurrentBlock();
725 if ((count($this->top_formbuttons) > 0) && (strlen($this->form_action) > 0))
727 $tpl->addBlockfile(
"TOP_FORMBUTTONS",
"top_submitbuttons",
"tpl.submitbuttons.html");
729 foreach($this->top_formbuttons as $button)
732 $tpl->setCurrentBlock(
"btn_submit_cell");
733 $tpl->setVariable(
"BTN_COMMAND", $button[
"command"]);
734 $tpl->setVariable(
"BTN_NAME", $button[
"title"]);
735 $tpl->parseCurrentBlock();
740 if (strlen($this->form_action) > 0)
742 $tpl->setCurrentBlock(
"formtop");
743 $tpl->setVariable(
"FORMACTION", $this->form_action);
744 $tpl->parseCurrentBlock();
745 $tpl->touchBlock(
"formbottom");
748 if (count($this->hiddenelements))
750 foreach ($this->hiddenelements as $hidden)
752 $tpl->setCurrentBlock(
"hidden_element");
753 $tpl->setVariable(
"HIDDEN_NAME", $hidden[
"name"]);
754 $tpl->setVariable(
"HIDDEN_VALUE", $hidden[
"value"]);
755 $tpl->parseCurrentBlock();
760 if (is_object($this->gui_object->object))
763 if ($tags_set->get(
"enable") && $ilUser->getId() != ANONYMOUS_USER_ID)
773 $tpl->setCurrentBlock(
"learning_progress");
774 $tpl->setVariable(
"LP_TABLE",$html);
775 $tpl->parseCurrentBlock();
780 if ($this->private_notes_enabled && !$ilSetting->get(
'disable_notes'))
783 $tpl->setCurrentBlock(
"notes");
784 $tpl->setVariable(
"NOTES", $html);
785 $tpl->parseCurrentBlock();
788 if(is_object($this->gui_object->object))
794 for($i = 1; $i <= $this->sec_nr; $i++)
796 if (is_array($this->section[$i][
"properties"]))
799 $tpl->setCurrentBlock(
"header_row");
800 $tpl->setVariable(
"TXT_SECTION",
801 $this->section[$i][
"title"]);
802 $tpl->parseCurrentBlock();
803 $tpl->touchBlock(
"row");
806 foreach($this->section[$i][
"properties"] as $property)
808 if ($property[
"name"] !=
"")
810 if ($property[
"link"] ==
"")
812 $tpl->setCurrentBlock(
"pv");
813 $tpl->setVariable(
"TXT_PROPERTY_VALUE", $property[
"value"]);
814 $tpl->parseCurrentBlock();
818 $tpl->setCurrentBlock(
"lpv");
819 $tpl->setVariable(
"TXT_PROPERTY_LVALUE", $property[
"value"]);
820 $tpl->setVariable(
"LINK_PROPERTY_VALUE", $property[
"link"]);
821 $tpl->parseCurrentBlock();
823 $tpl->setCurrentBlock(
"property_row");
824 $tpl->setVariable(
"TXT_PROPERTY", $property[
"name"]);
825 $tpl->parseCurrentBlock();
826 $tpl->touchBlock(
"row");
830 $tpl->setCurrentBlock(
"property_full_row");
831 $tpl->setVariable(
"TXT_PROPERTY_FULL_VALUE", $property[
"value"]);
832 $tpl->parseCurrentBlock();
833 $tpl->touchBlock(
"row");
844 global $ilUser,$rbacsystem;
846 if(!$rbacsystem->checkAccess(
'read',$this->gui_object->object->getRefId()))
850 if($ilUser->getId() == ANONYMOUS_USER_ID)
855 include_once(
"Services/Tracking/classes/class.ilObjUserTracking.php");
861 include_once
'Services/Tracking/classes/class.ilLPObjSettings.php';
862 include_once
'Services/Tracking/classes/class.ilLPMarks.php';
869 $this->lng->loadLanguageModule(
'trac');
870 $tpl =
new ilTemplate(
"tpl.lp_edit_manual.html",
true,
true,
'Services/Tracking');
872 $tpl->setVariable(
"FORMACTION",$this->ctrl->getFormAction($this));
874 $tpl->setVariable(
"ALT_IMG",$this->lng->txt(
'learning_progress'));
875 $tpl->setVariable(
"TXT_EDIT_PROGRESS",$this->lng->txt(
'trac_edit_progress'));
877 $tpl->setVariable(
"TXT_STATUS",$this->lng->txt(
'trac_status'));
881 $this->gui_object->object->getId()),
883 array(0 => $this->lng->txt(
'trac_not_completed'),
884 1 => $this->lng->txt(
'trac_completed')),
889 $tpl->setVariable(
"INFO_EDITED",$this->lng->txt(
'trac_info_edited'));
892 if($this->gui_object->object->getType() ==
'lm' ||
893 $this->gui_object->object->getType() ==
'htlm')
895 $tpl->setCurrentBlock(
"lm_infos");
896 $tpl->setVariable(
"TXT_LAST_ACCESS",$this->lng->txt(
'trac_last_access'));
898 include_once
'Services/Tracking/classes/class.ilLearningProgress.php';
900 if($progress[
'access_time'])
906 $tpl->setVariable(
"LAST_ACCESS",$this->lng->txt(
'trac_not_accessed'));
909 $tpl->setVariable(
"TXT_VISITS",$this->lng->txt(
'trac_visits'));
910 $tpl->setVariable(
"VISITS",(
int) $progress[
'visits']);
912 if($this->gui_object->object->getType() ==
'lm')
914 $tpl->setVariable(
"TXT_DURATION",$this->lng->txt(
'trac_spent_time'));
918 $tpl->parseCurrentBlock();
920 $tpl->setVariable(
"TXT_SAVE",$this->lng->txt(
'save'));
929 include_once
'Services/Tracking/classes/class.ilLPObjSettings.php';
930 include_once
'Services/Tracking/classes/class.ilLPMarks.php';
932 $lp_marks =
new ilLPMarks($this->gui_object->object->getId(),$ilUser->getId());
936 $this->lng->loadLanguageModule(
'trac');
950 $next_class = $this->ctrl->getNextClass($this);
951 include_once(
"Services/Notes/classes/class.ilNoteGUI.php");
952 $notes_gui =
new ilNoteGUI($this->gui_object->object->getId(), 0,
953 $this->gui_object->object->getType());
955 $ref_id = $this->gui_object->object->getRefId();
956 if ($ilAccess->checkAccess(
"write",
"", $ref_id) ||
957 $ilAccess->checkAccess(
"edit_permissions",
"", $ref_id))
959 $notes_gui->enableCommentsSettings();
962 $notes_gui->enablePrivateNotes();
965 if ($next_class ==
"ilnotegui")
967 $html = $this->ctrl->forwardCommand($notes_gui);
971 $html = $notes_gui->getNotesHTML();
986 if(strlen($a_section))
990 include_once(
'Services/LDAP/classes/class.ilLDAPRoleGroupMapping.php');
992 if($infos = $ldap_mapping->getInfoStrings($this->gui_object->object->getId()))
994 $info_combined =
'<div style="color:green;">';
996 foreach($infos as $info_string)
1000 $info_combined .=
'<br />';
1002 $info_combined .= $info_string;
1004 $info_combined .=
'</div>';
1005 $this->
addProperty($this->lng->txt(
'applications'),$info_combined);
1014 $this->
getTabs($this->tabs_gui);
1022 global $rbacsystem,$ilUser,$ilAccess;
1024 $next_class = $this->ctrl->getNextClass($this);
1025 $force_active = ($next_class ==
"ilnotegui")
1029 $tabs_gui->addSubTabTarget(
'summary',
1030 $this->ctrl->getLinkTarget($this,
"showSummary"),
1031 array(
"showSummary",
""),
1032 get_class($this),
"", $force_active);
1034 if ($this->feedback_enabled)
1036 $show_feedback_tab=
false;
1037 if($ilAccess->checkAccess(
'write',
'edit',
$_GET[
'ref_id']))
1039 $show_feedback_tab=
true;
1046 include_once(
'Services/Feedback/classes/class.ilFeedback.php');
1048 $feedback->setRefId(
$_GET[
'ref_id']);
1049 $barometers = $feedback->getAllBarometer(0);
1050 if(count($barometers))
1052 foreach ($barometers as $barometer)
1054 if($barometer->canVote($ilUser->getId(),$barometer->getId())==1)
1056 $show_feedback_tab=
true;
1062 if ($show_feedback_tab)
1064 $tabs_gui->addSubTabTarget(
"feedback",
1065 $this->ctrl->getLinkTargetByClass(
"ilfeedbackgui",
"fbList"),
1066 "",
"ilfeedbackgui");
1084 $lng->loadLanguageModule(
"tagging");
1086 include_once(
"Services/Tagging/classes/class.ilTaggingGUI.php");
1088 $tagging_gui->setObject($this->gui_object->object->getId(),
1089 $this->gui_object->object->getType());
1092 $tpl->setCurrentBlock(
"header_row");
1093 $tpl->setVariable(
"TXT_SECTION",
1094 $this->lng->txt(
"tagging_tags"));
1095 $tpl->parseCurrentBlock();
1096 $tpl->touchBlock(
"row");
1099 $tpl->setCurrentBlock(
"pv");
1100 $tpl->setVariable(
"TXT_PROPERTY_VALUE",
1101 $tagging_gui->getAllUserTagsForObjectHTML());
1102 $tpl->parseCurrentBlock();
1103 $tpl->setCurrentBlock(
"property_row");
1104 $tpl->setVariable(
"TXT_PROPERTY", $lng->txt(
"tagging_all_users"));
1105 $tpl->parseCurrentBlock();
1106 $tpl->touchBlock(
"row");
1109 $tpl->setCurrentBlock(
"pv");
1110 $tpl->setVariable(
"TXT_PROPERTY_VALUE", $tagging_gui->getTaggingInputHTML());
1111 $tpl->parseCurrentBlock();
1112 $tpl->setCurrentBlock(
"property_row");
1113 $tpl->setVariable(
"TXT_PROPERTY", $lng->txt(
"tagging_my_tags"));
1114 $tpl->parseCurrentBlock();
1115 $tpl->touchBlock(
"row");
1122 include_once(
"Services/Tagging/classes/class.ilTaggingGUI.php");
1124 $tagging_gui->setObject($this->gui_object->object->getId(),
1125 $this->gui_object->object->getType());
1126 $tagging_gui->saveInput();