ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilPortfolioPageGUI Class Reference

Portfolio page gui class. More...

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

Public Member Functions

 __construct ($a_portfolio_id, $a_id=0, $a_old_nr=0, $a_enable_comments=true)
 Constructor. More...
 
 getParentType ()
 
 executeCommand ()
 execute command More...
 
 showPage ()
 Show page. More...
 
 getTabs ($a_activate="")
 Set all tabs. More...
 
 setEmbedded ($a_value)
 Set embedded mode: will suppress tabs. More...
 
 setAdditional ($a_additional)
 Set Additonal Information. More...
 
 getAdditional ()
 Get Additonal Information. More...
 
 getJsOnloadCode ()
 
 postOutputProcessing ($a_output)
 
 getExportMaterial ()
 
 makePlaceHoldersClickable ($a_html)
 Modify page content after xsl. More...
 
 getViewPageLink ()
 Get view page link. More...
 
 getViewPageText ()
 Get view page link. More...
 
 getPagePermaLink ()
 Get page perma link. More...
 
- 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...
 
 setPageObject (ilPageObject $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...
 
 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...
 
 getViewPageText ()
 get view page text 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...
 
 getDisabledText ()
 Get disabled text. 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...
 
 getProfileBackUrl ()
 Get profile back url. 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...
 
 initCaptchaForm ()
 Init captcha form. 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...
 
 getPagePermaLink ()
 Get page perma link. More...
 

Data Fields

const EMBEDDED_NO_OUTPUT = -99
 
- Data Fields inherited from ilPageObjectGUI
 $obj
 
 $presentation_title
 
 $target_script
 
 $return_location
 
 $target_var
 
 $template_output_var
 
 $output2template
 
 $link_params
 
 $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

 $obj_definition
 
 $tree
 
 $js_onload_code = array()
 
 $additional = array()
 
 $export_material = array("js"=>array(), "images"=>array(), "files"=>array())
 
- Protected Attributes inherited from ilPageObjectGUI
 $tpl
 
 $lng
 
 $ctrl
 
 $tabs_gui
 
 $access
 
 $plugin_admin
 
 $log
 
 $user
 
 $help
 
 $output_mode
 
 $parent_type = ""
 

Static Protected Attributes

static $initialized = 0
 

Additional Inherited Members

- Static Public Member Functions inherited from ilPageObjectGUI
static getTinyMenu ( $a_par_type, $a_int_links=false, $a_wiki_links=false, $a_keywords=false, $a_style_id=0, $a_paragraph_styles=true, $a_save_return=true, $a_anchors=false, $a_save_new=true, $a_user_links=false)
 Get Tiny Menu. More...
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

Constructor.

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

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

42  {
43  global $DIC;
44 
45  $this->tpl = $DIC["tpl"];
46  $this->ctrl = $DIC->ctrl();
47  $this->user = $DIC->user();
48  $this->obj_definition = $DIC["objDefinition"];
49  $this->access = $DIC->access();
50  $this->tree = $DIC->repositoryTree();
51  $this->lng = $DIC->language();
52  $tpl = $DIC["tpl"];
53 
54  $this->portfolio_id = (int) $a_portfolio_id;
55  $this->enable_comments = (bool) $a_enable_comments;
56 
57  parent::__construct($this->getParentType(), $a_id, $a_old_nr);
58  $this->getPageObject()->setPortfolioId($this->portfolio_id);
59 
60  // content style
61  include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
62 
63  $tpl->setCurrentBlock("SyntaxStyle");
64  $tpl->setVariable(
65  "LOCATION_SYNTAX_STYLESHEET",
67  );
68  $tpl->parseCurrentBlock();
69 
70  $tpl->setCurrentBlock("ContentStyle");
71  $tpl->setVariable(
72  "LOCATION_CONTENT_STYLESHEET",
74  );
75  $tpl->setVariable(
76  "LOCATION_ADDITIONAL_STYLESHEET",
78  );
79  $tpl->parseCurrentBlock();
80  }
static getPlaceHolderStylePath()
get placeholder style path (for Page Layouts)
getPageObject()
Get Page Object.
global $DIC
Definition: saml.php:7
user()
Definition: user.php:4
static getSyntaxStylePath()
get syntax style path
static getContentStylePath($a_style_id, $add_random=true)
get content style path
+ Here is the call graph for this function:

Member Function Documentation

◆ dlcrsv()

ilPortfolioPageGUI::dlcrsv ( )
protected

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

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

423  {
424  $id = $_GET["dlid"];
425  if ($id) {
426  include_once "Modules/Course/classes/Verification/class.ilObjCourseVerificationGUI.php";
428  $verification->downloadFromPortfolioPage($this->getPageObject());
429  }
430  }
getPageObject()
Get Page Object.
$_GET["client_id"]
if(!array_key_exists('StateId', $_REQUEST)) $id
GUI class for course verification.
+ Here is the call graph for this function:

◆ dlexcv()

ilPortfolioPageGUI::dlexcv ( )
protected

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

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

413  {
414  $id = $_GET["dlid"];
415  if ($id) {
416  include_once "Modules/Exercise/classes/class.ilObjExerciseVerificationGUI.php";
418  $verification->downloadFromPortfolioPage($this->getPageObject());
419  }
420  }
getPageObject()
Get Page Object.
$_GET["client_id"]
if(!array_key_exists('StateId', $_REQUEST)) $id
GUI class for exercise verification.
+ Here is the call graph for this function:

◆ dlscov()

ilPortfolioPageGUI::dlscov ( )
protected

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

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

433  {
434  $id = $_GET["dlid"];
435  if ($id) {
436  include_once "Modules/ScormAicc/classes/Verification/class.ilObjSCORMVerificationGUI.php";
438  $verification->downloadFromPortfolioPage($this->getPageObject());
439  }
440  }
getPageObject()
Get Page Object.
$_GET["client_id"]
if(!array_key_exists('StateId', $_REQUEST)) $id
GUI class for scorm verification.
+ Here is the call graph for this function:

◆ dltstv()

ilPortfolioPageGUI::dltstv ( )
protected

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

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

403  {
404  $id = $_GET["dlid"];
405  if ($id) {
406  include_once "Modules/Test/classes/class.ilObjTestVerificationGUI.php";
408  $verification->downloadFromPortfolioPage($this->getPageObject());
409  }
410  }
getPageObject()
Get Page Object.
$_GET["client_id"]
if(!array_key_exists('StateId', $_REQUEST)) $id
GUI class for test verification.
+ Here is the call graph for this function:

◆ executeCommand()

ilPortfolioPageGUI::executeCommand ( )

execute command

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

References $_GET, ilPageObjectGUI\$ctrl, $ilCtrl, $ilUser, ilPageObjectGUI\$user, ilCalendarCategories\_getInstance(), ilPageObjectGUI\getPageObject(), IL_CAL_DATE, IL_CAL_UNIX, ilCalendarCategories\MODE_PORTFOLIO_CONSULTATION, ilPageObjectGUI\setPresentationTitle(), time, and ilObject2GUI\WORKSPACE_NODE_ID.

97  {
100 
101  $next_class = $this->ctrl->getNextClass($this);
102  $cmd = $this->ctrl->getCmd();
103 
104  switch ($next_class) {
105  case "ilobjbloggui":
106  // #12879 - we need the wsp-id for the keywords
107  include_once "Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
108  $wsp_tree = new ilWorkspaceTree($ilUser->getId());
109  $blog_obj_id = (int) $this->getPageObject()->getTitle();
110  $blog_node_id = $wsp_tree->lookupNodeId($blog_obj_id);
111 
112  include_once "Modules/Blog/classes/class.ilObjBlogGUI.php";
113  $blog_gui = new ilObjBlogGUI($blog_node_id, ilObjBlogGUI::WORKSPACE_NODE_ID);
114  $blog_gui->disableNotes(!$this->enable_comments);
115  $blog_gui->prtf_embed = true; // disables prepareOutput()/getStandardTemplate() in blog
116  return $ilCtrl->forwardCommand($blog_gui);
117 
118  case "ilcalendarmonthgui":
119 
120 
121  // booking action
122  if ($cmd && $cmd != "preview") {
123  $categories = ilCalendarCategories::_getInstance();
124  if ($categories->getMode() == 0) {
125  if ($_GET['chuid']) {
126  $categories->setCHUserId((int) $_GET['chuid']);
127  }
128  $categories->initialize(ilCalendarCategories::MODE_PORTFOLIO_CONSULTATION, null, true);
129  }
130 
131  if ($_GET['seed']) {
132  $seed = new ilDate((string) $_GET['seed'], IL_CAL_DATE);
133  } else {
134  $seed = new ilDate(time(), IL_CAL_UNIX);
135  }
136 
137  include_once('./Services/Calendar/classes/class.ilCalendarMonthGUI.php');
138  $month_gui = new ilCalendarMonthGUI($seed);
139  return $ilCtrl->forwardCommand($month_gui);
140  }
141  // calendar month navigation
142  else {
143  $ilCtrl->setParameter($this, "cmd", "preview");
144  return self::EMBEDDED_NO_OUTPUT;
145  }
146 
147  // no break
148  case "ilpageobjectgui":
149  die("Deprecated. ilPortfolioPage gui forwarding to ilpageobject");
150  return;
151 
152  default:
153  $this->setPresentationTitle($this->getPageObject()->getTitle());
154  return parent::executeCommand();
155  }
156  }
getPageObject()
Get Page Object.
$_GET["client_id"]
const IL_CAL_UNIX
Tree handler for personal workspace.
global $ilCtrl
Definition: ilias.php:18
Class for single dates.
Class ilObjBlogGUI.
setPresentationTitle($a_title="")
$ilUser
Definition: imgupload.php:18
static _getInstance($a_usr_id=0)
get singleton instance
const IL_CAL_DATE
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
+ Here is the call graph for this function:

◆ getAdditional()

ilPortfolioPageGUI::getAdditional ( )

Get Additonal Information.

Returns
array Additonal Information

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

References $additional.

Referenced by renderProfile().

223  {
224  return $this->additional;
225  }
+ Here is the caller graph for this function:

◆ getCoursesOfUser()

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

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

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

Referenced by renderMyCourses().

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

◆ getCourseSortAction()

ilPortfolioPageGUI::getCourseSortAction (   $ctrl)
protected

Get course sort action.

Parameters
ilCtrl$ctrl
Returns
string

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

References ilPageObjectGUI\$ctrl.

Referenced by renderMyCourses().

855  {
856  return $ctrl->getFormActionByClass("ilobjportfoliogui", "preview");
857  }
+ Here is the caller graph for this function:

◆ getExportMaterial()

ilPortfolioPageGUI::getExportMaterial ( )

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

References $export_material.

1030  {
1031  return $this->export_material;
1032  }

◆ getJsOnloadCode()

ilPortfolioPageGUI::getJsOnloadCode ( )

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

References $js_onload_code.

228  {
229  return $this->js_onload_code;
230  }

◆ getPageContentUserId()

ilPortfolioPageGUI::getPageContentUserId (   $a_user_id)
protected

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

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

88  {
89  // user id from content-xml
90  return $a_user_id;
91  }
+ Here is the caller graph for this function:

◆ getPagePermaLink()

ilPortfolioPageGUI::getPagePermaLink ( )

Get page perma link.

Parameters

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

References ilLink\_getStaticLink(), ilPortfolioPage\findPortfolioForPage(), and ilPageObjectGUI\getId().

Referenced by renderVerification().

1149  {
1150  include_once("./Services/Link/classes/class.ilLink.php");
1152  $href = ilLink::_getStaticLink($pid, "prtf", true, "_" . $this->getId());
1153  return $href;
1154  }
static findPortfolioForPage($a_page_id)
Get portfolio id of page id.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getParentType()

ilPortfolioPageGUI::getParentType ( )

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

Referenced by __construct().

83  {
84  return "prtf";
85  }
+ Here is the caller graph for this function:

◆ getTabs()

ilPortfolioPageGUI::getTabs (   $a_activate = "")

Set all tabs.

Parameters

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

191  {
192  if (!$this->embedded) {
193  parent::getTabs($a_activate);
194  }
195  }

◆ getViewPageLink()

ilPortfolioPageGUI::getViewPageLink ( )

Get view page link.

Parameters

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

References $_GET, ilPageObjectGUI\$ctrl, and $DIC.

1122  {
1123  global $DIC;
1124 
1125  $ctrl = $DIC->ctrl();
1126 
1127  $ctrl->setParameterByClass("ilobjportfoliogui", "user_page", $_GET["ppage"]);
1128  return $ctrl->getLinkTargetByClass("ilobjportfoliogui", "preview");
1129  }
global $DIC
Definition: saml.php:7
$_GET["client_id"]

◆ getViewPageText()

ilPortfolioPageGUI::getViewPageText ( )

Get view page link.

Parameters

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

1138  {
1139  return $this->lng->txt("preview");
1140  }

◆ isMyCoursesActive()

ilPortfolioPageGUI::isMyCoursesActive ( )
protected

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

Referenced by renderMyCourses(), and renderMyCoursesTeaser().

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

◆ makePlaceHoldersClickable()

ilPortfolioPageGUI::makePlaceHoldersClickable (   $a_html)

Modify page content after xsl.

Parameters
string$a_html
Returns
string

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

References $_GET, ilPageObjectGUI\$ctrl, $end, $html, $i, $ilCtrl, $ilUser, ilPageObjectGUI\$lng, ilPageObjectGUI\$user, ilObject2\_lookupOwner(), array, ilPageObjectGUI\getId(), and ilPageObjectGUI\getOutputMode().

Referenced by postOutputProcessing().

1041  {
1042  $ilCtrl = $this->ctrl;
1043  $lng = $this->lng;
1044  $ilUser = $this->user;
1045 
1046  $c_pos = 0;
1047  $start = strpos($a_html, "{{{{{PlaceHolder#");
1048  if (is_int($start)) {
1049  $end = strpos($a_html, "}}}}}", $start);
1050  }
1051  $i = 1;
1052  while ($end > 0) {
1053  $param = substr($a_html, $start + 17, $end - $start - 17);
1054  $param = explode("#", $param);
1055 
1056  $html = $param[2];
1057  switch ($param[2]) {
1058  case "Text":
1059  $html = $lng->txt("cont_text_placeh");
1060  break;
1061 
1062  case "Media":
1063  $html = $lng->txt("cont_media_placeh");
1064  break;
1065 
1066  case "Question":
1067  $html = $lng->txt("cont_question_placeh");
1068  break;
1069 
1070  case "Verification":
1071  $html = $lng->txt("cont_verification_placeh");
1072  break;
1073  }
1074 
1075  // only if not owner
1076  if ($ilUser->getId() == ilObjPortfolio::_lookupOwner($this->portfolio_id)
1077  && $this->getOutputMode() == "presentation") {
1078  switch ($param[2]) {
1079  case "Text":
1080  $ilCtrl->setParameterByClass("ilportfoliopagegui", "prt_id", $_GET["prt_id"]);
1081  $ilCtrl->setParameterByClass("ilportfoliopagegui", "ppage", $this->getId());
1082  $ilCtrl->setParameterByClass("ilportfoliopagegui", "pl_pc_id", $param[0]);
1083  $ilCtrl->setParameterByClass("ilportfoliopagegui", "pl_hier_id", $param[1]);
1084  $href = $ilCtrl->getLinkTargetByClass("ilportfoliopagegui", "insertJSAtPlaceholder");
1085  $html = "<a href='" . $href . "'>" . $html . "</a>";
1086  break;
1087 
1088  case "Media":
1089  $ilCtrl->setParameterByClass("ilpcmediaobjectgui", "prt_id", $_GET["prt_id"]);
1090  $ilCtrl->setParameterByClass("ilpcmediaobjectgui", "ppage", $this->getId());
1091  $ilCtrl->setParameterByClass("ilpcmediaobjectgui", "pl_pc_id", $param[0]);
1092  $ilCtrl->setParameterByClass("ilpcmediaobjectgui", "pl_hier_id", $param[1]);
1093  $ilCtrl->setParameterByClass("ilpcmediaobjectgui", "subCmd", "insertNew");
1094  $href = $ilCtrl->getLinkTargetByClass(array("ilPortfolioPageGUI", "ilPageEditorGUI", "ilPCPlaceHolderGUI", "ilpcmediaobjectgui"), "insert");
1095  $html = "<a href='" . $href . "'>" . $html . "</a>";
1096  break;
1097  }
1098  }
1099 
1100  $h2 = substr($a_html, 0, $start) .
1101  $html .
1102  substr($a_html, $end + 5);
1103  $a_html = $h2;
1104  $i++;
1105 
1106  $start = strpos($a_html, "{{{{{PlaceHolder#", $start + 5);
1107  $end = 0;
1108  if (is_int($start)) {
1109  $end = strpos($a_html, "}}}}}", $start);
1110  }
1111  }
1112  return $a_html;
1113  }
$_GET["client_id"]
$end
Definition: saml1-acs.php:18
static _lookupOwner($a_id)
global $ilCtrl
Definition: ilias.php:18
$ilUser
Definition: imgupload.php:18
Create styles array
The data for the language used.
$i
Definition: disco.tpl.php:19
$html
Definition: example_001.php:87
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parseLOUserResults()

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

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

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

Referenced by parseObjectives().

1000  {
1001  $res = array();
1002 
1003  include_once "Modules/Course/classes/Objectives/class.ilLOUserResults.php";
1004  $lur = new ilLOUserResults($a_course_obj_id, $a_user_id);
1005  foreach ($lur->getCourseResultsForUserPresentation() as $objective_id => $types) {
1006  // show either initial or qualified for objective
1007  if (isset($types[ilLOUserResults::TYPE_INITIAL])) {
1008  $initial_status = $types[ilLOUserResults::TYPE_INITIAL]["status"];
1009  }
1010 
1011  // qualified test has priority
1012  if (isset($types[ilLOUserResults::TYPE_QUALIFIED])) {
1015  $result["initial"] = $types[ilLOUserResults::TYPE_INITIAL];
1016  } else {
1019  }
1020 
1021  $result["initial_status"] = $initial_status;
1022 
1023  $res[$objective_id] = $result;
1024  }
1025 
1026  return $res;
1027  }
$result
foreach($_POST as $key=> $value) $res
Create styles array
The data for the language used.
+ Here is the caller graph for this function:

◆ parseObjectives()

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

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

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

Referenced by getCoursesOfUser().

949  {
950  $res = array();
951 
952  // we need the collection for the correct order
953  include_once "Services/Tracking/classes/class.ilLPObjSettings.php";
954  include_once "Services/Tracking/classes/collection/class.ilLPCollectionOfObjectives.php";
956  $coll_objtv = $coll_objtv->getItems();
957  if ($coll_objtv) {
958  // #13373
959  $lo_results = $this->parseLOUserResults($a_obj_id, $a_user_id);
960 
961  include_once "Modules/Course/classes/Objectives/class.ilLOTestAssignments.php";
962  $lo_ass = ilLOTestAssignments::getInstance($a_obj_id);
963 
964  $tmp = array();
965 
966  include_once "Modules/Course/classes/class.ilCourseObjective.php";
967  foreach ($coll_objtv as $objective_id) {
968  $title = ilCourseObjective::lookupObjectiveTitle($objective_id, true);
969 
970  $tmp[$objective_id] = array(
971  "id" => $objective_id,
972  "title" => $title["title"],
973  "desc" => $title["description"],
974  "itest" => $lo_ass->getTestByObjective($objective_id, ilLOSettings::TYPE_TEST_INITIAL),
975  "qtest" => $lo_ass->getTestByObjective($objective_id, ilLOSettings::TYPE_TEST_QUALIFIED)
976  );
977 
978  if (array_key_exists($objective_id, $lo_results)) {
979  $lo_result = $lo_results[$objective_id];
980  $tmp[$objective_id]["user_id"] = $lo_result["user_id"];
981  $tmp[$objective_id]["result_perc"] = $lo_result["result_perc"];
982  $tmp[$objective_id]["limit_perc"] = $lo_result["limit_perc"];
983  $tmp[$objective_id]["status"] = $lo_result["status"];
984  $tmp[$objective_id]["type"] = $lo_result["type"];
985  $tmp[$objective_id]["initial"] = $lo_result["initial"];
986  }
987  }
988 
989  // order
990  foreach ($coll_objtv as $objtv_id) {
991  $res[] = $tmp[$objtv_id];
992  }
993  }
994 
995  return $res;
996  }
static getInstance($a_container_id)
Get instance by container id.
static lookupObjectiveTitle($a_objective_id, $a_add_description=false)
foreach($_POST as $key=> $value) $res
Create styles array
The data for the language used.
parseLOUserResults($a_course_obj_id, $a_user_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ postOutputProcessing()

ilPortfolioPageGUI::postOutputProcessing (   $a_output)

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

References $def, $type, array, makePlaceHoldersClickable(), and renderPageElement().

233  {
234  $parts = array(
235  "Profile" => array("0-9", "a-z", "0-9a-z_;\W"), // user, mode, fields
236  "Verification" => array("0-9", "a-z", "0-9"), // user, type, id
237  "Blog" => array("0-9", "0-9", "0-9;\W"), // user, blog id, posting ids
238  "BlogTeaser" => array("0-9", "0-9", "0-9;\W"), // user, blog id, posting ids
239  "Skills" => array("0-9", "0-9"), // user, skill id
240  "SkillsTeaser" => array("0-9", "0-9"), // user, skill id
241  "ConsultationHours" => array("0-9", "a-z", "0-9;\W"), // user, mode, group ids
242  "ConsultationHoursTeaser" => array("0-9", "a-z", "0-9;\W"), // user, mode, group ids
243  "MyCourses" => array("0-9", "a-z*"), // user, sort
244  "MyCoursesTeaser" => array("0-9", "a-z*") // user, sort
245  );
246 
247  foreach ($parts as $type => $def) {
248  // #15732 - allow optional parts
249  $def_parts = array();
250  foreach ($def as $part) {
251  $is_opt = (substr($part, -1) == "*");
252  if (!$is_opt) {
253  $def_parts[] = "#";
254  $end_marker = "+";
255  } else {
256  $def_parts[] = "#*";
257  $end_marker = "*";
258  $part = substr($part, 0, -1);
259  }
260  $def_parts[] = "([" . $part . "]" . $end_marker . ")";
261  }
262  $def = implode("", $def_parts);
263 
264  if (preg_match_all(
265  "/" . $this->pl_start . $type . $def . $this->pl_end . "/",
266  $a_output,
267  $blocks
268  )) {
269  foreach ($blocks[0] as $idx => $block) {
270  switch ($type) {
271  case "Profile":
272  case "Blog":
273  case "BlogTeaser":
274  case "Skills":
275  case "SkillsTeaser":
276  case "ConsultationHours":
277  case "ConsultationHoursTeaser":
278  case "MyCourses":
279  case "MyCoursesTeaser":
280  $subs = null;
281  if (trim($blocks[3][$idx])) {
282  foreach (explode(";", $blocks[3][$idx]) as $sub) {
283  if (trim($sub)) {
284  $subs[] = trim($sub);
285  }
286  }
287  }
288  $snippet = $this->{"render" . $type}(
289  $blocks[1][$idx],
290  $blocks[2][$idx],
291  $subs
292  );
293  break;
294 
295  default:
296  $snippet = $this->{"render" . $type}(
297  $blocks[1][$idx],
298  $blocks[2][$idx],
299  $blocks[3][$idx]
300  );
301  break;
302  }
303 
304  $snippet = $this->renderPageElement($type, $snippet);
305  $a_output = str_replace($block, $snippet, $a_output);
306  }
307  }
308  }
309 
310  $a_output = $this->makePlaceHoldersClickable($a_output);
311 
312  return $a_output;
313  }
$type
makePlaceHoldersClickable($a_html)
Modify page content after xsl.
Create styles array
The data for the language used.
$def
Definition: croninfo.php:21
renderPageElement($a_type, $a_html)
+ Here is the call graph for this function:

◆ renderBlog()

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

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

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

Referenced by showPage().

443  {
445 
446  // not used
447  // $user_id = $this->getPageContentUserId($a_user_id);
448 
449  // full blog (separate tab/page)
450  if (!$a_posting_ids) {
451  include_once "Modules/Blog/classes/class.ilObjBlogGUI.php";
452  $blog = new ilObjBlogGUI($a_blog_id, ilObject2GUI::WORKSPACE_OBJECT_ID);
453  $blog->disableNotes(!$this->enable_comments);
454  $blog->setContentStyleSheet();
455 
456  if ($this->getOutputMode() != "offline") {
457  return $ilCtrl->getHTML($blog);
458  } else {
459  }
460  }
461  // embedded postings
462  else {
463  $html = array();
464 
465  include_once "Modules/Blog/classes/class.ilObjBlog.php";
466  $html[] = ilObjBlog::_lookupTitle($a_blog_id);
467 
468  include_once "Modules/Blog/classes/class.ilBlogPostingGUI.php";
469  foreach ($a_posting_ids as $post) {
470  $page = new ilBlogPostingGUI(0, null, $post);
471  if ($this->getOutputMode() != "offline") {
472  $page->setOutputMode(IL_PAGE_PREVIEW);
473  } else {
474  $page->setOutputMode("offline");
475  }
476  $html[] = $page->showPage();
477  }
478 
479  return implode("\n", $html);
480  }
481  }
const IL_PAGE_PREVIEW
static _lookupTitle($a_id)
Class ilBlogPosting GUI class.
global $ilCtrl
Definition: ilias.php:18
Class ilObjBlogGUI.
$post
Definition: post.php:34
Create styles array
The data for the language used.
$html
Definition: example_001.php:87
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderBlogTeaser()

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

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

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

484  {
485  // not used
486  // $user_id = $this->getPageContentUserId($a_user_id);
487 
488  $postings = "";
489  if ($a_posting_ids) {
490  $postings = array("<ul>");
491  include_once "Modules/Blog/classes/class.ilBlogPosting.php";
492  foreach ($a_posting_ids as $post) {
493  $post = new ilBlogPosting($post);
494  $postings[] = "<li>" . $post->getTitle() . " - " .
495  ilDatePresentation::formatDate($post->getCreated()) . "</li>";
496  }
497  $postings[] = "</ul>";
498  $postings = implode("\n", $postings);
499  }
500 
501  return $this->renderTeaser("blog", $this->lng->txt("obj_blog") . ' "' .
502  ilObject::_lookupTitle($a_blog_id) . '"', $postings);
503  }
Class ilBlogPosting.
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false)
Format a date public.
static _lookupTitle($a_id)
lookup object title
$post
Definition: post.php:34
Create styles array
The data for the language used.
renderTeaser($a_type, $a_title, $a_options=null)
+ Here is the call graph for this function:

◆ renderConsultationHours()

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

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

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

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

◆ renderConsultationHoursTeaser()

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

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

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

Referenced by renderConsultationHours().

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

◆ renderMyCourses()

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

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

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

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

◆ renderMyCoursesTeaser()

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

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

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

Referenced by renderMyCourses().

621  {
622  // not used
623  // $user_id = $this->getPageContentUserId($a_user_id);
624 
625  $title = $this->isMyCoursesActive()
626  ? "my_courses"
627  : "my_courses_inactive";
628 
629  return $this->renderTeaser(
630  $title,
631  $this->lng->txt("prtf_page_element_my_courses_title")
632  );
633  }
renderTeaser($a_type, $a_title, $a_options=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderPageElement()

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

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

Referenced by postOutputProcessing().

316  {
317  return trim($a_html);
318  }
+ Here is the caller graph for this function:

◆ renderProfile()

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

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

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

334  {
336 
337  $user_id = $this->getPageContentUserId($a_user_id);
338 
339  if ($this->getOutputMode() == "offline") {
340  // profile picture is done in ilPortfolioHTMLExport
341 
342  $this->export_material["js"][] = "http://maps.google.com/maps/api/js?sensor=false";
343  $this->export_material["js"][] = "./Services/Maps/js/ServiceGoogleMaps.js";
344  $this->export_material["js"][] = "./Services/Maps/js/OpenLayers.js";
345  $this->export_material["js"][] = "./Services/Maps/js/ServiceOpenLayers.js";
346  }
347 
348  include_once("./Services/User/classes/class.ilPublicUserProfileGUI.php");
349  $pub_profile = new ilPublicUserProfileGUI($user_id);
350  $pub_profile->setEmbedded(true, ($this->getOutputMode() == "offline"));
351 
352  // full circle: additional was set in the original public user profile call
353  $pub_profile->setAdditional($this->getAdditional());
354 
355  if ($a_type == "manual" && sizeof($a_fields)) {
356  $prefs = array();
357  foreach ($a_fields as $field) {
358  $field = trim($field);
359  if ($field) {
360  $prefs["public_" . $field] = "y";
361  }
362  }
363 
364  $pub_profile->setCustomPrefs($prefs);
365  }
366 
367  if ($this->getOutputMode() != "offline") {
368  return $ilCtrl->getHTML($pub_profile);
369  } else {
370  return $pub_profile->getEmbeddable();
371  }
372  }
getAdditional()
Get Additonal Information.
global $ilCtrl
Definition: ilias.php:18
$a_type
Definition: workflow.php:92
GUI class for public user profile presentation.
Create styles array
The data for the language used.
+ Here is the call graph for this function:

◆ renderSkills()

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

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

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

506  {
507  if ($this->getOutputMode() == "preview") {
508  return $this->renderSkillsTeaser($a_user_id, $a_skills_id);
509  }
510 
511  $user_id = $this->getPageContentUserId($a_user_id);
512 
513  include_once "Services/Skill/classes/class.ilPersonalSkillsGUI.php";
514  $gui = new ilPersonalSkillsGUI();
515  if ($this->getOutputMode() == "offline") {
516  $gui->setOfflineMode("./files/");
517  }
518  $html = $gui->getSkillHTML($a_skills_id, $user_id);
519 
520  return $html;
521  }
Personal skills GUI class.
renderSkillsTeaser($a_user_id, $a_skills_id)
$html
Definition: example_001.php:87
+ Here is the call graph for this function:

◆ renderSkillsTeaser()

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

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

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

Referenced by renderSkills().

524  {
525  // not used
526  // $user_id = $this->getPageContentUserId($a_user_id);
527 
528  include_once "Services/Skill/classes/class.ilSkillTreeNode.php";
529 
530  return $this->renderTeaser("skills", $this->lng->txt("skills") . ' "' .
531  ilSkillTreeNode::_lookupTitle($a_skills_id) . '"');
532  }
static _lookupTitle($a_obj_id, $a_tref_id=0)
Lookup Title.
renderTeaser($a_type, $a_title, $a_options=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderTeaser()

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

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

References $a_type, and $options.

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

321  {
322  $options = "";
323  if ($a_options) {
324  $options = '<div class="il_Footer">' . $this->lng->txt("prtf_page_element_teaser_settings") .
325  ": " . $a_options . '</div>';
326  }
327 
328  return '<div style="margin:5px" class="ilBox"><h3>' . $a_title . '</h3>' .
329  '<div class="il_Description_no_margin">' . $this->lng->txt("prtf_page_element_teaser_" . $a_type) . '</div>' .
330  $options . '</div>';
331  }
$a_type
Definition: workflow.php:92
if(!isset($_REQUEST['ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
Definition: as_login.php:20
+ Here is the caller graph for this function:

◆ renderVerification()

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

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

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

375  {
376  $objDefinition = $this->obj_definition;
377 
378  // not used
379  // $user_id = $this->getPageContentUserId($a_user_id);
380 
381  $class = "ilObj" . $objDefinition->getClassName($a_type) . "GUI";
382  include_once $objDefinition->getLocation($a_type) . "/class." . $class . ".php";
383  $verification = new $class($a_id, ilObject2GUI::WORKSPACE_OBJECT_ID);
384 
385  if ($this->getOutputMode() == "print") {
386  $url = $this->getPagePermaLink();
387  } elseif ($this->getOutputMode() != "offline") {
388  // direct download link
389  $this->ctrl->setParameter($this, "dlid", $a_id);
390  $url = $this->ctrl->getLinkTarget($this, "dl" . $a_type);
391  $this->ctrl->setParameter($this, "dlid", "");
392  } else {
393  $file = $verification->object->getFilePath();
394  $url = "files/" . basename($file);
395 
396  $this->export_material["files"][] = $file;
397  }
398 
399  return $verification->render(true, $url);
400  }
$a_type
Definition: workflow.php:92
$url
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
getPagePermaLink()
Get page perma link.
+ Here is the call graph for this function:

◆ setAdditional()

ilPortfolioPageGUI::setAdditional (   $a_additional)

Set Additonal Information.

Parameters
array$a_additionalAdditonal Information

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

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

213  {
214  $this->additional = $a_additional;
215  }
+ Here is the caller graph for this function:

◆ setEmbedded()

ilPortfolioPageGUI::setEmbedded (   $a_value)

Set embedded mode: will suppress tabs.

Parameters
bool$a_value

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

203  {
204  $this->embedded = (bool) $a_value;
205  }

◆ showPage()

ilPortfolioPageGUI::showPage ( )

Show page.

Returns
string page output

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

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

164  {
166 
167  if (!$this->getPageObject()) {
168  return;
169  }
170 
171  switch ($this->getPageObject()->getType()) {
173  return $this->renderBlog($ilUser->getId(), (int) $this->getPageObject()->getTitle());
174 
175  default:
176  $this->setTemplateOutput(false);
177  // $this->setPresentationTitle($this->getPageObject()->getTitle());
178  $output = parent::showPage();
179 
180  return $output;
181  }
182  }
renderBlog($a_user_id, $a_blog_id, array $a_posting_ids=null)
getPageObject()
Get Page Object.
setTemplateOutput($a_output=true)
if(!is_dir( $entity_dir)) exit("Fatal Error ([A-Za-z0-9]+)\+" &#(? foreach( $entity_files as $file) $output
$ilUser
Definition: imgupload.php:18
+ Here is the call graph for this function:

Field Documentation

◆ $additional

ilPortfolioPageGUI::$additional = array()
protected

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

Referenced by getAdditional().

◆ $export_material

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

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

Referenced by getExportMaterial().

◆ $initialized

ilPortfolioPageGUI::$initialized = 0
staticprotected

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

◆ $js_onload_code

ilPortfolioPageGUI::$js_onload_code = array()
protected

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

Referenced by getJsOnloadCode().

◆ $obj_definition

ilPortfolioPageGUI::$obj_definition
protected

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

Referenced by renderVerification().

◆ $tree

ilPortfolioPageGUI::$tree
protected

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

Referenced by getCoursesOfUser().

◆ EMBEDDED_NO_OUTPUT

const ilPortfolioPageGUI::EMBEDDED_NO_OUTPUT = -99

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

Referenced by ilObjPortfolioBaseGUI\handlePageCall().


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