ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilPortfolioPageGUI Class Reference

Portfolio page gui class. More...

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

Public Member Functions

 __construct (int $a_portfolio_id, int $a_id=0, int $a_old_nr=0, bool $a_enable_comments=true)
 
 getParentType ()
 
 executeCommand ()
 execute command More...
 
 showPage ()
 display content of page More...
 
 getTabs (string $a_activate="")
 
 setEmbedded (bool $a_value)
 Set embedded mode: will suppress tabs. More...
 
 setAdditional (array $a_additional)
 Set Additonal Information. More...
 
 getAdditional ()
 Get Additonal Information. More...
 
 getJsOnloadCode ()
 
 postOutputProcessing (string $a_output)
 Finalizing output processing. More...
 
 getExportMaterial ()
 
 makePlaceHoldersClickable (string $a_html)
 
 getViewPageLink ()
 
 getViewPageText ()
 
 getPagePermaLink ()
 
 getCommentsHTMLExport ()
 
 finishEditing ()
 
- Public Member Functions inherited from ilPageObjectGUI
 __construct (string $a_parent_type, int $a_id, int $a_old_nr=0, bool $a_prevent_get_id=false, string $a_lang="", string $concrete_lang="")
 
 setTemplate (ilGlobalTemplateInterface $main_tpl)
 
 afterConstructor ()
 
 setAdvMdRecordObject (int $a_adv_ref_id, string $a_adv_type, string $a_adv_subtype="-")
 Set object, that defines the adv md records being used. More...
 
 getAdvMdRecordObject ()
 Get adv md record type. More...
 
 setParentType (string $a_val)
 
 getParentType ()
 
 setId (int $a_val)
 
 getId ()
 
 setOldNr (int $a_val)
 Set old nr (historic page) More...
 
 getOldNr ()
 
 setLanguage (string $a_val)
 
 getLanguage ()
 
 setEnablePCType (string $a_pc_type, bool $a_val)
 
 getEnablePCType (string $a_pc_type)
 
 setPageConfig (ilPageConfig $a_val)
 
 getPageConfig ()
 
 setPageObject (ilPageObject $a_pg_obj)
 
 getPageObject ()
 
 setOutputMode (string $a_mode=self::PRESENTATION)
 
 getOutputMode ()
 
 setTemplateOutput (bool $a_output=true)
 
 outputToTemplate ()
 
 setPresentationTitle (string $a_title="")
 
 getPresentationTitle ()
 
 setHeader (string $a_title="")
 
 getHeader ()
 
 setLinkParams (string $l_params="")
 
 getLinkParams ()
 
 setLinkFrame (string $l_frame="")
 
 getLinkFrame ()
 
 setPageLinker (\ILIAS\COPage\PageLinker $page_linker)
 
 getLinkXML ()
 
 setQuestionHTML (array $question_html)
 
 getQuestionHTML ()
 
 setTemplateTargetVar (string $a_variable)
 
 getTemplateTargetVar ()
 
 getTemplateOutputVar ()
 
 setSourcecodeDownloadScript (string $script_name)
 
 getSourcecodeDownloadScript ()
 
 setTabs (ilTabsGUI $a_tabs)
 
 setPageBackTitle (string $a_title)
 
 setFileDownloadLink (string $a_download_link)
 
 getFileDownloadLink ()
 
 setFullscreenLink (string $a_fullscreen_link)
 
 getFullscreenLink ()
 
 setIntLinkReturn (string $a_return)
 
 enableNotes (bool $a_enabled, int $a_parent_id)
 
 isEnabledNotes ()
 
 setOfflineDirectory (string $offdir)
 
 getOfflineDirectory ()
 
 setViewPageLink (string $a_link, string $a_target="")
 set link for "view page" button More...
 
 getViewPageLink ()
 
 getViewPageTarget ()
 
 getViewPageText ()
 
 setActivationListener (object $a_obj, string $a_meth)
 
 setEnabledNews (bool $a_enabled, int $a_news_obj_id=0, string $a_news_obj_type="")
 
 getEnabledNews ()
 
 setTabHook (object $a_object, string $a_function)
 
 setEditPreview (bool $a_editpreview)
 Set Display first Edit tab, then Preview tab, instead of Page and Edit. More...
 
 getEditPreview ()
 
 setEnabledTabs (bool $a_enabledtabs)
 
 getEnabledTabs ()
 
 setEnabledPageFocus (bool $a_enabledpagefocus)
 
 setOpenPlaceHolder (string $a_val)
 
 getOpenPlaceHolder ()
 
 getEnabledPageFocus ()
 
 setPrependingHtml (string $a_prependinghtml)
 
 getPrependingHtml ()
 
 setEnableEditing (bool $a_enableediting)
 
 getEnableEditing ()
 
 setRawPageContent (bool $a_rawpagecontent)
 Set Get raw page content only. More...
 
 getRawPageContent ()
 
 setStyleId (int $a_styleid)
 
 getStyleId ()
 
 setCompareMode (bool $a_val)
 
 getCompareMode ()
 
 setAbstractOnly (bool $a_val, string $pcid="")
 Get only abstract (first text paragraph) More...
 
 getAbstractOnly ()
 
 setRenderPageContainer (bool $a_val)
 
 getRenderPageContainer ()
 
 getDisabledText ()
 
 getEnabledHref ()
 
 setEnabledHref (bool $enable)
 
 activateMetaDataEditor (ilObject $a_rep_obj, string $a_type, int $a_sub_obj_id, ?object $a_observer_obj=null, string $a_observer_func="")
 Activate meda data editor. More...
 
 determineFileDownloadLink ()
 
 determineFullscreenLink ()
 
 determineSourcecodeDownloadScript ()
 
 getComponentPluginsXML ()
 Put information about activated plugins into XML. More...
 
 executeCommand ()
 execute command More...
 
 setQEditTabs (string $a_active)
 Set question editing tabs. More...
 
 onFeedbackEditingForwarding ()
 
 deactivatePage ()
 
 activatePage ()
 
 showPage ()
 display content of page More...
 
 replaceCurlyBrackets (string $output)
 
 getActivationCaptions ()
 Get captions for activation action menu entries. More...
 
 setEditMode ()
 Set edit mode. More...
 
 setDefaultLinkXml ()
 
 setLinkXml (string $xml)
 
 getProfileBackUrl ()
 
 setProfileBackUrl (string $url)
 
 downloadFile ()
 
 displayMediaFullscreen ()
 
 displayMedia (bool $a_fullscreen=false)
 
 download_paragraph ()
 download source code paragraph More...
 
 insertPageToc (string $a_output)
 
 insertResources (string $a_output)
 
 insertAdvTrigger (string $a_output)
 Insert adv content trigger. More...
 
 postOutputProcessing (string $a_output)
 Finalizing output processing. More...
 
 previewHistory ()
 Preview history. More...
 
 preview ()
 
 edit ()
 
 getBlockingInfoMessage ()
 
 insertJSAtPlaceholder ()
 
 presentation (string $a_mode=self::PRESENTATION)
 
 getHTML ()
 
 showMediaFullscreen (int $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 ()
 
 getMetaDataLink ()
 
 getTabs (string $a_activate="")
 
 compareVersion ()
 Compares two revisions of the page. More...
 
 replaceDiffTags (string $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 (?object $a_content_object=null, bool $a_enable_private_notes=true, bool $a_enable_public_notes=false, bool $a_enable_notes_deletion=false, ?callable $a_callback=null, bool $export=false)
 Get html for public and/or private notes. More...
 
 processAnswer ()
 Process answer. More...
 
 initialOpenedContent ()
 Initially opened content. More...
 
 initOpenedContentForm ()
 
 saveInitialOpenedContent ()
 
 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...
 
 finishEditing ()
 
 getPagePermaLink ()
 
 getAdditionalPageActions ()
 Get additional page actions. More...
 
 afterDeleteContents ()
 

Data Fields

const EMBEDDED_NO_OUTPUT = -99
 
- Data Fields inherited from ilPageObjectGUI
const PRESENTATION = "presentation"
 
const EDIT = "edit"
 
const PREVIEW = "preview"
 
const OFFLINE = "offline"
 
const PRINTING = "print"
 
string $page_back_title = ""
 
ilPageObject $obj
 
string $presentation_title = ""
 
string $target_script = ""
 
string $return_location = ""
 
string $target_var = ""
 
string $template_output_var = ""
 
bool $output2template = false
 
string $link_params = ""
 
string $sourcecode_download_script = ""
 
bool $activation = false
 
bool $activated = true
 
bool $editpreview = false
 
bool $use_meta_data = false
 
ilObject $meta_data_rep_obj = null
 
int $meta_data_sub_obj_id = 0
 
string $meta_data_type = ""
 
object $meta_data_observer_obj = null
 
string $meta_data_observer_func = ""
 
bool $link_xml_set = false
 
bool $enableediting = true
 
bool $rawpagecontent = false
 
bool $enabledcontentincludes = false
 
bool $compare_mode = false
 
ilPageConfig $page_config = null
 
bool $tabs_enabled = true
 
bool $render_page_container = false
 
string $pl_start = "{{{{{"
 
string $pl_end = "}}}}}"
 

Protected Member Functions

 getPageContentUserId (int $a_user_id)
 
 renderPageElement (string $a_type, string $a_html)
 
 renderTeaser (string $a_type, string $a_title, string $a_options="")
 
 renderProfile (int $a_user_id, string $a_type, ?array $a_fields=null)
 
 renderVerification (int $a_user_id, string $a_type, int $a_id)
 
 dltstv ()
 
 dlexcv ()
 
 dlcrsv ()
 
 dlcmxv ()
 
 dlltiv ()
 
 dlscov ()
 
 dlcrta ()
 
 renderBlogTeaser (int $a_user_id, int $a_blog_id, ?array $a_posting_ids=null)
 
 renderSkills (int $a_user_id, int $a_skills_id)
 
 renderSkillsTeaser (int $a_user_id, int $a_skills_id)
 
 renderConsultationHoursTeaser (int $a_user_id, string $a_mode, ?array $a_group_ids=null)
 
 renderConsultationHours (int $a_user_id, string $a_mode, ?array $a_group_ids=null)
 
 isMyCoursesActive ()
 
 renderMyCoursesTeaser (int $a_user_id, $a_default_sorting)
 
 renderMyCourses (int $a_user_id, string $a_default_sorting)
 
 getCourseSortAction (ilCtrl $ctrl)
 Get course sort action. More...
 
 getCoursesOfUser (int $a_user_id, bool $a_add_path=false)
 
 parseLOUserResults (int $a_course_obj_id, int $a_user_id)
 
- Protected Member Functions inherited from ilPageObjectGUI
 initPageObject ()
 Init page object. More...
 
 showEditToolbar ()
 Show edit toolbar. More...
 
 setEditorToolContext ()
 Set editor tool context. More...
 
 initEditing ()
 
 showEditLockInfo ()
 
 setBackToEditTabs ()
 
 setBackToHistoryTabs ()
 
 checkLangPageAvailable (int $id, string $lang)
 
 isPageContainerToBeRendered ()
 
 addResourcesToTemplate (ilGlobalTemplateInterface $tpl)
 Add resources to template. More...
 

Protected Attributes

bool $enable_comments
 
int $portfolio_id
 
ILIAS Portfolio StandardGUIRequest $port_request
 
bool $embedded = false
 
ilObjectDefinition $obj_definition
 
ilTree $tree
 
array $js_onload_code = array()
 
array $additional = array()
 
array $export_material = array("js" => array(), "images" => array(), "files" => array())
 
int $requested_ppage
 
ILIAS UI Factory $ui_fac
 
ILIAS UI Renderer $ui_ren
 
- Protected Attributes inherited from ilPageObjectGUI
ILIAS TestQuestionPool Questions PublicInterface $questioninfo
 
ILIAS COPage Page PageManager $pm
 
ILIAS COPage Link LinkManager $link
 
ILIAS COPage InternalGUIService $gui
 
ILIAS COPage PC PCDefinition $pc_definition
 
ILIAS COPage Xsl XslManager $xsl
 
ILIAS COPage Editor GUIService $editor_gui
 
ILIAS Notes Service $notes
 
int $requested_ref_id
 
int $requested_pg_id
 
string $requested_file_id
 
string $requested_transl
 
int $requested_old_nr
 
EditGUIRequest $request
 
EditSessionRepository $edit_repo
 
string $exp_target_script = ""
 
string $exp_id = ""
 
string $exp_frame = ""
 
string $act_meth = ""
 
object $act_obj
 
int $notes_parent_id = 0
 
ilPropertyFormGUI $form
 
int $styleid = 0
 
bool $enabledpagefocus
 
string $link_xml
 
int $old_nr = 0
 
int $id
 
string $language
 
ilGlobalTemplateInterface $tpl
 
ilLanguage $lng
 
ilCtrl $ctrl
 
ilTabsGUI $tabs_gui
 
ilAccessHandler $access
 
ilLogger $log
 
ilObjUser $user
 
ilHelpGUI $help
 
string $output_mode = ""
 
string $parent_type = ""
 
string $file_download_link = ''
 
string $fullscreen_link = ''
 
string $link_frame = ''
 
ILIAS GlobalScreen ScreenContext ContextServices $tool_context
 
ILIAS DI UIServices $ui
 
ILIAS COPage PageLinker $page_linker
 
string $abstract_pcid = ""
 
ilToolbarGUI $toolbar
 
string $open_place_holder = ""
 
int $requested_user_id = 0
 
int $requested_q_id = 0
 
int $requested_history_mode = 0
 
bool $enabled_news = false
 
int $news_obj_id = 0
 
string $news_obj_type = ""
 
array $tab_hook = null
 
string $view_page_link = ""
 
string $view_page_target = ""
 
string $offline_directory = ""
 
bool $notes_enabled = false
 
string $prependinghtml = ""
 
string $header = ""
 
string $int_link_return = ""
 
bool $enabled_href = true
 
int $adv_ref_id = null
 
string $adv_type = null
 
string $adv_subtype = null
 
string $concrete_lang = ""
 
string $profile_back_url = ""
 
ilComponentFactory $component_factory
 
ILIAS COPage Compare PageCompare $compare
 

Static Protected Attributes

static int $initialized = 0
 
static bool $calender_initialized = false
 

Private Member Functions

 createPersistentCertificateUrl (int $a_id, ilUserCertificateRepository $userCertificateRepository, string $url)
 

Additional Inherited Members

- Static Public Member Functions inherited from ilPageObjectGUI
static getTinyMenu (string $a_par_type, bool $a_int_links=false, bool $a_wiki_links=false, bool $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, ?\ILIAS\COPage\Editor\Server\UIWrapper $ui_wrapper=null)
 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 @ilCtrl_Calls ilPortfolioPageGUI: ilPageEditorGUI, ilEditClipboardGUI, ilMediaPoolTargetSelector @ilCtrl_Calls ilPortfolioPageGUI: ilPageObjectGUI, ILIAS\User\Profile\PublicProfileGUI @ilCtrl_Calls ilPortfolioPageGUI: ilCalendarMonthGUI, ilConsultationHoursGUI, ilLearningHistoryGUI

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

Constructor & Destructor Documentation

◆ __construct()

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

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

52 {
53 global $DIC;
54
55 $this->tpl = $DIC["tpl"];
56 $this->ctrl = $DIC->ctrl();
57 $this->user = $DIC->user();
58 $this->obj_definition = $DIC["objDefinition"];
59 $this->access = $DIC->access();
60 $this->tree = $DIC->repositoryTree();
61 $this->lng = $DIC->language();
62 $tpl = $DIC["tpl"];
63 $this->port_request = $DIC->portfolio()
64 ->internal()
65 ->gui()
66 ->standardRequest();
67 $this->ui_fac = $DIC->ui()->factory();
68 $this->ui_ren = $DIC->ui()->renderer();
69
70 $this->portfolio_id = $a_portfolio_id;
71 $this->enable_comments = $a_enable_comments;
72
73 parent::__construct($this->getParentType(), $a_id, $a_old_nr);
74 $this->getPageObject()->setPortfolioId($this->portfolio_id);
75
76 // content style
77
78 $tpl->setCurrentBlock("SyntaxStyle");
80 "LOCATION_SYNTAX_STYLESHEET",
82 );
84
85 $tpl->setCurrentBlock("ContentStyle");
87 "LOCATION_CONTENT_STYLESHEET",
89 );
91
92 $this->requested_ppage = $this->port_request->getPortfolioPageId();
93 }
static getContentStylePath(int $a_style_id, bool $add_random=true, bool $add_token=true)
get content style path static (to avoid full reading)
ilGlobalTemplateInterface $tpl
setVariable(string $variable, $value='')
Sets the given variable to the given value.
parseCurrentBlock(string $block_name=self::DEFAULT_BLOCK)
Parses the given block.
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
Sets the template to the given block.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

References $DIC, ilPageObjectGUI\$tpl, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\access(), ILIAS\Repository\ctrl(), ilObjStyleSheet\getContentStylePath(), ilPageObjectGUI\getPageObject(), getParentType(), ilObjStyleSheet\getSyntaxStylePath(), ILIAS\Repository\lng(), ILIAS\UICore\GlobalTemplate\parseCurrentBlock(), ILIAS\UICore\GlobalTemplate\setCurrentBlock(), ILIAS\UICore\GlobalTemplate\setVariable(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

Member Function Documentation

◆ createPersistentCertificateUrl()

ilPortfolioPageGUI::createPersistentCertificateUrl ( int  $a_id,
ilUserCertificateRepository  $userCertificateRepository,
string  $url 
)
private

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

1136 : string {
1137 try {
1138 $presentation = $userCertificateRepository->fetchActiveCertificateForPresentation($this->user->getId(), $a_id);
1139 } catch (Exception $e) {
1140 return "";
1141 }
1142 $caption = $this->lng->txt('certificate') . ': ';
1143 $caption .= $this->lng->txt($presentation->getUserCertificate()->getObjType()) . ' ';
1144 $caption .= '"' . $presentation->getObjectTitle() . '"';
1145
1146 return '<div><a href="' . $url . '">' . $caption . '</a></div>';
1147 }
fetchActiveCertificateForPresentation(int $userId, int $objectId)
$url
Definition: shib_logout.php:68

◆ dlcmxv()

ilPortfolioPageGUI::dlcmxv ( )
protected

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

439 : void
440 {
441 $id = $this->port_request->getVerificationId();
442 if ($id) {
444 $verification->downloadFromPortfolioPage($this->getPortfolioPage());
445 }
446 }

References $id, and ilObject2GUI\WORKSPACE_OBJECT_ID.

◆ dlcrsv()

ilPortfolioPageGUI::dlcrsv ( )
protected

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

430 : void
431 {
432 $id = $this->port_request->getVerificationId();
433 if ($id) {
435 $verification->downloadFromPortfolioPage($this->getPortfolioPage());
436 }
437 }
GUI class for course verification.

References $id, and ilObject2GUI\WORKSPACE_OBJECT_ID.

◆ dlcrta()

ilPortfolioPageGUI::dlcrta ( )
protected

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

466 : void
467 {
468 $objectId = $this->port_request->getVerificationId();
469 if ($objectId) {
471 $object->downloadFromPortfolioPage($this->getPortfolioPage(), $objectId, $this->user->getId());
472 }
473 }

References ILIAS\Repository\user().

+ Here is the call graph for this function:

◆ dlexcv()

ilPortfolioPageGUI::dlexcv ( )
protected

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

421 : void
422 {
423 $id = $this->port_request->getVerificationId();
424 if ($id) {
426 $verification->downloadFromPortfolioPage($this->getPortfolioPage());
427 }
428 }
GUI class for exercise verification.

References $id, and ilObject2GUI\WORKSPACE_OBJECT_ID.

◆ dlltiv()

ilPortfolioPageGUI::dlltiv ( )
protected

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

448 : void
449 {
450 $id = $this->port_request->getVerificationId();
451 if ($id) {
453 $verification->downloadFromPortfolioPage($this->getPortfolioPage());
454 }
455 }

References $id, and ilObject2GUI\WORKSPACE_OBJECT_ID.

◆ dlscov()

ilPortfolioPageGUI::dlscov ( )
protected

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

457 : void
458 {
459 $id = $this->port_request->getVerificationId();
460 if ($id) {
462 $verification->downloadFromPortfolioPage($this->getPortfolioPage());
463 }
464 }
GUI class for scorm verification.

References $id, and ilObject2GUI\WORKSPACE_OBJECT_ID.

◆ dltstv()

ilPortfolioPageGUI::dltstv ( )
protected

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

412 : void
413 {
414 $id = $this->port_request->getVerificationId();
415 if ($id) {
417 $verification->downloadFromPortfolioPage($this->getPortfolioPage());
418 }
419 }
GUI class for test verification.

References $id, and ilObject2GUI\WORKSPACE_OBJECT_ID.

◆ executeCommand()

ilPortfolioPageGUI::executeCommand ( )

execute command

Reimplemented from ilPageObjectGUI.

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

113 : string
114 {
115 $ilCtrl = $this->ctrl;
116 $ilUser = $this->user;
117
118 $next_class = $this->ctrl->getNextClass($this);
119 $cmd = $this->ctrl->getCmd();
120
121 switch ($next_class) {
122 case "ilcalendarmonthgui":
123 $this->ctrl->saveParameter($this, "chuid");
124 // booking action
125 if ($cmd && $cmd !== "preview") {
127 if ($categories->getMode() === 0) {
128 $chuid = $this->port_request->getConsultationHourUserId();
129 if ($chuid > 0) {
130 $categories->setCHUserId($chuid);
131 }
132 $categories->initialize(ilCalendarCategories::MODE_PORTFOLIO_CONSULTATION, 0, true);
133 }
134
135 $req_seed = $this->port_request->getCalendarSeed();
136 if ($req_seed !== "") {
137 $seed = new ilDate($req_seed, IL_CAL_DATE);
138 } else {
139 $seed = new ilDate(time(), IL_CAL_UNIX);
140 }
141
142 $month_gui = new ilCalendarMonthGUI($seed);
143 return (string) $ilCtrl->forwardCommand($month_gui);
144 }
145
146 // calendar month navigation
147 //$ilCtrl->setParameter($this, "cmd", "preview");
148 return (string) self::EMBEDDED_NO_OUTPUT;
149 default:
150 $this->setPresentationTitle($this->getPageObject()->getTitle());
151 return (string) parent::executeCommand();
152 }
153 }
const IL_CAL_DATE
const IL_CAL_UNIX
static _getInstance($a_usr_id=0)
get singleton instance
Class for single dates.
setPresentationTitle(string $a_title="")

References ilPageObjectGUI\$ctrl, ilPageObjectGUI\$user, ilCalendarCategories\_getInstance(), ILIAS\Repository\ctrl(), EMBEDDED_NO_OUTPUT, ilPageObjectGUI\getPageObject(), ILIAS\GlobalScreen\Scope\Footer\Factory\getTitle(), IL_CAL_DATE, IL_CAL_UNIX, ilCalendarCategories\MODE_PORTFOLIO_CONSULTATION, and ilPageObjectGUI\setPresentationTitle().

+ Here is the call graph for this function:

◆ finishEditing()

ilPortfolioPageGUI::finishEditing ( )

Reimplemented from ilPageObjectGUI.

Reimplemented in ilPortfolioTemplatePageGUI.

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

1162 : void
1163 {
1164 $this->ctrl->redirectByClass("ilObjPortfolioGUI", "view");
1165 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ getAdditional()

ilPortfolioPageGUI::getAdditional ( )

Get Additonal Information.

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

194 : array
195 {
196 return $this->additional;
197 }

References $additional.

◆ getCommentsHTMLExport()

ilPortfolioPageGUI::getCommentsHTMLExport ( )

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

1149 : string
1150 {
1151 $notes_gui = new ilCommentGUI(
1152 $this->portfolio_id,
1153 $this->getPageObject()->getId(),
1154 "pfpg"
1155 );
1156 $notes_gui->enablePublicNotes(true);
1157 $notes_gui->setRepositoryMode(false);
1158 $notes_gui->setExportMode();
1159 return $notes_gui->getListHTML();
1160 }

References ILIAS\Survey\Mode\getId().

+ Here is the call graph for this function:

◆ getCoursesOfUser()

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

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

858 : array {
860
861 // see ilPDSelectedItemsBlockGUI
862
863 $items = ilParticipants::_getMembershipByType($a_user_id, ['crs']);
864
865 $repo_title = $tree->getNodeData(ROOT_FOLDER_ID);
866 $repo_title = $repo_title["title"];
867 if ($repo_title == "ILIAS") {
868 $repo_title = $this->lng->txt("repository");
869 }
870
871 $references = $lp_obj_refs = array();
872 foreach ($items as $obj_id) {
874 if (is_array($ref_id) && count($ref_id)) {
875 $ref_id = array_pop($ref_id);
876 if (!$tree->isDeleted($ref_id)) {
877 $visible = false;
878 $active = ilObjCourseAccess::_isActivated($obj_id, $visible, false);
879 if ($active && $visible) {
880 $references[$ref_id] = array(
881 'ref_id' => $ref_id,
882 'obj_id' => $obj_id,
883 'title' => ilObject::_lookupTitle($obj_id)
884 );
885
886 if ($a_add_path) {
887 $path = array();
888 foreach ($tree->getPathFull($ref_id) as $item) {
889 $path[] = $item["title"];
890 }
891 // top level comes first
892 if (count($path) === 2) {
893 $path[0] = 0;
894 } else {
895 $path[0] = 1;
896 }
897 $references[$ref_id]["path_sort"] = implode("__", $path);
898 array_shift($path);
899 array_pop($path);
900 if (!count($path)) {
901 array_unshift($path, $repo_title);
902 }
903 $references[$ref_id]["path"] = implode(" &rsaquo; ", $path);
904 }
905
906 $lp_obj_refs[$obj_id] = $ref_id;
907 }
908 }
909 }
910 }
911
912 // get lp data for valid courses
913
914 if (count($lp_obj_refs)) {
915 // listing the objectives should NOT depend on any LP status / setting
916 foreach ($lp_obj_refs as $obj_id => $ref_id) {
917 // only if set in DB (default mode is not relevant
919 $references[$ref_id]["objectives"] = $this->parseObjectives($obj_id, $a_user_id);
920 }
921 }
922
923 // LP must be active, personal and not anonymized
927 // see ilLPProgressTableGUI
928 $lp_data = ilTrQuery::getObjectsStatusForUser($a_user_id, $lp_obj_refs);
929 foreach ($lp_data as $item) {
930 $ref_id = $item["ref_ids"];
931 $references[$ref_id]["lp_status"] = $item["status"];
932 }
933 }
934 }
935
936 return $references;
937 }
static _isActivated(int $a_obj_id, ?bool &$a_visible_flag=null, bool $a_mind_member_view=true)
static _lookupViewMode(int $a_id)
static _getAllReferences(int $id)
get all reference ids for object ID
static _lookupTitle(int $obj_id)
static _getMembershipByType(int $a_usr_id, array $a_type, bool $a_only_member_role=false)
get membership by type Get course or group membership
static getObjectsStatusForUser(int $a_user_id, array $obj_refs)
getPathFull(int $a_endnode_id, int $a_startnode_id=0)
get path from a given startnode to a given endnode if startnode is not given the rootnode is startnod...
isDeleted(int $a_node_id)
This is a wrapper for isSaved() with a more useful name.
getNodeData(int $a_node_id, ?int $a_tree_pk=null)
get all information of a node.
const ROOT_FOLDER_ID
Definition: constants.php:32
$ref_id
Definition: ltiauth.php:66
$path
Definition: ltiservices.php:30

◆ getCourseSortAction()

ilPortfolioPageGUI::getCourseSortAction ( ilCtrl  $ctrl)
protected

Get course sort action.

Reimplemented in ilPortfolioTemplatePageGUI.

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

850 : string
851 {
852 return $ctrl->getFormActionByClass("ilobjportfoliogui", "preview");
853 }
getFormActionByClass( $a_class, ?string $a_fallback_cmd=null, ?string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
@inheritDoc

References ilCtrl\getFormActionByClass().

+ Here is the call graph for this function:

◆ getExportMaterial()

ilPortfolioPageGUI::getExportMaterial ( )

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

1021 : array
1022 {
1024 }

◆ getJsOnloadCode()

ilPortfolioPageGUI::getJsOnloadCode ( )

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

199 : array
200 {
202 }

References $js_onload_code.

◆ getPageContentUserId()

ilPortfolioPageGUI::getPageContentUserId ( int  $a_user_id)
protected

Reimplemented in ilPortfolioTemplatePageGUI.

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

100 : int
101 {
102 // user id from content-xml
103 return $a_user_id;
104 }

◆ getPagePermaLink()

ilPortfolioPageGUI::getPagePermaLink ( )

Reimplemented from ilPageObjectGUI.

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

1126 : string
1127 {
1129 return ilLink::_getStaticLink($pid, "prtf", true, "_" . $this->getId());
1130 }
static findPortfolioForPage(int $a_page_id)
Get portfolio id of page id.

References ilLink\_getStaticLink(), ilPortfolioPage\findPortfolioForPage(), and ILIAS\Survey\Mode\getId().

+ Here is the call graph for this function:

◆ getParentType()

ilPortfolioPageGUI::getParentType ( )

Reimplemented from ilPageObjectGUI.

Reimplemented in ilPortfolioTemplatePageGUI.

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

95 : string
96 {
97 return "prtf";
98 }

Referenced by __construct().

+ Here is the caller graph for this function:

◆ getTabs()

ilPortfolioPageGUI::getTabs ( string  $a_activate = "")

Reimplemented from ilPageObjectGUI.

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

168 : void
169 {
170 if (!$this->embedded) {
171 parent::getTabs($a_activate);
172 }
173 }

◆ getViewPageLink()

ilPortfolioPageGUI::getViewPageLink ( )

Reimplemented from ilPageObjectGUI.

Reimplemented in ilPortfolioTemplatePageGUI.

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

1111 : string
1112 {
1113 global $DIC;
1114
1115 $ctrl = $DIC->ctrl();
1116
1117 $ctrl->setParameterByClass("ilobjportfoliogui", "user_page", $this->requested_ppage);
1118 return $ctrl->getLinkTargetByClass("ilobjportfoliogui", "preview");
1119 }
setParameterByClass(string $a_class, string $a_parameter, $a_value)
@inheritDoc
getLinkTargetByClass( $a_class, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
@inheritDoc

References $DIC.

◆ getViewPageText()

ilPortfolioPageGUI::getViewPageText ( )

Reimplemented from ilPageObjectGUI.

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

1121 : string
1122 {
1123 return $this->lng->txt("preview");
1124 }

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ isMyCoursesActive()

ilPortfolioPageGUI::isMyCoursesActive ( )
protected

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

624 : bool
625 {
626 $prfa_set = new ilSetting("prfa");
627 return (bool) $prfa_set->get("mycrs", true);
628 }
ILIAS Setting Class.

◆ makePlaceHoldersClickable()

ilPortfolioPageGUI::makePlaceHoldersClickable ( string  $a_html)

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

1026 : string
1027 {
1028 $ilCtrl = $this->ctrl;
1029 $lng = $this->lng;
1030 $ilUser = $this->user;
1031
1032 $end = 0;
1033 $start = strpos($a_html, "{{{{{PlaceHolder#");
1034 if (is_int($start)) {
1035 $end = strpos($a_html, "}}}}}", $start);
1036 }
1037 while ($end > 0) {
1038 $param = substr($a_html, $start + 17, $end - $start - 17);
1039 $param = explode("#", $param);
1040
1041 $html = $param[2];
1042 switch ($param[2]) {
1043 case "Text":
1044 $html = $lng->txt("cont_text_placeh");
1045 break;
1046
1047 case "Media":
1048 $html = $lng->txt("cont_media_placeh");
1049 break;
1050
1051 case "Question":
1052 $html = $lng->txt("cont_question_placeh");
1053 break;
1054
1055 case "Verification":
1056 $html = $lng->txt("cont_verification_placeh");
1057 break;
1058 }
1059
1060 // only if not owner
1061 if ($ilUser->getId() === ilObjPortfolio::_lookupOwner($this->portfolio_id)
1062 && $this->getOutputMode() === "presentation") {
1063 switch ($param[2]) {
1064 case "Text":
1065 $ilCtrl->setParameterByClass("ilportfoliopagegui", "prt_id", $this->port_request->getPortfolioId());
1066 $ilCtrl->setParameterByClass("ilportfoliopagegui", "ppage", $this->getId());
1067 $ilCtrl->setParameterByClass("ilportfoliopagegui", "pl_pc_id", $param[0]);
1068 $ilCtrl->setParameterByClass("ilportfoliopagegui", "pl_hier_id", $param[1]);
1069 $href = $ilCtrl->getLinkTargetByClass("ilportfoliopagegui", "insertJSAtPlaceholder");
1070 $html = "<a href='" . $href . "'>" . $html . "</a>";
1071 break;
1072
1073 case "Media":
1074 $ilCtrl->setParameterByClass("ilpcmediaobjectgui", "prt_id", $this->port_request->getPortfolioId());
1075 $ilCtrl->setParameterByClass("ilpcmediaobjectgui", "ppage", $this->getId());
1076 $ilCtrl->setParameterByClass("ilpcmediaobjectgui", "pl_pc_id", $param[0]);
1077 $ilCtrl->setParameterByClass("ilpcmediaobjectgui", "pl_hier_id", $param[1]);
1078 $ilCtrl->setParameterByClass("ilpcmediaobjectgui", "subCmd", "insertNew");
1079 $href = $ilCtrl->getLinkTargetByClass(array("ilPortfolioPageGUI", "ilPageEditorGUI", "ilPCPlaceHolderGUI", "ilpcmediaobjectgui"), "insert");
1080 $html = "<a href='" . $href . "'>" . $html . "</a>";
1081 break;
1082
1083 /* see #34170, may need a different change, keep code to monitor
1084 case "Verification":
1085 $ilCtrl->setParameterByClass("ilPCVerificationGUI", "prt_id", $this->port_request->getPortfolioId());
1086 $ilCtrl->setParameterByClass("ilPCVerificationGUI", "ppage", $this->getId());
1087 $ilCtrl->setParameterByClass("ilPCVerificationGUI", "pl_pc_id", $param[0]);
1088 $ilCtrl->setParameterByClass("ilPCVerificationGUI", "pl_hier_id", $param[1]);
1089 $ilCtrl->setParameterByClass("ilPCVerificationGUI", "subCmd", "insertNew");
1090 $href = $ilCtrl->getLinkTargetByClass(array("ilPortfolioPageGUI", "ilPageEditorGUI", "ilPCPlaceHolderGUI", "ilPCVerificationGUI"), "insert");
1091 $html = "<a href='" . $href . "'>" . $html . "</a>";
1092 break;
1093 */
1094 }
1095 }
1096
1097 $h2 = substr($a_html, 0, $start) .
1098 $html .
1099 substr($a_html, $end + 5);
1100 $a_html = $h2;
1101
1102 $start = strpos($a_html, "{{{{{PlaceHolder#", $start + 5);
1103 $end = 0;
1104 if (is_int($start)) {
1105 $end = strpos($a_html, "}}}}}", $start);
1106 }
1107 }
1108 return $a_html;
1109 }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static _lookupOwner(int $obj_id)
Lookup owner user ID for object ID.
$param
Definition: xapitoken.php:46

References $lng, $param, ilObject\_lookupOwner(), and ILIAS\Survey\Mode\getId().

Referenced by postOutputProcessing().

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

◆ parseLOUserResults()

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

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

992 : array {
993 $res = array();
994 $initial_status = "";
995
996 $lur = new ilLOUserResults($a_course_obj_id, $a_user_id);
997 foreach ($lur->getCourseResultsForUserPresentation() as $objective_id => $types) {
998 // show either initial or qualified for objective
999 if (isset($types[ilLOUserResults::TYPE_INITIAL])) {
1000 $initial_status = $types[ilLOUserResults::TYPE_INITIAL]["status"];
1001 }
1002
1003 // qualified test has priority
1004 if (isset($types[ilLOUserResults::TYPE_QUALIFIED])) {
1005 $result = $types[ilLOUserResults::TYPE_QUALIFIED];
1006 $result["type"] = ilLOUserResults::TYPE_QUALIFIED;
1007 $result["initial"] = $types[ilLOUserResults::TYPE_INITIAL] ?? null;
1008 } else {
1009 $result = $types[ilLOUserResults::TYPE_INITIAL];
1010 $result["type"] = ilLOUserResults::TYPE_INITIAL;
1011 }
1012
1013 $result["initial_status"] = $initial_status;
1014
1015 $res[$objective_id] = $result;
1016 }
1017
1018 return $res;
1019 }
$res
Definition: ltiservices.php:69

◆ postOutputProcessing()

ilPortfolioPageGUI::postOutputProcessing ( string  $a_output)

Finalizing output processing.

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

Reimplemented from ilPageObjectGUI.

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

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

References $parts, makePlaceHoldersClickable(), and renderPageElement().

+ Here is the call graph for this function:

◆ renderBlogTeaser()

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

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

479 : string {
480 // not used
481 // $user_id = $this->getPageContentUserId($a_user_id);
482
483 $postings = "";
484 if ($a_posting_ids) {
485 $postings = array("<ul>");
486 foreach ($a_posting_ids as $post) {
488 $postings[] = "<li>" . $post->getTitle() . " - " .
489 ilDatePresentation::formatDate($post->getCreated()) . "</li>";
490 }
491 $postings[] = "</ul>";
492 $postings = implode("\n", $postings);
493 }
494
495 return $this->renderTeaser("blog", $this->lng->txt("obj_blog") . ' "' .
496 ilObject::_lookupTitle($a_blog_id) . '"', $postings);
497 }
Class ilBlogPosting.
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=null,)
renderTeaser(string $a_type, string $a_title, string $a_options="")
$post
Definition: ltitoken.php:46

References $post, and ilDatePresentation\formatDate().

+ Here is the call graph for this function:

◆ renderConsultationHours()

ilPortfolioPageGUI::renderConsultationHours ( int  $a_user_id,
string  $a_mode,
?array  $a_group_ids = null 
)
protected

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

564 : string {
565 $ilUser = $this->user;
566 if ($this->getOutputMode() === "preview") {
567 return $this->renderConsultationHoursTeaser($a_user_id, $a_mode, $a_group_ids);
568 }
569
570 if ($this->getOutputMode() === "offline") {
571 return "";
572 }
573
574 if ($this->getOutputMode() === "print") {
575 return "";
576 }
577
578 $user_id = $this->getPageContentUserId($a_user_id);
579
580 // only if not owner
581 $bkid = 0;
582 if ($ilUser->getId() !== $user_id) {
583 $bkid = $user_id;
584 }
585 $this->ctrl->setParameter($this, "chuid", $user_id);
586
587 if ($a_mode !== "manual") {
588 $a_group_ids = null;
589 }
591 if (!self::$calender_initialized) {
594 0,
595 true
596 );
597 self::$calender_initialized = true;
598 }
599
600 $seed = $this->port_request->getCalendarSeed();
601 if ($seed === "") {
602 $seed = new ilDate(time(), IL_CAL_UNIX);
603 } else {
604 $seed = new ilDate($seed, IL_CAL_DATE);
605 }
606
607 $month_gui = new ilCalendarMonthGUI($seed);
608 if ($bkid > 0) {
609 $month_gui->setBkId($bkid);
610 }
611 $month_gui->setConsulationHoursUserId($user_id);
612
613 // custom schedule filter: handle booking group ids
615 $month_gui->addScheduleFilter($filter);
616
617 $this->tpl->addCss(ilUtil::getStyleSheetLocation('filesystem', 'delos.css'));
618
619 $this->lng->loadLanguageModule("dateplaner");
620 return '<h3>' . $this->lng->txt("app_consultation_hours") . '</h3>' .
621 $this->ctrl->getHTML($month_gui);
622 }
Calendar schedule filter for consultation hour bookings.
renderConsultationHoursTeaser(int $a_user_id, string $a_mode, ?array $a_group_ids=null)
getPageContentUserId(int $a_user_id)
static getStyleSheetLocation(string $mode="output", string $a_css_name="")
get full style sheet file name (path inclusive) of current user

◆ renderConsultationHoursTeaser()

ilPortfolioPageGUI::renderConsultationHoursTeaser ( int  $a_user_id,
string  $a_mode,
?array  $a_group_ids = null 
)
protected

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

531 : string {
532 // not used
533 // $user_id = $this->getPageContentUserId($a_user_id);
534 if ($a_mode === "auto") {
535 $mode = $this->lng->txt("cont_cach_mode_automatic");
536 $groups = null;
537 }
538 // begin-abandon ch_groups
539 /*
540 else {
541 $mode = $this->lng->txt("cont_cach_mode_manual");
542
543 $groups = array();
544 foreach ($a_group_ids as $grp_id) {
545 $groups[] = ilConsultationHourGroups::lookupTitle($grp_id);
546 }
547 $groups = " (" . implode(", ", $groups) . ")";
548 }
549 */
550 // end-abandon ch_groups
551
552 $this->lng->loadLanguageModule("dateplaner");
553 return $this->renderTeaser(
554 "consultation_hours",
555 $this->lng->txt("app_consultation_hours"),
556 $mode . $groups
557 );
558 }

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ renderMyCourses()

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

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

650 : string {
651 $ilAccess = $this->access;
652 $ilUser = $this->user;
653 $ilCtrl = $this->ctrl;
654
655 if ($this->getOutputMode() === "preview") {
656 return $this->renderMyCoursesTeaser($a_user_id, $a_default_sorting);
657 }
658
659 if (!$this->isMyCoursesActive()) {
660 return "";
661 }
662
663 $img_path = null;
665
666 $user_id = $this->getPageContentUserId($a_user_id);
667
668 // sorting pref
669 $req_sorting = $this->port_request->getCourseSorting();
670 if (in_array($req_sorting, array("alpha", "loc"))) {
671 $ilUser->writePref("prtf_mcrs_sort", $req_sorting);
672 }
673 $sorting = $ilUser->getPref("prtf_mcrs_sort");
674 if (!$sorting) {
675 $sorting = $a_default_sorting;
676 }
677
678 $data = $this->getCoursesOfUser($user_id, ($sorting === "loc"));
679 if (count($data)) {
680 if ($sorting !== "loc") {
681 $data = ilArrayUtil::sortArray($data, "title", "ASC");
682 } else {
683 $data = ilArrayUtil::sortArray($data, "path_sort", "ASC");
684 }
685
686 $tpl = new ilTemplate("tpl.pc_my_courses.html", true, true, "components/ILIAS/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 $this->lng->loadLanguageModule("trac");
691 $this->lng->loadLanguageModule("crs");
692
693 // sorting
694 if ($this->getOutputMode() !== "print") {
695 $options = array(
696 "alpha" => $this->lng->txt("cont_mycourses_sortorder_alphabetical"),
697 "loc" => $this->lng->txt("cont_mycourses_sortorder_location")
698 );
700 "SORT_SELECT",
702 $sorting,
703 "srt",
704 $options,
705 false,
706 true,
707 0,
708 "",
709 ["onchange" => "form.submit()"]
710 )
711 );
712 $tpl->setVariable("SORT_FORM", $this->getCourseSortAction($ilCtrl));
713 }
714
715 $old_path = null;
716
717 foreach ($data as $course) {
718 if (($sorting === "loc") && $course["path"] != $old_path) {
719 $tpl->setCurrentBlock("path_bl");
720 $tpl->setVariable("PATH", $course["path"]);
722
723 $old_path = $course["path"];
724 }
725
726 if (isset($course["lp_status"])) {
727 $lp_icon_rendered = $lp_icons->renderIconForStatus($course["lp_status"]);
728
729 $tpl->setCurrentBlock("lp_bl");
730 $tpl->setVariable("LP_ICON", $lp_icon_rendered);
732 }
733
734 $do_links = false;
735 if ($ilUser->getId() !== ANONYMOUS_USER_ID) {
736 $do_links = $ilAccess->checkAccessOfUser($ilUser->getId(), "read", "", $course["ref_id"], "crs") ||
737 ($ilAccess->checkAccessOfUser($ilUser->getId(), "visible", "", $course["ref_id"], "crs") &&
738 $ilAccess->checkAccessOfUser($ilUser->getId(), "join", "", $course["ref_id"], "crs"));
739 }
740
741 if (isset($course["objectives"])) {
742 $loc_settings = ilLOSettings::getInstanceByObjId($course["obj_id"]);
743 $has_initial_test = (bool) $loc_settings->getInitialTest();
744
745 foreach ($course["objectives"] as $objtv) {
746 if ($do_links) {
747 $params = array("oobj" => $objtv["id"]);
748 $url = ilLink::_getLink($course["ref_id"], "crs", $params);
749
750 // #15510
751 $url .= "#objtv_acc_" . $objtv["id"];
752
753 if ($this->getOutputMode() !== "print") {
754 $tpl->touchBlock("objective_dnone");
755 }
756
757 $tpl->setCurrentBlock("objective_link_bl");
758
759 $objtv_link = $this->ui_fac->link()->standard(
760 $objtv["title"],
761 $url
762 );
763 if (trim($objtv["desc"] ?? "") !== "") {
764 $desc = nl2br($objtv["desc"]);
765 $objtv_link = $objtv_link->withHelpTopics(...$this->ui_fac->helpTopics($desc));
766 }
767
768 $tpl->setVariable("OBJECTIVE_LINK", $this->ui_ren->render($objtv_link));
769 } else {
770 $tpl->setCurrentBlock("objective_nolink_bl");
771 $tpl->setVariable("OBJECTIVE_NOLINK_TITLE", $objtv["title"]);
772 }
774
775 $objtv_icon = ilObject::_getIcon($objtv["id"], 'big', "lobj");
776 if ($img_path) {
777 $objtv_icon = $img_path . basename($objtv_icon);
778 }
779
780 $tpl->setCurrentBlock("objective_bl");
781 $tpl->setVariable("OBJTV_ICON_URL", $objtv_icon);
782 $tpl->setVariable("OBJTV_ICON_ALT", $this->lng->txt("crs_objectives"));
783
784 if (isset($objtv["type"])) {
786 "LP_OBJTV_PROGRESS",
788 $has_initial_test,
789 $objtv["id"],
790 $objtv,
791 true,
792 false,
793 self::$initialized
794 )
795 );
796 }
797
799 }
800
801 $tpl->setCurrentBlock("objectives_bl");
802 $tpl->setVariable("OBJTV_LIST_CRS_ID", $course["obj_id"]);
804 }
805
806 // always check against current user
807 if ($do_links) {
808 $tpl->setCurrentBlock("course_link_bl");
809 $tpl->setVariable("COURSE_LINK_TITLE", $course["title"]);
810 $tpl->setVariable("COURSE_LINK_URL", ilLink::_getLink($course["ref_id"]));
811 } else {
812 $tpl->setCurrentBlock("course_nolink_bl");
813 $tpl->setVariable("COURSE_NOLINK_TITLE", $course["title"]);
814 }
816
817 $crs_icon = ilObject::_getIcon($course["obj_id"], 'small', 'crs');
818 if ($img_path) {
819 $crs_icon = $img_path . basename($crs_icon);
820 }
821
822 $tpl->setCurrentBlock("course_bl");
823
824 if (isset($course["objectives"])) {
825 $tpl->setVariable("TOGGLE_CLASS", "ilPCMyCoursesToggle");
826 } else {
827 $tpl->setVariable("NO_TOGGLE", ' style="visibility:hidden;"');
828 }
829
830 $tpl->setVariable("CRS_ICON_URL", $crs_icon);
831 $tpl->setVariable("CRS_ICON_ALT", $this->lng->txt("obj_crs"));
833 }
834
835 // #15508
836 if (!self::$initialized) {
837 $GLOBALS["tpl"]->addJavaScript("assets/js/ilPortfolio.js");
838 $GLOBALS["tpl"]->addOnLoadCode("ilPortfolio.init()");
839 }
840 self::$initialized++;
841
842 return $tpl->get();
843 }
844 return "";
845 }
static sortArray(array $array, string $a_array_sortby_key, string $a_array_sortorder="asc", bool $a_numeric=false, bool $a_keep_keys=false)
static buildObjectiveProgressBar(bool $a_has_initial_test, int $a_objective_id, array $a_lo_result, bool $a_list_mode=false, bool $a_sub=false, ?string $a_tt_suffix=null)
Render progressbar(s) for given objective and result data.
static getInstanceByObjId(int $a_obj_id)
static getInstance(int $variant=ilLPStatusIcons::ICON_VARIANT_DEFAULT, ?\ILIAS\UI\Renderer $renderer=null, ?\ILIAS\UI\Factory $factory=null)
static formSelect( $selected, string $varname, array $options, bool $multiple=false, bool $direct_text=false, int $size=0, string $style_class="", array $attribs=[], bool $disabled=false)
Builds a select form field with options and shows the selected option first.
static _getIcon(int $obj_id=0, string $size="big", string $type="", bool $offline=false)
Get icon for repository item.
ilAccessHandler $access
getCourseSortAction(ilCtrl $ctrl)
Get course sort action.
renderMyCoursesTeaser(int $a_user_id, $a_default_sorting)
getCoursesOfUser(int $a_user_id, bool $a_add_path=false)
special template class to simplify handling of ITX/PEAR
const ANONYMOUS_USER_ID
Definition: constants.php:27
touchBlock(string $block)
overwrites ITX::touchBlock.
get(string $part=self::DEFAULT_BLOCK)
Renders the given block and returns the html string.
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
Definition: ltiregstart.php:31
$GLOBALS["DIC"]
Definition: wac.php:54

◆ renderMyCoursesTeaser()

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

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

633 : string {
634 // not used
635 // $user_id = $this->getPageContentUserId($a_user_id);
636
637 $title = $this->isMyCoursesActive()
638 ? "my_courses"
639 : "my_courses_inactive";
640
641 return $this->renderTeaser(
642 $title,
643 $this->lng->txt("prtf_page_element_my_courses_title")
644 );
645 }

◆ renderPageElement()

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

Reimplemented in ilPortfolioTemplatePageGUI.

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

290 : string {
291 return trim($a_html);
292 }

Referenced by postOutputProcessing().

+ Here is the caller graph for this function:

◆ renderProfile()

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

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

314 : string {
315 $ilCtrl = $this->ctrl;
316
317 $user_id = $this->getPageContentUserId($a_user_id);
318
319 $pub_profile = new PublicProfileGUI($user_id);
320 $pub_profile->setEmbedded(true, ($this->getOutputMode() === "offline"));
321
322 // full circle: additional was set in the original public user profile call
323 $pub_profile->setAdditional($this->getAdditional());
324
325 if ($a_type === "manual" && is_array($a_fields) && count($a_fields) > 0) {
326 $prefs = array();
327 foreach ($a_fields as $field) {
328 $field = trim($field);
329 if ($field) {
330 $prefs["public_" . $field] = "y";
331 }
332 }
333
334 $pub_profile->setCustomPrefs($prefs);
335 }
336
337 if ($this->getOutputMode() !== "offline") {
338 return $ilCtrl->getHTML($pub_profile);
339 }
340
341 return $pub_profile->getEmbeddable();
342 }
GUI class for public user profile presentation.
getAdditional()
Get Additonal Information.

◆ renderSkills()

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

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

502 : string {
503 if ($this->getOutputMode() === "preview") {
504 return $this->renderSkillsTeaser($a_user_id, $a_skills_id);
505 }
506
507 $user_id = $this->getPageContentUserId($a_user_id);
508
510 if ($this->getOutputMode() === "offline") {
511 $gui->setOfflineMode("./files/");
512 }
513 return $gui->getSkillHTML($a_skills_id, $user_id);
514 }
ILIAS COPage InternalGUIService $gui
Personal skills GUI class.
renderSkillsTeaser(int $a_user_id, int $a_skills_id)

◆ renderSkillsTeaser()

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

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

519 : string {
520 // not used
521 // $user_id = $this->getPageContentUserId($a_user_id);
522
523 return $this->renderTeaser("skills", $this->lng->txt("skills") . ' "' .
524 ilSkillTreeNode::_lookupTitle($a_skills_id) . '"');
525 }
static _lookupTitle(int $a_obj_id, int $a_tref_id=0)

◆ renderTeaser()

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

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

298 : string {
299 $options = "";
300 if ($a_options) {
301 $options = '<div class="il_Footer">' . $this->lng->txt("prtf_page_element_teaser_settings") .
302 ": " . $a_options . '</div>';
303 }
304
305 return '<div style="margin:5px" class="ilBox"><h3>' . $a_title . '</h3>' .
306 '<div class="il_Description_no_margin">' . $this->lng->txt("prtf_page_element_teaser_" . $a_type) . '</div>' .
307 $options . '</div>';
308 }

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ renderVerification()

ilPortfolioPageGUI::renderVerification ( int  $a_user_id,
string  $a_type,
int  $a_id 
)
protected
Exceptions
ilException

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

351 : string {
352 $objDefinition = $this->obj_definition;
353
354 $outputMode = $this->getOutputMode();
355
356 // not used
357 // $user_id = $this->getPageContentUserId($a_user_id);
358 if ($a_type === 'crta' && $outputMode === 'offline') {
359 $fileService = new ilPortfolioCertificateFileService();
360
361 $certificatePdfFile = $fileService->createCertificateFilePath($a_user_id, $a_id);
362 $this->export_material["files"][] = $certificatePdfFile;
363
364 $url = 'files/' . basename($certificatePdfFile);
365
366 $userCertificateRepository = new ilUserCertificateRepository();
367
368 return $this->createPersistentCertificateUrl($a_id, $userCertificateRepository, $url);
369 }
370
371 if ($a_type === 'crta' && $outputMode === 'print') {
372 $userCertificateRepository = new ilUserCertificateRepository();
373 $url = $this->getPagePermaLink();
374
375 return $this->createPersistentCertificateUrl($a_id, $userCertificateRepository, $url);
376 }
377
378 if ($a_type === 'crta') {
379 $this->ctrl->setParameter($this, "dlid", $a_id);
380 $url = $this->ctrl->getLinkTarget($this, "dl" . $a_type);
381 $this->ctrl->setParameter($this, "dlid", "");
382
383 $userCertificateRepository = new ilUserCertificateRepository();
384
385 return $this->createPersistentCertificateUrl($a_id, $userCertificateRepository, $url);
386 }
387
388 if (!ilObject::_exists($a_id)) {
389 return $this->lng->txt('deleted');
390 }
391
392 $class = "ilObj" . $objDefinition->getClassName($a_type) . "GUI";
393 $verification = new $class($a_id, ilObject2GUI::WORKSPACE_OBJECT_ID);
394
395 if ($outputMode === "print") {
396 $url = $this->getPagePermaLink();
397 } elseif ($outputMode !== "offline") {
398 // direct download link
399 $this->ctrl->setParameter($this, "dlid", $a_id);
400 $url = $this->ctrl->getLinkTarget($this, "dl" . $a_type);
401 $this->ctrl->setParameter($this, "dlid", "");
402 } else {
403 $file = $verification->getObject()->getFilePath();
404 $url = "files/" . basename($file);
405
406 $this->export_material["files"][] = $file;
407 }
408
409 return $verification->render(true, $url);
410 }
static _exists(int $id, bool $reference=false, ?string $type=null)
checks if an object exists in object_data
ilObjectDefinition $obj_definition
createPersistentCertificateUrl(int $a_id, ilUserCertificateRepository $userCertificateRepository, string $url)

◆ setAdditional()

ilPortfolioPageGUI::setAdditional ( array  $a_additional)

Set Additonal Information.

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

186 : void
187 {
188 $this->additional = $a_additional;
189 }

◆ setEmbedded()

ilPortfolioPageGUI::setEmbedded ( bool  $a_value)

Set embedded mode: will suppress tabs.

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

178 : void
179 {
180 $this->embedded = $a_value;
181 }

◆ showPage()

ilPortfolioPageGUI::showPage ( )

display content of page

Reimplemented from ilPageObjectGUI.

Reimplemented in ilPortfolioTemplatePageGUI.

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

155 : string
156 {
157 $ilUser = $this->user;
158
159 if (!$this->getPageObject()) {
160 return "";
161 }
162
163 $this->setTemplateOutput(false);
164 // $this->setPresentationTitle($this->getPageObject()->getTitle());
165 return parent::showPage();
166 }
setTemplateOutput(bool $a_output=true)

References ilPageObjectGUI\$user, ilPageObjectGUI\getPageObject(), and ilPageObjectGUI\setTemplateOutput().

+ Here is the call graph for this function:

Field Documentation

◆ $additional

array ilPortfolioPageGUI::$additional = array()
protected

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

Referenced by getAdditional().

◆ $calender_initialized

bool ilPortfolioPageGUI::$calender_initialized = false
staticprotected

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

◆ $embedded

bool ilPortfolioPageGUI::$embedded = false
protected

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

◆ $enable_comments

bool ilPortfolioPageGUI::$enable_comments
protected

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

◆ $export_material

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

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

◆ $initialized

int ilPortfolioPageGUI::$initialized = 0
staticprotected

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

◆ $js_onload_code

array ilPortfolioPageGUI::$js_onload_code = array()
protected

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

Referenced by getJsOnloadCode().

◆ $obj_definition

ilObjectDefinition ilPortfolioPageGUI::$obj_definition
protected

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

◆ $port_request

ILIAS Portfolio StandardGUIRequest ilPortfolioPageGUI::$port_request
protected

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

◆ $portfolio_id

int ilPortfolioPageGUI::$portfolio_id
protected

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

◆ $requested_ppage

int ilPortfolioPageGUI::$requested_ppage
protected

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

◆ $tree

ilTree ilPortfolioPageGUI::$tree
protected

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

◆ $ui_fac

ILIAS UI Factory ilPortfolioPageGUI::$ui_fac
protected

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

◆ $ui_ren

ILIAS UI Renderer ilPortfolioPageGUI::$ui_ren
protected

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

◆ EMBEDDED_NO_OUTPUT

const ilPortfolioPageGUI::EMBEDDED_NO_OUTPUT = -99

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