ILIAS  trunk Revision v11.0_alpha-1715-g7fc467680fb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilStudyProgrammeDashboardViewGUI Class Reference
+ Inheritance diagram for ilStudyProgrammeDashboardViewGUI:
+ Collaboration diagram for ilStudyProgrammeDashboardViewGUI:

Public Member Functions

 initViewSettings ()
 
 emptyHandling ()
 
 initData ()
 
 getBlockType ()
 
 removeMultipleEnabled ()
 
 getRemoveMultipleActionText ()
 
- Public Member Functions inherited from ilDashboardBlockGUI
 __construct ()
 
 initViewSettings ()
 
 initData ()
 
 emptyHandling ()
 
 addCustomCommandsToActionMenu (ilObjectListGUI $itemListGui, int $ref_id)
 
 getNoItemFoundContent ()
 
 getViewSettings ()
 
 init ()
 
 getHTML ()
 
 setData (array $a_data)
 
 getData ()
 
 addCommandActions ()
 
 getRemoveModal ()
 
 executeCommand ()
 
 viewDashboardObject ()
 
 changePDItemSortingObject ()
 
 changePDItemPresentationObject ()
 
 getItemGroups ()
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
 removeMultipleEnabled ()
 
 getRemoveMultipleActionText ()
 
 confirmedRemove (array $ids)
 
 byType (string $a_type)
 
- Public Member Functions inherited from ilBlockGUI
 __construct ()
 
 getBlockType ()
 
 setData (array $a_data)
 
 getData ()
 
 setPresentation (int $type)
 
 getPresentation ()
 
 setBlockId (string $a_block_id="0")
 
 getBlockId ()
 
 setGuiObject (object $a_gui_object)
 Set GuiObject. More...
 
 getGuiObject ()
 
 setTitle (string $a_title)
 
 getTitle ()
 
 setOffset (int $a_offset)
 
 getOffset ()
 
 checkOffset (int $offset)
 
 setLimit (int $a_limit)
 
 getLimit ()
 
 setEnableEdit (bool $a_enableedit)
 
 getEnableEdit ()
 
 setRepositoryMode (bool $a_repositorymode)
 
 getRepositoryMode ()
 
 setSubtitle (string $a_subtitle)
 
 getSubtitle ()
 
 setRefId (int $a_refid)
 Set Ref Id (only used if isRepositoryObject() is true). More...
 
 getRefId ()
 
 setAdminCommands (bool $a_admincommands)
 
 getAdminCommands ()
 
 setEnableNumInfo (bool $a_enablenuminfo)
 
 getEnableNumInfo ()
 
 setProperties (array $a_properties)
 This function is supposed to be used for block type specific properties, that should be inherited through ilColumnGUI->setBlockProperties. More...
 
 getProperty (string $a_property)
 
 setProperty (string $a_property, string $a_value)
 
 setRowTemplate (string $a_rowtemplatename, string $a_rowtemplatedir="")
 Set Row Template Name. More...
 
 getNavParameter ()
 
 getConfigParameter ()
 
 getMoveParameter ()
 
 getRowTemplateName ()
 
 getRowTemplateDir ()
 
 addBlockCommand (string $a_href, string $a_text, string $a_onclick="", ?RoundTrip $modal=null)
 
 getBlockCommands ()
 
 getHTML ()
 
 getAsynch ()
 Use this for final get before sending asynchronous output (ajax) per echo to output. More...
 
 getPaginationViewControl ()
 Fill previous/next row. More...
 
 getViewControlsForPanel ()
 
 sortObject ()
 
 addSortOption (string $option, string $label, bool $active)
 
 setSortTarget (string $target)
 
 addPresentation (string $label, string $target, bool $active)
 
 getNoItemFoundContent ()
 

Protected Member Functions

 isReadable (ilObjStudyProgramme $prg)
 
 getVisibleOnPDMode ()
 
 maybeGetCertificateLink (int $usr_id, int $prg_obj_id, int $prg_ref_id)
 
- Protected Member Functions inherited from ilDashboardBlockGUI
 getCardForData (BlockDTO $data)
 
 getListItemGroups ()
 
 getListItemForDataDTO (BlockDTO $data)
 
 isRepositoryObject ()
 
 getLegacyContent ()
 
 initAndShow ()
 
 isRootNode (int $refId)
 
 getRepositoryTitle ()
 
 getManageFields ()
 
- Protected Member Functions inherited from ilBlockGUI
 isRepositoryObject ()
 Returns whether block has a corresponding repository object. More...
 
 specialCharsAsEntities (string $string)
 
 initCommands ()
 
 preloadData (array $data)
 Can be overwritten in subclasses. More...
 
 getLegacyContent ()
 Get legacy content. More...
 
 getListItemForData (array $data)
 Get list item for data array. More...
 
 handleNavigation ()
 Handle navigation. More...
 
 loadData ()
 Load data for current page. More...
 
 getListItemGroups ()
 Get items. More...
 
 addRepoCommands ()
 Add repo commands. More...
 
 getActionsForPanel ()
 
 send (string $output)
 Send. More...
 

Protected Attributes

string $visible_on_pd_mode = null
 
- Protected Attributes inherited from ilDashboardBlockGUI
ilFavouritesManager $favourites_manager
 
int $requested_item_ref_id
 
ilSetting $settings
 
ilLogger $logging
 
Services $http
 
ilPDSelectedItemsBlockViewSettings $viewSettings
 
array $data
 
- Protected Attributes inherited from ilBlockGUI
ILIAS UI Renderer $renderer
 
Factory $factory
 
object $gui_object
 
ILIAS Block StandardGUIRequest $request
 
ILIAS Block BlockManager $block_manager
 
bool $repositorymode = false
 
ILIAS DI UIServices $ui
 
array $data = array()
 
bool $enablenuminfo = true
 
array $footer_links = array()
 
string $block_id = "0"
 
bool $allow_moving = true
 
array $move = array("left" => false, "right" => false, "up" => false, "down" => false)
 
array $block_commands = array()
 
int $max_count = 0
 
bool $close_command = false
 
bool $image = false
 
array $property = []
 
string $nav_value = ""
 
string $css_row = ""
 
string $title = ""
 
bool $admincommands = false
 
array $dropdown
 
ilTemplate $tpl
 
ilGlobalTemplateInterface $main_tpl
 
ilObjUser $user
 
ilCtrl $ctrl
 
ilAccessHandler $access
 
ilLanguage $lng
 
ilObjectDefinition $obj_def
 
int $presentation
 
int $requested_ref_id
 

Additional Inherited Members

- Static Public Member Functions inherited from ilBlockGUI
static getScreenMode ()
 
- Data Fields inherited from ilBlockGUI
const PRES_MAIN_LEG = 0
 
const PRES_SEC_LEG = 1
 
const PRES_SEC_LIST = 2
 
const PRES_MAIN_LIST = 3
 
const PRES_MAIN_TILE = 4
 

Detailed Description

Definition at line 25 of file class.ilStudyProgrammeDashboardViewGUI.php.

Member Function Documentation

◆ emptyHandling()

ilStudyProgrammeDashboardViewGUI::emptyHandling ( )

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

39  : string
40  {
41  return '';
42  }

◆ getBlockType()

ilStudyProgrammeDashboardViewGUI::getBlockType ( )

Definition at line 110 of file class.ilStudyProgrammeDashboardViewGUI.php.

110  : string
111  {
112  return 'pdprg';
113  }

◆ getRemoveMultipleActionText()

ilStudyProgrammeDashboardViewGUI::getRemoveMultipleActionText ( )

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

120  : string
121  {
122  return '';
123  }

◆ getVisibleOnPDMode()

ilStudyProgrammeDashboardViewGUI::getVisibleOnPDMode ( )
protected

Definition at line 98 of file class.ilStudyProgrammeDashboardViewGUI.php.

References $visible_on_pd_mode, ilObjStudyProgrammeAdmin\SETTING_VISIBLE_ON_PD, ilObjStudyProgrammeAdmin\SETTING_VISIBLE_ON_PD_READ, and ILIAS\Repository\settings().

Referenced by isReadable().

98  : string
99  {
100  if (is_null($this->visible_on_pd_mode)) {
101  $this->visible_on_pd_mode =
102  $this->settings->get(
105  );
106  }
108  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initData()

ilStudyProgrammeDashboardViewGUI::initData ( )

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

References ilStudyProgrammeDIC\dic(), ilObjStudyProgramme\getInstanceByObjId(), isReadable(), ILIAS\Repository\lng(), maybeGetCertificateLink(), null, ilDashboardBlockGUI\setData(), ilPRGProgress\STATUS_ACCREDITED, ilPRGProgress\STATUS_COMPLETED, and ILIAS\Repository\user().

44  : void
45  {
46  $user_table = ilStudyProgrammeDIC::dic()['ilStudyProgrammeUserTable'];
47  $user_table->disablePermissionCheck(true);
48  $rows = $user_table->fetchSingleUserRootAssignments($this->user->getId());
49 
50  $items = [];
51  foreach ($rows as $row) {
52  $prg = ilObjStudyProgramme::getInstanceByObjId($row->getNodeId());
53  if (!$this->isReadable($prg) || !$prg->isActive()) {
54  continue;
55  }
56 
57  $properties = [
58  $this->lng->txt('prg_dash_label_minimum') => $row->getPointsRequired(),
59  $this->lng->txt('prg_dash_label_gain') => $row->getPointsCurrent(),
60  $this->lng->txt('prg_dash_label_status') => $row->getStatus(),
61  ];
62 
63  if ($row->getStatusRaw() === ilPRGProgress::STATUS_ACCREDITED ||
64  $row->getStatusRaw() === ilPRGProgress::STATUS_COMPLETED
65  ) {
66  $properties[$this->lng->txt('prg_dash_label_valid')] = $row->getExpiryDate() ?: $row->getValidity();
67 
68  if ($cert_link = $this->maybeGetCertificateLink($this->user->getId(), $prg->getId(), $prg->getRefId())) {
69  $properties[$this->lng->txt('certificate')] = $cert_link;
70  }
71  } else {
72  $properties[$this->lng->txt('prg_dash_label_finish_until')] = $row->getDeadline();
73  }
74 
75  $items[] = new BlockDTO(
76  $prg->getType(),
77  $prg->getRefId(),
78  $prg->getId(),
79  $prg->getTitle(),
80  $prg->getDescription(),
81  null,
82  null,
83  $properties
84  );
85  }
86 
87  $this->setData(['' => $items]);
88  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static getInstanceByObjId(int $obj_id)
maybeGetCertificateLink(int $usr_id, int $prg_obj_id, int $prg_ref_id)
+ Here is the call graph for this function:

◆ initViewSettings()

ilStudyProgrammeDashboardViewGUI::initViewSettings ( )

Definition at line 29 of file class.ilStudyProgrammeDashboardViewGUI.php.

References ILIAS\Repository\ctrl(), ILIAS\Repository\user(), and ilPDSelectedItemsBlockConstants\VIEW_MY_STUDYPROGRAMME.

29  : void
30  {
31  $this->viewSettings = new ilPDSelectedItemsBlockViewSettings(
32  $this->user,
34  );
35 
36  $this->ctrl->setParameter($this, 'view', $this->viewSettings->getCurrentView());
37  }
+ Here is the call graph for this function:

◆ isReadable()

ilStudyProgrammeDashboardViewGUI::isReadable ( ilObjStudyProgramme  $prg)
protected

Definition at line 90 of file class.ilStudyProgrammeDashboardViewGUI.php.

References ILIAS\Repository\access(), ilObject\getId(), ilObject\getRefId(), getVisibleOnPDMode(), and ilObjStudyProgrammeAdmin\SETTING_VISIBLE_ON_PD_ALLWAYS.

Referenced by initData().

90  : bool
91  {
93  return true;
94  }
95  return $this->access->checkAccess('read', "", $prg->getRefId(), "prg", $prg->getId());
96  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ maybeGetCertificateLink()

ilStudyProgrammeDashboardViewGUI::maybeGetCertificateLink ( int  $usr_id,
int  $prg_obj_id,
int  $prg_ref_id 
)
protected

Definition at line 125 of file class.ilStudyProgrammeDashboardViewGUI.php.

References ILIAS\Repository\ctrl(), factory(), ILIAS\Repository\lng(), null, and renderer().

Referenced by initData().

125  : ?string
126  {
127  $cert_validator = new ilCertificateDownloadValidator();
128  if ($cert_validator->isCertificateDownloadable($usr_id, $prg_obj_id)) {
129  $this->ctrl->setParameterByClass('ilObjStudyProgrammeGUI', 'ref_id', $prg_ref_id);
130  $target = $this->ctrl->getLinkTargetByClass("ilObjStudyProgrammeGUI", "deliverCertificate");
131  $this->ctrl->setParameterByClass('ilObjStudyProgrammeGUI', 'ref_id', null);
132  $this->lng->loadLanguageModule('certificate');
133  return $this->renderer->render($this->factory->link()->standard($this->lng->txt('download_certificate'), $target));
134  }
135  return null;
136  }
factory()
renderer()
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
Validates if an active certificate is stored in the database and can be downloaded by the user...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeMultipleEnabled()

ilStudyProgrammeDashboardViewGUI::removeMultipleEnabled ( )

Definition at line 115 of file class.ilStudyProgrammeDashboardViewGUI.php.

115  : bool
116  {
117  return false;
118  }

Field Documentation

◆ $visible_on_pd_mode

string ilStudyProgrammeDashboardViewGUI::$visible_on_pd_mode = null
protected

Definition at line 27 of file class.ilStudyProgrammeDashboardViewGUI.php.

Referenced by getVisibleOnPDMode().


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