4 include_once(
"./Services/Portfolio/classes/class.ilObjPortfolio.php");
5 include_once(
'./Services/Portfolio/classes/class.ilPortfolioAccessHandler.php');
33 $lng->loadLanguageModule(
"prtf");
35 $this->user_id = $ilUser->getId();
39 $ilCtrl->setParameter($this,
"prt_id", $portfolio_id);
47 protected function checkAccess($a_permission, $a_portfolio_id = null)
49 if(!$a_portfolio_id && $this->portfolio)
51 $a_portfolio_id = $this->portfolio->getId();
55 return $this->access_handler->checkAccess($a_permission,
"", $a_portfolio_id);
67 if(
$portfolio->getId() && $this->access_handler->checkAccess(
"read",
"", $a_id))
80 $next_class = $ilCtrl->getNextClass($this);
81 $cmd = $ilCtrl->getCmd(
"show");
83 $lng->loadLanguageModule(
"user");
85 $title = $lng->txt(
"portfolio");
88 $title .=
": ".$this->portfolio->getTitle();
92 $lng->txt(
"portfolio"));
96 case "ilworkspaceaccessgui";
99 $ilTabs->clearTargets();
100 $ilCtrl->setParameter($this,
"prt_id",
"");
101 $ilTabs->setBackTarget($lng->txt(
"back"),
102 $ilCtrl->getLinkTarget($this,
"show"));
103 $ilCtrl->setParameter($this,
"prt_id", $this->portfolio->getId());
106 $ilTabs->activateTab(
"share");
108 include_once(
'Services/PermanentLink/classes/class.ilPermanentLinkGUI.php');
112 include_once(
'./Services/PersonalWorkspace/classes/class.ilWorkspaceAccessGUI.php');
114 $ilCtrl->forwardCommand($wspacc);
118 case 'ilportfoliopagegui':
119 $ilTabs->clearTargets();
120 $ilTabs->setBackTarget($lng->txt(
"back"),
121 $ilCtrl->getLinkTarget($this,
"pages"));
129 $ilCtrl->setParameter($this,
"ppage",
$_REQUEST[
"ppage"]);
135 $ilCtrl->setParameter($this,
"user_page",
$_REQUEST[
"user_page"]);
138 include_once(
"Services/Portfolio/classes/class.ilPortfolioPageGUI.php");
140 $page_id, 0, $this->portfolio->hasPublicComments());
143 $ret = $ilCtrl->forwardCommand($page_gui);
156 $tpl->setContent(
$ret);
166 if(
$cmd !=
"preview")
188 $ilHelp->setScreenIdComponent(
"prtf");
190 $ilTabs->addTab(
"mypf", $lng->txt(
"prtf_tab_portfolios"),
191 $ilCtrl->getLinkTarget($this));
193 $ilTabs->addTab(
"otpf", $lng->txt(
"prtf_tab_other_users"),
194 $ilCtrl->getLinkTarget($this,
"showother"));
196 $ilTabs->activateTab(
"mypf");
206 $ilToolbar->addButton($lng->txt(
"prtf_add_portfolio"),
207 $ilCtrl->getLinkTarget($this,
"add"));
209 include_once
"Services/Portfolio/classes/class.ilPortfolioTableGUI.php";
212 $tpl->setContent($table->getHTML());
228 if(is_array(
$_POST[
"online"]) && in_array($id,
$_POST[
"online"]))
243 $ilCtrl->redirect($this,
"show");
255 $tpl->setContent($form->getHTML());
266 if($form->checkInput())
269 $portfolio->setTitle($form->getInput(
"title"));
273 include_once(
"Services/Portfolio/classes/class.ilPortfolioPage.php");
275 if($form->getInput(
"ptype") ==
"page")
278 $page->setTitle($form->getInput(
"fpage"));
281 $layout_id = $form->getInput(
"tmpl");
284 include_once(
"./Services/Style/classes/class.ilPageLayout.php");
286 $page->setXMLContent($layout_obj->getXMLContent());
292 $page->setTitle($form->getInput(
"blog"));
297 $ilCtrl->setParameter($this,
"prt_id",
$portfolio->getId());
298 $ilCtrl->redirect($this,
"pages");
301 $form->setValuesByPost();
302 $tpl->setContent($form->getHTML());
312 $ilTabs->clearTargets();
313 $ilCtrl->setParameter($this,
"prt_id",
"");
314 $ilTabs->setBackTarget($lng->txt(
"back"),
315 $ilCtrl->getLinkTarget($this,
"show"));
316 $ilCtrl->setParameter($this,
"prt_id", $this->portfolio->getId());
319 $ilTabs->activateTab(
"edit");
323 $tpl->setContent($form->getHTML());
334 if($form->checkInput() && $this->
checkAccess(
"write"))
336 $this->portfolio->setTitle($form->getInput(
"title"));
337 $this->portfolio->setDescription($form->getInput(
"desc"));
338 $this->portfolio->setOnline($form->getInput(
"online"));
339 $this->portfolio->setPublicComments($form->getInput(
"comments"));
340 $this->portfolio->setProfilePicture($form->getInput(
"ppic"));
341 $this->portfolio->setBackgroundColor($form->getInput(
"bg_color"));
342 $this->portfolio->setFontcolor($form->getInput(
"font_color"));
346 if($_FILES[
"banner"][
"tmp_name"])
348 $this->portfolio->uploadImage($_FILES[
"banner"]);
350 else if($prfa_set->get(
'banner') and $form->getItemByPostVar(
"banner")->getDeletionFlag())
352 $this->portfolio->deleteImage();
355 $this->portfolio->update();
358 if(!$form->getInput(
"online"))
364 $ilCtrl->redirect($this,
"pages");
367 $form->setValuesByPost();
368 $tpl->setContent($form->getHTML());
381 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
383 $form->setFormAction($ilCtrl->getFormAction($this));
389 $ti->setRequired(
true);
399 if($a_mode ==
"create")
403 $form->addItem($type);
406 $type->addOption($type_page);
412 $tf->setRequired(
true);
413 $type_page->addSubItem($tf);
415 include_once
"Services/Style/classes/class.ilPageLayout.php";
419 $options = array(0 => $lng->txt(
"none"));
420 foreach ($templates as $templ)
422 $templ->readObject();
423 $options[$templ->getId()] = $templ->getTitle();
426 $use_template =
new ilSelectInputGUI($lng->txt(
"prtf_use_page_layout"),
"tmpl");
428 $use_template->setOptions($options);
429 $type_page->addSubItem($use_template);
432 if(!$ilSetting->get(
'disable_wsp_blogs'))
435 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
441 foreach ($tree->getSubTree($root) as $node)
443 if ($node[
"type"] ==
"blog")
445 $options[$node[
"obj_id"]] = $node[
"title"];
452 $type_blog =
new ilRadioOption($lng->txt(
"obj_blog"),
"blog");
453 $type->addOption($type_blog);
457 $obj->setOptions($options);
458 $type_blog->addSubItem($obj);
463 $type->setValue(
"page");
467 $form->setTitle($lng->txt(
"prtf_create_portfolio"));
468 $form->addCommandButton(
"save", $lng->txt(
"save"));
469 $form->addCommandButton(
"show", $lng->txt(
"cancel"));
475 $form->addItem($online);
479 $form->addItem($comments);
483 $form->addItem($ppic);
486 if($prfa_set->get(
"banner"))
488 $dimensions =
" (".$prfa_set->get(
"banner_width").
"x".
489 $prfa_set->get(
"banner_height").
")";
492 $form->addItem(
$img);
495 $file = $this->portfolio->getImageFullPath(
true);
503 $form->addItem($bg_color);
506 $form->addItem($font_color);
508 $ti->
setValue($this->portfolio->getTitle());
510 $online->setChecked($this->portfolio->isOnline());
511 $comments->setChecked($this->portfolio->hasPublicComments());
512 $ppic->setChecked($this->portfolio->hasProfilePicture());
513 $bg_color->setValue($this->portfolio->getBackgroundColor());
514 $font_color->setValue($this->portfolio->getFontColor());
516 $form->setTitle($lng->txt(
"prtf_edit_portfolio"));
517 $form->addCommandButton(
"update", $lng->txt(
"save"));
518 $form->addCommandButton(
"show", $lng->txt(
"cancel"));
531 if($this->portfolio && $this->
checkAccess(
"write"))
534 if($this->access_handler->hasRegisteredPermission($this->portfolio->getId()) ||
535 $this->access_handler->hasGlobalPermission($this->portfolio->getId()))
540 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
542 $cgui->setFormAction($ilCtrl->getFormAction($this));
543 $cgui->setHeaderText($lng->txt(
"prtf_set_default_publish_confirmation"));
544 $cgui->setCancel($lng->txt(
"yes"),
"setDefaultGlobal");
545 $cgui->setConfirm($lng->txt(
"no"),
"setDefaultRegistered");
547 $tpl->setContent($cgui->getHTML());
550 $ilCtrl->redirect($this,
"show");
557 if($this->portfolio && $this->
checkAccess(
"write"))
562 $ilCtrl->redirect($this,
"show");
569 if($this->portfolio && $this->
checkAccess(
"write"))
574 $ilCtrl->redirect($this,
"show");
584 if($this->portfolio && $this->
checkAccess(
"write"))
587 if($this->access_handler->hasGlobalPermission($this->portfolio->getId()))
589 $ilUser->setPref(
"public_profile",
"g");
590 $ilUser->writePrefs();
592 else if($this->access_handler->hasRegisteredPermission($this->portfolio->getId()))
594 $ilUser->setPref(
"public_profile",
"y");
595 $ilUser->writePrefs();
604 $ilCtrl->redirect($this,
"show");
614 if($this->portfolio && $this->
checkAccess(
"write"))
617 $ilUser->setPref(
"public_profile",
"n");
618 $ilUser->writePrefs();
623 $ilCtrl->redirect($this,
"show");
633 if (!is_array(
$_POST[
"prtfs"]) || count(
$_POST[
"prtfs"]) == 0)
636 $ilCtrl->redirect($this,
"show");
640 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
642 $cgui->setFormAction($ilCtrl->getFormAction($this));
643 $cgui->setHeaderText($lng->txt(
"prtf_sure_delete_portfolios"));
644 $cgui->setCancel($lng->txt(
"cancel"),
"show");
645 $cgui->setConfirm($lng->txt(
"delete"),
"deletePortfolios");
647 foreach (
$_POST[
"prtfs"] as $id)
652 $tpl->setContent($cgui->getHTML());
663 if (is_array(
$_POST[
"prtfs"]))
665 foreach (
$_POST[
"prtfs"] as $id)
672 $this->access_handler->removePermission($id);
679 $ilCtrl->redirect($this,
"show");
693 $ilHelp->setScreenIdComponent(
"prtf");
695 $ilTabs->addTab(
"pages",
696 $lng->txt(
"content"),
697 $ilCtrl->getLinkTarget($this,
"pages"));
699 $ilTabs->addTab(
"edit",
700 $lng->txt(
"settings"),
701 $ilCtrl->getLinkTarget($this,
"edit"));
703 $lng->loadLanguageModule(
"wsp");
704 $ilTabs->addTab(
"share",
705 $lng->txt(
"wsp_permissions"),
706 $ilCtrl->getLinkTargetByClass(
"ilworkspaceaccessgui",
"share"));
709 $ilTabs->addNonTabbedLink(
"preview",
710 $lng->txt(
"user_profile_preview"),
711 $ilCtrl->getLinkTarget($this,
"preview"));
726 $ilTabs->clearTargets();
728 $ilCtrl->setParameter($this,
"prt_id",
"");
729 $ilTabs->setBackTarget($lng->txt(
"back"),
730 $ilCtrl->getLinkTarget($this,
"show"));
731 $ilCtrl->setParameter($this,
"prt_id", $this->portfolio->getId());
734 $ilTabs->activateTab(
"pages");
736 $ilToolbar->addButton($lng->txt(
"prtf_add_page"),
737 $ilCtrl->getLinkTarget($this,
"addPage"));
739 if(!$ilSetting->get(
'disable_wsp_blogs'))
741 $ilToolbar->addButton($lng->txt(
"prtf_add_blog"),
742 $ilCtrl->getLinkTarget($this,
"addBlog"));
745 $ilToolbar->addSeparator();
747 $ilToolbar->addButton($lng->txt(
"export"),
748 $ilCtrl->getLinkTarget($this,
"export"));
750 include_once
"Services/Portfolio/classes/class.ilPortfolioPageTableGUI.php";
754 include_once
"Modules/Exercise/classes/class.ilObjExercise.php";
759 foreach($exercises as $exercise)
765 if(!$tree->isSaved($ref_id))
773 $part = $this->
getExerciseInfo($exercise[
"ass_id"], $table->dataExists());
786 $tpl->setContent($table->getHTML());
793 include_once
"Modules/Exercise/classes/class.ilExAssignment.php";
795 $exercise_id = $ass->getExerciseId();
803 if($ass->getDeadline() && $ass->getDeadline() - time() <= 0)
809 include_once
"./Services/Link/classes/class.ilLink.php";
813 $info = sprintf($lng->txt(
"prtf_exercise_info"),
815 "<a href=\"".$exc_link.
"\">".
819 if($a_add_submit && !$times_up)
821 $ilCtrl->setParameter($this,
"exc", $exercise_id);
822 $ilCtrl->setParameter($this,
"ass", $a_assignment_id);
823 $submit_link = $ilCtrl->getLinkTarget($this,
"finalize");
824 $ilCtrl->setParameter($this,
"ass",
"");
825 $ilCtrl->setParameter($this,
"exc",
"");
826 $info .=
" <a class=\"submit\" href=\"".$submit_link.
"\">".$lng->txt(
"prtf_finalize_portfolio").
"</a>";
833 $submitted = array_pop($submitted);
835 $ilCtrl->setParameter($this,
"ass", $a_assignment_id);
836 $dl_link = $ilCtrl->getLinkTarget($this,
"downloadExcSubFile");
837 $ilCtrl->setParameter($this,
"ass",
"");
842 $info .=
"<br />".sprintf($lng->txt(
"prtf_exercise_submitted_info"),
844 "<a href=\"".$dl_link.
"\">".$lng->txt(
"download").
"</a>");
854 $ass = $ass->getInstruction();
857 $tooltip .= nl2br($ass);
861 if (count($ass_files) > 0)
863 $tooltip .=
"<br /><br />";
865 foreach($ass_files as
$file)
867 $ilCtrl->setParameter($this,
"ass", $a_assignment_id);
868 $ilCtrl->setParameter($this,
"file", urlencode($file[
"name"]));
869 $dl_link = $ilCtrl->getLinkTarget($this,
"downloadExcAssFile");
870 $ilCtrl->setParameter($this,
"file",
"");
871 $ilCtrl->setParameter($this,
"ass",
"");
873 $tooltip .= $file[
"name"].
": <a href=\"".$dl_link.
"\">".
874 $lng->txt(
"download").
"</a>";
880 $ol_id =
"exc_ass_".$a_assignment_id;
882 include_once
"Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php";
886 $overlay->setAnchor($ol_id.
"_tr");
887 $overlay->setTrigger($ol_id.
"_tr",
"click", $ol_id.
"_tr");
888 $overlay->setAutoHide(
false);
893 $overlay->addTrigger($ol_id.
"_tr",
"click", $ol_id.
"_tr");
895 $info .=
"<div id=\"".$ol_id.
"_tr\"><a href=\"#\">".$lng->txt(
"exc_instruction").
"</a></div>".
896 "<div id=\"".$ol_id.
"\" style=\"display:none; background-color:white; border: 1px solid #bbb; padding: 10px;\">".$tooltip.
"</div>";
906 include_once
"Modules/Exercise/classes/class.ilExAssignment.php";
910 if (count($ass_files) > 0)
912 foreach($ass_files as
$file)
914 if($file[
"name"] == $_GET[
"file"])
929 include_once
"Modules/Exercise/classes/class.ilExAssignment.php";
933 if (count($submitted) > 0)
935 $submitted = array_pop($submitted);
939 $ass->getTitle().
" - ".
940 $user_data[
"firstname"].
" ".
941 $user_data[
"lastname"].
" (".
942 $user_data[
"login"].
").zip";
956 $ilTabs->clearTargets();
957 $ilTabs->setBackTarget($lng->txt(
"back"),
958 $ilCtrl->getLinkTarget($this,
"pages"));
961 $tpl->setContent($form->getHTML());
974 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
976 $form->setFormAction($ilCtrl->getFormAction($this));
981 $ti->setRequired(
true);
985 if ($a_mode ==
"create")
987 include_once
"Services/Style/classes/class.ilPageLayout.php";
993 $form->addItem($use_template);
996 $use_template->addOption($opt);
998 foreach ($templates as $templ)
1000 $templ->readObject();
1002 $opt =
new ilRadioOption($templ->getTitle().$templ->getPreview(), $templ->getId());
1003 $use_template->addOption($opt);
1007 $form->
setTitle($lng->txt(
"prtf_add_page").
": ".
1008 $this->portfolio->getTitle());
1009 $form->addCommandButton(
"savePage", $lng->txt(
"save"));
1010 $form->addCommandButton(
"pages", $lng->txt(
"cancel"));
1032 if ($form->checkInput() && $this->
checkAccess(
"write"))
1034 include_once(
"Services/Portfolio/classes/class.ilPortfolioPage.php");
1037 $page->setTitle($form->getInput(
"title"));
1040 $layout_id = $form->getInput(
"tmpl");
1043 include_once(
"./Services/Style/classes/class.ilPageLayout.php");
1045 $page->setXMLContent($layout_obj->getXMLContent());
1051 $ilCtrl->redirect($this,
"pages");
1054 $ilTabs->clearTargets();
1055 $ilTabs->setBackTarget($lng->txt(
"back"),
1056 $ilCtrl->getLinkTarget($this,
"pages"));
1058 $form->setValuesByPost();
1059 $tpl->setContent($form->getHtml());
1069 $ilTabs->clearTargets();
1070 $ilTabs->setBackTarget($lng->txt(
"back"),
1071 $ilCtrl->getLinkTarget($this,
"pages"));
1074 $tpl->setContent($form->getHTML());
1087 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
1089 $form->setFormAction($ilCtrl->getFormAction($this));
1092 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
1098 foreach ($tree->getSubTree($root) as $node)
1100 if ($node[
"type"] ==
"blog")
1102 $options[$node[
"obj_id"]] = $node[
"title"];
1109 if(!
sizeof($options))
1112 $ilCtrl->redirect($this,
"pages");
1117 $obj->setOptions($options);
1118 $form->addItem($obj);
1121 if ($a_mode ==
"create")
1123 $form->setTitle($lng->txt(
"prtf_add_blog").
": ".
1124 $this->portfolio->getTitle());
1125 $form->addCommandButton(
"saveBlog", $lng->txt(
"save"));
1126 $form->addCommandButton(
"pages", $lng->txt(
"cancel"));
1149 if ($form->checkInput() && $this->
checkAccess(
"write"))
1151 include_once(
"Services/Portfolio/classes/class.ilPortfolioPage.php");
1154 $page->setTitle($form->getInput(
"blog"));
1158 $ilCtrl->redirect($this,
"pages");
1161 $ilTabs->clearTargets();
1162 $ilTabs->setBackTarget($lng->txt(
"back"),
1163 $ilCtrl->getLinkTarget($this,
"pages"));
1165 $form->setValuesByPost();
1166 $tpl->setContent($form->getHtml());
1181 include_once(
"Services/Portfolio/classes/class.ilPortfolioPage.php");
1183 if (is_array(
$_POST[
"order"]))
1185 foreach (
$_POST[
"order"] as $k => $v)
1200 $ilCtrl->redirect($this,
"pages");
1210 if (!is_array(
$_POST[
"prtf_pages"]) || count(
$_POST[
"prtf_pages"]) == 0)
1213 $ilCtrl->redirect($this,
"pages");
1217 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
1219 $cgui->setFormAction($ilCtrl->getFormAction($this));
1220 $cgui->setHeaderText($lng->txt(
"prtf_sure_delete_portfolio_pages"));
1221 $cgui->setCancel($lng->txt(
"cancel"),
"pages");
1222 $cgui->setConfirm($lng->txt(
"delete"),
"deletePortfolioPages");
1224 include_once(
"Services/Portfolio/classes/class.ilPortfolioPage.php");
1225 foreach (
$_POST[
"prtf_pages"] as $id)
1228 $title = $page->getTitle();
1233 $cgui->addItem(
"prtf_pages[]", $id, $title);
1236 $tpl->setContent($cgui->getHTML());
1252 include_once(
"Services/Portfolio/classes/class.ilPortfolioPage.php");
1253 if (is_array(
$_POST[
"prtf_pages"]))
1255 foreach (
$_POST[
"prtf_pages"] as $id)
1262 $ilCtrl->redirect($this,
"pages");
1268 function preview($a_return =
false, $a_content =
false, $a_show_notes =
true)
1278 else if(
$_GET[
"baseClass"] !=
"ilPublicUserProfileGUI" &&
1279 $ilUser->getId() && $ilUser->getId() != ANONYMOUS_USER_ID)
1283 $ilCtrl->setParameter($this,
"user", $this->portfolio->getOwner());
1284 $back = $ilCtrl->getLinkTarget($this,
"showOther");
1285 $ilCtrl->setParameter($this,
"user",
"");
1290 $back = $ilCtrl->getLinkTarget($this,
"pages");
1293 $tpl->setTopBar($back);
1295 $portfolio_id = $this->portfolio->getId();
1296 $user_id = $this->portfolio->getOwner();
1298 $ilTabs->clearTargets();
1300 include_once(
"./Services/Portfolio/classes/class.ilPortfolioPage.php");
1302 $current_page =
$_GET[
"user_page"];
1305 if(!$current_page && $pages)
1307 $current_page = $pages;
1308 $current_page = array_shift($current_page);
1309 $current_page = $current_page[
"id"];
1313 $current_blog = null;
1314 if(count($pages) > 1)
1316 foreach ($pages as $p)
1321 if($p[
"id"] == $current_page)
1323 $current_blog = (int)$p[
"title"];
1325 include_once
"Modules/Blog/classes/class.ilObjBlog.php";
1329 $ilCtrl->setParameter($this,
"user_page", $p[
"id"]);
1330 $ilTabs->addTab(
"user_page_".$p[
"id"],
1332 $ilCtrl->getLinkTarget($this,
"preview"));
1335 $ilTabs->activateTab(
"user_page_".$current_page);
1338 $ilCtrl->setParameter($this,
"user_page", $current_page);
1343 include_once(
"./Services/Portfolio/classes/class.ilPortfolioPageGUI.php");
1345 $this->portfolio->hasPublicComments());
1349 $content = $ilCtrl->getHTML($page_gui);
1353 $content = $a_content;
1363 if($a_show_notes && $this->portfolio->hasPublicComments() && !$current_blog)
1365 include_once(
"./Services/Notes/classes/class.ilNoteGUI.php");
1366 $note_gui =
new ilNoteGUI($portfolio_id, $current_page,
"pfpg");
1367 $note_gui->setRepositoryMode(
false);
1368 $note_gui->enablePublicNotes(
true);
1369 $note_gui->enablePrivateNotes(
false);
1370 $note_gui->enablePublicNotesDeletion($ilUser->getId() ==
$user_id);
1372 $next_class = $ilCtrl->getNextClass($this);
1373 if ($next_class ==
"ilnotegui")
1375 $notes = $ilCtrl->forwardCommand($note_gui);
1379 $notes = $note_gui->getNotesHTML();
1383 if($this->perma_link === null)
1385 include_once(
'Services/PermanentLink/classes/class.ilPermanentLinkGUI.php');
1397 $tpl->setVariable(
"LOCATOR",
"");
1400 $tpl->setContent($content.
1401 '<div class="ilClearFloat">'.$notes.$plink.
'</div>');
1402 $tpl->setFrameFixedWidth(
true);
1404 echo $tpl->show(
"DEFAULT",
true,
true);
1418 $name = $name[
"lastname"].
", ".(
$t = $name[
"title"] ?
$t .
" " :
"").$name[
"firstname"];
1421 $banner = $banner_width = $banner_height =
false;
1423 if($prfa_set->get(
"banner"))
1425 $banner = $a_portfolio->getImageFullPath();
1426 $banner_width = $prfa_set->get(
"banner_width");
1427 $banner_height = $prfa_set->get(
"banner_height");
1430 $banner = basename($banner);
1436 if($a_portfolio->hasProfilePicture())
1441 $ppic = basename($ppic);
1445 include_once(
"./Services/User/classes/class.ilUserUtil.php");
1446 $a_tpl->setFullscreenHeader($a_portfolio->getTitle(),
1450 $a_portfolio->getBackgroundColor(),
1451 $a_portfolio->getFontColor(),
1455 $a_tpl->setBodyClass(
"std ilExternal ilPortfolio");
1460 include_once
"Services/Portfolio/classes/class.ilPortfolioHTMLExport.php";
1462 $zip = $export->buildExportFile();
1480 include_once
"Modules/Exercise/classes/class.ilObjExerciseGUI.php";
1482 $exc_gui->submitPortfolio($this->portfolio->getId());
1485 $ilCtrl->redirect($this,
"pages");
1492 $ilCtrl->setParameter($this,
"prt_id",
"");
1493 $ilLocator->addItem($lng->txt(
"portfolio"),
1494 $ilCtrl->getLinkTarget($this,
"show"));
1496 if($this->portfolio)
1498 $ilCtrl->setParameter($this,
"prt_id", $this->portfolio->getId());
1499 $ilLocator->addItem($this->portfolio->getTitle(),
1500 $ilCtrl->getLinkTarget($this,
"pages"));
1505 include_once
"Services/Portfolio/classes/class.ilPortfolioPage.php";
1507 $title = $page->getTitle();
1512 $ilCtrl->setParameterByClass(
"ilportfoliopagegui",
"ppage", $a_page_id);
1513 $ilLocator->addItem($title,
1514 $ilCtrl->getLinkTargetByClass(
"ilportfoliopagegui",
"edit"));
1527 if (!is_array(
$_POST[
"prtf_pages"]) || count(
$_POST[
"prtf_pages"]) == 0)
1530 $ilCtrl->redirect($this,
"pages");
1539 foreach(
$_POST[
"prtf_pages"] as $page_id)
1542 $item->setValue($page_id);
1543 $a_form->addItem($item);
1546 $tpl->setContent($a_form->getHTML());
1555 if($form->checkInput())
1558 if($form->getInput(
"target") ==
"old")
1560 $portfolio_id = $form->getInput(
"prtf");
1567 $portfolio->setTitle($form->getInput(
"title"));
1573 include_once
"Services/Portfolio/classes/class.ilPortfolioPage.php";
1574 foreach(
$_POST[
"prtf_pages"] as $page_id)
1579 $target->setXMLContent($source->copyXmlContent());
1580 $target->setType($source->getType());
1581 $target->setTitle($source->getTitle());
1586 $ilCtrl->redirect($this,
"pages");
1589 $form->setValuesByPost();
1597 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
1599 $form->setFormAction($ilCtrl->getFormAction($this));
1600 $form->setTitle($lng->txt(
"prtf_copy_page"));
1604 $form->addItem($tgt);
1607 if(
sizeof($all) > 1)
1609 $old =
new ilRadioOption($lng->txt(
"prtf_existing_portfolio"),
"old");
1610 $tgt->addOption($old);
1613 foreach($all as $item)
1615 if($item[
"id"] != $this->portfolio->getId())
1617 $options[$item[
"id"]] = $item[
"title"];
1622 $prtf->setOptions($options);
1623 $old->addSubItem($prtf);
1626 $new =
new ilRadioOption($lng->txt(
"prtf_new_portfolio"),
"new");
1627 $tgt->addOption($new);
1633 $tf->setRequired(
true);
1634 $new->addSubItem($tf);
1636 $form->addCommandButton(
"copyPage", $lng->txt(
"save"));
1637 $form->addCommandButton(
"pages", $lng->txt(
"cancel"));
1646 $ilTabs->activateTab(
"otpf");
1648 include_once(
'./Services/Portfolio/classes/class.ilPortfolioAccessHandler.php');
1650 $users = $handler->getSharedOwners();
1653 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
1655 $si->setOptions(array(
""=>
"-")+$users);
1656 $ilToolbar->addInputItem(
$si);
1658 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
1659 $ilToolbar->addFormButton($lng->txt(
"ok"),
"showOther");
1669 include_once
"Services/Portfolio/classes/class.ilPortfolioTableGUI.php";
1671 $tpl->setContent($table->getHTML());
1682 $this->additional = $a_additional;
1697 $this->perma_link = $a_link;
1702 $id = explode(
"_", $a_target);
1704 $_GET[
"baseClass"] =
"ilsharedresourceGUI";
1705 $_GET[
"prt_id"] = $id[0];
1707 include(
"ilias.php");