ILIAS  release_4-4 Revision
ilPortfolioPageGUI Class Reference

Portfolio page gui class. More...

+ Inheritance diagram for ilPortfolioPageGUI:
+ Collaboration diagram for ilPortfolioPageGUI:

Public Member Functions

 __construct ($a_portfolio_id, $a_id=0, $a_old_nr=0, $a_enable_comments=true)
 Constructor. More...
 
 getParentType ()
 
executeCommand ()
 execute command More...
 
 showPage ()
 Show page. More...
 
 getTabs ($a_activate="")
 Set all tabs. More...
 
 setEmbedded ($a_value)
 Set embedded mode: will suppress tabs. More...
 
 setAdditional ($a_additional)
 Set Additonal Information. More...
 
 getAdditional ()
 Get Additonal Information. More...
 
 getJsOnloadCode ()
 
 postOutputProcessing ($a_output)
 
- Public Member Functions inherited from ilPageObjectGUI
 ilPageObjectGUI ($a_parent_type, $a_id, $a_old_nr=0, $a_prevent_get_id=false, $a_lang="")
 Constructor. More...
 
 afterConstructor ()
 After constructor. More...
 
 setParentType ($a_val)
 Set parent type. More...
 
 getParentType ()
 Get parent type. More...
 
 setId ($a_val)
 Set ID. More...
 
 getId ()
 Get ID. More...
 
 setOldNr ($a_val)
 Set old nr (historic page) More...
 
 getOldNr ()
 Get old nr (historic page) More...
 
 setLanguage ($a_val)
 Set language. More...
 
 getLanguage ()
 Get language. More...
 
 setEnablePCType ($a_pc_type, $a_val)
 Set enable pc type. More...
 
 getEnablePCType ($a_pc_type)
 Get enable pc type. More...
 
 setPageConfig ($a_val)
 Set page config object. More...
 
 getPageConfig ()
 Get page config object. More...
 
 setBibId ($a_id)
 Set Bib Id. More...
 
 getBibId ()
 Get Bib Id. More...
 
 setPageObject ($a_pg_obj)
 Set Page Object. More...
 
 getPageObject ()
 Get Page Object. More...
 
 setOutputMode ($a_mode=IL_PAGE_PRESENTATION)
 Set Output Mode. More...
 
 getOutputMode ()
 
 setTemplateOutput ($a_output=true)
 
 outputToTemplate ()
 
 setPresentationTitle ($a_title="")
 
 getPresentationTitle ()
 
 setHeader ($a_title="")
 
 getHeader ()
 
 setLinkParams ($l_params="")
 
 getLinkParams ()
 
 setLinkFrame ($l_frame="")
 
 getLinkFrame ()
 
 setLinkXML ($link_xml)
 
 getLinkXML ()
 
 setQuestionXML ($question_xml)
 
 setQuestionHTML ($question_html)
 
 getQuestionXML ()
 
 getQuestionHTML ()
 
 setTemplateTargetVar ($a_variable)
 
 getTemplateTargetVar ()
 
 setTemplateOutputVar ($a_value)
 
 getTemplateOutputVar ()
 
 setSourcecodeDownloadScript ($script_name)
 
 getSourcecodeDownloadScript ()
 
 enableCitation ($a_enabled)
 
 isEnabledCitation ()
 
 setLocator (&$a_locator)
 
 setTabs ($a_tabs)
 
 setPageBackTitle ($a_title)
 
 setFileDownloadLink ($a_download_link)
 
 getFileDownloadLink ()
 
 setFullscreenLink ($a_fullscreen_link)
 
 getFullscreenLink ()
 
 setIntLinkReturn ($a_return)
 
 enableChangeComments ($a_enabled)
 
 isEnabledChangeComments ()
 
 enableNotes ($a_enabled, $a_parent_id)
 
 isEnabledNotes ()
 
 setOfflineDirectory ($offdir)
 set offline directory to offdir More...
 
 getOfflineDirectory ()
 get offline directory More...
 
 setViewPageLink ($a_link, $a_target="")
 set link for "view page" button More...
 
 getViewPageLink ()
 get view page link More...
 
 getViewPageTarget ()
 get view page target frame More...
 
 setActivationListener (&$a_obj, $a_meth)
 
 setEnabledNews ($a_enabled, $a_news_obj_id=0, $a_news_obj_type=0)
 Set enabled news. More...
 
 getEnabledNews ()
 Get enabled news. More...
 
 setTabHook ($a_object, $a_function)
 Set tab hook. More...
 
 setEditPreview ($a_editpreview)
 Set Display first Edit tab, then Preview tab, instead of Page and Edit. More...
 
 getEditPreview ()
 Get Display first Edit tab, then Preview tab, instead of Page and Edit. More...
 
 setEnabledTabs ($a_enabledtabs)
 Set Output tabs. More...
 
 getEnabledTabs ()
 Get Output tabs. More...
 
 setEnabledPageFocus ($a_enabledpagefocus)
 Set Enable page focus. More...
 
 getEnabledPageFocus ()
 Get Enable page focus. More...
 
 setExplorerUpdater ($a_exp_frame, $a_exp_id, $a_exp_target_script)
 Set Explorer Updater. More...
 
 setPrependingHtml ($a_prependinghtml)
 Set Prepending HTML. More...
 
 getPrependingHtml ()
 Get Prepending HTML. More...
 
 setEnableEditing ($a_enableediting)
 Set Enable Editing. More...
 
 getEnableEditing ()
 Get Enable Editing. More...
 
 setRawPageContent ($a_rawpagecontent)
 Set Get raw page content only. More...
 
 getRawPageContent ()
 Get Get raw page content only. More...
 
 setStyleId ($a_styleid)
 Set Style Id. More...
 
 getStyleId ()
 Get Style Id. More...
 
 setCompareMode ($a_val)
 Set compare mode. More...
 
 getCompareMode ()
 Get compare mode. More...
 
 setAbstractOnly ($a_val)
 Set abstract only. More...
 
 getAbstractOnly ()
 Get abstract only. More...
 
 setRenderPageContainer ($a_val)
 Set render page container. More...
 
 getRenderPageContainer ()
 Get render page container. More...
 
 activateMetaDataEditor ($a_rep_obj_id, $a_sub_obj_id, $a_type, $a_observer_obj=NULL, $a_observer_func="")
 Activate meda data editor. More...
 
 determineFileDownloadLink ()
 Determine file download link. More...
 
 determineFullscreenLink ()
 Determine fullscreen link. More...
 
 determineSourcecodeDownloadScript ()
 Determine source code download script. More...
 
 getComponentPluginsXML ()
 Put information about activated plugins into XML. More...
 
executeCommand ()
 execute command More...
 
 setQEditTabs ($a_active)
 Set question editing tabs. More...
 
 onFeedbackEditingForwarding ()
 On feedback editing forwarding. More...
 
 deactivatePage ()
 
 activatePage ()
 
 showPage ()
 
 replaceCurlyBrackets ($output)
 Replace curly brackets. More...
 
 addActionsMenu ($a_tpl, $sel_media_mode, $sel_html_mode, $sel_js_mode)
 Add actions menu. More...
 
 addMultiLangActionsAndInfo ($a_list, $a_tpl)
 Add multi-language actions to menu. More...
 
 setEditMode ()
 Set edit mode. More...
 
 setDefaultLinkXml ()
 Set standard link xml. More...
 
 downloadFile ()
 Download file of file lists. More...
 
 displayMediaFullscreen ()
 Show media in fullscreen mode. More...
 
 displayMedia ($a_fullscreen=false)
 Display media. More...
 
 download_paragraph ()
 download source code paragraph More...
 
 insertContentIncludes ($a_html)
 Insert content includes. More...
 
 insertPageToc ($a_output)
 Insert page toc. More...
 
 insertResources ($a_output)
 Insert resources. More...
 
 insertAdvTrigger ($a_output)
 Insert adv content trigger. More...
 
 postOutputProcessing ($a_output)
 Finalizing output processing. More...
 
 insertHelp ($a_tpl)
 Insert help texts. More...
 
 preview ()
 preview More...
 
 edit ()
 edit ("view" before) More...
 
 insertJSAtPlaceholder ()
 InsertJS at placeholder. More...
 
 presentation ($a_mode=IL_PAGE_PRESENTATION)
 
 getHTML ()
 
 showMediaFullscreen ($a_style_id=0)
 show fullscreen view of media object More...
 
 displayValidationError ($a_error)
 display validation error More...
 
 history ()
 Get history table as HTML. More...
 
 rollbackConfirmation ()
 Rollback confirmation. More...
 
 rollback ()
 Rollback to a previous version. More...
 
 setScreenIdComponent ()
 Set screen id component. More...
 
 getTabs ($a_activate="")
 adds tabs to tab gui object More...
 
 compareVersion ()
 Compares two revisions of the page. More...
 
 replaceDiffTags ($a_html)
 
 editActivation ()
 Edit activation (only, if scheduled page activation is activated in administration) More...
 
 initActivationForm ()
 Init activation form. More...
 
 getActivationFormValues ()
 Get values for activation form. More...
 
 saveActivation ()
 Save Activation. More...
 
 getNotesHTML ($a_content_object=null, $a_enable_private_notes=true, $a_enable_public_notes=false, $a_enable_notes_deletion=false, $a_callback=null)
 Get html for public and/or private notes. More...
 
 getQuestionJsOfPage ($a_no_interaction=false)
 Get question js. More...
 
 initSelfAssessmentRendering ($a_force_no_form=false)
 Init question handling. More...
 
 processAnswer ()
 Process answer. More...
 
 selfAssessmentRendering ($a_output)
 Self assessment question rendering. More...
 
 initialOpenedContent ()
 Initially opened content. More...
 
 initOpenedContentForm ()
 Init form for initially opened content. More...
 
 saveInitialOpenedContent ()
 Save initial opened content. More...
 
 switchToLanguage ()
 Switch to language. More...
 
 confirmPageTranslationCreation ()
 Confirm page translation creation. More...
 
 editMasterLanguage ()
 Edit master language. More...
 
 createPageTranslation ()
 Create page translation. More...
 
 releasePageLock ()
 Release page lock. More...
 

Data Fields

const EMBEDDED_NO_OUTPUT = -99
 
- Data Fields inherited from ilPageObjectGUI
 $tpl
 
 $lng
 
 $ctrl
 
 $obj
 
 $output_mode
 
 $presentation_title
 
 $target_script
 
 $return_location
 
 $target_var
 
 $template_output_var
 
 $output2template
 
 $link_params
 
 $bib_id
 
 $citation
 
 $sourcecode_download_script
 
 $change_comments
 
 $question_html
 
 $activation = false
 
 $activated = true
 
 $editpreview = false
 
 $use_meta_data = false
 
 $link_xml_set = false
 
 $enableediting = true
 
 $rawpagecontent = false
 
 $enabledcontentincludes = false
 
 $compare_mode = false
 
 $page_config = null
 
 $tabs_enabled = true
 
 $render_page_container = false
 
 $pl_start = "{{{{{"
 
 $pl_end = "}}}}}"
 

Protected Member Functions

 getPageContentUserId ($a_user_id)
 
 renderPageElement ($a_type, $a_html)
 
 renderTeaser ($a_type, $a_title, $a_options=null)
 
 renderProfile ($a_user_id, $a_type, array $a_fields=null)
 
 renderVerification ($a_user_id, $a_type, $a_id)
 
 dltstv ()
 
 dlexcv ()
 
 dlcrsv ()
 
 dlscov ()
 
 renderBlog ($a_user_id, $a_blog_id, array $a_posting_ids=null)
 
 renderBlogTeaser ($a_user_id, $a_blog_id, array $a_posting_ids=null)
 
 renderSkills ($a_user_id, $a_skills_id)
 
 renderSkillsTeaser ($a_user_id, $a_skills_id)
 
 renderConsultationHoursTeaser ($a_user_id, $a_mode, $a_group_ids)
 
 renderConsultationHours ($a_user_id, $a_mode, $a_group_ids)
 
- Protected Member Functions inherited from ilPageObjectGUI
 initPageObject ()
 Init page object. More...
 
 getActivationCaptions ()
 Get captions for activation action menu entries. More...
 

Protected Attributes

 $js_onload_code = array()
 
 $additional = array()
 
- Protected Attributes inherited from ilPageObjectGUI
 $parent_type = ""
 

Additional Inherited Members

- Static Public Member Functions inherited from ilPageObjectGUI
static getTinyMenu ($a_par_type, $a_int_links=false, $a_wiki_links=false, $a_keywords=false, $a_style_id=0, $a_paragraph_styles=true, $a_save_return=true, $a_anchors=false, $a_save_new=true)
 Get Tiny Menu. More...
 
static addPreparationJavascript ($a_tpl, $a_lang)
 Add standard texts. More...
 
static getJSTextInitCode ($a_lang)
 Get js txt init code. More...
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilPortfolioPageGUI::__construct (   $a_portfolio_id,
  $a_id = 0,
  $a_old_nr = 0,
  $a_enable_comments = true 
)

Constructor.

Definition at line 28 of file class.ilPortfolioPageGUI.php.

References ilPageObjectGUI\$tpl, ilObjStyleSheet\getContentStylePath(), ilPageObjectGUI\getPageObject(), getParentType(), and ilObjStyleSheet\getSyntaxStylePath().

29  {
30  global $tpl;
31 
32  $this->portfolio_id = (int)$a_portfolio_id;
33  $this->enable_comments = (bool)$a_enable_comments;
34 
35  parent::__construct($this->getParentType(), $a_id, $a_old_nr);
36  $this->getPageObject()->setPortfolioId($this->portfolio_id);
37 
38  // content style
39  include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
40 
41  $tpl->setCurrentBlock("SyntaxStyle");
42  $tpl->setVariable("LOCATION_SYNTAX_STYLESHEET",
44  $tpl->parseCurrentBlock();
45 
46  $tpl->setCurrentBlock("ContentStyle");
47  $tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
49  $tpl->parseCurrentBlock();
50  }
getPageObject()
Get Page Object.
getSyntaxStylePath()
get syntax style path
getContentStylePath($a_style_id)
get content style path
+ Here is the call graph for this function:

Member Function Documentation

◆ dlcrsv()

ilPortfolioPageGUI::dlcrsv ( )
protected

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

References $_GET, ilPageObjectGUI\getPageObject(), and ilObject2GUI\WORKSPACE_OBJECT_ID.

348  {
349  $id = $_GET["dlid"];
350  if($id)
351  {
352  include_once "Modules/Course/classes/Verification/class.ilObjCourseVerificationGUI.php";
354  $verification->downloadFromPortfolioPage($this->getPageObject());
355  }
356  }
getPageObject()
Get Page Object.
$_GET["client_id"]
GUI class for course verification.
+ Here is the call graph for this function:

◆ dlexcv()

ilPortfolioPageGUI::dlexcv ( )
protected

Definition at line 336 of file class.ilPortfolioPageGUI.php.

References $_GET, ilPageObjectGUI\getPageObject(), and ilObject2GUI\WORKSPACE_OBJECT_ID.

337  {
338  $id = $_GET["dlid"];
339  if($id)
340  {
341  include_once "Modules/Exercise/classes/class.ilObjExerciseVerificationGUI.php";
343  $verification->downloadFromPortfolioPage($this->getPageObject());
344  }
345  }
getPageObject()
Get Page Object.
$_GET["client_id"]
GUI class for exercise verification.
+ Here is the call graph for this function:

◆ dlscov()

ilPortfolioPageGUI::dlscov ( )
protected

Definition at line 358 of file class.ilPortfolioPageGUI.php.

References $_GET, ilPageObjectGUI\getPageObject(), and ilObject2GUI\WORKSPACE_OBJECT_ID.

359  {
360  $id = $_GET["dlid"];
361  if($id)
362  {
363  include_once "Modules/ScormAicc/classes/Verification/class.ilObjSCORMVerificationGUI.php";
365  $verification->downloadFromPortfolioPage($this->getPageObject());
366  }
367  }
getPageObject()
Get Page Object.
$_GET["client_id"]
GUI class for scorm verification.
+ Here is the call graph for this function:

◆ dltstv()

ilPortfolioPageGUI::dltstv ( )
protected

Definition at line 325 of file class.ilPortfolioPageGUI.php.

References $_GET, ilPageObjectGUI\getPageObject(), and ilObject2GUI\WORKSPACE_OBJECT_ID.

326  {
327  $id = $_GET["dlid"];
328  if($id)
329  {
330  include_once "Modules/Test/classes/class.ilObjTestVerificationGUI.php";
332  $verification->downloadFromPortfolioPage($this->getPageObject());
333  }
334  }
getPageObject()
Get Page Object.
$_GET["client_id"]
GUI class for test verification.
+ Here is the call graph for this function:

◆ executeCommand()

& ilPortfolioPageGUI::executeCommand ( )

execute command

Definition at line 66 of file class.ilPortfolioPageGUI.php.

References $cmd, $ilCtrl, $ilUser, ilPageObjectGUI\getPageObject(), ilPageObjectGUI\setPresentationTitle(), and ilObject2GUI\WORKSPACE_NODE_ID.

67  {
68  global $ilCtrl, $ilUser;
69 
70  $next_class = $this->ctrl->getNextClass($this);
71  $cmd = $this->ctrl->getCmd();
72 
73  switch($next_class)
74  {
75  case "ilobjbloggui":
76  // we need the wsp-id for the keywords
77  include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
78  $wsp_tree = new ilWorkspaceTree($ilUser->getId());
79  $blog_obj_id = (int)$this->getPageObject()->getTitle();
80  $blog_node_id = $wsp_tree->lookupNodeId($blog_obj_id);
81 
82  include_once "Modules/Blog/classes/class.ilObjBlogGUI.php";
83  $blog_gui = new ilObjBlogGUI($blog_node_id, ilObjBlogGUI::WORKSPACE_NODE_ID);
84  $blog_gui->disableNotes(!$this->enable_comments);
85  return $ilCtrl->forwardCommand($blog_gui);
86 
87  case "ilcalendarmonthgui":
88  // booking action
89  if($cmd && $cmd != "preview")
90  {
91  include_once('./Services/Calendar/classes/class.ilCalendarMonthGUI.php');
92  $month_gui = new ilCalendarMonthGUI(new ilDate());
93  return $ilCtrl->forwardCommand($month_gui);
94  }
95  // calendar month navigation
96  else
97  {
98  $ilCtrl->setParameter($this, "cmd", "preview");
99  return self::EMBEDDED_NO_OUTPUT;
100  }
101 
102  case "ilpageobjectgui":
103  die("Deprecated. ilPortfolioPage gui forwarding to ilpageobject");
104  return;
105 
106  default:
107  $this->setPresentationTitle($this->getPageObject()->getTitle());
108  return parent::executeCommand();
109  }
110  }
getPageObject()
Get Page Object.
$cmd
Definition: sahs_server.php:35
Tree handler for personal workspace.
global $ilCtrl
Definition: ilias.php:18
Class for single dates.
Class ilObjBlogGUI.
setPresentationTitle($a_title="")
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:

◆ getAdditional()

ilPortfolioPageGUI::getAdditional ( )

Get Additonal Information.

Returns
array Additonal Information

Definition at line 179 of file class.ilPortfolioPageGUI.php.

References $additional.

Referenced by renderProfile().

180  {
181  return $this->additional;
182  }
+ Here is the caller graph for this function:

◆ getJsOnloadCode()

ilPortfolioPageGUI::getJsOnloadCode ( )

Definition at line 184 of file class.ilPortfolioPageGUI.php.

References $js_onload_code.

185  {
186  return $this->js_onload_code;
187  }

◆ getPageContentUserId()

ilPortfolioPageGUI::getPageContentUserId (   $a_user_id)
protected

Definition at line 57 of file class.ilPortfolioPageGUI.php.

Referenced by renderConsultationHours(), renderProfile(), and renderSkills().

58  {
59  // user id from content-xml
60  return $a_user_id;
61  }
+ Here is the caller graph for this function:

◆ getParentType()

ilPortfolioPageGUI::getParentType ( )

Definition at line 52 of file class.ilPortfolioPageGUI.php.

Referenced by __construct().

53  {
54  return "prtf";
55  }
+ Here is the caller graph for this function:

◆ getTabs()

ilPortfolioPageGUI::getTabs (   $a_activate = "")

Set all tabs.

Parameters

Definition at line 146 of file class.ilPortfolioPageGUI.php.

147  {
148  if(!$this->embedded)
149  {
150  parent::getTabs($a_activate);
151  }
152  }

◆ postOutputProcessing()

ilPortfolioPageGUI::postOutputProcessing (   $a_output)

Definition at line 189 of file class.ilPortfolioPageGUI.php.

References renderPageElement().

190  {
191  $parts = array(
192  "Profile" => array("0-9", "a-z", "0-9a-z_;\W"), // user, mode, fields
193  "Verification" => array("0-9", "a-z", "0-9"), // user, type, id
194  "Blog" => array("0-9", "0-9", "0-9;\W"), // user, blog id, posting ids
195  "BlogTeaser" => array("0-9", "0-9", "0-9;\W"), // user, blog id, posting ids
196  "Skills" => array("0-9", "0-9"), // user, skill id
197  "SkillsTeaser" => array("0-9", "0-9"), // user, skill id
198  "ConsultationHours" => array("0-9", "a-z", "0-9;\W"), // user, mode, group ids
199  "ConsultationHoursTeaser" => array("0-9", "a-z", "0-9;\W") // user, mode, group ids
200  );
201 
202  foreach($parts as $type => $def)
203  {
204  $def = implode("]+)#([", $def);
205  if(preg_match_all("/".$this->pl_start.$type."#([".$def.
206  "]+)".$this->pl_end."/", $a_output, $blocks))
207  {
208  foreach($blocks[0] as $idx => $block)
209  {
210  switch($type)
211  {
212  case "Profile":
213  case "Blog":
214  case "BlogTeaser":
215  case "Skills":
216  case "SkillsTeaser":
217  case "ConsultationHours":
218  case "ConsultationHoursTeaser":
219  $subs = null;
220  if(trim($blocks[3][$idx]))
221  {
222  foreach(explode(";", $blocks[3][$idx]) as $sub)
223  {
224  if(trim($sub))
225  {
226  $subs[] = trim($sub);
227  }
228  }
229  }
230  $snippet = $this->{"render".$type}($blocks[1][$idx],
231  $blocks[2][$idx], $subs);
232  break;
233 
234  default:
235  $snippet = $this->{"render".$type}($blocks[1][$idx],
236  $blocks[2][$idx], $blocks[3][$idx]);
237  break;
238  }
239 
240  $snippet = $this->renderPageElement($type, $snippet);
241  $a_output = str_replace($block, $snippet, $a_output);
242  }
243  }
244  }
245 
246  return $a_output;
247  }
renderPageElement($a_type, $a_html)
+ Here is the call graph for this function:

◆ renderBlog()

ilPortfolioPageGUI::renderBlog (   $a_user_id,
  $a_blog_id,
array  $a_posting_ids = null 
)
protected

Definition at line 369 of file class.ilPortfolioPageGUI.php.

References $ilCtrl, ilObject2\_lookupTitle(), ilPageObjectGUI\getOutputMode(), IL_PAGE_PREVIEW, and ilObject2GUI\WORKSPACE_OBJECT_ID.

Referenced by showPage().

370  {
371  global $ilCtrl;
372 
373  // not used
374  // $user_id = $this->getPageContentUserId($a_user_id);
375 
376  // full blog (separate tab/page)
377  if(!$a_posting_ids)
378  {
379  include_once "Modules/Blog/classes/class.ilObjBlogGUI.php";
380  $blog = new ilObjBlogGUI($a_blog_id, ilObject2GUI::WORKSPACE_OBJECT_ID);
381  $blog->disableNotes(!$this->enable_comments);
382  $blog->setContentStyleSheet();
383 
384  if($this->getOutputMode() != "offline")
385  {
386  return $ilCtrl->getHTML($blog);
387  }
388  else
389  {
390 
391  }
392  }
393  // embedded postings
394  else
395  {
396  $html = array();
397 
398  include_once "Modules/Blog/classes/class.ilObjBlog.php";
399  $html[] = ilObjBlog::_lookupTitle($a_blog_id);
400 
401  include_once "Modules/Blog/classes/class.ilBlogPostingGUI.php";
402  foreach($a_posting_ids as $post)
403  {
404  $page = new ilBlogPostingGUI(0, null, $post);
405  if($this->getOutputMode() != "offline")
406  {
407  $page->setOutputMode(IL_PAGE_PREVIEW);
408  }
409  else
410  {
411  $page->setOutputMode("offline");
412  }
413  $html[] = $page->showPage();
414  }
415 
416  return implode("\n", $html);
417  }
418  }
const IL_PAGE_PREVIEW
static _lookupTitle($a_id)
Class ilBlogPosting GUI class.
global $ilCtrl
Definition: ilias.php:18
Class ilObjBlogGUI.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderBlogTeaser()

ilPortfolioPageGUI::renderBlogTeaser (   $a_user_id,
  $a_blog_id,
array  $a_posting_ids = null 
)
protected

Definition at line 420 of file class.ilPortfolioPageGUI.php.

References ilObject\_lookupTitle(), ilDatePresentation\formatDate(), and renderTeaser().

421  {
422  // not used
423  // $user_id = $this->getPageContentUserId($a_user_id);
424 
425  $postings = "";
426  if($a_posting_ids)
427  {
428  $postings = array("<ul>");
429  include_once "Modules/Blog/classes/class.ilBlogPosting.php";
430  foreach($a_posting_ids as $post)
431  {
432  $post = new ilBlogPosting($post);
433  $postings[] = "<li>".$post->getTitle()." - ".
434  ilDatePresentation::formatDate($post->getCreated())."</li>";
435  }
436  $postings[] = "</ul>";
437  $postings = implode("\n", $postings);
438  }
439 
440  return $this->renderTeaser("blog", $this->lng->txt("obj_blog").' "'.
441  ilObject::_lookupTitle($a_blog_id).'"', $postings);
442  }
Class ilBlogPosting.
static _lookupTitle($a_id)
lookup object title
static formatDate(ilDateTime $date)
Format a date public.
renderTeaser($a_type, $a_title, $a_options=null)
+ Here is the call graph for this function:

◆ renderConsultationHours()

ilPortfolioPageGUI::renderConsultationHours (   $a_user_id,
  $a_mode,
  $a_group_ids 
)
protected

Definition at line 512 of file class.ilPortfolioPageGUI.php.

References $_GET, $_REQUEST, $ilUser, ilCalendarCategories\_getInstance(), ilPageObjectGUI\getOutputMode(), getPageContentUserId(), ilUtil\getStyleSheetLocation(), IL_CAL_DATE, IL_CAL_UNIX, ilCalendarCategories\MODE_PORTFOLIO_CONSULTATION, and renderConsultationHoursTeaser().

513  {
514  global $ilUser;
515 
516  if($this->getOutputMode() == "preview")
517  {
518  return $this->renderConsultationHoursTeaser($a_user_id, $a_mode, $a_group_ids);
519  }
520 
521  if($this->getOutputMode() == "offline")
522  {
523  return;
524  }
525 
526  $user_id = $this->getPageContentUserId($a_user_id);
527 
528  // only if not owner
529  if($ilUser->getId() != $user_id)
530  {
531  $_GET["bkid"] = $user_id;
532  }
533 
534  if($a_mode != "manual")
535  {
536  $a_group_ids = null;
537  }
538 
539  include_once('./Services/Calendar/classes/class.ilCalendarCategories.php');
540  ilCalendarCategories::_getInstance()->setCHUserId($user_id);
542 
543  if(!$_REQUEST["seed"])
544  {
545  $seed = new ilDate(time(), IL_CAL_UNIX);
546  }
547  else
548  {
549  $seed = new ilDate($_REQUEST["seed"], IL_CAL_DATE);
550  }
551 
552  include_once('./Services/Calendar/classes/class.ilCalendarMonthGUI.php');
553  $month_gui = new ilCalendarMonthGUI($seed);
554 
555  // custom schedule filter: handle booking group ids
556  include_once('./Services/Calendar/classes/class.ilCalendarScheduleFilterBookings.php');
557  $filter = new ilCalendarScheduleFilterBookings($user_id, $a_group_ids);
558  $month_gui->addScheduleFilter($filter);
559 
560  $this->tpl->addCss(ilUtil::getStyleSheetLocation('filesystem','delos.css','Services/Calendar'));
561 
562  $this->lng->loadLanguageModule("dateplaner");
563  return '<h3>'.$this->lng->txt("app_consultation_hours").'</h3>'.
564  $this->ctrl->getHTML($month_gui);
565  }
Calendar schedule filter for consultation hour bookings.
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
$_GET["client_id"]
const IL_CAL_UNIX
Class for single dates.
static _getInstance($a_usr_id=0)
get singleton instance
const IL_CAL_DATE
global $ilUser
Definition: imgupload.php:15
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7
renderConsultationHoursTeaser($a_user_id, $a_mode, $a_group_ids)
+ Here is the call graph for this function:

◆ renderConsultationHoursTeaser()

ilPortfolioPageGUI::renderConsultationHoursTeaser (   $a_user_id,
  $a_mode,
  $a_group_ids 
)
protected

Definition at line 484 of file class.ilPortfolioPageGUI.php.

References ilConsultationHourGroups\lookupTitle(), and renderTeaser().

Referenced by renderConsultationHours().

485  {
486  // not used
487  // $user_id = $this->getPageContentUserId($a_user_id);
488 
489  if($a_mode == "auto")
490  {
491  $mode = $this->lng->txt("cont_cach_mode_automatic");
492  $groups = null;
493  }
494  else
495  {
496  $mode = $this->lng->txt("cont_cach_mode_manual");
497 
498  include_once "Services/Calendar/classes/ConsultationHours/class.ilConsultationHourGroups.php";
499  $groups = array();
500  foreach($a_group_ids as $grp_id)
501  {
502  $groups[] = ilConsultationHourGroups::lookupTitle($grp_id);
503  }
504  $groups = " (".implode(", ", $groups).")";
505  }
506 
507  $this->lng->loadLanguageModule("dateplaner");
508  return $this->renderTeaser("consultation_hours",
509  $this->lng->txt("app_consultation_hours"), $mode.$groups);
510  }
static lookupTitle($a_group_id)
Lookup group title.
renderTeaser($a_type, $a_title, $a_options=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderPageElement()

ilPortfolioPageGUI::renderPageElement (   $a_type,
  $a_html 
)
protected

Definition at line 249 of file class.ilPortfolioPageGUI.php.

Referenced by postOutputProcessing().

250  {
251  return trim($a_html);
252  }
+ Here is the caller graph for this function:

◆ renderProfile()

ilPortfolioPageGUI::renderProfile (   $a_user_id,
  $a_type,
array  $a_fields = null 
)
protected

Definition at line 268 of file class.ilPortfolioPageGUI.php.

References $ilCtrl, getAdditional(), ilPageObjectGUI\getOutputMode(), and getPageContentUserId().

269  {
270  global $ilCtrl;
271 
272  $user_id = $this->getPageContentUserId($a_user_id);
273 
274  include_once("./Services/User/classes/class.ilPublicUserProfileGUI.php");
275  $pub_profile = new ilPublicUserProfileGUI($user_id);
276  $pub_profile->setEmbedded(true, ($this->getOutputMode() == "offline"));
277 
278  // full circle: additional was set in the original public user profile call
279  $pub_profile->setAdditional($this->getAdditional());
280 
281  if($a_type == "manual" && sizeof($a_fields))
282  {
283  $prefs = array();
284  foreach($a_fields as $field)
285  {
286  $field = trim($field);
287  if($field)
288  {
289  $prefs["public_".$field] = "y";
290  }
291  }
292 
293  $pub_profile->setCustomPrefs($prefs);
294  }
295 
296  if($this->getOutputMode() != "offline")
297  {
298  return $ilCtrl->getHTML($pub_profile);
299  }
300  else
301  {
302  return $pub_profile->getEmbeddable();
303  }
304  }
getAdditional()
Get Additonal Information.
global $ilCtrl
Definition: ilias.php:18
GUI class for public user profile presentation.
+ Here is the call graph for this function:

◆ renderSkills()

ilPortfolioPageGUI::renderSkills (   $a_user_id,
  $a_skills_id 
)
protected

Definition at line 444 of file class.ilPortfolioPageGUI.php.

References ilPageObjectGUI\getOutputMode(), getPageContentUserId(), and renderSkillsTeaser().

445  {
446  if($this->getOutputMode() == "preview")
447  {
448  return $this->renderSkillsTeaser($a_user_id, $a_skills_id);
449  }
450 
451  $user_id = $this->getPageContentUserId($a_user_id);
452 
453  include_once "Services/Skill/classes/class.ilPersonalSkillsGUI.php";
454  $gui = new ilPersonalSkillsGUI();
455  if($this->getOutputMode() == "offline")
456  {
457  $gui->setOfflineMode("./files/");
458  }
459  $html = $gui->getSkillHTML($a_skills_id, $user_id);
460 
461  if($this->getOutputMode() == "offline")
462  {
463  $js = $gui->getTooltipsJs();
464  if(sizeof($js))
465  {
466  $this->js_onload_code = array_merge($this->js_onload_code, $js);
467  }
468  }
469 
470  return $html;
471  }
Personal skills GUI class.
renderSkillsTeaser($a_user_id, $a_skills_id)
+ Here is the call graph for this function:

◆ renderSkillsTeaser()

ilPortfolioPageGUI::renderSkillsTeaser (   $a_user_id,
  $a_skills_id 
)
protected

Definition at line 473 of file class.ilPortfolioPageGUI.php.

References ilSkillTreeNode\_lookupTitle(), and renderTeaser().

Referenced by renderSkills().

474  {
475  // not used
476  // $user_id = $this->getPageContentUserId($a_user_id);
477 
478  include_once "Services/Skill/classes/class.ilSkillTreeNode.php";
479 
480  return $this->renderTeaser("skills", $this->lng->txt("skills").' "'.
481  ilSkillTreeNode::_lookupTitle($a_skills_id).'"');
482  }
static _lookupTitle($a_obj_id, $a_tref_id=0)
Lookup Title.
renderTeaser($a_type, $a_title, $a_options=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderTeaser()

ilPortfolioPageGUI::renderTeaser (   $a_type,
  $a_title,
  $a_options = null 
)
protected

Definition at line 254 of file class.ilPortfolioPageGUI.php.

References $options.

Referenced by renderBlogTeaser(), ilPortfolioTemplatePageGUI\renderBlogTemplate(), renderConsultationHoursTeaser(), and renderSkillsTeaser().

255  {
256  $options = "";
257  if($a_options)
258  {
259  $options = '<div class="il_Footer">'.$this->lng->txt("prtf_page_element_teaser_settings").
260  ": ".$a_options.'</div>';
261  }
262 
263  return '<div style="margin:5px" class="ilBox"><h3>'.$a_title.'</h3>'.
264  '<div class="il_Description_no_margin">'.$this->lng->txt("prtf_page_element_teaser_".$a_type).'</div>'.
265  $options.'</div>';
266  }
if(!is_array($argv)) $options
+ Here is the caller graph for this function:

◆ renderVerification()

ilPortfolioPageGUI::renderVerification (   $a_user_id,
  $a_type,
  $a_id 
)
protected

Definition at line 306 of file class.ilPortfolioPageGUI.php.

References ilObject2GUI\WORKSPACE_OBJECT_ID.

307  {
308  global $objDefinition;
309 
310  // not used
311  // $user_id = $this->getPageContentUserId($a_user_id);
312 
313  $class = "ilObj".$objDefinition->getClassName($a_type)."GUI";
314  include_once $objDefinition->getLocation($a_type)."/class.".$class.".php";
315  $verification = new $class($a_id, ilObject2GUI::WORKSPACE_OBJECT_ID);
316 
317  // direct download link
318  $this->ctrl->setParameter($this, "dlid", $a_id);
319  $url = $this->ctrl->getLinkTarget($this, "dl".$a_type);
320  $this->ctrl->setParameter($this, "dlid", "");
321 
322  return $verification->render(true, $url);
323  }

◆ setAdditional()

ilPortfolioPageGUI::setAdditional (   $a_additional)

Set Additonal Information.

Parameters
array$a_additionalAdditonal Information

Definition at line 169 of file class.ilPortfolioPageGUI.php.

Referenced by ilObjPortfolioTemplateGUI\getPageGUIInstance(), and ilObjPortfolioGUI\getPageGUIInstance().

170  {
171  $this->additional = $a_additional;
172  }
+ Here is the caller graph for this function:

◆ setEmbedded()

ilPortfolioPageGUI::setEmbedded (   $a_value)

Set embedded mode: will suppress tabs.

Parameters
bool$a_value

Definition at line 159 of file class.ilPortfolioPageGUI.php.

160  {
161  $this->embedded = (bool)$a_value;
162  }

◆ showPage()

ilPortfolioPageGUI::showPage ( )

Show page.

Returns
string page output

Definition at line 117 of file class.ilPortfolioPageGUI.php.

References $ilUser, ilPageObjectGUI\getPageObject(), renderBlog(), ilPageObjectGUI\setTemplateOutput(), and ilPortfolioPage\TYPE_BLOG.

118  {
119  global $ilUser;
120 
121  if(!$this->getPageObject())
122  {
123  return;
124  }
125 
126  switch($this->getPageObject()->getType())
127  {
129  return $this->renderBlog($ilUser->getId(), (int)$this->getPageObject()->getTitle());
130 
131  default:
132  $this->setTemplateOutput(false);
133  // $this->setPresentationTitle($this->getPageObject()->getTitle());
134  $output = parent::showPage();
135 
136  return $output;
137  }
138  }
renderBlog($a_user_id, $a_blog_id, array $a_posting_ids=null)
getPageObject()
Get Page Object.
setTemplateOutput($a_output=true)
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:

Field Documentation

◆ $additional

ilPortfolioPageGUI::$additional = array()
protected

Definition at line 23 of file class.ilPortfolioPageGUI.php.

Referenced by getAdditional().

◆ $js_onload_code

ilPortfolioPageGUI::$js_onload_code = array()
protected

Definition at line 22 of file class.ilPortfolioPageGUI.php.

Referenced by getJsOnloadCode().

◆ EMBEDDED_NO_OUTPUT

const ilPortfolioPageGUI::EMBEDDED_NO_OUTPUT = -99

Definition at line 20 of file class.ilPortfolioPageGUI.php.

Referenced by ilObjPortfolioBaseGUI\handlePageCall().


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