ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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)
 
 getExportMaterial ()
 
- 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, $a_type, $a_sub_obj_id, $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 ()
 display content of page More...
 
 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...
 
 previewHistory ()
 Preview history. 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...
 
 processAnswer ()
 Process answer. 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)
 
 isMyCoursesActive ()
 
 renderMyCoursesTeaser ($a_user_id, $a_default_sorting)
 
 renderMyCourses ($a_user_id, $a_default_sorting)
 
 getCoursesOfUser ($a_user_id, $a_add_path=false)
 
 parseObjectives ($a_obj_id, $a_user_id)
 
 parseLOUserResults ($a_course_obj_id, $a_user_id)
 
- Protected Member Functions inherited from ilPageObjectGUI
 initPageObject ()
 Init page object. More...
 
 getActivationCaptions ()
 Get captions for activation action menu entries. More...
 
 isPageContainerToBeRendered ()
 

Protected Attributes

 $js_onload_code = array()
 
 $additional = array()
 
 $export_material = array("js"=>array(), "images"=>array(), "files"=>array())
 
- Protected Attributes inherited from ilPageObjectGUI
 $parent_type = ""
 
 $log
 

Static Protected Attributes

static $initialized = 0
 

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, $a_user_links=false)
 Get Tiny Menu. 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 31 of file class.ilPortfolioPageGUI.php.

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

32  {
33  global $tpl;
34 
35  $this->portfolio_id = (int)$a_portfolio_id;
36  $this->enable_comments = (bool)$a_enable_comments;
37 
38  parent::__construct($this->getParentType(), $a_id, $a_old_nr);
39  $this->getPageObject()->setPortfolioId($this->portfolio_id);
40 
41  // content style
42  include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
43 
44  $tpl->setCurrentBlock("SyntaxStyle");
45  $tpl->setVariable("LOCATION_SYNTAX_STYLESHEET",
47  $tpl->parseCurrentBlock();
48 
49  $tpl->setCurrentBlock("ContentStyle");
50  $tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
52  $tpl->parseCurrentBlock();
53  }
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 394 of file class.ilPortfolioPageGUI.php.

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

395  {
396  $id = $_GET["dlid"];
397  if($id)
398  {
399  include_once "Modules/Course/classes/Verification/class.ilObjCourseVerificationGUI.php";
401  $verification->downloadFromPortfolioPage($this->getPageObject());
402  }
403  }
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 383 of file class.ilPortfolioPageGUI.php.

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

384  {
385  $id = $_GET["dlid"];
386  if($id)
387  {
388  include_once "Modules/Exercise/classes/class.ilObjExerciseVerificationGUI.php";
390  $verification->downloadFromPortfolioPage($this->getPageObject());
391  }
392  }
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 405 of file class.ilPortfolioPageGUI.php.

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

406  {
407  $id = $_GET["dlid"];
408  if($id)
409  {
410  include_once "Modules/ScormAicc/classes/Verification/class.ilObjSCORMVerificationGUI.php";
412  $verification->downloadFromPortfolioPage($this->getPageObject());
413  }
414  }
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 372 of file class.ilPortfolioPageGUI.php.

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

373  {
374  $id = $_GET["dlid"];
375  if($id)
376  {
377  include_once "Modules/Test/classes/class.ilObjTestVerificationGUI.php";
379  $verification->downloadFromPortfolioPage($this->getPageObject());
380  }
381  }
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 69 of file class.ilPortfolioPageGUI.php.

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

70  {
71  global $ilCtrl, $ilUser;
72 
73  $next_class = $this->ctrl->getNextClass($this);
74  $cmd = $this->ctrl->getCmd();
75 
76  switch($next_class)
77  {
78  case "ilobjbloggui":
79  // #12879 - we need the wsp-id for the keywords
80  include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
81  $wsp_tree = new ilWorkspaceTree($ilUser->getId());
82  $blog_obj_id = (int)$this->getPageObject()->getTitle();
83  $blog_node_id = $wsp_tree->lookupNodeId($blog_obj_id);
84 
85  include_once "Modules/Blog/classes/class.ilObjBlogGUI.php";
86  $blog_gui = new ilObjBlogGUI($blog_node_id, ilObjBlogGUI::WORKSPACE_NODE_ID);
87  $blog_gui->disableNotes(!$this->enable_comments);
88  return $ilCtrl->forwardCommand($blog_gui);
89 
90  case "ilcalendarmonthgui":
91  // booking action
92  if($cmd && $cmd != "preview")
93  {
94  include_once('./Services/Calendar/classes/class.ilCalendarMonthGUI.php');
95  $month_gui = new ilCalendarMonthGUI(new ilDate());
96  return $ilCtrl->forwardCommand($month_gui);
97  }
98  // calendar month navigation
99  else
100  {
101  $ilCtrl->setParameter($this, "cmd", "preview");
102  return self::EMBEDDED_NO_OUTPUT;
103  }
104 
105  case "ilpageobjectgui":
106  die("Deprecated. ilPortfolioPage gui forwarding to ilpageobject");
107  return;
108 
109  default:
110  $this->setPresentationTitle($this->getPageObject()->getTitle());
111  return parent::executeCommand();
112  }
113  }
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 182 of file class.ilPortfolioPageGUI.php.

References $additional.

Referenced by renderProfile().

183  {
184  return $this->additional;
185  }
+ Here is the caller graph for this function:

◆ getCoursesOfUser()

ilPortfolioPageGUI::getCoursesOfUser (   $a_user_id,
  $a_add_path = false 
)
protected

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

References $path, $ref_id, ilObjUserTracking\_enabledLearningProgress(), ilObjUserTracking\_enabledUserRelatedData(), ilObject\_getAllReferences(), ilParticipants\_getMembershipByType(), ilObjUserTracking\_hasLearningProgressLearner(), ilObjCourseAccess\_isActivated(), ilObject\_lookupTitle(), ilObjCourse\_lookupViewMode(), ilTrQuery\getObjectsStatusForUser(), IL_CRS_VIEW_OBJECTIVE, and parseObjectives().

Referenced by renderMyCourses().

860  {
861  global $tree;
862 
863  // see ilPDSelectedItemsBlockGUI
864 
865  include_once 'Modules/Course/classes/class.ilObjCourseAccess.php';
866  include_once 'Services/Membership/classes/class.ilParticipants.php';
867  $items = ilParticipants::_getMembershipByType($a_user_id, 'crs');
868 
869  $repo_title = $tree->getNodeData(ROOT_FOLDER_ID);
870  $repo_title = $repo_title["title"];
871  if($repo_title == "ILIAS")
872  {
873  $repo_title = $this->lng->txt("repository");
874  }
875 
876  $references = $lp_obj_refs = array();
877  foreach($items as $obj_id)
878  {
880  if(is_array($ref_id) && count($ref_id))
881  {
882  $ref_id = array_pop($ref_id);
883  if(!$tree->isDeleted($ref_id))
884  {
885  $visible = false;
886  $active = ilObjCourseAccess::_isActivated($obj_id, $visible, false);
887  if($active && $visible)
888  {
889  $references[$ref_id] = array(
890  'ref_id' => $ref_id,
891  'obj_id' => $obj_id,
892  'title' => ilObject::_lookupTitle($obj_id)
893  );
894 
895  if($a_add_path)
896  {
897  $path = array();
898  foreach($tree->getPathFull($ref_id) as $item)
899  {
900  $path[] = $item["title"];
901  }
902  // top level comes first
903  if(sizeof($path) == 2)
904  {
905  $path[0] = 0;
906  }
907  else
908  {
909  $path[0] = 1;
910  }
911  $references[$ref_id]["path_sort"] = implode("__", $path);
912  array_shift($path);
913  array_pop($path);
914  if(!sizeof($path))
915  {
916  array_unshift($path, $repo_title);
917  }
918  $references[$ref_id]["path"] = implode(" › ", $path);
919  }
920 
921  $lp_obj_refs[$obj_id] = $ref_id;
922  }
923  }
924  }
925  }
926 
927  // get lp data for valid courses
928 
929  if(sizeof($lp_obj_refs))
930  {
931  // listing the objectives should NOT depend on any LP status / setting
932  include_once 'Modules/Course/classes/class.ilObjCourse.php';
933  foreach($lp_obj_refs as $obj_id => $ref_id)
934  {
935  // only if set in DB (default mode is not relevant
937  {
938  $references[$ref_id]["objectives"] = $this->parseObjectives($obj_id, $a_user_id);
939  }
940  }
941 
942  // LP must be active, personal and not anonymized
943  include_once "Services/Tracking/classes/class.ilObjUserTracking.php";
947  {
948  // see ilLPProgressTableGUI
949  include_once "Services/Tracking/classes/class.ilTrQuery.php";
950  include_once "Services/Tracking/classes/class.ilLPStatusFactory.php";
951  $lp_data = ilTrQuery::getObjectsStatusForUser($a_user_id, $lp_obj_refs);
952  foreach($lp_data as $item)
953  {
954  $ref_id = $item["ref_ids"];
955  $references[$ref_id]["lp_status"] = $item["status"];
956  }
957  }
958  }
959 
960  return $references;
961  }
const IL_CRS_VIEW_OBJECTIVE
static _getMembershipByType($a_usr_id, $a_type, $a_only_member_role=false)
get membership by type Get course or group membership
static _lookupTitle($a_id)
lookup object title
static _getAllReferences($a_id)
get all reference ids of object
static _enabledUserRelatedData()
check wether user related tracking is enabled or not
static _enabledLearningProgress()
check wether learing progress is enabled or not
$ref_id
Definition: sahs_server.php:39
$path
Definition: index.php:22
getObjectsStatusForUser($a_user_id, array $obj_refs)
parseObjectives($a_obj_id, $a_user_id)
static _isActivated($a_obj_id, &$a_visible_flag=null, $a_mind_member_view=true)
Is activated?
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getExportMaterial()

ilPortfolioPageGUI::getExportMaterial ( )

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

References $export_material.

1054  {
1055  return $this->export_material;
1056  }

◆ getJsOnloadCode()

ilPortfolioPageGUI::getJsOnloadCode ( )

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

References $js_onload_code.

188  {
189  return $this->js_onload_code;
190  }

◆ getPageContentUserId()

ilPortfolioPageGUI::getPageContentUserId (   $a_user_id)
protected

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

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

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

◆ getParentType()

ilPortfolioPageGUI::getParentType ( )

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

Referenced by __construct().

56  {
57  return "prtf";
58  }
+ Here is the caller graph for this function:

◆ getTabs()

ilPortfolioPageGUI::getTabs (   $a_activate = "")

Set all tabs.

Parameters

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

150  {
151  if(!$this->embedded)
152  {
153  parent::getTabs($a_activate);
154  }
155  }

◆ isMyCoursesActive()

ilPortfolioPageGUI::isMyCoursesActive ( )
protected

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

Referenced by renderMyCourses(), and renderMyCoursesTeaser().

615  {
616  $prfa_set = new ilSetting("prfa");
617  return (bool)$prfa_set->get("mycrs", true);
618  }
ILIAS Setting Class.
+ Here is the caller graph for this function:

◆ parseLOUserResults()

ilPortfolioPageGUI::parseLOUserResults (   $a_course_obj_id,
  $a_user_id 
)
protected

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

References $res, $result, ilLOUserResults\TYPE_INITIAL, and ilLOUserResults\TYPE_QUALIFIED.

Referenced by parseObjectives().

1019  {
1020  $res = array();
1021 
1022  include_once "Modules/Course/classes/Objectives/class.ilLOUserResults.php";
1023  $lur = new ilLOUserResults($a_course_obj_id, $a_user_id);
1024  foreach($lur->getCourseResultsForUserPresentation() as $objective_id => $types)
1025  {
1026  // show either initial or qualified for objective
1027  if(isset($types[ilLOUserResults::TYPE_INITIAL]))
1028  {
1029  $initial_status = $types[ilLOUserResults::TYPE_INITIAL]["status"];
1030  }
1031 
1032  // qualified test has priority
1033  if(isset($types[ilLOUserResults::TYPE_QUALIFIED]))
1034  {
1037  $result["initial"] = $types[ilLOUserResults::TYPE_INITIAL];
1038  }
1039  else
1040  {
1043  }
1044 
1045  $result["initial_status"] = $initial_status;
1046 
1047  $res[$objective_id] = $result;
1048  }
1049 
1050  return $res;
1051  }
$result
+ Here is the caller graph for this function:

◆ parseObjectives()

ilPortfolioPageGUI::parseObjectives (   $a_obj_id,
  $a_user_id 
)
protected

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

References $res, ilLOTestAssignments\getInstance(), ilCourseObjective\lookupObjectiveTitle(), ilLPObjSettings\LP_MODE_OBJECTIVES, parseLOUserResults(), ilLOSettings\TYPE_TEST_INITIAL, and ilLOSettings\TYPE_TEST_QUALIFIED.

Referenced by getCoursesOfUser().

964  {
965  $res = array();
966 
967  // we need the collection for the correct order
968  include_once "Services/Tracking/classes/class.ilLPObjSettings.php";
969  include_once "Services/Tracking/classes/collection/class.ilLPCollectionOfObjectives.php";
971  $coll_objtv = $coll_objtv->getItems();
972  if($coll_objtv)
973  {
974  // #13373
975  $lo_results = $this->parseLOUserResults($a_obj_id, $a_user_id);
976 
977  include_once "Modules/Course/classes/Objectives/class.ilLOTestAssignments.php";
978  $lo_ass = ilLOTestAssignments::getInstance($a_obj_id);
979 
980  $tmp = array();
981 
982  include_once "Modules/Course/classes/class.ilCourseObjective.php";
983  foreach($coll_objtv as $objective_id)
984  {
985  $title = ilCourseObjective::lookupObjectiveTitle($objective_id, true);
986 
987  $tmp[$objective_id] = array(
988  "id" => $objective_id,
989  "title" => $title["title"],
990  "desc" => $title["description"],
991  "itest" => $lo_ass->getTestByObjective($objective_id, ilLOSettings::TYPE_TEST_INITIAL),
992  "qtest" => $lo_ass->getTestByObjective($objective_id, ilLOSettings::TYPE_TEST_QUALIFIED)
993  );
994 
995  if(array_key_exists($objective_id, $lo_results))
996  {
997  $lo_result = $lo_results[$objective_id];
998  $tmp[$objective_id]["user_id"] = $lo_result["user_id"];
999  $tmp[$objective_id]["result_perc"] = $lo_result["result_perc"];
1000  $tmp[$objective_id]["limit_perc"] = $lo_result["limit_perc"];
1001  $tmp[$objective_id]["status"] = $lo_result["status"];
1002  $tmp[$objective_id]["type"] = $lo_result["type"];
1003  $tmp[$objective_id]["initial"] = $lo_result["initial"];
1004  }
1005  }
1006 
1007  // order
1008  foreach($coll_objtv as $objtv_id)
1009  {
1010  $res[] = $tmp[$objtv_id];
1011  }
1012  }
1013 
1014  return $res;
1015  }
static getInstance($a_container_id)
Get instance by container id.
static lookupObjectiveTitle($a_objective_id, $a_add_description=false)
parseLOUserResults($a_course_obj_id, $a_user_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ postOutputProcessing()

ilPortfolioPageGUI::postOutputProcessing (   $a_output)

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

References renderPageElement().

193  {
194  $parts = array(
195  "Profile" => array("0-9", "a-z", "0-9a-z_;\W"), // user, mode, fields
196  "Verification" => array("0-9", "a-z", "0-9"), // user, type, id
197  "Blog" => array("0-9", "0-9", "0-9;\W"), // user, blog id, posting ids
198  "BlogTeaser" => array("0-9", "0-9", "0-9;\W"), // user, blog id, posting ids
199  "Skills" => array("0-9", "0-9"), // user, skill id
200  "SkillsTeaser" => array("0-9", "0-9"), // user, skill id
201  "ConsultationHours" => array("0-9", "a-z", "0-9;\W"), // user, mode, group ids
202  "ConsultationHoursTeaser" => array("0-9", "a-z", "0-9;\W"), // user, mode, group ids
203  "MyCourses" => array("0-9", "a-z*"), // user, sort
204  "MyCoursesTeaser" => array("0-9", "a-z*") // user, sort
205  );
206 
207  foreach($parts as $type => $def)
208  {
209  // #15732 - allow optional parts
210  $def_parts = array();
211  foreach($def as $part)
212  {
213  $is_opt = (substr($part, -1) == "*");
214  if(!$is_opt)
215  {
216  $def_parts[] = "#";
217  $end_marker = "+";
218  }
219  else
220  {
221  $def_parts[] = "#*";
222  $end_marker = "*";
223  $part = substr($part, 0, -1);
224  }
225  $def_parts[] = "([".$part."]".$end_marker.")";
226  }
227  $def = implode("", $def_parts);
228 
229  if(preg_match_all(
230  "/".$this->pl_start.$type.$def.$this->pl_end."/",
231  $a_output, $blocks))
232  {
233  foreach($blocks[0] as $idx => $block)
234  {
235  switch($type)
236  {
237  case "Profile":
238  case "Blog":
239  case "BlogTeaser":
240  case "Skills":
241  case "SkillsTeaser":
242  case "ConsultationHours":
243  case "ConsultationHoursTeaser":
244  case "MyCourses":
245  case "MyCoursesTeaser":
246  $subs = null;
247  if(trim($blocks[3][$idx]))
248  {
249  foreach(explode(";", $blocks[3][$idx]) as $sub)
250  {
251  if(trim($sub))
252  {
253  $subs[] = trim($sub);
254  }
255  }
256  }
257  $snippet = $this->{"render".$type}($blocks[1][$idx],
258  $blocks[2][$idx], $subs);
259  break;
260 
261  default:
262  $snippet = $this->{"render".$type}($blocks[1][$idx],
263  $blocks[2][$idx], $blocks[3][$idx]);
264  break;
265  }
266 
267  $snippet = $this->renderPageElement($type, $snippet);
268  $a_output = str_replace($block, $snippet, $a_output);
269  }
270  }
271  }
272 
273  return $a_output;
274  }
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 416 of file class.ilPortfolioPageGUI.php.

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

Referenced by showPage().

417  {
418  global $ilCtrl;
419 
420  // not used
421  // $user_id = $this->getPageContentUserId($a_user_id);
422 
423  // full blog (separate tab/page)
424  if(!$a_posting_ids)
425  {
426  include_once "Modules/Blog/classes/class.ilObjBlogGUI.php";
427  $blog = new ilObjBlogGUI($a_blog_id, ilObject2GUI::WORKSPACE_OBJECT_ID);
428  $blog->disableNotes(!$this->enable_comments);
429  $blog->setContentStyleSheet();
430 
431  if($this->getOutputMode() != "offline")
432  {
433  return $ilCtrl->getHTML($blog);
434  }
435  else
436  {
437 
438  }
439  }
440  // embedded postings
441  else
442  {
443  $html = array();
444 
445  include_once "Modules/Blog/classes/class.ilObjBlog.php";
446  $html[] = ilObjBlog::_lookupTitle($a_blog_id);
447 
448  include_once "Modules/Blog/classes/class.ilBlogPostingGUI.php";
449  foreach($a_posting_ids as $post)
450  {
451  $page = new ilBlogPostingGUI(0, null, $post);
452  if($this->getOutputMode() != "offline")
453  {
454  $page->setOutputMode(IL_PAGE_PREVIEW);
455  }
456  else
457  {
458  $page->setOutputMode("offline");
459  }
460  $html[] = $page->showPage();
461  }
462 
463  return implode("\n", $html);
464  }
465  }
const IL_PAGE_PREVIEW
static _lookupTitle($a_id)
Class ilBlogPosting GUI class.
global $ilCtrl
Definition: ilias.php:18
Class ilObjBlogGUI.
$html
Definition: example_001.php:87
+ 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 467 of file class.ilPortfolioPageGUI.php.

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

468  {
469  // not used
470  // $user_id = $this->getPageContentUserId($a_user_id);
471 
472  $postings = "";
473  if($a_posting_ids)
474  {
475  $postings = array("<ul>");
476  include_once "Modules/Blog/classes/class.ilBlogPosting.php";
477  foreach($a_posting_ids as $post)
478  {
479  $post = new ilBlogPosting($post);
480  $postings[] = "<li>".$post->getTitle()." - ".
481  ilDatePresentation::formatDate($post->getCreated())."</li>";
482  }
483  $postings[] = "</ul>";
484  $postings = implode("\n", $postings);
485  }
486 
487  return $this->renderTeaser("blog", $this->lng->txt("obj_blog").' "'.
488  ilObject::_lookupTitle($a_blog_id).'"', $postings);
489  }
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 559 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().

560  {
561  global $ilUser;
562 
563  if($this->getOutputMode() == "preview")
564  {
565  return $this->renderConsultationHoursTeaser($a_user_id, $a_mode, $a_group_ids);
566  }
567 
568  if($this->getOutputMode() == "offline")
569  {
570  return;
571  }
572 
573  $user_id = $this->getPageContentUserId($a_user_id);
574 
575  // only if not owner
576  if($ilUser->getId() != $user_id)
577  {
578  $_GET["bkid"] = $user_id;
579  }
580 
581  if($a_mode != "manual")
582  {
583  $a_group_ids = null;
584  }
585 
586  include_once('./Services/Calendar/classes/class.ilCalendarCategories.php');
587  ilCalendarCategories::_getInstance()->setCHUserId($user_id);
589 
590  if(!$_REQUEST["seed"])
591  {
592  $seed = new ilDate(time(), IL_CAL_UNIX);
593  }
594  else
595  {
596  $seed = new ilDate($_REQUEST["seed"], IL_CAL_DATE);
597  }
598 
599  include_once('./Services/Calendar/classes/class.ilCalendarMonthGUI.php');
600  $month_gui = new ilCalendarMonthGUI($seed);
601 
602  // custom schedule filter: handle booking group ids
603  include_once('./Services/Calendar/classes/class.ilCalendarScheduleFilterBookings.php');
604  $filter = new ilCalendarScheduleFilterBookings($user_id, $a_group_ids);
605  $month_gui->addScheduleFilter($filter);
606 
607  $this->tpl->addCss(ilUtil::getStyleSheetLocation('filesystem','delos.css','Services/Calendar'));
608 
609  $this->lng->loadLanguageModule("dateplaner");
610  return '<h3>'.$this->lng->txt("app_consultation_hours").'</h3>'.
611  $this->ctrl->getHTML($month_gui);
612  }
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 531 of file class.ilPortfolioPageGUI.php.

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

Referenced by renderConsultationHours().

532  {
533  // not used
534  // $user_id = $this->getPageContentUserId($a_user_id);
535 
536  if($a_mode == "auto")
537  {
538  $mode = $this->lng->txt("cont_cach_mode_automatic");
539  $groups = null;
540  }
541  else
542  {
543  $mode = $this->lng->txt("cont_cach_mode_manual");
544 
545  include_once "Services/Calendar/classes/ConsultationHours/class.ilConsultationHourGroups.php";
546  $groups = array();
547  foreach($a_group_ids as $grp_id)
548  {
549  $groups[] = ilConsultationHourGroups::lookupTitle($grp_id);
550  }
551  $groups = " (".implode(", ", $groups).")";
552  }
553 
554  $this->lng->loadLanguageModule("dateplaner");
555  return $this->renderTeaser("consultation_hours",
556  $this->lng->txt("app_consultation_hours"), $mode.$groups);
557  }
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:

◆ renderMyCourses()

ilPortfolioPageGUI::renderMyCourses (   $a_user_id,
  $a_default_sorting 
)
protected

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

References $_POST, $data, $GLOBALS, $ilCtrl, $ilUser, $options, $params, ilPageObjectGUI\$tpl, $url, ilLearningProgressBaseGUI\_getImagePathForStatus(), ilLink\_getLink(), ilLearningProgressBaseGUI\_getStatusText(), ilContainerObjectiveGUI\buildObjectiveProgressBar(), ilUtil\formSelect(), getCoursesOfUser(), ilLOSettings\getInstanceByObjId(), ilPageObjectGUI\getOutputMode(), getPageContentUserId(), ilUtil\getTypeIconPath(), isMyCoursesActive(), renderMyCoursesTeaser(), and ilUtil\sortArray().

634  {
635  global $ilAccess, $ilUser, $ilCtrl;
636 
637  if($this->getOutputMode() == "preview")
638  {
639  return $this->renderMyCoursesTeaser($a_user_id, $a_default_sorting);
640  }
641 
642  if(!$this->isMyCoursesActive())
643  {
644  return;
645  }
646 
647  $img_path = null;
648  if($this->getOutputMode() == "offline")
649  {
650  $this->export_material["images"][] = "./templates/default/images/icon_crs.svg";
651  $this->export_material["images"][] = "./templates/default/images/icon_lobj.svg";
652  $this->export_material["images"][] = "./templates/default/images/scorm/complete.svg";
653  $this->export_material["images"][] = "./templates/default/images/scorm/not_attempted.svg";
654  $this->export_material["images"][] = "./templates/default/images/scorm/failed.svg";
655  $this->export_material["images"][] = "./templates/default/images/scorm/incomplete.svg";
656 
657  $img_path = "images/";
658  }
659 
660  $user_id = $this->getPageContentUserId($a_user_id);
661 
662  // sorting pref
663  if($_POST["srt"] &&
664  in_array($_POST["srt"], array("alpha", "loc")))
665  {
666  $ilUser->writePref("prtf_mcrs_sort", $_POST["srt"]);
667  }
668  $sorting = $ilUser->getPref("prtf_mcrs_sort");
669  if(!$sorting)
670  {
671  $sorting = $a_default_sorting;
672  }
673 
674  $data = $this->getCoursesOfUser($user_id, ($sorting == "loc"));
675  if(sizeof($data))
676  {
677  if($sorting != "loc")
678  {
679  $data = ilUtil::sortArray($data, "title", "ASC");
680  }
681  else
682  {
683  $data = ilUtil::sortArray($data, "path_sort", "ASC");
684  }
685 
686  $tpl = new ilTemplate("tpl.pc_my_courses.html", true, true, "Modules/Portfolio");
687  $tpl->setVariable("TITLE", $this->lng->txt("prtf_page_element_my_courses_title"));
688  $tpl->setVariable("INFO", $this->lng->txt("prtf_page_element_my_courses_info")); // #14464
689 
690  include_once("./Services/Tracking/classes/class.ilLearningProgressBaseGUI.php");
691  $this->lng->loadLanguageModule("trac");
692  $this->lng->loadLanguageModule("crs");
693 
694  include_once("./Services/Container/classes/class.ilContainerObjectiveGUI.php");
695  include_once("./Services/Link/classes/class.ilLink.php");
696 
697  // sorting
698  $options = array(
699  "alpha" => $this->lng->txt("cont_mycourses_sortorder_alphabetical"),
700  "loc" => $this->lng->txt("cont_mycourses_sortorder_location")
701  );
702  $tpl->setVariable("SORT_SELECT", ilUtil::formSelect($sorting, "srt", $options, false, true, 0, "",
703  array("onchange"=>"form.submit()")));
704  $tpl->setVariable("SORT_FORM", $ilCtrl->getFormActionByClass("ilobjportfoliogui", "preview"));
705 
706  $old_path = null;
707 
708  foreach($data as $course)
709  {
710  if($sorting == "loc")
711  {
712  if($course["path"] != $old_path)
713  {
714  $tpl->setCurrentBlock("path_bl");
715  $tpl->setVariable("PATH", $course["path"]);
716  $tpl->parseCurrentBlock();
717 
718  $old_path = $course["path"];
719  }
720  }
721 
722  if(isset($course["lp_status"]))
723  {
724  $lp_icon = ilLearningProgressBaseGUI::_getImagePathForStatus($course["lp_status"]);
725  $lp_alt = ilLearningProgressBaseGUI::_getStatusText($course["lp_status"]);
726 
727  if($img_path)
728  {
729  $lp_icon = $img_path.basename($lp_icon);
730  }
731 
732  $tpl->setCurrentBlock("lp_bl");
733  $tpl->setVariable("LP_ICON_URL", $lp_icon);
734  $tpl->setVariable("LP_ICON_ALT", $lp_alt);
735  $tpl->parseCurrentBlock();
736  }
737 
738  $do_links = false;
739  if($ilUser->getId() != ANONYMOUS_USER_ID)
740  {
741  $do_links = $ilAccess->checkAccessOfUser($ilUser->getId(), "read", "", $course["ref_id"], "crs") ||
742  ($ilAccess->checkAccessOfUser($ilUser->getId(), "visible", "", $course["ref_id"], "crs") &&
743  $ilAccess->checkAccessOfUser($ilUser->getId(), "join", "", $course["ref_id"], "crs"));
744  }
745 
746  if(isset($course["objectives"]))
747  {
748  include_once './Modules/Course/classes/Objectives/class.ilLOSettings.php';
749  $loc_settings = ilLOSettings::getInstanceByObjId($course["obj_id"]);
750  $has_initial_test = (bool)$loc_settings->getInitialTest();
751 
752  foreach($course["objectives"] as $objtv)
753  {
754  if($do_links)
755  {
756  $params = array("oobj"=>$objtv["id"]);
757  $url = ilLink::_getLink($course["ref_id"], "crs", $params);
758 
759  // #15510
760  $url .= "#objtv_acc_".$objtv["id"];
761 
762  $tpl->setCurrentBlock("objective_link_bl");
763 
764  if(trim($objtv["desc"]))
765  {
766  $desc = nl2br($objtv["desc"]);
767  $tt_id = "objtvtt_".$objtv["id"]."_".((int)self::$initialized);
768 
769  include_once "Services/UIComponent/Tooltip/classes/class.ilTooltipGUI.php";
770  ilToolTipGUI::addTooltip($tt_id, $desc, "", "bottom center", "top center", false);
771 
772  $tpl->setVariable("OBJECTIVE_LINK_ID", $tt_id);
773  }
774 
775  $tpl->setVariable("OBJECTIVE_LINK_URL", $url);
776  $tpl->setVariable("OBJECTIVE_LINK_TITLE", $objtv["title"]);
777  $tpl->parseCurrentBlock();
778  }
779  else
780  {
781  $tpl->setCurrentBlock("objective_nolink_bl");
782  $tpl->setVariable("OBJECTIVE_NOLINK_TITLE", $objtv["title"]);
783  $tpl->parseCurrentBlock();
784  }
785 
786  $objtv_icon = ilUtil::getTypeIconPath("lobj", $objtv["id"]);
787  if($img_path)
788  {
789  $objtv_icon = $img_path.basename($objtv_icon);
790  }
791 
792  $tpl->setCurrentBlock("objective_bl");
793  $tpl->setVariable("OBJTV_ICON_URL", $objtv_icon);
794  $tpl->setVariable("OBJTV_ICON_ALT", $this->lng->txt("crs_objectives"));
795 
796  if($objtv["type"])
797  {
798  $tpl->setVariable("LP_OBJTV_PROGRESS",
799  ilContainerObjectiveGUI::buildObjectiveProgressBar($has_initial_test, $objtv["id"], $objtv, true, false, (int)self::$initialized));
800  }
801 
802  $tpl->parseCurrentBlock();
803  }
804 
805  $tpl->setCurrentBlock("objectives_bl");
806  $tpl->setVariable("OBJTV_LIST_CRS_ID", $course["obj_id"]);
807  $tpl->parseCurrentBlock();
808  }
809 
810  // always check against current user
811  if($do_links)
812  {
813  $tpl->setCurrentBlock("course_link_bl");
814  $tpl->setVariable("COURSE_LINK_TITLE", $course["title"]);
815  $tpl->setVariable("COURSE_LINK_URL", ilLink::_getLink($course["ref_id"]));
816  $tpl->parseCurrentBlock();
817  }
818  else
819  {
820  $tpl->setCurrentBlock("course_nolink_bl");
821  $tpl->setVariable("COURSE_NOLINK_TITLE", $course["title"]);
822  $tpl->parseCurrentBlock();
823  }
824 
825  $crs_icon = ilUtil::getTypeIconPath("crs", $course["obj_id"]);
826  if($img_path)
827  {
828  $crs_icon = $img_path.basename($crs_icon);
829  }
830 
831  $tpl->setCurrentBlock("course_bl");
832 
833  if(isset($course["objectives"]))
834  {
835  $tpl->setVariable("TOGGLE_CLASS", "ilPCMyCoursesToggle");
836  }
837  else
838  {
839  $tpl->setVariable("NO_TOGGLE", ' style="visibility:hidden;"');
840  }
841 
842  $tpl->setVariable("CRS_ICON_URL", $crs_icon);
843  $tpl->setVariable("CRS_ICON_ALT", $this->lng->txt("obj_crs"));
844  $tpl->parseCurrentBlock();
845  }
846 
847  // #15508
848  if(!self::$initialized)
849  {
850  $GLOBALS["tpl"]->addJavaScript("Modules/Portfolio/js/ilPortfolio.js");
851  $GLOBALS["tpl"]->addOnLoadCode("ilPortfolio.init()");
852  }
853  self::$initialized++;
854 
855  return $tpl->get();
856  }
857  }
getCoursesOfUser($a_user_id, $a_add_path=false)
static getInstanceByObjId($a_obj_id)
get singleton instance
$_POST['username']
Definition: cron.php:12
_getImagePathForStatus($a_status)
Get image path for status.
$url
Definition: shib_logout.php:72
static getTypeIconPath($a_type, $a_obj_id, $a_size='small')
Get type icon path path Return image path for icon_xxx.pngs Or (if enabled) path to custom icon Depre...
static sortArray($array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
global $ilCtrl
Definition: ilias.php:18
$data
if(!is_array($argv)) $options
static formSelect($selected, $varname, $options, $multiple=false, $direct_text=false, $size="0", $style_class="", $attribs="", $disabled=false)
Builds a select form field with options and shows the selected option first.
_getStatusText($a_status, $a_lng=null)
Get status alt text.
special template class to simplify handling of ITX/PEAR
static buildObjectiveProgressBar($a_has_initial_test, $a_objective_id, array $a_lo_result, $a_list_mode=false, $a_sub=false, $a_tt_suffix=null)
Render progressbar(s) for given objective and result data.
renderMyCoursesTeaser($a_user_id, $a_default_sorting)
global $ilUser
Definition: imgupload.php:15
$GLOBALS['PHPCAS_CLIENT']
This global variable is used by the interface class phpCAS.
Definition: CAS.php:276
$params
Definition: example_049.php:96
+ Here is the call graph for this function:

◆ renderMyCoursesTeaser()

ilPortfolioPageGUI::renderMyCoursesTeaser (   $a_user_id,
  $a_default_sorting 
)
protected

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

References isMyCoursesActive(), and renderTeaser().

Referenced by renderMyCourses().

621  {
622  // not used
623  // $user_id = $this->getPageContentUserId($a_user_id);
624 
625  $title = $this->isMyCoursesActive()
626  ? "my_courses"
627  : "my_courses_inactive";
628 
629  return $this->renderTeaser($title,
630  $this->lng->txt("prtf_page_element_my_courses_title"));
631  }
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 276 of file class.ilPortfolioPageGUI.php.

Referenced by postOutputProcessing().

277  {
278  return trim($a_html);
279  }
+ Here is the caller graph for this function:

◆ renderProfile()

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

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

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

296  {
297  global $ilCtrl;
298 
299  $user_id = $this->getPageContentUserId($a_user_id);
300 
301  if($this->getOutputMode() == "offline")
302  {
303  // profile picture is done in ilPortfolioHTMLExport
304 
305  $this->export_material["js"][] = "http://maps.google.com/maps/api/js?sensor=false";
306  $this->export_material["js"][] = "./Services/Maps/js/ServiceGoogleMaps.js";
307  $this->export_material["js"][] = "./Services/Maps/js/OpenLayers.js";
308  $this->export_material["js"][] = "./Services/Maps/js/ServiceOpenLayers.js";
309  }
310 
311  include_once("./Services/User/classes/class.ilPublicUserProfileGUI.php");
312  $pub_profile = new ilPublicUserProfileGUI($user_id);
313  $pub_profile->setEmbedded(true, ($this->getOutputMode() == "offline"));
314 
315  // full circle: additional was set in the original public user profile call
316  $pub_profile->setAdditional($this->getAdditional());
317 
318  if($a_type == "manual" && sizeof($a_fields))
319  {
320  $prefs = array();
321  foreach($a_fields as $field)
322  {
323  $field = trim($field);
324  if($field)
325  {
326  $prefs["public_".$field] = "y";
327  }
328  }
329 
330  $pub_profile->setCustomPrefs($prefs);
331  }
332 
333  if($this->getOutputMode() != "offline")
334  {
335  return $ilCtrl->getHTML($pub_profile);
336  }
337  else
338  {
339  return $pub_profile->getEmbeddable();
340  }
341  }
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 491 of file class.ilPortfolioPageGUI.php.

References $html, $js, ilPageObjectGUI\getOutputMode(), getPageContentUserId(), and renderSkillsTeaser().

492  {
493  if($this->getOutputMode() == "preview")
494  {
495  return $this->renderSkillsTeaser($a_user_id, $a_skills_id);
496  }
497 
498  $user_id = $this->getPageContentUserId($a_user_id);
499 
500  include_once "Services/Skill/classes/class.ilPersonalSkillsGUI.php";
501  $gui = new ilPersonalSkillsGUI();
502  if($this->getOutputMode() == "offline")
503  {
504  $gui->setOfflineMode("./files/");
505  }
506  $html = $gui->getSkillHTML($a_skills_id, $user_id);
507 
508  if($this->getOutputMode() == "offline")
509  {
510  $js = $gui->getTooltipsJs();
511  if(sizeof($js))
512  {
513  $this->js_onload_code = array_merge($this->js_onload_code, $js);
514  }
515  }
516 
517  return $html;
518  }
$js
Personal skills GUI class.
renderSkillsTeaser($a_user_id, $a_skills_id)
$html
Definition: example_001.php:87
+ Here is the call graph for this function:

◆ renderSkillsTeaser()

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

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

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

Referenced by renderSkills().

521  {
522  // not used
523  // $user_id = $this->getPageContentUserId($a_user_id);
524 
525  include_once "Services/Skill/classes/class.ilSkillTreeNode.php";
526 
527  return $this->renderTeaser("skills", $this->lng->txt("skills").' "'.
528  ilSkillTreeNode::_lookupTitle($a_skills_id).'"');
529  }
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 281 of file class.ilPortfolioPageGUI.php.

References $options.

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

282  {
283  $options = "";
284  if($a_options)
285  {
286  $options = '<div class="il_Footer">'.$this->lng->txt("prtf_page_element_teaser_settings").
287  ": ".$a_options.'</div>';
288  }
289 
290  return '<div style="margin:5px" class="ilBox"><h3>'.$a_title.'</h3>'.
291  '<div class="il_Description_no_margin">'.$this->lng->txt("prtf_page_element_teaser_".$a_type).'</div>'.
292  $options.'</div>';
293  }
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 343 of file class.ilPortfolioPageGUI.php.

References $file, $url, ilPageObjectGUI\getOutputMode(), and ilObject2GUI\WORKSPACE_OBJECT_ID.

344  {
345  global $objDefinition;
346 
347  // not used
348  // $user_id = $this->getPageContentUserId($a_user_id);
349 
350  $class = "ilObj".$objDefinition->getClassName($a_type)."GUI";
351  include_once $objDefinition->getLocation($a_type)."/class.".$class.".php";
352  $verification = new $class($a_id, ilObject2GUI::WORKSPACE_OBJECT_ID);
353 
354  if($this->getOutputMode() != "offline")
355  {
356  // direct download link
357  $this->ctrl->setParameter($this, "dlid", $a_id);
358  $url = $this->ctrl->getLinkTarget($this, "dl".$a_type);
359  $this->ctrl->setParameter($this, "dlid", "");
360  }
361  else
362  {
363  $file = $verification->object->getFilePath();
364  $url = "files/".basename($file);
365 
366  $this->export_material["files"][] = $file;
367  }
368 
369  return $verification->render(true, $url);
370  }
print $file
$url
Definition: shib_logout.php:72
+ Here is the call graph for this function:

◆ setAdditional()

ilPortfolioPageGUI::setAdditional (   $a_additional)

Set Additonal Information.

Parameters
array$a_additionalAdditonal Information

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

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

173  {
174  $this->additional = $a_additional;
175  }
+ 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 162 of file class.ilPortfolioPageGUI.php.

163  {
164  $this->embedded = (bool)$a_value;
165  }

◆ showPage()

ilPortfolioPageGUI::showPage ( )

Show page.

Returns
string page output

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

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

121  {
122  global $ilUser;
123 
124  if(!$this->getPageObject())
125  {
126  return;
127  }
128 
129  switch($this->getPageObject()->getType())
130  {
132  return $this->renderBlog($ilUser->getId(), (int)$this->getPageObject()->getTitle());
133 
134  default:
135  $this->setTemplateOutput(false);
136  // $this->setPresentationTitle($this->getPageObject()->getTitle());
137  $output = parent::showPage();
138 
139  return $output;
140  }
141  }
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().

◆ $export_material

ilPortfolioPageGUI::$export_material = array("js"=>array(), "images"=>array(), "files"=>array())
protected

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

Referenced by getExportMaterial().

◆ $initialized

ilPortfolioPageGUI::$initialized = 0
staticprotected

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

◆ $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: