4include_once(
'./Modules/Portfolio/classes/class.ilObjPortfolioBaseGUI.php');
 
   24                parent::__construct($a_id, self::PORTFOLIO_OBJECT_ID, 0);
 
   34                if($a_perm == 
"create")
 
   42                return $this->access_handler->checkAccess($a_perm, 
"", $a_node_id);                                     
 
   57                $next_class = $this->ctrl->getNextClass($this);
 
   58                $cmd = $this->ctrl->getCmd(
"view");             
 
   70                        case "ilworkspaceaccessgui";    
 
   74                                        $this->tabs_gui->activateTab(
"share");
 
   76                                        $this->tpl->setPermanentLink(
"prtf", $this->object->getId());
 
   78                                        include_once(
'./Services/PersonalWorkspace/classes/class.ilWorkspaceAccessGUI.php');
 
   80                                        $this->ctrl->forwardCommand($wspacc);
 
   84                        case 'ilportfoliopagegui':                                                                      
 
   90                                        include_once 
"Services/Form/classes/class.ilFileInputGUI.php";
 
  100                        case "ilobjstylesheetgui":
 
  101                                include_once (
"./Services/Style/classes/class.ilObjStyleSheetGUI.php");
 
  102                                $this->ctrl->setReturn($this, 
"editStyleProperties");
 
  103                                $style_gui = 
new ilObjStyleSheetGUI(
"", $this->object->getStyleSheetId(), 
false, 
false);
 
  104                                $style_gui->omitLocator();
 
  105                                if (
$cmd == 
"create" || 
$_GET[
"new_type"]==
"sty")
 
  107                                        $style_gui->setCreationMode(
true);
 
  110                                if (
$cmd == 
"confirmedDelete")
 
  112                                        $this->
object->setStyleSheetId(0);
 
  113                                        $this->
object->update();
 
  116                                $ret = $this->ctrl->forwardCommand($style_gui);
 
  118                                if (
$cmd == 
"save" || 
$cmd == 
"copyStyle" || 
$cmd == 
"importStyle")
 
  121                                        $this->
object->setStyleSheetId($style_id);
 
  122                                        $this->
object->update();
 
  123                                        $this->ctrl->redirectByClass(
"ilobjstylesheetgui", 
"edit");
 
  127                        case "ilportfolioexercisegui":
 
  128                                $this->ctrl->setReturn($this, 
"view");
 
  129                                include_once 
"Modules/Portfolio/classes/class.ilPortfolioExerciseGUI.php";
 
  131                                $this->ctrl->forwardCommand($gui);
 
  136                                if(
$cmd != 
"preview")
 
  152                $ilHelp->setScreenIdComponent(
"prtf");
 
  156                        $this->tabs_gui->addTab(
"pages",
 
  157                                $this->lng->txt(
"content"),
 
  158                                $this->ctrl->getLinkTarget($this, 
"view"));                             
 
  160                        $this->tabs_gui->addTab(
"settings",
 
  161                                $this->lng->txt(
"settings"),
 
  162                                $this->ctrl->getLinkTarget($this, 
"edit"));
 
  164                        $this->tabs_gui->addNonTabbedLink(
"preview", 
 
  165                                $this->lng->txt(
"user_profile_preview"),
 
  166                                $this->ctrl->getLinkTarget($this, 
"preview"));  
 
  168                        $this->lng->loadLanguageModule(
"wsp");
 
  169                        $this->tabs_gui->addTab(
"share",
 
  170                                $this->lng->txt(
"wsp_permissions"),
 
  171                                $this->ctrl->getLinkTargetByClass(
"ilworkspaceaccessgui", 
"share"));
 
  177                if(!$this->creation_mode)
 
  179                        $this->ctrl->setParameter($this, 
"prt_id", $this->object->getId());     
 
  182                parent::addLocatorItems();
 
  184                $this->tpl->setLocator();
 
  191                $title = $this->lng->txt(
"portfolio");
 
  194                        $title .= 
": ".$this->object->getTitle();       
 
  196                $this->tpl->setTitle($title);
 
  198                        $this->lng->txt(
"portfolio"));
 
  201                        !$this->object->isOnline())
 
  203                        $this->tpl->setAlertProperties(array(
 
  204                                array(
"alert" => 
true, 
 
  205                                        "property" => $this->lng->txt(
"status"),
 
  206                                        "value" => $this->lng->txt(
"offline"))
 
  218                return array(self::CFORM_NEW => $this->
initCreateForm($a_new_type));            
 
  225                $this->ctrl->setParameter($this, 
"new_type", $this->
getType());
 
  227                include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
  229                $form->setFormAction($this->ctrl->getFormAction($this));                
 
  235                $ti->setRequired(
true);
 
  246                $main->setValue(
"mode_scratch");
 
  247                $form->addItem($main);
 
  249                $opt_scratch = 
new ilRadioOption($this->lng->txt(
"prtf_creation_mode_scratch"), 
"mode_scratch");
 
  250                $main->addOption($opt_scratch);
 
  256                $type->setRequired(
true);
 
  257                $opt_scratch->addSubItem($type);
 
  259                $type_page = 
new ilRadioOption($this->lng->txt(
"page"), 
"page");
 
  260                $type->addOption($type_page);
 
  264                $tf->setMaxLength(128);
 
  266                $tf->setRequired(
true);
 
  267                $type_page->addSubItem($tf);    
 
  270                include_once 
"Services/Style/classes/class.ilPageLayout.php";
 
  274                        $options = array(0 => $this->lng->txt(
"none"));
 
  275                        foreach ($templates as $templ)
 
  277                                $templ->readObject();
 
  278                                $options[$templ->getId()] = $templ->getTitle();                 
 
  281                        $use_template = 
new ilSelectInputGUI($this->lng->txt(
"prtf_use_page_layout"), 
"tmpl");
 
  282                        $use_template->setRequired(
true);
 
  283                        $use_template->setOptions(
$options);
 
  284                        $type_page->addSubItem($use_template);
 
  291                        include_once 
"Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
 
  293                        $root = 
$tree->readRootId();
 
  296                                $root = 
$tree->getNodeData($root);
 
  297                                foreach (
$tree->getSubTree($root) as $node)
 
  299                                        if ($node[
"type"] == 
"blog")
 
  301                                                $options[$node[
"obj_id"]] = $node[
"title"];
 
  308                                $type_blog = 
new ilRadioOption($this->lng->txt(
"obj_blog"), 
"blog");
 
  309                                $type->addOption($type_blog);
 
  312                                $obj->setRequired(
true);
 
  313                                $obj->setOptions(array(
""=>$this->lng->txt(
"please_select"))+
$options);
 
  314                                $type_blog->addSubItem($obj);
 
  319                                $this->lng->loadLanguageModule(
'pd');
 
  320                                $url = $this->ctrl->getLinkTargetByClass(
"ilpersonaldesktopgui", 
"jumpToWorkspace");
 
  321                                $url = 
'<a href="'.$url.
'">'.$this->lng->txt(
"pd_personal_workspace").
'</a>';
 
  324                                $type->setValue(
"page");
 
  331                $opt_tmpl = 
new ilRadioOption($this->lng->txt(
"prtf_creation_mode_template"), 
"mode_tmpl");
 
  332                $main->addOption($opt_tmpl);
 
  334                include_once 
"Modules/Portfolio/classes/class.ilObjPortfolioTemplate.php";
 
  336                if(!
sizeof($templates))
 
  338                        $opt_tmpl->setDisabled(
true);                   
 
  343                        $tmpl->setRequired(
true);
 
  344                        $tmpl->setOptions(array(
""=>$this->lng->txt(
"please_select"))+$templates);
 
  345                        $opt_tmpl->addSubItem($tmpl);
 
  350                                $tmpl->setValue((
int)
$_REQUEST[
"prtt_pre"]);
 
  351                                $main->setValue(
"mode_tmpl");
 
  356                $form->setTitle($this->lng->txt(
"prtf_create_portfolio"));
 
  357                $form->addCommandButton(
"save", $this->lng->txt(
"create"));
 
  358                $form->addCommandButton(
"toRepository", $this->lng->txt(
"cancel"));
 
  366                if($form->checkInput())
 
  369                        if($form->getInput(
"mode") == 
"mode_tmpl")
 
  371                                $_REQUEST[
"pt"] = $form->getInput(
"title");
 
  376                return parent::save();
 
  382                include_once(
"Modules/Portfolio/classes/class.ilPortfolioPage.php");
 
  384                if(
$_POST[
"ptype"] == 
"page")
 
  387                        $page->setTitle(
$_POST[
"fpage"]);               
 
  390                        $layout_id = 
$_POST[
"tmpl"];
 
  393                                include_once(
"./Services/Style/classes/class.ilPageLayout.php");
 
  395                                $page->setXMLContent($layout_obj->getXMLContent());
 
  401                        $page->setTitle(
$_POST[
"blog"]);                                                                
 
  406                $this->ctrl->setParameter($this, 
"prt_id", $a_new_object->
getId());
 
  407                $this->ctrl->redirect($this, 
"view");
 
  417                        $ilAccess->checkAccess(
"read", 
"", $exc_ref_id))
 
  419                        include_once 
"Services/Link/classes/class.ilLink.php";
 
  423                $this->ctrl->redirectByClass(
"ilportfoliorepositorygui", 
"show");
 
  428                include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
  430                $form->setFormAction($this->ctrl->getFormAction($this));        
 
  436                $ti->setRequired(
true);
 
  437                $ti->setValue($this->object->getTitle());
 
  450                $online->setChecked($this->object->isOnline());
 
  451                $form->addItem($online);
 
  455                $form->setTitle($this->lng->txt(
"prtf_edit_portfolio"));
 
  456                $form->addCommandButton(
"update", $this->lng->txt(
"save"));
 
  457                $form->addCommandButton(
"view", $this->lng->txt(
"cancel"));             
 
  464                $a_values[
"online"] = $this->
object->isOnline();
 
  466                parent::getEditFormCustomValues($a_values);
 
  471                $this->
object->setOnline($a_form->
getInput(
"online"));
 
  479                parent::updateCustom($a_form);          
 
  497                if(!$a_portfolio_id && $this->
object)
 
  499                        $a_portfolio_id = $this->
object->getId();
 
  501                include_once 
"Modules/Portfolio/classes/class.ilPortfolioPage.php";                     
 
  503                $page->setPortfolioId($a_portfolio_id);
 
  515                include_once(
"Modules/Portfolio/classes/class.ilPortfolioPageGUI.php");
 
  517                        $this->object->getId(),
 
  520                        $this->object->hasPublicComments()
 
  528                return "ilportfoliopagegui";
 
  533                $old = 
new ilRadioOption($this->lng->txt(
"prtf_existing_portfolio"), 
"old");
 
  534                $a_tgt->addOption($old);
 
  538                foreach($all as $item)
 
  540                        $options[$item[
"id"]] = $item[
"title"];                                 
 
  543                $prtf->setRequired(
true);
 
  545                $old->addSubItem($prtf);        
 
  547                $new = 
new ilRadioOption($this->lng->txt(
"prtf_new_portfolio"), 
"new");
 
  548                $a_tgt->addOption($new);
 
  551                $tf->setMaxLength(128);
 
  553                $tf->setRequired(
true);
 
  554                $new->addSubItem($tf);          
 
  570                include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
  572                $form->setFormAction($this->ctrl->getFormAction($this));
 
  575                include_once 
"Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
 
  577                $root = 
$tree->readRootId();
 
  580                        $root = 
$tree->getNodeData($root);
 
  581                        foreach (
$tree->getSubTree($root, 
true, 
"blog") as $node)
 
  583                                $options[$node[
"obj_id"]] = $node[
"title"];                             
 
  592                        $this->lng->loadLanguageModule(
'pd');
 
  593                        $url = $this->ctrl->getLinkTargetByClass(
"ilpersonaldesktopgui", 
"jumpToWorkspace");
 
  594                        $url = 
'<a href="'.$url.
'">'.$this->lng->txt(
"pd_personal_workspace").
'</a>';
 
  597                        $this->ctrl->redirect($this, 
"view");
 
  601                $obj->setRequired(
true);
 
  603                $form->addItem($obj);
 
  605                $form->setTitle($this->lng->txt(
"prtf_add_blog").
": ".
 
  606                        $this->object->getTitle());
 
  607                $form->addCommandButton(
"saveBlog", $this->lng->txt(
"save"));
 
  608                $form->addCommandButton(
"view", $this->lng->txt(
"cancel"));
 
  619                if ($form->checkInput() && $this->checkPermissionBool(
"write"))
 
  623                        $page->setTitle($form->getInput(
"blog"));                                                                       
 
  627                        $this->ctrl->redirect($this, 
"view");
 
  630                $this->tabs_gui->clearTargets();
 
  631                $this->tabs_gui->setBackTarget($this->lng->txt(
"back"),
 
  632                        $this->ctrl->getLinkTarget($this, 
"view"));
 
  634                $form->setValuesByPost();
 
  635                $this->tpl->setContent($form->getHtml());
 
  649                include_once 
"Modules/Portfolio/classes/class.ilObjPortfolioTemplate.php";              
 
  651                if(!
sizeof($templates) || !in_array($prtt_id, $templates))
 
  657                $this->ctrl->setParameter($this, 
"prtt", $prtt_id);
 
  665                        $this->tpl->setContent($a_form->getHTML());                                             
 
  679                        $this->ctrl->setParameter($this, 
"exc_id", (
int)
$_REQUEST[
"exc_id"]);           
 
  680                        $this->ctrl->setParameter($this, 
"ass_id", (
int)
$_REQUEST[
"ass_id"]);           
 
  683                include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
  685                $form->setFormAction($this->ctrl->getFormAction($this));                
 
  689                $form->addItem($tmpl);
 
  692                $title->setValue($a_title);
 
  693                $form->addItem($title);         
 
  698                        $blog_options = array();
 
  699                        include_once 
"Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
 
  701                        $root = 
$tree->readRootId();
 
  704                                $root = 
$tree->getNodeData($root);
 
  705                                foreach (
$tree->getSubTree($root, 
true, 
"blog") as $node)
 
  707                                        $blog_options[$node[
"obj_id"]] = $node[
"title"];                                        
 
  709                                asort($blog_options);           
 
  713                $has_form_content = 
false;
 
  715                include_once 
"Services/WebDAV/classes/class.ilDiskQuotaActivationChecker.php";                  
 
  719                include_once 
"Services/Skill/classes/class.ilPersonalSkill.php";
 
  721                $skill_ids = array();
 
  723                include_once 
"Modules/Portfolio/classes/class.ilPortfolioTemplatePage.php";
 
  726                        switch($page[
"type"])
 
  731                                        $source_page->buildDom(
true);
 
  732                                        $dom = $source_page->getDom();                                  
 
  735                                                $dom = $dom->myDOMDocument;
 
  737                                        $xpath = 
new DOMXPath($dom);
 
  738                                        $nodes = $xpath->query(
"//PageContent/Skills");
 
  739                                        foreach($nodes as $node)
 
  741                                                $skill_id = $node->getAttribute(
"Id");
 
  742                                                if(!in_array($skill_id, $pskills))
 
  744                                                        $skill_ids[] = $skill_id;
 
  752                                                $quota_sum += $source_page->getPageDiskSize();
 
  754                                        if(
sizeof($skill_ids))
 
  756                                                $has_form_content = 
true;
 
  763                                                $has_form_content = 
true;
 
  765                                                $field_id = 
"blog_".$page[
"id"];
 
  768                                                        $page[
"title"], $field_id);
 
  769                                                $blog->setRequired(
true);
 
  770                                                $blog->setValue(
"blog_create");
 
  771                                                $form->addItem($blog);
 
  773                                                $new_blog = 
new ilRadioOption($this->lng->txt(
"prtf_template_import_blog_create"), 
"blog_create");
 
  774                                                $blog->addOption($new_blog);
 
  776                                                $title = 
new ilTextInputGUI($this->lng->txt(
"title"), $field_id.
"_create_title");
 
  777                                                $title->setRequired(
true);
 
  778                                                $new_blog->addSubItem($title);
 
  780                                                if(
sizeof($blog_options))
 
  782                                                        $reuse_blog = 
new ilRadioOption($this->lng->txt(
"prtf_template_import_blog_reuse"), 
"blog_resuse");
 
  783                                                        $blog->addOption($reuse_blog);
 
  785                                                        $obj = 
new ilSelectInputGUI($this->lng->txt(
"obj_blog"), $field_id.
"_reuse_blog");
 
  786                                                        $obj->setRequired(
true);
 
  787                                                        $obj->setOptions(array(
""=>$this->lng->txt(
"please_select"))+$blog_options);
 
  788                                                        $reuse_blog->addSubItem($obj);
 
  791                                                $blog->addOption(
new ilRadioOption($this->lng->txt(
"prtf_template_import_blog_ignore"), 
"blog_ignore"));
 
  799                        include_once 
"Services/Skill/classes/class.ilSkillTreeNode.php";                                                
 
  801                        $skills->setInfo($this->lng->txt(
"prtf_template_import_new_skills"));
 
  802                        $skills->setValue($skill_ids);
 
  803                        foreach($skill_ids as $skill_id)
 
  807                        $form->addItem($skills);                        
 
  812                        include_once 
"Services/DiskQuota/classes/class.ilDiskQuotaHandler.php";                 
 
  816                                $this->ctrl->redirect($this, 
"create");                         
 
  821                if(!$has_form_content)
 
  826                $form->setTitle($this->lng->txt(
"prtf_creation_mode").
": ".$this->lng->txt(
"prtf_creation_mode_template"));
 
  827                $form->addCommandButton(
"createPortfolioFromTemplateProcess", $this->lng->txt(
"continue"));
 
  828                $form->addCommandButton(
"toRepository", $this->lng->txt(
"cancel"));
 
  841                include_once 
"Modules/Portfolio/classes/class.ilObjPortfolioTemplate.php";              
 
  843                if(!
sizeof($templates) || !in_array($prtt_id, $templates))
 
  853                        $this->ctrl->setParameter($this, 
"prtt", $prtt_id);             
 
  856                        if($form->checkInput())
 
  858                                include_once 
"Modules/Portfolio/classes/class.ilPortfolioTemplatePage.php";
 
  861                                        switch($page[
"type"])
 
  866                                                                $field_id = 
"blog_".$page[
"id"];
 
  867                                                                switch($form->getInput($field_id))
 
  870                                                                                $recipe[$page[
"id"]] = array(
"blog", 
"create", 
 
  871                                                                                        trim($form->getInput($field_id.
"_create_title")));
 
  875                                                                                $recipe[$page[
"id"]] = array(
"blog", 
"reuse", 
 
  876                                                                                        (
int)$form->getInput($field_id.
"_reuse_blog"));
 
  880                                                                                $recipe[$page[
"id"]] = array(
"blog", 
"ignore");
 
  888                                $recipe[
"skills"] = (array)$form->getInput(
"skill_ids");                                                                                                                
 
  892                                $form->setValuesByPost();
 
  900                include_once 
"Modules/Portfolio/classes/class.ilObjPortfolio.php";
 
  902                $target->setTitle($title);
 
  906                $source->clonePagesAndSettings($source, $target, $recipe);
 
  913                        $ilAccess->checkAccess(
"read", 
"", $exc_ref_id))
 
  915                        include_once 
"Modules/Exercise/classes/class.ilObjExercise.php";
 
  916                        include_once 
"Modules/Exercise/classes/class.ilExAssignment.php";                                                       
 
  919                        if($ass->getExerciseId() == $exc->getId() &&
 
  923                                include_once 
"Modules/Exercise/classes/class.ilExSubmission.php";                       
 
  930                $this->ctrl->setParameter($this, 
"prt_id", 
$target_id);
 
  931                $this->ctrl->redirect($this, 
"view");
 
  934        public static function _goto($a_target)
 
  936                $id = explode(
"_", $a_target);
 
  938                $_GET[
"baseClass"] = 
"ilsharedresourceGUI";     
 
  939                $_GET[
"prt_id"] = $id[0];               
 
  942                        $_GET[
"gtp"] = $id[1];
 
  945                include(
"ilias.php");
 
This class represents an option in a checkbox group.
static _isPersonalWorkspaceActive()
Static getter.
static isUploadPossible($a_additional_size=null)
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
This class represents a non editable value in a property form.
Portfolio view gui base class.
initEditCustomForm(ilPropertyFormGUI $a_form)
Add custom fields to update form.
getAdditional()
Get Additonal Information.
preview($a_return=false, $a_content=false, $a_show_notes=true)
Show user page.
Portfolio view gui class.
getType()
Functions that must be overwritten.
initEditForm()
Init object edit form.
executeCommand()
execute command
getPageGUIInstance($a_page_id)
Get portfolio template page gui instance.
initCopyPageFormOptions(ilFormPropertyGUI $a_tgt)
saveBlog()
Create new portfolio blog page.
initCreateForm($a_new_type)
Init object creation form.
getPageInstance($a_page_id=null, $a_portfolio_id=null)
Get portfolio template page instance.
afterSave(ilObject $a_new_object)
Post (successful) object creation hook.
getEditFormCustomValues(array &$a_values)
Add values to custom edit fields.
setTitleAndDescription()
called by prepare output
createPortfolioFromTemplate(ilPropertyFormGUI $a_form=null)
createPortfolioFromTemplateProcess($a_process_form=true)
updateCustom(ilPropertyFormGUI $a_form)
Insert custom update form values into object.
setTabs()
create tabs (repository/workspace switch)
initBlogForm()
Init blog page form.
initCreationForms($a_new_type)
Init creation froms.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
initCreatePortfolioFromTemplateForm($a_prtt_id, $a_title)
static getAvailablePortfolioTemplates($a_permission="read")
static setUserDefault($a_user_id, $a_portfolio_id=null)
Set the user default portfolio.
static getPortfoliosOfUser($a_user_id)
Get views of user.
Class ilObjStyleSheetGUI.
checkPermission($a_perm, $a_cmd="")
Class ilObject Basic functions for all objects.
const TITLE_LENGTH
max length of object title
static _lookupTitle($a_id)
lookup object title
getId()
get object id @access public
static activeLayouts($a_special_page=false, $a_module=null)
Get active layouts.
static getSelectedUserSkills($a_user_id)
Get personal selected user skills.
Class ilPortfolioExerciseGUI.
Portfolio page gui class.
static getAllPages($a_portfolio_id)
Get pages of portfolio.
Page for portfolio template.
This class represents an option in a radio group.
static _lookupTitle($a_obj_id, $a_tref_id=0)
Lookup Title.
This class represents a text property in a property form.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static redirect($a_script)
http redirect to other script
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
Tree handler for personal workspace.
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
if(!is_array($argv)) $options