ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 ()
 Get parent type. More...
 
 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)
 Finalizing output processing. More...
 
 getExportMaterial ()
 
- Public Member Functions inherited from ilPageObjectGUI
 __construct ($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)
 Set sourcecode download script. More...
 
 getSourcecodeDownloadScript ()
 Get sourcecode download script. More...
 
 enableCitation ($a_enabled)
 
 isEnabledCitation ()
 
 setLocator (&$a_locator)
 
 setTabs ($a_tabs)
 
 setPageBackTitle ($a_title)
 
 setFileDownloadLink ($a_download_link)
 Set file download link. More...
 
 getFileDownloadLink ()
 Get file download link. More...
 
 setFullscreenLink ($a_fullscreen_link)
 Set fullscreen link. More...
 
 getFullscreenLink ()
 Get fullscreen link. More...
 
 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...
 
 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)
 
 getCourseSortAction ($ctrl)
 Get course sort action. More...
 
 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

Portfolio page gui class.

Author
Jörg Lützenkirchen luetz.nosp@m.enki.nosp@m.rchen.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

@ilCtrl_Calls ilPortfolioPageGUI: ilPageEditorGUI, ilEditClipboardGUI, ilMediaPoolTargetSelector @ilCtrl_Calls ilPortfolioPageGUI: ilPageObjectGUI, ilObjBlogGUI, ilBlogPostingGUI @ilCtrl_Calls ilPortfolioPageGUI: ilCalendarMonthGUI, ilConsultationHoursGUI

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

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.

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/Content/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 }
static getSyntaxStylePath()
get syntax style path
static getContentStylePath($a_style_id)
get content style path
getPageObject()
Get Page Object.
getParentType()
Get parent type.

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

+ Here is the call graph for this function:

Member Function Documentation

◆ dlcrsv()

ilPortfolioPageGUI::dlcrsv ( )
protected

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

396 {
397 $id = $_GET["dlid"];
398 if($id)
399 {
400 include_once "Modules/Course/classes/Verification/class.ilObjCourseVerificationGUI.php";
402 $verification->downloadFromPortfolioPage($this->getPageObject());
403 }
404 }
$_GET["client_id"]
GUI class for course verification.

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

+ Here is the call graph for this function:

◆ dlexcv()

ilPortfolioPageGUI::dlexcv ( )
protected

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

385 {
386 $id = $_GET["dlid"];
387 if($id)
388 {
389 include_once "Modules/Exercise/classes/class.ilObjExerciseVerificationGUI.php";
391 $verification->downloadFromPortfolioPage($this->getPageObject());
392 }
393 }
GUI class for exercise verification.

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

+ Here is the call graph for this function:

◆ dlscov()

ilPortfolioPageGUI::dlscov ( )
protected

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

407 {
408 $id = $_GET["dlid"];
409 if($id)
410 {
411 include_once "Modules/ScormAicc/classes/Verification/class.ilObjSCORMVerificationGUI.php";
413 $verification->downloadFromPortfolioPage($this->getPageObject());
414 }
415 }
GUI class for scorm verification.

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

+ Here is the call graph for this function:

◆ dltstv()

ilPortfolioPageGUI::dltstv ( )
protected

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

374 {
375 $id = $_GET["dlid"];
376 if($id)
377 {
378 include_once "Modules/Test/classes/class.ilObjTestVerificationGUI.php";
380 $verification->downloadFromPortfolioPage($this->getPageObject());
381 }
382 }
GUI class for test verification.

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

+ Here is the call graph for this function:

◆ executeCommand()

ilPortfolioPageGUI::executeCommand ( )

execute command

Reimplemented from ilPageObjectGUI.

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

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 $blog_gui->prtf_embed = true; // disables prepareOutput()/getStandardTemplate() in blog
89 return $ilCtrl->forwardCommand($blog_gui);
90
91 case "ilcalendarmonthgui":
92 // booking action
93 if($cmd && $cmd != "preview")
94 {
95 include_once('./Services/Calendar/classes/class.ilCalendarMonthGUI.php');
96 $month_gui = new ilCalendarMonthGUI(new ilDate());
97 return $ilCtrl->forwardCommand($month_gui);
98 }
99 // calendar month navigation
100 else
101 {
102 $ilCtrl->setParameter($this, "cmd", "preview");
104 }
105
106 case "ilpageobjectgui":
107 die("Deprecated. ilPortfolioPage gui forwarding to ilpageobject");
108 return;
109
110 default:
111 $this->setPresentationTitle($this->getPageObject()->getTitle());
112 return parent::executeCommand();
113 }
114 }
Class for single dates.
Class ilObjBlogGUI.
setPresentationTitle($a_title="")
Tree handler for personal workspace.
global $ilCtrl
Definition: ilias.php:18
$cmd
Definition: sahs_server.php:35
$ilUser
Definition: imgupload.php:18

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

+ Here is the call graph for this function:

◆ getAdditional()

ilPortfolioPageGUI::getAdditional ( )

Get Additonal Information.

Returns
array Additonal Information

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

References $additional.

Referenced by renderProfile().

+ Here is the caller graph for this function:

◆ getCoursesOfUser()

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

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

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

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCourseSortAction()

ilPortfolioPageGUI::getCourseSortAction (   $ctrl)
protected

Get course sort action.

Parameters
ilCtrl$ctrl
Returns
string

Reimplemented in ilPortfolioTemplatePageGUI.

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

868 {
869 return $ctrl->getFormActionByClass("ilobjportfoliogui", "preview");
870 }

References ilPageObjectGUI\$ctrl.

Referenced by renderMyCourses().

+ Here is the caller graph for this function:

◆ getExportMaterial()

ilPortfolioPageGUI::getExportMaterial ( )

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

References $export_material.

◆ getJsOnloadCode()

ilPortfolioPageGUI::getJsOnloadCode ( )

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

References $js_onload_code.

◆ getPageContentUserId()

ilPortfolioPageGUI::getPageContentUserId (   $a_user_id)
protected

Reimplemented in ilPortfolioTemplatePageGUI.

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

61 {
62 // user id from content-xml
63 return $a_user_id;
64 }

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

+ Here is the caller graph for this function:

◆ getParentType()

ilPortfolioPageGUI::getParentType ( )

Get parent type.

Returns
string parent type

Reimplemented from ilPageObjectGUI.

Reimplemented in ilPortfolioTemplatePageGUI.

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

56 {
57 return "prtf";
58 }

Referenced by __construct().

+ Here is the caller graph for this function:

◆ getTabs()

ilPortfolioPageGUI::getTabs (   $a_activate = "")

Set all tabs.

Parameters

return

Reimplemented from ilPageObjectGUI.

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

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

◆ isMyCoursesActive()

ilPortfolioPageGUI::isMyCoursesActive ( )
protected

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

616 {
617 $prfa_set = new ilSetting("prfa");
618 return (bool)$prfa_set->get("mycrs", true);
619 }
ILIAS Setting Class.

Referenced by renderMyCourses(), and renderMyCoursesTeaser().

+ Here is the caller graph for this function:

◆ parseLOUserResults()

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

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

1033 {
1034 $res = array();
1035
1036 include_once "Modules/Course/classes/Objectives/class.ilLOUserResults.php";
1037 $lur = new ilLOUserResults($a_course_obj_id, $a_user_id);
1038 foreach($lur->getCourseResultsForUserPresentation() as $objective_id => $types)
1039 {
1040 // show either initial or qualified for objective
1041 if(isset($types[ilLOUserResults::TYPE_INITIAL]))
1042 {
1043 $initial_status = $types[ilLOUserResults::TYPE_INITIAL]["status"];
1044 }
1045
1046 // qualified test has priority
1047 if(isset($types[ilLOUserResults::TYPE_QUALIFIED]))
1048 {
1051 $result["initial"] = $types[ilLOUserResults::TYPE_INITIAL];
1052 }
1053 else
1054 {
1057 }
1058
1059 $result["initial_status"] = $initial_status;
1060
1061 $res[$objective_id] = $result;
1062 }
1063
1064 return $res;
1065 }
$result

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

Referenced by parseObjectives().

+ Here is the caller graph for this function:

◆ parseObjectives()

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

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

978 {
979 $res = array();
980
981 // we need the collection for the correct order
982 include_once "Services/Tracking/classes/class.ilLPObjSettings.php";
983 include_once "Services/Tracking/classes/collection/class.ilLPCollectionOfObjectives.php";
985 $coll_objtv = $coll_objtv->getItems();
986 if($coll_objtv)
987 {
988 // #13373
989 $lo_results = $this->parseLOUserResults($a_obj_id, $a_user_id);
990
991 include_once "Modules/Course/classes/Objectives/class.ilLOTestAssignments.php";
992 $lo_ass = ilLOTestAssignments::getInstance($a_obj_id);
993
994 $tmp = array();
995
996 include_once "Modules/Course/classes/class.ilCourseObjective.php";
997 foreach($coll_objtv as $objective_id)
998 {
999 $title = ilCourseObjective::lookupObjectiveTitle($objective_id, true);
1000
1001 $tmp[$objective_id] = array(
1002 "id" => $objective_id,
1003 "title" => $title["title"],
1004 "desc" => $title["description"],
1005 "itest" => $lo_ass->getTestByObjective($objective_id, ilLOSettings::TYPE_TEST_INITIAL),
1006 "qtest" => $lo_ass->getTestByObjective($objective_id, ilLOSettings::TYPE_TEST_QUALIFIED)
1007 );
1008
1009 if(array_key_exists($objective_id, $lo_results))
1010 {
1011 $lo_result = $lo_results[$objective_id];
1012 $tmp[$objective_id]["user_id"] = $lo_result["user_id"];
1013 $tmp[$objective_id]["result_perc"] = $lo_result["result_perc"];
1014 $tmp[$objective_id]["limit_perc"] = $lo_result["limit_perc"];
1015 $tmp[$objective_id]["status"] = $lo_result["status"];
1016 $tmp[$objective_id]["type"] = $lo_result["type"];
1017 $tmp[$objective_id]["initial"] = $lo_result["initial"];
1018 }
1019 }
1020
1021 // order
1022 foreach($coll_objtv as $objtv_id)
1023 {
1024 $res[] = $tmp[$objtv_id];
1025 }
1026 }
1027
1028 return $res;
1029 }
static lookupObjectiveTitle($a_objective_id, $a_add_description=false)
static getInstance($a_container_id)
Get instance by container id.
parseLOUserResults($a_course_obj_id, $a_user_id)

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

Referenced by getCoursesOfUser().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ postOutputProcessing()

ilPortfolioPageGUI::postOutputProcessing (   $a_output)

Finalizing output processing.

Maybe overwritten in derived classes, e.g. in wiki module.

Reimplemented from ilPageObjectGUI.

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

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

References renderPageElement().

+ 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 417 of file class.ilPortfolioPageGUI.php.

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

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

Referenced by showPage().

+ 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 468 of file class.ilPortfolioPageGUI.php.

469 {
470 // not used
471 // $user_id = $this->getPageContentUserId($a_user_id);
472
473 $postings = "";
474 if($a_posting_ids)
475 {
476 $postings = array("<ul>");
477 include_once "Modules/Blog/classes/class.ilBlogPosting.php";
478 foreach($a_posting_ids as $post)
479 {
480 $post = new ilBlogPosting($post);
481 $postings[] = "<li>".$post->getTitle()." - ".
482 ilDatePresentation::formatDate($post->getCreated())."</li>";
483 }
484 $postings[] = "</ul>";
485 $postings = implode("\n", $postings);
486 }
487
488 return $this->renderTeaser("blog", $this->lng->txt("obj_blog").' "'.
489 ilObject::_lookupTitle($a_blog_id).'"', $postings);
490 }
Class ilBlogPosting.
static formatDate(ilDateTime $date)
Format a date @access public.
renderTeaser($a_type, $a_title, $a_options=null)

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

+ Here is the call graph for this function:

◆ renderConsultationHours()

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

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

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

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

+ Here is the call graph for this function:

◆ renderConsultationHoursTeaser()

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

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

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

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

Referenced by renderConsultationHours().

+ 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 634 of file class.ilPortfolioPageGUI.php.

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

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

+ Here is the call graph for this function:

◆ renderMyCoursesTeaser()

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

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

622 {
623 // not used
624 // $user_id = $this->getPageContentUserId($a_user_id);
625
626 $title = $this->isMyCoursesActive()
627 ? "my_courses"
628 : "my_courses_inactive";
629
630 return $this->renderTeaser($title,
631 $this->lng->txt("prtf_page_element_my_courses_title"));
632 }

References $title, isMyCoursesActive(), and renderTeaser().

Referenced by renderMyCourses().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderPageElement()

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

Reimplemented in ilPortfolioTemplatePageGUI.

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

278 {
279 return trim($a_html);
280 }

Referenced by postOutputProcessing().

+ Here is the caller graph for this function:

◆ renderProfile()

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

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

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

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

+ Here is the call graph for this function:

◆ renderSkills()

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

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

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

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

+ Here is the call graph for this function:

◆ renderSkillsTeaser()

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

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

522 {
523 // not used
524 // $user_id = $this->getPageContentUserId($a_user_id);
525
526 include_once "Services/Skill/classes/class.ilSkillTreeNode.php";
527
528 return $this->renderTeaser("skills", $this->lng->txt("skills").' "'.
529 ilSkillTreeNode::_lookupTitle($a_skills_id).'"');
530 }
static _lookupTitle($a_obj_id, $a_tref_id=0)
Lookup Title.

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

Referenced by renderSkills().

+ 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 282 of file class.ilPortfolioPageGUI.php.

283 {
284 $options = "";
285 if($a_options)
286 {
287 $options = '<div class="il_Footer">'.$this->lng->txt("prtf_page_element_teaser_settings").
288 ": ".$a_options.'</div>';
289 }
290
291 return '<div style="margin:5px" class="ilBox"><h3>'.$a_title.'</h3>'.
292 '<div class="il_Description_no_margin">'.$this->lng->txt("prtf_page_element_teaser_".$a_type).'</div>'.
293 $options.'</div>';
294 }

References $a_type, and $options.

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

+ Here is the caller graph for this function:

◆ renderVerification()

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

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

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

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

+ Here is the call graph for this function:

◆ setAdditional()

ilPortfolioPageGUI::setAdditional (   $a_additional)

Set Additonal Information.

Parameters
array$a_additionalAdditonal Information

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

174 {
175 $this->additional = $a_additional;
176 }

◆ setEmbedded()

ilPortfolioPageGUI::setEmbedded (   $a_value)

Set embedded mode: will suppress tabs.

Parameters
bool$a_value

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

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

◆ showPage()

ilPortfolioPageGUI::showPage ( )

Show page.

Returns
string page output

Reimplemented from ilPageObjectGUI.

Reimplemented in ilPortfolioTemplatePageGUI.

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

122 {
123 global $ilUser;
124
125 if(!$this->getPageObject())
126 {
127 return;
128 }
129
130 switch($this->getPageObject()->getType())
131 {
133 return $this->renderBlog($ilUser->getId(), (int)$this->getPageObject()->getTitle());
134
135 default:
136 $this->setTemplateOutput(false);
137 // $this->setPresentationTitle($this->getPageObject()->getTitle());
138 $output = parent::showPage();
139
140 return $output;
141 }
142 }
setTemplateOutput($a_output=true)
renderBlog($a_user_id, $a_blog_id, array $a_posting_ids=null)
if(!is_dir( $entity_dir)) exit("Fatal Error ([A-Za-z0-9]+)\s+" &#(? foreach( $entity_files as $file) $output

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

+ 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

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