ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilObjPortfolioGUI Class Reference

Portfolio view gui class. More...

+ Inheritance diagram for ilObjPortfolioGUI:
+ Collaboration diagram for ilObjPortfolioGUI:

Public Member Functions

 __construct ($a_id=0)
 getType ()
 Functions that must be overwritten.
 executeCommand ()
 execute command
 save ()
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object.
 getPageGUIClassName ()
 initBlogForm ()
 Init blog page form.
 saveBlog ()
 Create new portfolio blog page.
 getExerciseInfo ($a_assignment_id, $a_add_submit=false)
 downloadExcAssFile ()
 downloadExcSubFile ()
- Public Member Functions inherited from ilObjPortfolioBaseGUI
 __construct ($a_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
 Constructor.
 setAdditional ($a_additional)
 Set Additonal Information (used in public profile?)
 getAdditional ()
 Get Additonal Information.
 setPermaLink ($a_obj_id, $a_type)
 Set custom perma link (used in public profile?)
 view ()
 Show list of portfolio pages.
 initPageForm ($a_mode="create")
 Init portfolio page form.
 savePage ()
 Create new portfolio page.
 savePortfolioPagesOrdering ()
 Save ordering of portfolio pages.
 confirmPortfolioPageDeletion ()
 Confirm portfolio deletion.
 deletePortfolioPages ()
 Delete portfolio pages.
 preview ($a_return=false, $a_content=false, $a_show_notes=true)
 Show user page.
 export ()
 copyPageForm ($a_form=null)
 Select target portfolio for page(s) copy.
 copyPage ()
 initCopyPageForm ()
 setContentStyleSheet ($a_tpl=null)
 editStyleProperties ()
 initStylePropertiesForm ()
 createStyle ()
 editStyle ()
 deleteStyle ()
 saveStyleSettings ()
- Public Member Functions inherited from ilObject2GUI
 delete ()
 Display delete confirmation form (repository/workspace switch)
 confirmedDelete ()
 Delete objects (repository/workspace switch)
 getHTML ()
 withReferences ()
 Final/Private declaration of unchanged parent methods.
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui
 getCreationMode ()
 get creation mode
 isVisible ()
 trash ()
 undelete ()
 cancelDelete ()
 removeFromSystem ()
 cloneAll ()
 create ()
 Deleted in ilObject.
 edit ()
 update ()
 cancel ()
 importFile ()
 Import.
- Public Member Functions inherited from ilObjectGUI
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public.
 getAdminTabs (&$tabs_gui)
 administration tabs show only permissions and trash folder
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled
 cancelDeleteObject ()
 cancel deletion of object
 cancelObject ($in_rep=false)
 cancel action and go back to previous page public
 createObject ()
 create new object form
 cancelCreation ()
 cancel create action and go back to repository parent
 saveObject ()
 save object
 editObject ()
 edit object
 updateObject ()
 updates object entry in object_data
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g.
 isVisible ($a_ref_id, $a_type)
 viewObject ()
 list childs of current object
 deleteObject ($a_error=false)
 Display deletion confirmation screen.
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI.

Static Public Member Functions

static _goto ($a_target)
- Static Public Member Functions inherited from ilObjPortfolioBaseGUI
static renderFullscreenHeader ($a_portfolio, $a_tpl, $a_user_id, $a_export=false)
 Render banner, user name.
- Static Public Member Functions inherited from ilObject2GUI
static handleAfterSaveCallback (ilObject $a_obj, $a_callback_ref_id)
 After creation callback.
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root.
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root.

Protected Member Functions

 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
 Check permission.
 setTabs ()
 create tabs (repository/workspace switch)
 addLocator ()
 setTitleAndDescription ()
 called by prepare output
 initCreationForms ($a_new_type)
 Init creation froms.
 initCreateForm ($a_new_type)
 Init object creation form.
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook.
 toRepository ()
 initEditForm ()
 Init object edit form.
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields.
 getPageInstance ($a_page_id=null, $a_portfolio_id=null)
 Get portfolio template page instance.
 getPageGUIInstance ($a_page_id)
 Get portfolio template page gui instance.
 initCopyPageFormOptions (ilFormPropertyGUI $a_tgt)
 finalize ()
 Finalize and submit portfolio to exercise.
 createPortfolioFromTemplate (ilPropertyFormGUI $a_form=null)
 initCreatePortfolioFromTemplateForm ($a_prtt_id, $a_title)
 createPortfolioFromTemplateProcess ($a_process_form=true)
- Protected Member Functions inherited from ilObjPortfolioBaseGUI
 addLocatorItems ()
 Functions to be overwritten.
 determinePageCall ()
 handlePageCall ($a_cmd)
 setSettingsSubTabs ($a_active)
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form.
 addPage ()
 Show portfolio page creation form.
 addBlog ()
 Show portfolio blog page creation form.
- Protected Member Functions inherited from ilObject2GUI
 afterConstructor ()
 Do anything that should be done after constructor in here.
 assignObject ()
 create object instance as internal property (repository/workspace switch)
 getAccessHandler ()
 Get access handler.
 setLocator ()
 set Locator
 deleteConfirmation ()
 Display delete confirmation form (workspace specific)
 deleteConfirmedObjects ()
 Delete objects (workspace specific)
 prepareOutput ()
 prepare output
 showUpperIcon ()
 omitLocator ($a_omit=true)
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g.
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command
 getCenterColumnHTML ()
 Get center column.
 getRightColumnHTML ()
 Display right column.
 setColumnSettings ($column_gui)
 May be overwritten in subclasses.
 checkPermission ($a_perm, $a_cmd="")
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu)
 redirectToRefId ()
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning.
 fillCloneSearchTemplate ($a_tpl_varname, $a_type)
 searchCloneSource ()
 buildCloneSelect ($existing_objs)
 addAdminLocatorItems ()
 getReturnLocation ()
 Deprecated functions.
 setReturnLocation ()
 showActions ()
 getTitlesByRefId ()
 getTabs ()
 __showButton ()
 hitsperpageObject ()
 __initTableGUI ()
 __setTableGUIBasicData ()
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position.
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu.
 redrawHeaderAction ()
 Updating icons after ajax call.
 getPermanentLinkWidget ($a_append=null, $a_center=false)
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting.
- Protected Member Functions inherited from ilObjectGUI
 insertHeaderAction ($a_list_gui)
 Insert header action into main template.
 addHeaderAction ()
 Add header action menu.
 redrawHeaderActionObject ()
 Ajax call: redraw action header only.
 showMountWebfolderIcon ()
 setAdminTabs ()
 set admin tabs public
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded)
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion)
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types.
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates.
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen.
 getEditFormValues ()
 Get values for edit form.
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput())
 afterUpdate ()
 Post (successful) object update hook.
 initImportForm ($a_new_type)
 Init object import form.
 importFileObject ($parent_id=null)
 Import.
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook.
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g.
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl.
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste
 getTabs (&$tabs_gui)
 get tabs abstract method.
 __showButton ($a_cmd, $a_text, $a_target= '')
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table
 redirectToRefId ($a_ref_id, $a_cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current $_GET["ref_id"] value
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error.
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files.

Protected Attributes

 $ws_access
- Protected Attributes inherited from ilObjPortfolioBaseGUI
 $user_id
 $additional = array()
 $perma_link
 $page_id
 $page_mode
- Protected Attributes inherited from ilObject2GUI
 $object_id
 $node_id
 $creation_forms = array()
 $id_type = array()
 $parent_id
 $access_handler

Additional Inherited Members

- Data Fields inherited from ilObject2GUI
 $tree
const OBJECT_ID = 0
const REPOSITORY_NODE_ID = 1
const WORKSPACE_NODE_ID = 2
const REPOSITORY_OBJECT_ID = 3
const WORKSPACE_OBJECT_ID = 4
const PORTFOLIO_OBJECT_ID = 5

Detailed Description

Constructor & Destructor Documentation

ilObjPortfolioGUI::__construct (   $a_id = 0)

Definition at line 21 of file class.ilObjPortfolioGUI.php.

{
parent::__construct($a_id, self::PORTFOLIO_OBJECT_ID, 0);
}

Member Function Documentation

static ilObjPortfolioGUI::_goto (   $a_target)
static

Definition at line 1101 of file class.ilObjPortfolioGUI.php.

References $_GET, and exit.

{
$id = explode("_", $a_target);
$_GET["baseClass"] = "ilsharedresourceGUI";
$_GET["prt_id"] = $id[0];
if(sizeof($id) == 2)
{
$_GET["gtp"] = $id[1];
}
include("ilias.php");
}
ilObjPortfolioGUI::addLocator ( )
protected

Definition at line 164 of file class.ilObjPortfolioGUI.php.

References ilObjPortfolioBaseGUI\addLocatorItems().

Referenced by executeCommand().

{
if(!$this->creation_mode)
{
$this->ctrl->setParameter($this, "prt_id", $this->object->getId());
}
$this->tpl->setLocator();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjPortfolioGUI::afterSave ( ilObject  $a_new_object)
protected

Post (successful) object creation hook.

Parameters
ilObject$a_new_object

Reimplemented from ilObjectGUI.

Definition at line 363 of file class.ilObjPortfolioGUI.php.

References $_POST, ilObject\getId(), getPageInstance(), ilUtil\sendSuccess(), ilPortfolioPage\TYPE_BLOG, and ilPortfolioPage\TYPE_PAGE.

{
// create 1st page / blog
include_once("Modules/Portfolio/classes/class.ilPortfolioPage.php");
$page = $this->getPageInstance(null, $a_new_object->getId());
if($_POST["ptype"] == "page")
{
$page->setType(ilPortfolioPage::TYPE_PAGE);
$page->setTitle($_POST["fpage"]);
// use template as basis
$layout_id = $_POST["tmpl"];
if($layout_id)
{
include_once("./Services/Style/classes/class.ilPageLayout.php");
$layout_obj = new ilPageLayout($layout_id);
$page->setXMLContent($layout_obj->getXMLContent());
}
}
else
{
$page->setType(ilPortfolioPage::TYPE_BLOG);
$page->setTitle($_POST["blog"]);
}
$page->create();
ilUtil::sendSuccess($this->lng->txt("prtf_portfolio_created"), true);
$this->ctrl->setParameter($this, "prt_id", $a_new_object->getId());
$this->ctrl->redirect($this, "view");
}

+ Here is the call graph for this function:

ilObjPortfolioGUI::checkPermissionBool (   $a_perm,
  $a_cmd = "",
  $a_type = "",
  $a_node_id = null 
)
protected

Check permission.

Parameters
string$a_perm
string$a_cmd
string$a_type
int$a_node_id
Returns
bool

Reimplemented from ilObject2GUI.

Definition at line 31 of file class.ilObjPortfolioGUI.php.

References ilObjectGUI\$obj_id.

Referenced by executeCommand(), saveBlog(), and setTabs().

{
if($a_perm == "create")
{
return true;
}
if(!$a_node_id)
{
$a_node_id = $this->obj_id;
}
return $this->access_handler->checkAccess($a_perm, "", $a_node_id);
}

+ Here is the caller graph for this function:

ilObjPortfolioGUI::createPortfolioFromTemplate ( ilPropertyFormGUI  $a_form = null)
protected

Definition at line 813 of file class.ilObjPortfolioGUI.php.

References $_REQUEST, createPortfolioFromTemplateProcess(), ilObjPortfolioTemplate\getAvailablePortfolioTemplates(), initCreatePortfolioFromTemplateForm(), and toRepository().

Referenced by createPortfolioFromTemplateProcess(), and save().

{
$title = trim($_REQUEST["pt"]);
$prtt_id = (int)$_REQUEST["prtt"];
// valid template?
include_once "Modules/Portfolio/classes/class.ilObjPortfolioTemplate.php";
if(!sizeof($templates) || !in_array($prtt_id, $templates))
{
$this->toRepository();
}
unset($templates);
$this->ctrl->setParameter($this, "prtt", $prtt_id);
if(!$a_form)
{
$a_form = $this->initCreatePortfolioFromTemplateForm($prtt_id, $title);
}
if($a_form)
{
$this->tpl->setContent($a_form->getHTML());
}
else
{
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjPortfolioGUI::createPortfolioFromTemplateProcess (   $a_process_form = true)
protected

Definition at line 1003 of file class.ilObjPortfolioGUI.php.

References $_REQUEST, $ilSetting, $ilUser, $target_id, createPortfolioFromTemplate(), ilPortfolioPage\getAllPages(), ilObjPortfolioTemplate\getAvailablePortfolioTemplates(), initCreatePortfolioFromTemplateForm(), ilUtil\sendSuccess(), toRepository(), ilPortfolioTemplatePage\TYPE_BLOG_TEMPLATE, and ilExAssignment\TYPE_PORTFOLIO.

Referenced by createPortfolioFromTemplate().

{
global $ilSetting, $ilUser, $ilAccess;
$title = trim($_REQUEST["pt"]);
$prtt_id = (int)$_REQUEST["prtt"];
// valid template?
include_once "Modules/Portfolio/classes/class.ilObjPortfolioTemplate.php";
if(!sizeof($templates) || !in_array($prtt_id, $templates))
{
$this->toRepository();
}
unset($templates);
// build page recipe (aka import form values)
$recipe = null;
if($a_process_form)
{
$this->ctrl->setParameter($this, "prtt", $prtt_id);
$form = $this->initCreatePortfolioFromTemplateForm($prtt_id, $title);
if($form->checkInput())
{
include_once "Modules/Portfolio/classes/class.ilPortfolioTemplatePage.php";
foreach(ilPortfolioTemplatePage::getAllPages($prtt_id) as $page)
{
switch($page["type"])
{
if(!$ilSetting->get('disable_wsp_blogs'))
{
$field_id = "blog_".$page["id"];
switch($form->getInput($field_id))
{
case "blog_create":
$recipe[$page["id"]] = array("blog", "create",
trim($form->getInput($field_id."_create_title")));
break;
case "blog_resuse":
$recipe[$page["id"]] = array("blog", "reuse",
(int)$form->getInput($field_id."_reuse_blog"));
break;
case "blog_ignore":
$recipe[$page["id"]] = array("blog", "ignore");
break;
}
}
break;
}
}
$recipe["skills"] = (array)$form->getInput("skill_ids");
}
else
{
$form->setValuesByPost();
return $this->createPortfolioFromTemplate($form);
}
}
$source = new ilObjPortfolioTemplate($prtt_id, false);
// create portfolio
include_once "Modules/Portfolio/classes/class.ilObjPortfolio.php";
$target = new ilObjPortfolio();
$target->setTitle($title);
$target->create();
$target_id = $target->getId();
$source->clonePagesAndSettings($source, $target, $recipe);
// link portfolio to exercise assignment
$exc_ref_id = (int)$_REQUEST["exc_id"];
$ass_id = (int)$_REQUEST["ass_id"];
if($exc_ref_id &&
$ass_id &&
$ilAccess->checkAccess("read", "", $exc_ref_id))
{
include_once "Modules/Exercise/classes/class.ilObjExercise.php";
include_once "Modules/Exercise/classes/class.ilExAssignment.php";
$exc = new ilObjExercise($exc_ref_id);
$ass = new ilExAssignment($ass_id);
if($ass->getExerciseId() == $exc->getId() &&
$ass->getType() == ilExAssignment::TYPE_PORTFOLIO)
{
$exc->addResourceObject($target_id, $ass_id, $ilUser->getId());
}
}
ilUtil::sendSuccess($this->lng->txt("prtf_portfolio_created"), true);
$this->ctrl->setParameter($this, "prt_id", $target_id);
$this->ctrl->redirect($this, "view");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjPortfolioGUI::downloadExcAssFile ( )

Definition at line 744 of file class.ilObjPortfolioGUI.php.

References $_GET, $file, ilUtil\deliverFile(), and ilExAssignment\getFiles().

{
if($_GET["ass"] && $_GET["file"])
{
include_once "Modules/Exercise/classes/class.ilExAssignment.php";
$ass = new ilExAssignment((int)$_GET["ass"]);
$ass_files = ilExAssignment::getFiles($ass->getExerciseId(), $ass->getId());
if (count($ass_files) > 0)
{
foreach($ass_files as $file)
{
if($file["name"] == $_GET["file"])
{
ilUtil::deliverFile($file["fullpath"], $file["name"]);
}
}
}
}
}

+ Here is the call graph for this function:

ilObjPortfolioGUI::downloadExcSubFile ( )

Definition at line 765 of file class.ilObjPortfolioGUI.php.

References $_GET, ilObjPortfolioBaseGUI\$user_id, ilObjUser\_lookupName(), ilObject\_lookupTitle(), ilUtil\deliverFile(), and ilExAssignment\getDeliveredFiles().

{
if($_GET["ass"])
{
include_once "Modules/Exercise/classes/class.ilExAssignment.php";
$ass = new ilExAssignment((int)$_GET["ass"]);
$submitted = ilExAssignment::getDeliveredFiles($ass->getExerciseId(), $ass->getId(), $this->user_id);
if (count($submitted) > 0)
{
$submitted = array_pop($submitted);
$user_data = ilObjUser::_lookupName($submitted["user_id"]);
$title = ilObject::_lookupTitle($submitted["obj_id"])." - ".
$ass->getTitle()." - ".
$user_data["firstname"]." ".
$user_data["lastname"]." (".
$user_data["login"].").zip";
ilUtil::deliverFile($submitted["filename"], $title);
}
}
}

+ Here is the call graph for this function:

ilObjPortfolioGUI::executeCommand ( )

execute command

Reimplemented from ilObject2GUI.

Definition at line 44 of file class.ilObjPortfolioGUI.php.

References $_GET, ilObject2GUI\$access_handler, $cmd, $ret, addLocator(), checkPermissionBool(), ilObjPortfolioBaseGUI\determinePageCall(), ilObjPortfolioBaseGUI\handlePageCall(), ilObjectGUI\omitLocator(), ilObjPortfolioBaseGUI\preview(), ilFileInputGUI\setPersonalWorkspaceQuotaCheck(), setTabs(), and setTitleAndDescription().

{
// goto link to portfolio page
if($_GET["gtp"])
{
$_GET["user_page"] = $_GET["gtp"];
}
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->ctrl->getCmd("view");
/*
if($_REQUEST["ecal"])
{
$cmd = "preview";
$next_class = "";
}
*/
switch($next_class)
{
case "ilworkspaceaccessgui";
if($this->checkPermissionBool("write"))
{
$this->setTabs();
$this->tabs_gui->activateTab("share");
$this->tpl->setPermanentLink("prtf", $this->object->getId());
include_once('./Services/PersonalWorkspace/classes/class.ilWorkspaceAccessGUI.php');
$wspacc = new ilWorkspaceAccessGUI($this->object->getId(), $this->access_handler, true, $plink);
$this->ctrl->forwardCommand($wspacc);
}
break;
case 'ilportfoliopagegui':
if($this->determinePageCall())
{
// only in edit mode
$this->addLocator();
include_once "Services/Form/classes/class.ilFileInputGUI.php";
}
$this->handlePageCall($cmd);
break;
case "ilnotegui";
$this->preview();
break;
case "ilobjstylesheetgui":
include_once ("./Services/Style/classes/class.ilObjStyleSheetGUI.php");
$this->ctrl->setReturn($this, "editStyleProperties");
$style_gui = new ilObjStyleSheetGUI("", $this->object->getStyleSheetId(), false, false);
$style_gui->omitLocator();
if ($cmd == "create" || $_GET["new_type"]=="sty")
{
$style_gui->setCreationMode(true);
}
if ($cmd == "confirmedDelete")
{
$this->object->setStyleSheetId(0);
$this->object->update();
}
$ret = $this->ctrl->forwardCommand($style_gui);
if ($cmd == "save" || $cmd == "copyStyle" || $cmd == "importStyle")
{
$style_id = $ret;
$this->object->setStyleSheetId($style_id);
$this->object->update();
$this->ctrl->redirectByClass("ilobjstylesheetgui", "edit");
}
break;
default:
if($cmd != "preview")
{
$this->addLocator();
$this->setTabs();
}
$this->$cmd();
break;
}
return true;
}

+ Here is the call graph for this function:

ilObjPortfolioGUI::finalize ( )
protected

Finalize and submit portfolio to exercise.

Definition at line 792 of file class.ilObjPortfolioGUI.php.

References $_GET, $_REQUEST, ilObject\_getAllReferences(), and ilUtil\sendSuccess().

{
// to make exercise gui load assignment
$_GET["ass_id"] = $_REQUEST["ass"];
// #11173 - ref_id is needed for notifications
$exc_ref_id = array_shift(ilObject::_getAllReferences($_REQUEST["exc"]));
include_once "Modules/Exercise/classes/class.ilObjExerciseGUI.php";
$exc_gui = new ilObjExerciseGUI(null, $exc_ref_id, true);
$exc_gui->submitPortfolio($this->object->getId());
ilUtil::sendSuccess($this->lng->txt("prtf_finalized"), true);
$this->ctrl->redirect($this, "view");
}

+ Here is the call graph for this function:

ilObjPortfolioGUI::getEditFormCustomValues ( array &  $a_values)
protected

Add values to custom edit fields.

Parameters
array$a_values

Reimplemented from ilObjPortfolioBaseGUI.

Definition at line 446 of file class.ilObjPortfolioGUI.php.

{
$a_values["online"] = $this->object->isOnline();
}
ilObjPortfolioGUI::getExerciseInfo (   $a_assignment_id,
  $a_add_submit = false 
)

Definition at line 622 of file class.ilObjPortfolioGUI.php.

References $file, ilObject\_getAllReferences(), ilLink\_getStaticLink(), ilObject\_lookupTitle(), ilDatePresentation\formatDate(), ilExAssignment\getDeliveredFiles(), ilExAssignment\getFiles(), ilLinkButton\getInstance(), IL_CAL_DATETIME, ilDatePresentation\setUseRelativeDates(), and ilDatePresentation\useRelativeDates().

{
include_once "Modules/Exercise/classes/class.ilExAssignment.php";
$ass = new ilExAssignment($a_assignment_id);
$exercise_id = $ass->getExerciseId();
if(!$exercise_id)
{
return;
}
// is the assignment still open?
$times_up = false;
if($ass->getDeadline() && $ass->getDeadline() - time() <= 0)
{
$times_up = true;
}
// exercise goto
include_once "./Services/Link/classes/class.ilLink.php";
$exc_ref_id = array_shift(ilObject::_getAllReferences($exercise_id));
$exc_link = ilLink::_getStaticLink($exc_ref_id, "exc");
$info = sprintf($this->lng->txt("prtf_exercise_info"),
$ass->getTitle(),
"<a href=\"".$exc_link."\">".
ilObject::_lookupTitle($exercise_id)."</a>");
// submit button
if($a_add_submit && !$times_up)
{
$this->ctrl->setParameter($this, "exc", $exercise_id);
$this->ctrl->setParameter($this, "ass", $a_assignment_id);
$submit_link = $this->ctrl->getLinkTarget($this, "finalize");
$this->ctrl->setParameter($this, "ass", "");
$this->ctrl->setParameter($this, "exc", "");
include_once "Services/UIComponent/Button/classes/class.ilLinkButton.php";
$button->setCaption("prtf_finalize_portfolio");
$button->setPrimary(true);
$button->setUrl($submit_link);
$info .= " ".$button->render();
}
// submitted files
$submitted = ilExAssignment::getDeliveredFiles($exercise_id, $a_assignment_id, $this->user_id, true);
if($submitted)
{
$submitted = array_pop($submitted);
$this->ctrl->setParameter($this, "ass", $a_assignment_id);
$dl_link = $this->ctrl->getLinkTarget($this, "downloadExcSubFile");
$this->ctrl->setParameter($this, "ass", "");
include_once "Services/UIComponent/Button/classes/class.ilLinkButton.php";
$button->setCaption("download");
$button->setUrl($dl_link);
$info .= "<br />".sprintf($this->lng->txt("prtf_exercise_submitted_info"),
$button->render());
}
// work instructions incl. files
$tooltip = "";
$ass = $ass->getInstruction();
if($ass)
{
$tooltip .= nl2br($ass);
}
$ass_files = ilExAssignment::getFiles($exercise_id, $a_assignment_id);
if (count($ass_files) > 0)
{
$tooltip .= "<br /><br />";
foreach($ass_files as $file)
{
$this->ctrl->setParameter($this, "ass", $a_assignment_id);
$this->ctrl->setParameter($this, "file", urlencode($file["name"]));
$dl_link = $this->ctrl->getLinkTarget($this, "downloadExcAssFile");
$this->ctrl->setParameter($this, "file", "");
$this->ctrl->setParameter($this, "ass", "");
$tooltip .= $file["name"].": <a href=\"".$dl_link."\">".
$this->lng->txt("download")."</a>";
}
}
if($tooltip)
{
$ol_id = "exc_ass_".$a_assignment_id;
include_once "Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php";
$overlay = new ilOverlayGUI($ol_id);
// overlay
$overlay->setAnchor($ol_id."_tr");
$overlay->setTrigger($ol_id."_tr", "click", $ol_id."_tr");
$overlay->setAutoHide(false);
// $overlay->setCloseElementId($cl_id);
$overlay->add();
// trigger
$overlay->addTrigger($ol_id."_tr", "click", $ol_id."_tr");
$info .= "<div id=\"".$ol_id."_tr\"><a href=\"#\">".$this->lng->txt("exc_instruction")."</a></div>".
"<div id=\"".$ol_id."\" style=\"display:none; background-color:white; border: 1px solid #bbb; padding: 10px;\">".$tooltip."</div>";
}
return $info;
}

+ Here is the call graph for this function:

ilObjPortfolioGUI::getPageGUIClassName ( )

Reimplemented from ilObjPortfolioBaseGUI.

Definition at line 510 of file class.ilObjPortfolioGUI.php.

{
return "ilportfoliopagegui";
}
ilObjPortfolioGUI::getPageGUIInstance (   $a_page_id)
protected

Get portfolio template page gui instance.

Parameters
int$a_page_id
Returns
ilPortfolioPageGUI

Reimplemented from ilObjPortfolioBaseGUI.

Definition at line 497 of file class.ilObjPortfolioGUI.php.

References ilObjPortfolioBaseGUI\getAdditional(), and ilPortfolioPageGUI\setAdditional().

{
include_once("Modules/Portfolio/classes/class.ilPortfolioPageGUI.php");
$page_gui = new ilPortfolioPageGUI(
$this->object->getId(),
$a_page_id,
0,
$this->object->hasPublicComments()
);
$page_gui->setAdditional($this->getAdditional());
return $page_gui;
}

+ Here is the call graph for this function:

ilObjPortfolioGUI::getPageInstance (   $a_page_id = null,
  $a_portfolio_id = null 
)
protected

Get portfolio template page instance.

Parameters
int$a_page_id
int$a_portfolio_id
Returns
ilPortfolioPage

Reimplemented from ilObjPortfolioBaseGUI.

Definition at line 478 of file class.ilObjPortfolioGUI.php.

Referenced by afterSave(), and saveBlog().

{
// #11531
if(!$a_portfolio_id && $this->object)
{
$a_portfolio_id = $this->object->getId();
}
include_once "Modules/Portfolio/classes/class.ilPortfolioPage.php";
$page = new ilPortfolioPage($a_page_id);
$page->setPortfolioId($a_portfolio_id);
return $page;
}

+ Here is the caller graph for this function:

ilObjPortfolioGUI::getType ( )

Functions that must be overwritten.

Reimplemented from ilObject2GUI.

Definition at line 26 of file class.ilObjPortfolioGUI.php.

Referenced by initCreateForm().

{
return "prtf";
}

+ Here is the caller graph for this function:

ilObjPortfolioGUI::initBlogForm ( )

Init blog page form.

Parameters
string$a_mode
Returns
ilPropertyFormGUI

Reimplemented from ilObjPortfolioBaseGUI.

Definition at line 552 of file class.ilObjPortfolioGUI.php.

References $options, ilObject2GUI\$tree, ilUtil\sendInfo(), and ilFormPropertyGUI\setRequired().

Referenced by saveBlog().

{
include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this));
$options = array();
include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
$tree = new ilWorkspaceTree($this->user_id);
$root = $tree->readRootId();
if($root)
{
$root = $tree->getNodeData($root);
foreach ($tree->getSubTree($root, true, "blog") as $node)
{
$options[$node["obj_id"]] = $node["title"];
}
asort($options);
}
// no blogs to add?
if(!sizeof($options))
{
ilUtil::sendInfo($this->lng->txt("prtf_no_blogs_info"), true);
$this->ctrl->redirect($this, "view");
}
$obj = new ilSelectInputGUI($this->lng->txt("obj_blog"), "blog");
$obj->setRequired(true);
$obj->setOptions($options);
$form->addItem($obj);
$form->setTitle($this->lng->txt("prtf_add_blog").": ".
$this->object->getTitle());
$form->addCommandButton("saveBlog", $this->lng->txt("save"));
$form->addCommandButton("view", $this->lng->txt("cancel"));
return $form;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjPortfolioGUI::initCopyPageFormOptions ( ilFormPropertyGUI  $a_tgt)
protected

Reimplemented from ilObjPortfolioBaseGUI.

Definition at line 515 of file class.ilObjPortfolioGUI.php.

References $options, ilObjPortfolio\getPortfoliosOfUser(), ilTextInputGUI\setMaxLength(), and ilFormPropertyGUI\setRequired().

{
$old = new ilRadioOption($this->lng->txt("prtf_existing_portfolio"), "old");
$a_tgt->addOption($old);
$options = array();
$all = ilObjPortfolio::getPortfoliosOfUser($this->user_id);
foreach($all as $item)
{
$options[$item["id"]] = $item["title"];
}
$prtf = new ilSelectInputGUI($this->lng->txt("portfolio"), "prtf");
$prtf->setRequired(true);
$prtf->setOptions($options);
$old->addSubItem($prtf);
$new = new ilRadioOption($this->lng->txt("prtf_new_portfolio"), "new");
$a_tgt->addOption($new);
$tf = new ilTextInputGUI($this->lng->txt("title"), "title");
$tf->setMaxLength(128);
$tf->setSize(40);
$tf->setRequired(true);
$new->addSubItem($tf);
}

+ Here is the call graph for this function:

ilObjPortfolioGUI::initCreateForm (   $a_new_type)
protected

Init object creation form.

Parameters
string$a_new_type
Returns
ilPropertyFormGUI

Reimplemented from ilObjectGUI.

Definition at line 210 of file class.ilObjPortfolioGUI.php.

References $_REQUEST, $ilSetting, $options, ilObject2GUI\$tree, ilPageLayout\activeLayouts(), ilObjPortfolioTemplate\getAvailablePortfolioTemplates(), getType(), ilPageLayout\MODULE_PORTFOLIO, ilUtil\sendInfo(), ilTextInputGUI\setMaxLength(), ilFormPropertyGUI\setRequired(), ilTextInputGUI\setSize(), ilRadioGroupInputGUI\setValue(), and ilObject\TITLE_LENGTH.

Referenced by initCreationForms(), and save().

{
global $ilSetting;
$this->ctrl->setParameter($this, "new_type", $this->getType());
include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this));
// title
$ti = new ilTextInputGUI($this->lng->txt("title"), "title");
$ti->setMaxLength(ilObject::TITLE_LENGTH);
$ti->setRequired(true);
$form->addItem($ti);
/* description
$ta = new ilTextAreaInputGUI($this->lng->txt("description"), "desc");
$ta->setCols(40);
$ta->setRows(2);
$form->addItem($ta);
*/
$main = new ilRadioGroupInputGUI($this->lng->txt("prtf_creation_mode"), "mode");
$main->setValue("mode_scratch");
$form->addItem($main);
$opt_scratch = new ilRadioOption($this->lng->txt("prtf_creation_mode_scratch"), "mode_scratch");
$main->addOption($opt_scratch);
// 1st page
$type = new ilRadioGroupInputGUI($this->lng->txt("prtf_first_page_title"), "ptype");
$type->setRequired(true);
$opt_scratch->addSubItem($type);
$type_page = new ilRadioOption($this->lng->txt("page"), "page");
$type->addOption($type_page);
// page type: page
$tf = new ilTextInputGUI($this->lng->txt("title"), "fpage");
$tf->setMaxLength(128);
$tf->setSize(40);
$tf->setRequired(true);
$type_page->addSubItem($tf);
// page templates
include_once "Services/Style/classes/class.ilPageLayout.php";
if($templates)
{
$options = array(0 => $this->lng->txt("none"));
foreach ($templates as $templ)
{
$templ->readObject();
$options[$templ->getId()] = $templ->getTitle();
}
$use_template = new ilSelectInputGUI($this->lng->txt("prtf_use_page_layout"), "tmpl");
$use_template->setRequired(true);
$use_template->setOptions($options);
$type_page->addSubItem($use_template);
}
// page type: blog
if(!$ilSetting->get('disable_wsp_blogs'))
{
$options = array();
include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
$tree = new ilWorkspaceTree($this->user_id);
$root = $tree->readRootId();
if($root)
{
$root = $tree->getNodeData($root);
foreach ($tree->getSubTree($root) as $node)
{
if ($node["type"] == "blog")
{
$options[$node["obj_id"]] = $node["title"];
}
}
asort($options);
}
if(sizeof($options))
{
$type_blog = new ilRadioOption($this->lng->txt("obj_blog"), "blog");
$type->addOption($type_blog);
$obj = new ilSelectInputGUI($this->lng->txt("obj_blog"), "blog");
$obj->setRequired(true);
$obj->setOptions(array(""=>$this->lng->txt("please_select"))+$options);
$type_blog->addSubItem($obj);
}
else
{
ilUtil::sendInfo($this->lng->txt("prtf_no_blogs_info"));
$type->setValue("page");
}
}
// portfolio templates
$opt_tmpl = new ilRadioOption($this->lng->txt("prtf_creation_mode_template"), "mode_tmpl");
$main->addOption($opt_tmpl);
include_once "Modules/Portfolio/classes/class.ilObjPortfolioTemplate.php";
if(!sizeof($templates))
{
$opt_tmpl->setDisabled(true);
}
else
{
$tmpl = new ilSelectInputGUI($this->lng->txt("obj_prtt"), "prtt");
$tmpl->setRequired(true);
$tmpl->setOptions(array(""=>$this->lng->txt("please_select"))+$templates);
$opt_tmpl->addSubItem($tmpl);
// incoming from repository
if((int)$_REQUEST["prtt_pre"])
{
$tmpl->setValue((int)$_REQUEST["prtt_pre"]);
$main->setValue("mode_tmpl");
}
}
$form->setTitle($this->lng->txt("prtf_create_portfolio"));
$form->addCommandButton("save", $this->lng->txt("create"));
$form->addCommandButton("toRepository", $this->lng->txt("cancel"));
return $form;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjPortfolioGUI::initCreatePortfolioFromTemplateForm (   $a_prtt_id,
  $a_title 
)
protected

Definition at line 843 of file class.ilObjPortfolioGUI.php.

References $_REQUEST, $ilSetting, $ilUser, ilObject2GUI\$tree, ilDiskQuotaActivationChecker\_isPersonalWorkspaceActive(), ilSkillTreeNode\_lookupTitle(), ilObject\_lookupTitle(), ilPortfolioPage\getAllPages(), ilPersonalSkill\getSelectedUserSkills(), ilDiskQuotaHandler\isUploadPossible(), ilUtil\sendFailure(), ilFormPropertyGUI\setInfo(), ilFormPropertyGUI\setRequired(), ilNonEditableValueGUI\setValue(), ilPortfolioTemplatePage\TYPE_BLOG_TEMPLATE, and ilPortfolioPage\TYPE_PAGE.

Referenced by createPortfolioFromTemplate(), and createPortfolioFromTemplateProcess().

{
if((int)$_REQUEST["exc_id"])
{
$this->ctrl->setParameter($this, "exc_id", (int)$_REQUEST["exc_id"]);
$this->ctrl->setParameter($this, "ass_id", (int)$_REQUEST["ass_id"]);
}
include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this));
$tmpl = new ilNonEditableValueGUI($this->lng->txt("obj_prtt"));
$tmpl->setValue(ilObject::_lookupTitle($a_prtt_id));
$form->addItem($tmpl);
$title = new ilNonEditableValueGUI($this->lng->txt("title"), "pt");
$title->setValue($a_title);
$form->addItem($title);
// gather user blogs
if(!$ilSetting->get('disable_wsp_blogs'))
{
$blog_options = array();
include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
$tree = new ilWorkspaceTree($this->user_id);
$root = $tree->readRootId();
if($root)
{
$root = $tree->getNodeData($root);
foreach ($tree->getSubTree($root, true, "blog") as $node)
{
$blog_options[$node["obj_id"]] = $node["title"];
}
asort($blog_options);
}
}
$has_form_content = false;
include_once "Services/WebDAV/classes/class.ilDiskQuotaActivationChecker.php";
$quota_sum = 0;
include_once "Services/Skill/classes/class.ilPersonalSkill.php";
$pskills = array_keys(ilPersonalSkill::getSelectedUserSkills($ilUser->getId()));
$skill_ids = array();
include_once "Modules/Portfolio/classes/class.ilPortfolioTemplatePage.php";
foreach(ilPortfolioTemplatePage::getAllPages($a_prtt_id) as $page)
{
switch($page["type"])
{
// skills
$source_page = new ilPortfolioTemplatePage($page["id"]);
$source_page->buildDom(true);
$dom = $source_page->getDom();
if($dom instanceof php4DOMDocument)
{
$dom = $dom->myDOMDocument;
}
$xpath = new DOMXPath($dom);
$nodes = $xpath->query("//PageContent/Skills");
foreach($nodes as $node)
{
$skill_id = $node->getAttribute("Id");
if(!in_array($skill_id, $pskills))
{
$skill_ids[] = $skill_id;
}
}
unset($nodes);
unset($xpath);
unset($dom);
if($check_quota)
{
$quota_sum += $source_page->getPageDiskSize();
}
if(sizeof($skill_ids))
{
$has_form_content = true;
}
break;
if(!$ilSetting->get('disable_wsp_blogs'))
{
$has_form_content = true;
$field_id = "blog_".$page["id"];
$blog = new ilRadioGroupInputGUI($this->lng->txt("obj_blog").": ".
$page["title"], $field_id);
$blog->setRequired(true);
$blog->setValue("blog_create");
$form->addItem($blog);
$new_blog = new ilRadioOption($this->lng->txt("prtf_template_import_blog_create"), "blog_create");
$blog->addOption($new_blog);
$title = new ilTextInputGUI($this->lng->txt("title"), $field_id."_create_title");
$title->setRequired(true);
$new_blog->addSubItem($title);
if(sizeof($blog_options))
{
$reuse_blog = new ilRadioOption($this->lng->txt("prtf_template_import_blog_reuse"), "blog_resuse");
$blog->addOption($reuse_blog);
$obj = new ilSelectInputGUI($this->lng->txt("obj_blog"), $field_id."_reuse_blog");
$obj->setRequired(true);
$obj->setOptions(array(""=>$this->lng->txt("please_select"))+$blog_options);
$reuse_blog->addSubItem($obj);
}
$blog->addOption(new ilRadioOption($this->lng->txt("prtf_template_import_blog_ignore"), "blog_ignore"));
}
break;
}
}
if($skill_ids)
{
include_once "Services/Skill/classes/class.ilSkillTreeNode.php";
$skills = new ilCheckboxGroupInputGUI($this->lng->txt("skills"), "skill_ids");
$skills->setInfo($this->lng->txt("prtf_template_import_new_skills"));
$skills->setValue($skill_ids);
foreach($skill_ids as $skill_id)
{
$skills->addOption(new ilCheckboxOption(ilSkillTreeNode::_lookupTitle($skill_id), $skill_id));
}
$form->addItem($skills);
}
if($quota_sum)
{
include_once "Services/DiskQuota/classes/class.ilDiskQuotaHandler.php";
{
ilUtil::sendFailure($this->lng->txt("prtf_template_import_quota_failure"), true);
$this->ctrl->redirect($this, "create");
}
}
// no dialog needed, go ahead
if(!$has_form_content)
{
return;
}
$form->setTitle($this->lng->txt("prtf_creation_mode").": ".$this->lng->txt("prtf_creation_mode_template"));
$form->addCommandButton("createPortfolioFromTemplateProcess", $this->lng->txt("continue"));
$form->addCommandButton("toRepository", $this->lng->txt("cancel"));
return $form;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjPortfolioGUI::initCreationForms (   $a_new_type)
protected

Init creation froms.

this will create the default creation forms: new, import, clone

Parameters
string$a_new_type
Returns
array

Reimplemented from ilObject2GUI.

Definition at line 205 of file class.ilObjPortfolioGUI.php.

References initCreateForm().

{
return array(self::CFORM_NEW => $this->initCreateForm($a_new_type));
}

+ Here is the call graph for this function:

ilObjPortfolioGUI::initEditForm ( )
protected

Init object edit form.

Returns
ilPropertyFormGUI

Reimplemented from ilObjectGUI.

Definition at line 410 of file class.ilObjPortfolioGUI.php.

References ilObjPortfolioBaseGUI\initEditCustomForm(), ilCheckboxInputGUI\setChecked(), ilTextInputGUI\setSize(), and ilObject\TITLE_LENGTH.

{
include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this));
// title
$ti = new ilTextInputGUI($this->lng->txt("title"), "title");
$ti->setMaxLength(ilObject::TITLE_LENGTH);
$ti->setRequired(true);
$ti->setValue($this->object->getTitle());
$form->addItem($ti);
/* description
$ta = new ilTextAreaInputGUI($this->lng->txt("description"), "desc");
$ta->setCols(40);
$ta->setRows(2);
$ta->setValue($this->object->getDescription());
$form->addItem($ta);
*/
// :TODO: online
$online = new ilCheckboxInputGUI($this->lng->txt("online"), "online");
$online->setChecked($this->object->isOnline());
$form->addItem($online);
$this->initEditCustomForm($form);
$form->setTitle($this->lng->txt("prtf_edit_portfolio"));
$form->addCommandButton("update", $this->lng->txt("save"));
$form->addCommandButton("view", $this->lng->txt("cancel"));
return $form;
}

+ Here is the call graph for this function:

ilObjPortfolioGUI::save ( )

Reimplemented from ilObject2GUI.

Definition at line 347 of file class.ilObjPortfolioGUI.php.

References $_REQUEST, createPortfolioFromTemplate(), and initCreateForm().

{
$form = $this->initCreateForm("prtf");
if($form->checkInput())
{
// trigger portfolio template "import" process
if($form->getInput("mode") == "mode_tmpl")
{
$_REQUEST["pt"] = $form->getInput("title");
return $this->createPortfolioFromTemplate();
}
}
return parent::save();
}

+ Here is the call graph for this function:

ilObjPortfolioGUI::saveBlog ( )

Create new portfolio blog page.

Reimplemented from ilObjPortfolioBaseGUI.

Definition at line 595 of file class.ilObjPortfolioGUI.php.

References checkPermissionBool(), getPageInstance(), initBlogForm(), ilUtil\sendSuccess(), and ilPortfolioPage\TYPE_BLOG.

{
$form = $this->initBlogForm();
if ($form->checkInput() && $this->checkPermissionBool("write"))
{
$page = $this->getPageInstance();
$page->setType(ilPortfolioPage::TYPE_BLOG);
$page->setTitle($form->getInput("blog"));
$page->create();
ilUtil::sendSuccess($this->lng->txt("prtf_blog_page_created"), true);
$this->ctrl->redirect($this, "view");
}
$this->tabs_gui->clearTargets();
$this->tabs_gui->setBackTarget($this->lng->txt("back"),
$this->ctrl->getLinkTarget($this, "view"));
$form->setValuesByPost();
$this->tpl->setContent($form->getHtml());
}

+ Here is the call graph for this function:

ilObjPortfolioGUI::setTabs ( )
protected

create tabs (repository/workspace switch)

this had to be moved here because of the context-specific permission tab

Reimplemented from ilObject2GUI.

Definition at line 137 of file class.ilObjPortfolioGUI.php.

References checkPermissionBool().

Referenced by executeCommand().

{
global $ilHelp;
$ilHelp->setScreenIdComponent("prtf");
if($this->checkPermissionBool("write"))
{
$this->tabs_gui->addTab("pages",
$this->lng->txt("content"),
$this->ctrl->getLinkTarget($this, "view"));
$this->tabs_gui->addTab("settings",
$this->lng->txt("settings"),
$this->ctrl->getLinkTarget($this, "edit"));
$this->tabs_gui->addNonTabbedLink("preview",
$this->lng->txt("user_profile_preview"),
$this->ctrl->getLinkTarget($this, "preview"));
$this->lng->loadLanguageModule("wsp");
$this->tabs_gui->addTab("share",
$this->lng->txt("wsp_permissions"),
$this->ctrl->getLinkTargetByClass("ilworkspaceaccessgui", "share"));
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjPortfolioGUI::setTitleAndDescription ( )
protected

called by prepare output

Reimplemented from ilObject2GUI.

Definition at line 176 of file class.ilObjPortfolioGUI.php.

References ilUtil\getImagePath().

Referenced by executeCommand().

{
// parent::setTitleAndDescription();
$title = $this->lng->txt("portfolio");
if($this->object)
{
$title .= ": ".$this->object->getTitle();
}
$this->tpl->setTitle($title);
$this->tpl->setTitleIcon(ilUtil::getImagePath("icon_prtf.svg"),
$this->lng->txt("portfolio"));
if($this->object &&
!$this->object->isOnline())
{
$this->tpl->setAlertProperties(array(
array("alert" => true,
"property" => $this->lng->txt("status"),
"value" => $this->lng->txt("offline"))
));
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjPortfolioGUI::toRepository ( )
protected

Definition at line 394 of file class.ilObjPortfolioGUI.php.

References $_REQUEST, ilLink\_getLink(), and ilUtil\redirect().

Referenced by createPortfolioFromTemplate(), and createPortfolioFromTemplateProcess().

{
global $ilAccess;
// return to exercise (portfolio assignment)
$exc_ref_id = (int)$_REQUEST["exc_id"];
if($exc_ref_id &&
$ilAccess->checkAccess("read", "", $exc_ref_id))
{
include_once "Services/Link/classes/class.ilLink.php";
ilUtil::redirect(ilLink::_getLink($exc_ref_id, "exc"));
}
$this->ctrl->redirectByClass("ilportfoliorepositorygui", "show");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjPortfolioGUI::updateCustom ( ilPropertyFormGUI  $a_form)

Insert custom update form values into object.

Parameters
ilPropertyFormGUI$a_form

Reimplemented from ilObjPortfolioBaseGUI.

Definition at line 453 of file class.ilObjPortfolioGUI.php.

References ilPropertyFormGUI\getInput(), and ilObjPortfolio\setUserDefault().

{
$this->object->setOnline($a_form->getInput("online"));
// if portfolio is not online, it cannot be default
if(!$a_form->getInput("online"))
{
ilObjPortfolio::setUserDefault($this->user_id, 0);
}
}

+ Here is the call graph for this function:

Field Documentation

ilObjPortfolioGUI::$ws_access
protected

Definition at line 19 of file class.ilObjPortfolioGUI.php.


The documentation for this class was generated from the following file: