4include_once(
'./Services/Object/classes/class.ilObject2GUI.php');
 
    5include_once(
'./Modules/Portfolio/classes/class.ilObjPortfolio.php');
 
    6include_once(
'./Modules/Portfolio/classes/class.ilPortfolioPage.php');
 
   24        public function __construct($a_id = 0, $a_id_type = self::REPOSITORY_NODE_ID, $a_parent_node_id = 0)
 
   28                parent::__construct($a_id, $a_id_type, $a_parent_node_id);
 
   30                $this->user_id = 
$ilUser->getId();              
 
   32                $this->lng->loadLanguageModule(
"prtf");
 
   33                $this->lng->loadLanguageModule(
"user");         
 
   42                        $ilLocator->addItem(strip_tags($this->object->getTitle()),
 
   43                                $this->ctrl->getLinkTarget($this, 
"view"));
 
   49                        $title = $page->getTitle();
 
   55                        $ilLocator->addItem($title,
 
   56                                $this->ctrl->getLinkTargetByClass($this->getPageGUIClassName(), 
"edit"));               
 
   67                                $this->ctrl->redirect($this, 
"view");
 
   71                        $this->page_mode = 
"edit";
 
   72                        $this->ctrl->setParameter($this, 
"ppage", $this->page_id);      
 
   79                        $this->page_mode = 
"preview";
 
   80                        $this->ctrl->setParameter($this, 
"user_page", $this->page_id);                  
 
   87                $this->tabs_gui->clearTargets();
 
   88                $this->tabs_gui->setBackTarget($this->lng->txt(
"back"),
 
   89                        $this->ctrl->getLinkTarget($this, 
"view"));
 
   93                        $this->ctrl->redirect($this, 
"view");
 
  100                        $this->object->getStyleSheetId(), $this->getType()));                   
 
  102                $ret = $this->ctrl->forwardCommand($page_gui);
 
  107                        if($this->page_mode == 
"preview")
 
  113                                        $this->
preview(
false, 
$ret, ($a_cmd != 
"previewEmbedded"));
 
  124                                $this->tpl->setContent(
$ret);
 
  136                $this->additional = $a_additional;
 
  157                $this->perma_link = array(
"obj_id"=>$a_obj_id, 
"type"=>$a_type);
 
  168                $this->lng->loadLanguageModule($this->
getType());
 
  171                $this->tabs_gui->addSubTab(
"properties",
 
  172                        $this->lng->txt($this->getType().
"_properties"),
 
  173                                $this->ctrl->getLinkTarget($this, 
'edit'));
 
  175                $this->tabs_gui->addSubTab(
"style",
 
  176                        $this->lng->txt(
"obj_sty"),
 
  177                        $this->ctrl->getLinkTarget($this, 
'editStyleProperties'));
 
  179                $this->tabs_gui->activateSubTab($a_active);
 
  187                $comments = 
new ilCheckboxInputGUI($this->lng->txt(
"prtf_public_comments"), 
"comments");
 
  195                if($prfa_set->get(
"banner"))
 
  197                        include_once 
"Services/Form/classes/class.ilFileInputGUI.php";
 
  200                        $dimensions = 
" (".$prfa_set->get(
"banner_width").
"x".
 
  201                                $prfa_set->get(
"banner_height").
")";
 
  207                        $file = $this->
object->getImageFullPath(
true);
 
  225                $a_values[
"comments"] = $this->
object->hasPublicComments();
 
  226                $a_values[
"ppic"] = $this->
object->hasProfilePicture();         
 
  235                $this->
object->setPublicComments($a_form->
getInput(
"comments"));
 
  236                $this->
object->setProfilePicture($a_form->
getInput(
"ppic"));
 
  244                if($_FILES[
"banner"][
"tmp_name"])
 
  246                        $this->
object->uploadImage($_FILES[
"banner"]);
 
  248                else if($prfa_set->get(
'banner') and $a_form->
getItemByPostVar(
"banner")->getDeletionFlag())
 
  250                        $this->
object->deleteImage();
 
  259        abstract protected function getPageInstance($a_page_id = 
null, $a_portfolio_id = 
null);
 
  274                        $this->ctrl->redirect($this, 
"infoScreen");
 
  277                $this->tabs_gui->activateTab(
"pages");
 
  279                include_once 
"Services/UIComponent/Button/classes/class.ilLinkButton.php";
 
  282                $button->setCaption(
"prtf_add_page");
 
  283                $button->setUrl($this->ctrl->getLinkTarget($this, 
"addPage"));
 
  284                $ilToolbar->addStickyItem($button);
 
  289                        $button->setCaption(
"prtf_add_blog");
 
  290                        $button->setUrl($this->ctrl->getLinkTarget($this, 
"addBlog"));
 
  291                        $ilToolbar->addStickyItem($button);
 
  294                $ilToolbar->addSeparator();
 
  300                        $button->setCaption(
"export_html");
 
  301                        $button->setUrl($this->ctrl->getLinkTarget($this, 
"export"));
 
  302                        $ilToolbar->addButtonInstance($button);
 
  305                include_once 
"Modules/Portfolio/classes/class.ilPortfolioPageTableGUI.php";
 
  309                include_once 
"Modules/Portfolio/classes/class.ilPortfolioExerciseGUI.php";                      
 
  316                $this->tpl->setContent($table->getHTML());
 
  326                $this->tabs_gui->clearTargets();
 
  327                $this->tabs_gui->setBackTarget($this->lng->txt(
"back"),
 
  328                        $this->ctrl->getLinkTarget($this, 
"view"));
 
  330                $ilHelp->setScreenIdComponent(
"prtf");
 
  331                $ilHelp->setScreenId(
"add_page");
 
  335                $this->tpl->setContent($form->getHTML());
 
  346                include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
  348                $form->setFormAction($this->ctrl->getFormAction($this));
 
  352                $ti->setMaxLength(200);
 
  353                $ti->setRequired(
true);
 
  357                if ($a_mode == 
"create")
 
  359                        include_once 
"Services/Style/classes/class.ilPageLayout.php";
 
  364                                $use_template->setRequired(
true);
 
  365                                $form->addItem($use_template);
 
  368                                $use_template->addOption($opt);
 
  370                                foreach ($templates as $templ)
 
  372                                        $templ->readObject();
 
  374                                        $opt = 
new ilRadioOption($templ->getTitle().$templ->getPreview(), $templ->getId());
 
  375                                        $use_template->addOption($opt);                 
 
  379                        $form->setTitle($this->lng->txt(
"prtf_add_page").
": ".
 
  380                                $this->object->getTitle());
 
  381                        $form->addCommandButton(
"savePage", $this->lng->txt(
"save"));
 
  382                        $form->addCommandButton(
"view", $this->lng->txt(
"cancel"));                     
 
  402                if ($form->checkInput() && $this->checkPermissionBool(
"write"))
 
  404                        include_once(
"Modules/Portfolio/classes/class.ilPortfolioPage.php");
 
  407                        $page->setTitle($form->getInput(
"title"));              
 
  410                        $layout_id = $form->getInput(
"tmpl");
 
  413                                include_once(
"./Services/Style/classes/class.ilPageLayout.php");
 
  415                                $page->setXMLContent($layout_obj->getXMLContent());
 
  421                        $this->ctrl->redirect($this, 
"view");
 
  424                $this->tabs_gui->clearTargets();
 
  425                $this->tabs_gui->setBackTarget($this->lng->txt(
"back"),
 
  426                        $this->ctrl->getLinkTarget($this, 
"view"));
 
  428                $form->setValuesByPost();
 
  429                $this->tpl->setContent($form->getHtml());
 
  439                $this->tabs_gui->clearTargets();
 
  440                $this->tabs_gui->setBackTarget($this->lng->txt(
"back"),
 
  441                        $this->ctrl->getLinkTarget($this, 
"view"));
 
  443                $ilHelp->setScreenIdComponent(
"prtf");
 
  444                $ilHelp->setScreenId(
"add_blog");
 
  447                $this->tpl->setContent($form->getHTML());
 
  464                if (is_array(
$_POST[
"order"]))
 
  466                        foreach (
$_POST[
"order"] as $k => $v)
 
  480                $this->ctrl->redirect($this, 
"view");
 
  488                if (!is_array(
$_POST[
"prtf_pages"]) || count(
$_POST[
"prtf_pages"]) == 0)
 
  491                        $this->ctrl->redirect($this, 
"view");
 
  495                        $this->tabs_gui->activateTab(
"pages");
 
  497                        include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
 
  499                        $cgui->setFormAction($this->ctrl->getFormAction($this));
 
  500                        $cgui->setHeaderText($this->lng->txt(
"prtf_sure_delete_portfolio_pages"));
 
  501                        $cgui->setCancel($this->lng->txt(
"cancel"), 
"view");
 
  502                        $cgui->setConfirm($this->lng->txt(
"delete"), 
"deletePortfolioPages");
 
  504                        foreach (
$_POST[
"prtf_pages"] as $id)
 
  507                                $title = $page->getTitle();
 
  512                                $cgui->addItem(
"prtf_pages[]", $id, $title);
 
  515                        $this->tpl->setContent($cgui->getHTML());
 
  529                if (is_array(
$_POST[
"prtf_pages"]))
 
  531                        foreach (
$_POST[
"prtf_pages"] as $id)
 
  538                $this->ctrl->redirect($this, 
"view");
 
  544        function preview($a_return = 
false, $a_content = 
false, $a_show_notes = 
true)
 
  548                $portfolio_id = $this->
object->getId();
 
  549                $user_id = $this->
object->getOwner();
 
  551                $this->tabs_gui->clearTargets();
 
  554                $current_page = (int)
$_GET[
"user_page"];
 
  557                if($pages && $current_page)
 
  560                        foreach($pages as $page)
 
  562                                if($page[
"id"] == $current_page)
 
  570                                $current_page = 
null;
 
  575                if(!$current_page && $pages)
 
  577                        $current_page = $pages;
 
  578                        $current_page = array_shift($current_page);
 
  579                        $current_page = $current_page[
"id"];
 
  583                if($this->user_id == ANONYMOUS_USER_ID &&
 
  586                        $this->tpl->setLoginTargetPar(
"prtf_".$this->object->getId().
"_".$current_page);
 
  596                else if(
$_GET[
"baseClass"] != 
"ilPublicUserProfileGUI" && 
 
  597                        $this->user_id && $this->user_id != ANONYMOUS_USER_ID)
 
  604                                        $this->ctrl->setParameterByClass(
"ilportfoliorepositorygui", 
"shr_id", $this->object->getOwner());
 
  605                                        $back = $this->ctrl->getLinkTargetByClass(array(
"ilpersonaldesktopgui", 
"ilportfoliorepositorygui"), 
"showOther");
 
  606                                        $this->ctrl->setParameterByClass(
"ilportfoliorepositorygui", 
"shr_id", 
"");
 
  614                                        include_once 
"Services/Link/classes/class.ilLink.php";
 
  621                                $back = $this->ctrl->getLinkTarget($this, 
"view");
 
  624                                        $back_caption = $this->lng->txt(
"prtf_back_to_portfolio_owner");
 
  629                                        $this->lng->loadLanguageModule(
"prtt");
 
  630                                        $back_caption = $this->lng->txt(
"prtt_edit");
 
  640                        $ilMainMenu->setTopBarBack($back, $back_caption);
 
  644                $current_blog = 
null;
 
  645                if(count($pages) > 1)
 
  647                        foreach ($pages as $p)
 
  652                                        if($p[
"id"] == $current_page)
 
  654                                                $current_blog = (int)$p[
"title"];
 
  656                                        include_once 
"Modules/Blog/classes/class.ilObjBlog.php";
 
  660                                $this->ctrl->setParameter($this, 
"user_page", $p[
"id"]);
 
  661                                $this->tabs_gui->addTab(
"user_page_".$p[
"id"],
 
  663                                        $this->ctrl->getLinkTarget($this, 
"preview"));                          
 
  666                        $this->tabs_gui->activateTab(
"user_page_".$current_page);                       
 
  669                $this->ctrl->setParameter($this, 
"user_page", $current_page);
 
  678                                $page_gui->setEmbedded(
true);
 
  680                                $content = $this->ctrl->getHTML($page_gui);             
 
  685                        $content = $a_content;
 
  695                if($a_show_notes && $this->object->hasPublicComments() && !$current_blog && $current_page)
 
  697                        include_once(
"./Services/Notes/classes/class.ilNoteGUI.php");                   
 
  698                        $note_gui = 
new ilNoteGUI($portfolio_id, $current_page, 
"pfpg");
 
  699                        $note_gui->setRepositoryMode(
false);                    
 
  700                        $note_gui->enablePublicNotes(
true);
 
  701                        $note_gui->enablePrivateNotes(
false);
 
  703                        $note_gui->enablePublicNotesDeletion(($this->user_id == 
$user_id) &&
 
  706                        $next_class = $this->ctrl->getNextClass($this);
 
  707                        if ($next_class == 
"ilnotegui")
 
  709                                $notes = $this->ctrl->forwardCommand($note_gui);
 
  713                                $notes = $note_gui->getNotesHTML();
 
  717                if($this->perma_link === 
null)
 
  721                                $this->tpl->setPermanentLink($this->
getType(), $this->object->getId(), 
"_".$current_page);                              
 
  725                                $this->tpl->setPermanentLink($this->
getType(), $this->object->getRefId());                              
 
  730                        $this->tpl->setPermanentLink($this->perma_link[
"type"], $this->perma_link[
"obj_id"]);
 
  742                $this->ctrl->setParameter($this, 
"user_page", 
"");
 
  743                $this->tpl->setTitleUrl($this->ctrl->getLinkTarget($this, 
"preview")); 
 
  744                $this->ctrl->setParameter($this, 
"user_page", $this->page_id);
 
  749                        $content = 
'<div id="ilCOPageContent" class="ilc_page_cont_PageContainer">'.
 
  750                                '<div class="ilc_page_Page">'.
 
  758                $this->tpl->setContent($content.
 
  759                        '<div class="ilClearFloat">'.$notes.
'</div>');                                  
 
  772                $name = $name[
"lastname"].
", ".(
$t = $name[
"title"] ? 
$t . 
" " : 
"").$name[
"firstname"];
 
  775                $banner = $banner_width = $banner_height = 
false;
 
  777                if($prfa_set->get(
"banner"))
 
  779                        require_once(
'./Services/WebAccessChecker/classes/class.ilWACSignedPath.php');
 
  781                        $banner_width = $prfa_set->get(
"banner_width");
 
  782                        $banner_height = $prfa_set->get(
"banner_height");
 
  785                                $banner = basename($banner);
 
  791                if($a_portfolio->hasProfilePicture())
 
  796                                $ppic = basename($ppic);
 
  800                $a_tpl->resetHeaderBlock(
false);
 
  802                $a_tpl->setBanner($banner, $banner_width, $banner_height, $a_export);
 
  803                $a_tpl->setTitleIcon($ppic);
 
  804                $a_tpl->setTitle($a_portfolio->getTitle());
 
  806                $a_tpl->setDescription($name);          
 
  809                $a_tpl->setVariable(
"LOCATOR", 
"");
 
  817                include_once 
"Modules/Portfolio/classes/class.ilPortfolioHTMLExport.php";
 
  819                $zip = $export->buildExportFile();
 
  830                if (!is_array(
$_POST[
"prtf_pages"]) || count(
$_POST[
"prtf_pages"]) == 0)
 
  833                        $this->ctrl->redirect($this, 
"view");
 
  837                        $this->tabs_gui->activateTab(
"pages");
 
  848                                $a_form->addItem($item);
 
  851                        $this->tpl->setContent($a_form->getHTML());
 
  858                if($form->checkInput())
 
  861                        if($form->getInput(
"target") == 
"old")
 
  863                                $portfolio_id = $form->getInput(
"prtf");                                                
 
  869                                $portfolio->setTitle($form->getInput(
"title"));
 
  870                                $portfolio->create();           
 
  871                                $portfolio_id = $portfolio->getId();
 
  879                                $target->setXMLContent($source->copyXmlContent(
true)); 
 
  880                                $target->setType($source->getType());
 
  881                                $target->setTitle($source->getTitle());
 
  886                        $this->ctrl->redirect($this, 
"view");
 
  889                $form->setValuesByPost();
 
  897                include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
  899                $form->setFormAction($this->ctrl->getFormAction($this));                
 
  900                $form->setTitle($this->lng->txt(
"prtf_copy_page"));                     
 
  903                $tgt->setRequired(
true);
 
  904                $form->addItem($tgt);
 
  908                $form->addCommandButton(
"copyPage", $this->lng->txt(
"save"));
 
  909                $form->addCommandButton(
"view", $this->lng->txt(
"cancel"));
 
  932                $ctpl->setCurrentBlock(
"ContentStyle");
 
  933                $ctpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
 
  935                $ctpl->parseCurrentBlock();
 
  942                $this->tabs_gui->activateTab(
"settings");
 
  946                $this->tpl->setContent($form->getHTML());                               
 
  953                include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
 
  954                $this->lng->loadLanguageModule(
"style");
 
  956                include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
 
  959                $fixed_style = 
$ilSetting->get(
"fixed_content_style_id");
 
  960                $style_id = $this->
object->getStyleSheetId();
 
  962                if ($fixed_style > 0)
 
  966                                $this->lng->txt(
"global_fixed").
")");
 
  974                        $st_styles[0] = $this->lng->txt(
"default");
 
  987                                        $form->addCommandButton(
"editStyle", $this->lng->txt(
"style_edit_style"));
 
  988                                        $form->addCommandButton(
"deleteStyle", $this->lng->txt(
"style_delete_style"));
 
  996                                $style_sel->setOptions($st_styles);
 
  997                                $style_sel->setValue($style_id);
 
  998                                $form->addItem($style_sel);
 
 1000                                $form->addCommandButton(
"saveStyleSettings", $this->lng->txt(
"save"));
 
 1001                                $form->addCommandButton(
"createStyle", $this->lng->txt(
"sty_create_ind_style"));
 
 1005                $form->setTitle($this->lng->txt($this->getType().
"_style"));
 
 1006                $form->setFormAction($this->ctrl->getFormAction($this));
 
 1013                $this->ctrl->redirectByClass(
"ilobjstylesheetgui", 
"create");
 
 1018                $this->ctrl->redirectByClass(
"ilobjstylesheetgui", 
"edit");
 
 1023                $this->ctrl->redirectByClass(
"ilobjstylesheetgui", 
"delete");
 
 1030                include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
 
 1031                if (
$ilSetting->get(
"fixed_content_style_id") <= 0 &&
 
 1033                        || $this->object->getStyleSheetId() == 0))
 
 1036                        $this->
object->update();
 
 1040                $this->ctrl->redirect($this, 
"editStyleProperties");
 
Confirmation screen class.
static _getStaticLink($a_ref_id, $a_type='', $a_fallback_goto=true, $append="")
Get static link.
This class represents a non editable value in a property form.
Portfolio view gui base class.
initPageForm($a_mode="create")
Init portfolio page form.
setPermaLink($a_obj_id, $a_type)
Set custom perma link (used in public profile?)
addBlog()
Show portfolio blog page creation form.
addPage()
Show portfolio page creation form.
view()
Show list of portfolio pages.
savePage()
Create new portfolio page.
initEditCustomForm(ilPropertyFormGUI $a_form)
Add custom fields to update form.
getAdditional()
Get Additonal Information.
updateCustom(ilPropertyFormGUI $a_form)
Insert custom update form values into object.
confirmPortfolioPageDeletion()
Confirm portfolio deletion.
initCopyPageFormOptions(ilFormPropertyGUI $a_tgt)
__construct($a_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
Constructor.
initStylePropertiesForm()
getEditFormCustomValues(array &$a_values)
Add values to custom edit fields.
copyPageForm($a_form=null)
Select target portfolio for page(s) copy.
deletePortfolioPages()
Delete portfolio pages.
getPageInstance($a_page_id=null, $a_portfolio_id=null)
savePortfolioPagesOrdering()
Save ordering of portfolio pages.
addLocatorItems()
Functions to be overwritten.
static renderFullscreenHeader($a_portfolio, $a_tpl, $a_user_id, $a_export=false)
Render banner, user name.
setAdditional($a_additional)
Set Additonal Information (used in public profile?)
preview($a_return=false, $a_content=false, $a_show_notes=true)
Show user page.
setSettingsSubTabs($a_active)
getPageGUIInstance($a_page_id)
setContentStyleSheet($a_tpl=null)
getContentStylePath($a_style_id)
get content style path
_getStandardStyles($a_exclude_default_style=false, $a_include_deactivated=false, $a_scope=0)
Get standard styles.
static getEffectiveContentStyleId($a_style_id, $a_type="")
Get effective Style Id.
_lookupStandard($a_id)
Lookup standard flag.
static _getPersonalPicturePath($a_usr_id, $a_size="small", $a_force_pic=false, $a_prevent_no_photo_image=false)
Get path to personal picture.
static _lookupName($a_user_id)
lookup user name
New implementation of ilObjectGUI.
getType()
Functions that must be overwritten.
checkPermission($a_perm, $a_cmd="")
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
static _lookupTitle($a_id)
lookup object title
static _lookupTitle($a_id)
lookup object title
static activeLayouts($a_special_page=false, $a_module=null)
Get active layouts.
static checkExercise($a_user_id, $a_obj_id, $a_add_submit=false)
Portfolio HTML exporter class.
static getAllPages($a_portfolio_id)
Get pages of portfolio.
static fixOrdering($a_portfolio_id)
Fix ordering.
This class represents an option in a radio group.
This class represents a text property in a property form.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static deliverFile($a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.
static signFile($path_to_file)
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']