ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilBadgeManagementGUI Class Reference

Class ilBadgeManagementGUI. More...

+ Collaboration diagram for ilBadgeManagementGUI:

Public Member Functions

 __construct (private readonly int $parent_ref_id, int $a_parent_obj_id=null, string $a_parent_obj_type=null)
 
 executeCommand ()
 

Protected Member Functions

 setTabs (string $a_active)
 
 hasWrite ()
 
 listBadges ()
 
 applyBadgeFilter ()
 
 resetBadgeFilter ()
 
 addBadge (ilPropertyFormGUI $a_form=null)
 
 initBadgeForm (string $a_mode, ilBadgeType $a_type, string $a_type_unique_id)
 
 saveBadge ()
 
 editBadge (ilPropertyFormGUI $a_form=null)
 
 setBadgeFormValues (ilPropertyFormGUI $a_form, ilBadge $a_badge, ilBadgeType $a_type)
 
 updateBadge ()
 
 confirmDeleteBadges ()
 
 deleteBadges ()
 
 getBadgesFromMultiAction ()
 
 copyBadges ()
 
 clearClipboard ()
 
 getValidBadgesFromClipboard ()
 
 pasteBadges ()
 
 toggleBadges (bool $a_status)
 
 activateBadges ()
 
 deactivateBadges ()
 
 listUsers ()
 
 applyListUsers ()
 
 resetListUsers ()
 
 awardBadgeUserSelection ()
 
 applyAwardBadgeUserSelection ()
 
 resetAwardBadgeUserSelection ()
 
 assignBadge ()
 
 confirmDeassignBadge ()
 
 deassignBadge ()
 

Private Attributes

ilBadgeGUIRequest $request
 
ilBadgeManagementSessionRepository $session_repo
 
ilLanguage $lng
 
ilCtrl $ctrl
 
ilTabsGUI $tabs
 
ilAccessHandler $access
 
ilToolbarGUI $toolbar
 
ilGlobalTemplateInterface $tpl
 
ilObjUser $user
 
ILIAS UI Factory $ui_factory
 
int $parent_obj_id
 
string $parent_obj_type
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilBadgeManagementGUI::__construct ( private readonly int  $parent_ref_id,
int  $a_parent_obj_id = null,
string  $a_parent_obj_type = null 
)

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

References $DIC, ilObject\_lookupObjId(), ilObject\_lookupType(), ILIAS\Repository\access(), ILIAS\Repository\ctrl(), ilBadgeHandler\getInstance(), ILIAS\Repository\lng(), ilLanguage\loadLanguageModule(), ILIAS\Repository\tabs(), ILIAS\Repository\toolbar(), and ILIAS\Repository\user().

46  {
47  global $DIC;
48 
49  $this->lng = $DIC->language();
50  $this->ctrl = $DIC->ctrl();
51  $this->tabs = $DIC->tabs();
52  $this->access = $DIC->access();
53  $this->toolbar = $DIC->toolbar();
54  $this->ui_factory = $DIC->ui()->factory();
55  $this->tpl = $DIC['tpl'];
56  $this->user = $DIC->user();
57  $lng = $DIC->language();
58  $this->parent_obj_id = $a_parent_obj_id
59  ?: ilObject::_lookupObjId($parent_ref_id);
60  $this->parent_obj_type = $a_parent_obj_type
61  ?: ilObject::_lookupType($this->parent_obj_id);
62 
63  if (!ilBadgeHandler::getInstance()->isObjectActive($this->parent_obj_id)) {
64  throw new ilException('inactive object');
65  }
66 
67  $lng->loadLanguageModule('badge');
68 
69  $this->request = new ilBadgeGUIRequest(
70  $DIC->http(),
71  $DIC->refinery()
72  );
73 
74  $this->session_repo = new ilBadgeManagementSessionRepository();
75  }
loadLanguageModule(string $a_module)
Load language module.
static _lookupObjId(int $ref_id)
global $DIC
Definition: feed.php:28
static _lookupType(int $id, bool $reference=false)
+ Here is the call graph for this function:

Member Function Documentation

◆ activateBadges()

ilBadgeManagementGUI::activateBadges ( )
protected

Definition at line 677 of file class.ilBadgeManagementGUI.php.

References toggleBadges().

677  : void
678  {
679  $this->toggleBadges(true);
680  }
+ Here is the call graph for this function:

◆ addBadge()

ilBadgeManagementGUI::addBadge ( ilPropertyFormGUI  $a_form = null)
protected

Definition at line 231 of file class.ilBadgeManagementGUI.php.

References $ctrl, $handler, $tpl, ilBadgeHandler\getInstance(), hasWrite(), initBadgeForm(), and ilGlobalTemplateInterface\setContent().

Referenced by saveBadge().

231  : void
232  {
233  $ilCtrl = $this->ctrl;
234  $tpl = $this->tpl;
235 
236  $type_id = $this->request->getType();
237  if (!$type_id ||
238  !$this->hasWrite()) {
239  $ilCtrl->redirect($this, 'listBadges');
240  }
241 
242  $ilCtrl->setParameter($this, 'type', $type_id);
243 
245  $type = $handler->getTypeInstanceByUniqueId($type_id);
246  if (!$type) {
247  $ilCtrl->redirect($this, 'listBadges');
248  }
249 
250  if (!$a_form) {
251  $a_form = $this->initBadgeForm('create', $type, $type_id);
252  }
253 
254  $tpl->setContent($a_form->getHTML());
255  }
initBadgeForm(string $a_mode, ilBadgeType $a_type, string $a_type_unique_id)
setContent(string $a_html)
Sets content for standard template.
ilGlobalTemplateInterface $tpl
$handler
Definition: index.php:18
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ applyAwardBadgeUserSelection()

ilBadgeManagementGUI::applyAwardBadgeUserSelection ( )
protected

Definition at line 776 of file class.ilBadgeManagementGUI.php.

References awardBadgeUserSelection().

776  : void
777  {
778  $tbl = new ilBadgeUserTableGUI($this, 'awardBadgeUserSelection', $this->parent_ref_id);
779  $tbl->resetOffset();
780  $tbl->writeFilterToSession();
781  $this->awardBadgeUserSelection();
782  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ applyBadgeFilter()

ilBadgeManagementGUI::applyBadgeFilter ( )
protected

Definition at line 210 of file class.ilBadgeManagementGUI.php.

References hasWrite(), and listBadges().

210  : void
211  {
212  $tbl = new ilBadgeTableGUI($this, 'listBadges', $this->parent_obj_id, $this->hasWrite());
213  $tbl->resetOffset();
214  $tbl->writeFilterToSession();
215  $this->listBadges();
216  }
TableGUI class for badge listing.
+ Here is the call graph for this function:

◆ applyListUsers()

ilBadgeManagementGUI::applyListUsers ( )
protected

Definition at line 720 of file class.ilBadgeManagementGUI.php.

References listUsers().

720  : void
721  {
722  $tbl = new ilBadgeUserTableGUI($this, 'listUsers', $this->parent_ref_id);
723  $tbl->resetOffset();
724  $tbl->writeFilterToSession();
725  $this->listUsers();
726  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ assignBadge()

ilBadgeManagementGUI::assignBadge ( )
protected

Definition at line 792 of file class.ilBadgeManagementGUI.php.

References $ctrl, $lng, $user, ilBadgeAssignment\exists(), ilBadgeHandler\getInstance(), hasWrite(), and ilLanguage\txt().

792  : void
793  {
794  $ilCtrl = $this->ctrl;
795  $ilUser = $this->user;
796  $lng = $this->lng;
797 
798  $user_ids = $this->request->getIds();
799  $badge_id = $this->request->getBadgeId();
800  if (!$user_ids ||
801  !$badge_id ||
802  !$this->hasWrite()) {
803  $ilCtrl->redirect($this, 'listUsers');
804  }
805 
806  $new_badges = [];
807  foreach ($user_ids as $user_id) {
808  if (!ilBadgeAssignment::exists($badge_id, (int) $user_id)) {
809  $ass = new ilBadgeAssignment($badge_id, (int) $user_id);
810  $ass->setAwardedBy($ilUser->getId());
811  $ass->store();
812 
813  $new_badges[$user_id][] = $badge_id;
814  }
815  }
816 
817  ilBadgeHandler::getInstance()->sendNotification($new_badges, $this->parent_ref_id);
818 
819  $this->tpl->setOnScreenMessage('success', $lng->txt('settings_saved'), true);
820  $ilCtrl->redirect($this, 'listUsers');
821  }
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 exists(int $a_badge_id, int $a_user_id)
+ Here is the call graph for this function:

◆ awardBadgeUserSelection()

ilBadgeManagementGUI::awardBadgeUserSelection ( )
protected

Definition at line 736 of file class.ilBadgeManagementGUI.php.

References $ctrl, $lng, $tabs, $tpl, ilBadgeHandler\getInstance(), hasWrite(), ilGlobalTemplateInterface\setContent(), and ilLanguage\txt().

Referenced by applyAwardBadgeUserSelection(), and resetAwardBadgeUserSelection().

736  : void
737  {
738  $ilCtrl = $this->ctrl;
739  $tpl = $this->tpl;
740  $ilTabs = $this->tabs;
741  $lng = $this->lng;
742 
743  $bid = $this->request->getBadgeId();
744  if (!$bid ||
745  !$this->hasWrite()) {
746  $ilCtrl->redirect($this, 'listUsers');
747  }
748 
749  $manual = array_keys(
750  ilBadgeHandler::getInstance()->getAvailableManualBadges($this->parent_obj_id, $this->parent_obj_type)
751  );
752  if (!in_array($bid, $manual, true)) {
753  $ilCtrl->redirect($this, 'listUsers');
754  }
755 
756  $back_target = 'listUsers';
757  if ($this->request->getTgt() === 'bdgl') {
758  $ilCtrl->saveParameter($this, 'tgt');
759  $back_target = 'listBadges';
760  }
761 
762  $ilTabs->clearTargets();
763  $ilTabs->setBackTarget(
764  $lng->txt('back'),
765  $ilCtrl->getLinkTarget($this, $back_target)
766  );
767 
768  $ilCtrl->setParameter($this, 'bid', $bid);
769 
770  $badge = new ilBadge($bid);
771 
772  $tbl = new ilBadgeUserTableGUI($this, 'awardBadgeUserSelection', $this->parent_ref_id, $badge);
773  $tpl->setContent($tbl->getHTML());
774  }
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...
setContent(string $a_html)
Sets content for standard template.
ilGlobalTemplateInterface $tpl
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clearClipboard()

ilBadgeManagementGUI::clearClipboard ( )
protected

Definition at line 617 of file class.ilBadgeManagementGUI.php.

References $ctrl, and ilCtrl\redirect().

617  : void
618  {
619  $ilCtrl = $this->ctrl;
620 
621  $this->session_repo->clear();
622  $ilCtrl->redirect($this, 'listBadges');
623  }
redirect(object $a_gui_obj, string $a_cmd=null, string $a_anchor=null, bool $is_async=false)
+ Here is the call graph for this function:

◆ confirmDeassignBadge()

ilBadgeManagementGUI::confirmDeassignBadge ( )
protected

Definition at line 823 of file class.ilBadgeManagementGUI.php.

References $ctrl, $lng, $tabs, $tpl, ilTabsGUI\clearTargets(), ilBadgeAssignment\getAssignedUsers(), ilUserUtil\getNamePresentation(), hasWrite(), ilGlobalTemplateInterface\setContent(), and ilLanguage\txt().

823  : void
824  {
825  $ilCtrl = $this->ctrl;
826  $lng = $this->lng;
827  $tpl = $this->tpl;
828  $ilTabs = $this->tabs;
829 
830  $user_ids = $this->request->getIds();
831  $badge_id = $this->request->getBadgeId();
832  if (!$user_ids ||
833  !$badge_id ||
834  !$this->hasWrite()) {
835  $ilCtrl->redirect($this, 'listUsers');
836  }
837 
838  $ilTabs->clearTargets();
839  $ilTabs->setBackTarget(
840  $lng->txt('back'),
841  $ilCtrl->getLinkTarget($this, 'listUsers')
842  );
843 
844  $badge = new ilBadge($badge_id);
845 
846  $ilCtrl->setParameter($this, 'bid', $badge->getId());
847 
848  $confirmation_gui = new ilConfirmationGUI();
849  $confirmation_gui->setFormAction($ilCtrl->getFormAction($this));
850  $confirmation_gui->setHeaderText(
851  sprintf($lng->txt('badge_assignment_deletion_confirmation'), $badge->getTitle())
852  );
853  $confirmation_gui->setCancel($lng->txt('cancel'), 'listUsers');
854  $confirmation_gui->setConfirm($lng->txt('delete'), 'deassignBadge');
855 
856  $assigned_users = ilBadgeAssignment::getAssignedUsers($badge->getId());
857 
858  foreach ($user_ids as $user_id) {
859  if (in_array($user_id, $assigned_users)) {
860  $confirmation_gui->addItem(
861  'id[]',
862  $user_id,
863  ilUserUtil::getNamePresentation($user_id, false, false, '', true)
864  );
865  }
866  }
867 
868  $tpl->setContent($confirmation_gui->getHTML());
869  }
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 getAssignedUsers(int $a_badge_id)
static getNamePresentation( $a_user_id, bool $a_user_image=false, bool $a_profile_link=false, string $a_profile_back_link='', bool $a_force_first_lastname=false, bool $a_omit_login=false, bool $a_sortable=true, bool $a_return_data_array=false, $a_ctrl_path='ilpublicuserprofilegui')
Default behaviour is:
setContent(string $a_html)
Sets content for standard template.
ilGlobalTemplateInterface $tpl
clearTargets()
clear all targets
+ Here is the call graph for this function:

◆ confirmDeleteBadges()

ilBadgeManagementGUI::confirmDeleteBadges ( )
protected

Definition at line 531 of file class.ilBadgeManagementGUI.php.

References $ctrl, $lng, $tabs, $tpl, getBadgesFromMultiAction(), ilBadgeAssignment\getInstancesByBadgeId(), ilGlobalTemplateInterface\setContent(), and ilLanguage\txt().

531  : void
532  {
533  $ilCtrl = $this->ctrl;
534  $lng = $this->lng;
535  $tpl = $this->tpl;
536  $ilTabs = $this->tabs;
537 
538  $badge_ids = $this->getBadgesFromMultiAction();
539 
540  $ilTabs->clearTargets();
541  $ilTabs->setBackTarget(
542  $lng->txt('back'),
543  $ilCtrl->getLinkTarget($this, 'listBadges')
544  );
545 
546  $confirmation_gui = new ilConfirmationGUI();
547  $confirmation_gui->setFormAction($ilCtrl->getFormAction($this));
548  $confirmation_gui->setHeaderText($lng->txt('badge_deletion_confirmation'));
549  $confirmation_gui->setCancel($lng->txt('cancel'), 'listBadges');
550  $confirmation_gui->setConfirm($lng->txt('delete'), 'deleteBadges');
551 
552  foreach ($badge_ids as $badge_id) {
553  $badge = new ilBadge($badge_id);
554  $confirmation_gui->addItem(
555  'id[]',
556  (string) $badge_id,
557  $badge->getTitle() .
558  ' (' . count(ilBadgeAssignment::getInstancesByBadgeId($badge_id)) . ')'
559  );
560  }
561 
562  $tpl->setContent($confirmation_gui->getHTML());
563  }
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...
setContent(string $a_html)
Sets content for standard template.
static getInstancesByBadgeId(int $a_badge_id)
ilGlobalTemplateInterface $tpl
+ Here is the call graph for this function:

◆ copyBadges()

ilBadgeManagementGUI::copyBadges ( )
protected

Definition at line 602 of file class.ilBadgeManagementGUI.php.

References $ctrl, and getBadgesFromMultiAction().

602  : void
603  {
604  $ilCtrl = $this->ctrl;
605 
606  $badge_ids = $this->getBadgesFromMultiAction();
607 
608  $clip_ids = $this->session_repo->getBadgeIds();
609  $clip_ids = array_unique(
610  array_merge($clip_ids, $badge_ids)
611  );
612  $this->session_repo->setBadgeIds($clip_ids);
613 
614  $ilCtrl->redirect($this, 'listBadges');
615  }
+ Here is the call graph for this function:

◆ deactivateBadges()

ilBadgeManagementGUI::deactivateBadges ( )
protected

Definition at line 682 of file class.ilBadgeManagementGUI.php.

References toggleBadges().

682  : void
683  {
684  $this->toggleBadges(false);
685  }
+ Here is the call graph for this function:

◆ deassignBadge()

ilBadgeManagementGUI::deassignBadge ( )
protected

Definition at line 871 of file class.ilBadgeManagementGUI.php.

References $ctrl, $lng, hasWrite(), and ilLanguage\txt().

871  : void
872  {
873  $ilCtrl = $this->ctrl;
874  $lng = $this->lng;
875 
876  $user_ids = $this->request->getIds();
877  $badge_id = $this->request->getBadgeId();
878  if (!$user_ids ||
879  !$badge_id ||
880  !$this->hasWrite()) {
881  $ilCtrl->redirect($this, 'listUsers');
882  }
883 
884  foreach ($user_ids as $user_id) {
885  $ass = new ilBadgeAssignment($badge_id, (int) $user_id);
886  $ass->delete();
887  }
888 
889  $this->tpl->setOnScreenMessage('success', $lng->txt('settings_saved'), true);
890  $ilCtrl->redirect($this, 'listUsers');
891  }
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...
+ Here is the call graph for this function:

◆ deleteBadges()

ilBadgeManagementGUI::deleteBadges ( )
protected

Definition at line 565 of file class.ilBadgeManagementGUI.php.

References $ctrl, $lng, getBadgesFromMultiAction(), and ilLanguage\txt().

565  : void
566  {
567  $ilCtrl = $this->ctrl;
568  $lng = $this->lng;
569 
570  $badge_ids = $this->getBadgesFromMultiAction();
571 
572  foreach ($badge_ids as $badge_id) {
573  $badge = new ilBadge($badge_id);
574  $badge->delete();
575  }
576 
577  $this->tpl->setOnScreenMessage('success', $lng->txt('settings_saved'), true);
578  $ilCtrl->redirect($this, 'listBadges');
579  }
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...
+ Here is the call graph for this function:

◆ editBadge()

ilBadgeManagementGUI::editBadge ( ilPropertyFormGUI  $a_form = null)
protected

Definition at line 429 of file class.ilBadgeManagementGUI.php.

References $ctrl, $lng, $tpl, ilBadgeHandler\getInstance(), hasWrite(), initBadgeForm(), setBadgeFormValues(), ilGlobalTemplateInterface\setContent(), and ilLanguage\txt().

Referenced by updateBadge().

429  : void
430  {
431  $ilCtrl = $this->ctrl;
432  $tpl = $this->tpl;
433  $lng = $this->lng;
434 
435  $badge_id = $this->request->getBadgeId();
436  if (!$badge_id ||
437  !$this->hasWrite()) {
438  $ilCtrl->redirect($this, 'listBadges');
439  }
440 
441  $ilCtrl->setParameter($this, 'bid', $badge_id);
442 
443  $badge = new ilBadge($badge_id);
444 
445  $static_cnt = ilBadgeHandler::getInstance()->countStaticBadgeInstances($badge);
446  if ($static_cnt) {
447  $this->tpl->setOnScreenMessage('info', sprintf($lng->txt('badge_edit_with_published'), $static_cnt));
448  }
449 
450  if (!$a_form) {
451  $type = $badge->getTypeInstance();
452  $a_form = $this->initBadgeForm('edit', $type, $badge->getTypeId());
453  $this->setBadgeFormValues($a_form, $badge, $type);
454  }
455 
456  $tpl->setContent($a_form->getHTML());
457  }
initBadgeForm(string $a_mode, ilBadgeType $a_type, string $a_type_unique_id)
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...
setBadgeFormValues(ilPropertyFormGUI $a_form, ilBadge $a_badge, ilBadgeType $a_type)
setContent(string $a_html)
Sets content for standard template.
ilGlobalTemplateInterface $tpl
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilBadgeManagementGUI::executeCommand ( )

Definition at line 77 of file class.ilBadgeManagementGUI.php.

References $ctrl, $handler, ilBadgeHandler\getInstance(), ilCtrl\getNextClass(), ilBadge\getTypeId(), initBadgeForm(), and setBadgeFormValues().

77  : void
78  {
79  $ilCtrl = $this->ctrl;
80 
81  $next_class = $ilCtrl->getNextClass($this);
82  $cmd = $ilCtrl->getCmd('listBadges');
83 
84  switch ($next_class) {
85  case 'ilpropertyformgui':
86  // ajax - update
87  if ($this->request->getBadgeId()) {
88  $badge = new ilBadge($this->request->getBadgeId());
89  $type = $badge->getTypeInstance();
90  $form = $this->initBadgeForm('edit', $type, $badge->getTypeId());
91  $this->setBadgeFormValues($form, $badge, $type);
92  } // ajax- create
93  else {
94  $type_id = $this->request->getType();
95  $ilCtrl->setParameter($this, 'type', $type_id);
97  $type = $handler->getTypeInstanceByUniqueId($type_id);
98  $form = $this->initBadgeForm('create', $type, $type_id);
99  }
100  $ilCtrl->forwardCommand($form);
101  break;
102 
103  default:
104  $this->$cmd();
105  break;
106  }
107  }
initBadgeForm(string $a_mode, ilBadgeType $a_type, string $a_type_unique_id)
setBadgeFormValues(ilPropertyFormGUI $a_form, ilBadge $a_badge, ilBadgeType $a_type)
getNextClass($a_gui_class=null)
$handler
Definition: index.php:18
+ Here is the call graph for this function:

◆ getBadgesFromMultiAction()

ilBadgeManagementGUI::getBadgesFromMultiAction ( )
protected
Returns
int[]

Definition at line 589 of file class.ilBadgeManagementGUI.php.

References $ctrl, hasWrite(), and ilCtrl\redirect().

Referenced by confirmDeleteBadges(), copyBadges(), deleteBadges(), and toggleBadges().

589  : array
590  {
591  $ilCtrl = $this->ctrl;
592 
593  $badge_ids = $this->request->getIds();
594  if (!$badge_ids ||
595  !$this->hasWrite()) {
596  $ilCtrl->redirect($this, 'listBadges');
597  }
598 
599  return $badge_ids;
600  }
redirect(object $a_gui_obj, string $a_cmd=null, string $a_anchor=null, bool $is_async=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getValidBadgesFromClipboard()

ilBadgeManagementGUI::getValidBadgesFromClipboard ( )
protected
Returns
ilBadge[]

Definition at line 628 of file class.ilBadgeManagementGUI.php.

References $res, and ilBadgeHandler\getInstance().

Referenced by listBadges(), and pasteBadges().

628  : array
629  {
630  $res = [];
631 
632  $valid_types = array_keys(ilBadgeHandler::getInstance()->getAvailableTypesForObjType($this->parent_obj_type));
633 
634  foreach ($this->session_repo->getBadgeIds() as $badge_id) {
635  $badge = new ilBadge($badge_id);
636  if (in_array($badge->getTypeId(), $valid_types, true)) {
637  $res[] = $badge;
638  }
639  }
640 
641  return $res;
642  }
$res
Definition: ltiservices.php:69
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hasWrite()

ilBadgeManagementGUI::hasWrite ( )
protected

Definition at line 130 of file class.ilBadgeManagementGUI.php.

References $access, and ilRBACAccessHandler\checkAccess().

Referenced by addBadge(), applyBadgeFilter(), assignBadge(), awardBadgeUserSelection(), confirmDeassignBadge(), deassignBadge(), editBadge(), getBadgesFromMultiAction(), listBadges(), listUsers(), pasteBadges(), resetBadgeFilter(), saveBadge(), and updateBadge().

130  : bool
131  {
132  $ilAccess = $this->access;
133  return $ilAccess->checkAccess('write', '', $this->parent_ref_id);
134  }
checkAccess(string $a_permission, string $a_cmd, int $a_ref_id, string $a_type="", ?int $a_obj_id=null, ?int $a_tree_id=null)
check access for an object (provide $a_type and $a_obj_id if available for better performance) ...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initBadgeForm()

ilBadgeManagementGUI::initBadgeForm ( string  $a_mode,
ilBadgeType  $a_type,
string  $a_type_unique_id 
)
protected

Definition at line 257 of file class.ilBadgeManagementGUI.php.

References $ctrl, $lng, $valid, ilBadgeType\getCaption(), ilBadgeType\getConfigGUIInstance(), ilBadgeImageTemplate\getInstancesByType(), ilTextAreaInputGUI\setMaxNumOfChars(), ilFormPropertyGUI\setRequired(), ilFileInputGUI\setSuffixes(), and ilLanguage\txt().

Referenced by addBadge(), editBadge(), executeCommand(), saveBadge(), and updateBadge().

262  $lng = $this->lng;
263  $ilCtrl = $this->ctrl;
264 
265  $form = new ilPropertyFormGUI();
266  $form->setFormAction($ilCtrl->getFormAction($this, 'saveBadge'));
267  $form->setTitle($lng->txt('badge_badge') . ' "' . $a_type->getCaption() . '"');
268 
269  $active = new ilCheckboxInputGUI($lng->txt('active'), 'act');
270  $form->addItem($active);
271 
272  $title = new ilTextInputGUI($lng->txt('title'), 'title');
273  $title->setMaxLength(255);
274  $title->setRequired(true);
275  $form->addItem($title);
276 
277  $desc = new ilTextAreaInputGUI($lng->txt('description'), 'desc');
278  $desc->setMaxNumOfChars(4000);
279  $desc->setRequired(true);
280  $form->addItem($desc);
281 
282  $crit = new ilTextAreaInputGUI($lng->txt('badge_criteria'), 'crit');
283  $crit->setMaxNumOfChars(4000);
284  $crit->setRequired(true);
285  $form->addItem($crit);
286 
287  if ($a_mode === 'create') {
288  // upload
289 
290  $img_mode = new ilRadioGroupInputGUI($lng->txt('image'), 'img_mode');
291  $img_mode->setRequired(true);
292  $img_mode->setValue('tmpl');
293  $form->addItem($img_mode);
294 
295  $img_mode_tmpl = new ilRadioOption($lng->txt('badge_image_from_template'), 'tmpl');
296  $img_mode->addOption($img_mode_tmpl);
297 
298  $img_mode_up = new ilRadioOption($lng->txt('badge_image_from_upload'), 'up');
299  $img_mode->addOption($img_mode_up);
300 
301  $img_upload = new ilImageFileInputGUI($lng->txt('file'), 'img');
302  $img_upload->setRequired(true);
303  $img_upload->setSuffixes(['png', 'svg']);
304  $img_mode_up->addSubItem($img_upload);
305 
306  // templates
307 
308  $valid_templates = ilBadgeImageTemplate::getInstancesByType($a_type_unique_id);
309  if (count($valid_templates)) {
310  $options = [];
311  $options[''] = $lng->txt('please_select');
312  foreach ($valid_templates as $tmpl) {
313  $options[$tmpl->getId()] = $tmpl->getTitle();
314  }
315 
316  $tmpl = new ilSelectInputGUI($lng->txt('badge_image_template_form'), 'tmpl');
317  $tmpl->setRequired(true);
318  $tmpl->setOptions($options);
319  $img_mode_tmpl->addSubItem($tmpl);
320  } else {
321  // no templates, activate upload
322  $img_mode_tmpl->setDisabled(true);
323  $img_mode->setValue('up');
324  }
325  } else {
326  $img_upload = new ilImageFileInputGUI($lng->txt('image'), 'img');
327  $img_upload->setSuffixes(['png', 'svg']);
328  $img_upload->setAllowDeletion(false);
329  $img_upload->setUseCache(false);
330  $form->addItem($img_upload);
331  }
332 
333  $valid = new ilTextInputGUI($lng->txt('badge_valid'), 'valid');
334  $valid->setMaxLength(255);
335  $form->addItem($valid);
336 
337  $custom = $a_type->getConfigGUIInstance();
338  if ($custom instanceof ilBadgeTypeGUI) {
339  $custom->initConfigForm($form, $this->parent_ref_id);
340  }
341 
342  // :TODO: valid date/period
343 
344  if ($a_mode === 'create') {
345  $form->addCommandButton('saveBadge', $lng->txt('save'));
346  } else {
347  $form->addCommandButton('updateBadge', $lng->txt('save'));
348  }
349  $form->addCommandButton('listBadges', $lng->txt('cancel'));
350 
351  return $form;
352  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getInstancesByType(string $a_type_unique_id)
This class represents a selection list property in a property form.
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...
$valid
getConfigGUIInstance()
Get GUI config instance.
setSuffixes(array $a_suffixes)
This class represents a property in a property form.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setRequired(bool $a_required)
This class represents an image file property in a property form.
This class represents a text area property in a property form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ listBadges()

ilBadgeManagementGUI::listBadges ( )
protected

Definition at line 136 of file class.ilBadgeManagementGUI.php.

References $ctrl, $handler, $id, $lng, $toolbar, $tpl, ilTooltipGUI\addTooltip(), ilBadge\getExtendedTypeCaption(), ilBadgeHandler\getInstance(), getValidBadgesFromClipboard(), hasWrite(), ilLanguage\loadLanguageModule(), ilGlobalTemplateInterface\setContent(), setTabs(), and ilLanguage\txt().

Referenced by applyBadgeFilter(), and resetBadgeFilter().

136  : void
137  {
138  $ilToolbar = $this->toolbar;
139  $lng = $this->lng;
140  $ilCtrl = $this->ctrl;
141  $tpl = $this->tpl;
142 
143  $this->setTabs('badges');
144 
145  if ($this->hasWrite()) {
147  $valid_types = $handler->getAvailableTypesForObjType($this->parent_obj_type);
148  if ($valid_types) {
149  $options = [];
150  foreach ($valid_types as $id => $type) {
151  $ilCtrl->setParameter($this, 'type', $id);
152  $options[$id] = $this->ui_factory->link()->standard(
153  $this->parent_obj_type !== 'bdga' ? ilBadge::getExtendedTypeCaption($type) : $type->getCaption(
154  ),
155  $ilCtrl->getLinkTarget($this, 'addBadge')
156  );
157  $ilCtrl->setParameter($this, 'type', null);
158  }
159  asort($options);
160  $options = array_values($options);
161 
162  $ilToolbar->addComponent(
163  $this->ui_factory->dropdown()->standard($options)->withLabel($lng->txt('badge_create'))
164  );
165  } else {
166  $this->tpl->setOnScreenMessage('info', $lng->txt('badge_no_valid_types_for_obj'));
167  }
168 
169  $clip_ids = $this->session_repo->getBadgeIds();
170  if (count($clip_ids) > 0) {
171  if ($valid_types) {
172  $ilToolbar->addSeparator();
173  }
174 
175  $tt = [];
176  foreach ($this->getValidBadgesFromClipboard() as $badge) {
177  $tt[] = $badge->getTitle();
178  }
179  $ttid = 'bdgpst';
181  $ttid,
182  implode('<br />', $tt),
183  '',
184  'bottom center',
185  'top center',
186  false
187  );
188 
189  $lng->loadLanguageModule('content');
190  $ilToolbar->addButton(
191  $lng->txt('cont_paste_from_clipboard') .
192  ' (' . count($tt) . ')',
193  $ilCtrl->getLinkTarget($this, 'pasteBadges'),
194  '',
195  null,
196  '',
197  $ttid
198  );
199  $ilToolbar->addButton(
200  $lng->txt('clear_clipboard'),
201  $ilCtrl->getLinkTarget($this, 'clearClipboard')
202  );
203  }
204  }
205 
206  $tbl = new ilBadgeTableGUI($this, 'listBadges', $this->parent_obj_id, $this->hasWrite());
207  $tpl->setContent($tbl->getHTML());
208  }
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...
loadLanguageModule(string $a_module)
Load language module.
setContent(string $a_html)
Sets content for standard template.
static getExtendedTypeCaption(ilBadgeType $a_type)
ilGlobalTemplateInterface $tpl
static addTooltip(string $a_el_id, string $a_text, string $a_container="", string $a_my="bottom center", string $a_at="top center", bool $a_use_htmlspecialchars=true)
TableGUI class for badge listing.
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
$handler
Definition: index.php:18
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ listUsers()

ilBadgeManagementGUI::listUsers ( )
protected

Definition at line 692 of file class.ilBadgeManagementGUI.php.

References $ctrl, $lng, $toolbar, $tpl, ilBadgeHandler\getInstance(), hasWrite(), ilGlobalTemplateInterface\setContent(), ilSelectInputGUI\setOptions(), setTabs(), and ilLanguage\txt().

Referenced by applyListUsers(), and resetListUsers().

692  : void
693  {
694  $lng = $this->lng;
695  $ilCtrl = $this->ctrl;
696  $ilToolbar = $this->toolbar;
697  $tpl = $this->tpl;
698 
699  $this->setTabs('users');
700 
701  if ($this->hasWrite()) {
702  $manual = ilBadgeHandler::getInstance()->getAvailableManualBadges(
703  $this->parent_obj_id,
704  $this->parent_obj_type
705  );
706  if (count($manual)) {
707  $drop = new ilSelectInputGUI($lng->txt('badge_badge'), 'bid');
708  $drop->setOptions($manual);
709  $ilToolbar->addInputItem($drop, true);
710 
711  $ilToolbar->setFormAction($ilCtrl->getFormAction($this, 'awardBadgeUserSelection'));
712  $ilToolbar->addFormButton($lng->txt('badge_award_badge'), 'awardBadgeUserSelection');
713  }
714  }
715 
716  $tbl = new ilBadgeUserTableGUI($this, 'listUsers', $this->parent_ref_id);
717  $tpl->setContent($tbl->getHTML());
718  }
This class represents a selection list property in a property form.
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...
setOptions(array $a_options)
setContent(string $a_html)
Sets content for standard template.
ilGlobalTemplateInterface $tpl
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pasteBadges()

ilBadgeManagementGUI::pasteBadges ( )
protected

Definition at line 644 of file class.ilBadgeManagementGUI.php.

References $ctrl, getValidBadgesFromClipboard(), hasWrite(), and ilCtrl\redirect().

644  : void
645  {
646  $ilCtrl = $this->ctrl;
647 
648  $clip_ids = $this->session_repo->getBadgeIds();
649  if (!$this->hasWrite() || count($clip_ids) === 0) {
650  $ilCtrl->redirect($this, 'listBadges');
651  }
652 
653  foreach ($this->getValidBadgesFromClipboard() as $badge) {
654  $badge->copy($this->parent_obj_id);
655  }
656 
657  $ilCtrl->redirect($this, 'listBadges');
658  }
redirect(object $a_gui_obj, string $a_cmd=null, string $a_anchor=null, bool $is_async=false)
+ Here is the call graph for this function:

◆ resetAwardBadgeUserSelection()

ilBadgeManagementGUI::resetAwardBadgeUserSelection ( )
protected

Definition at line 784 of file class.ilBadgeManagementGUI.php.

References awardBadgeUserSelection().

784  : void
785  {
786  $tbl = new ilBadgeUserTableGUI($this, 'awardBadgeUserSelection', $this->parent_ref_id);
787  $tbl->resetOffset();
788  $tbl->resetFilter();
789  $this->awardBadgeUserSelection();
790  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ resetBadgeFilter()

ilBadgeManagementGUI::resetBadgeFilter ( )
protected

Definition at line 218 of file class.ilBadgeManagementGUI.php.

References hasWrite(), and listBadges().

218  : void
219  {
220  $tbl = new ilBadgeTableGUI($this, 'listBadges', $this->parent_obj_id, $this->hasWrite());
221  $tbl->resetOffset();
222  $tbl->resetFilter();
223  $this->listBadges();
224  }
TableGUI class for badge listing.
+ Here is the call graph for this function:

◆ resetListUsers()

ilBadgeManagementGUI::resetListUsers ( )
protected

Definition at line 728 of file class.ilBadgeManagementGUI.php.

References listUsers().

728  : void
729  {
730  $tbl = new ilBadgeUserTableGUI($this, 'listUsers', $this->parent_ref_id);
731  $tbl->resetOffset();
732  $tbl->resetFilter();
733  $this->listUsers();
734  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ saveBadge()

ilBadgeManagementGUI::saveBadge ( )
protected

Definition at line 354 of file class.ilBadgeManagementGUI.php.

References $ctrl, Vendor\Package\$e, $handler, $lng, addBadge(), ilBadgeImageTemplate\delete(), ilBadgeHandler\getInstance(), hasWrite(), initBadgeForm(), and ilLanguage\txt().

354  : void
355  {
356  $ilCtrl = $this->ctrl;
357  $lng = $this->lng;
358 
359  $type_id = $this->request->getType();
360  if (!$type_id ||
361  !$this->hasWrite()) {
362  $ilCtrl->redirect($this, 'listBadges');
363  }
364 
365  $ilCtrl->setParameter($this, 'type', $type_id);
366 
368  $type = $handler->getTypeInstanceByUniqueId($type_id);
369  if (!$type) {
370  $ilCtrl->redirect($this, 'listBadges');
371  }
372 
373  $form = $this->initBadgeForm('create', $type, $type_id);
374  $custom = $type->getConfigGUIInstance();
375 
376  if ($form->checkInput() &&
377  (!$custom || $custom->validateForm($form))) {
378  $badge = new ilBadge();
379  $badge->setParentId($this->parent_obj_id); // :TODO: ref_id?
380  $badge->setTypeId($type_id);
381  $badge->setActive($form->getInput('act'));
382  $badge->setTitle($form->getInput('title'));
383  $badge->setDescription($form->getInput('desc'));
384  $badge->setCriteria($form->getInput('crit'));
385  $badge->setValid($form->getInput('valid'));
386 
387  if ($custom instanceof ilBadgeTypeGUI) {
388  $badge->setConfiguration($custom->getConfigFromForm($form));
389  }
390 
391  $badge->create();
392 
393 
394 
395  try {
396  if ($form->getInput('img_mode') === 'up') {
397  $badge->uploadImage($_FILES['img']);
398  } else {
399  $tmpl = new ilBadgeImageTemplate($form->getInput('tmpl'));
400  $badge->importImage($tmpl->getImage(), $tmpl->getImagePath());
401  }
402  } catch (BadgeException $e) {
403  $delete = false;
404  switch ($e->getCode()) {
405  case BadgeException::EXCEPTION_FILE_NOT_FOUND:
406  $this->tpl->setOnScreenMessage('failure', $lng->txt('badge_uploaded_image_file_not_found'), true);
407  $delete = true;
408  break;
409  case BadgeException::EXCEPTION_MOVE_UPLOADED_IMAGE_FAILED:
410  $this->tpl->setOnScreenMessage('failure', $lng->txt('badge_create_image_processing_failed'), true);
411  $delete = true;
412  break;
413  }
414 
415  if ($delete) {
416  $badge->delete();
417  $ilCtrl->redirect($this, "listBadges");
418  }
419  }
420 
421  $this->tpl->setOnScreenMessage('success', $lng->txt('settings_saved'), true);
422  $ilCtrl->redirect($this, 'listBadges');
423  }
424 
425  $form->setValuesByPost();
426  $this->addBadge($form);
427  }
initBadgeForm(string $a_mode, ilBadgeType $a_type, string $a_type_unique_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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...
addBadge(ilPropertyFormGUI $a_form=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$handler
Definition: index.php:18
+ Here is the call graph for this function:

◆ setBadgeFormValues()

ilBadgeManagementGUI::setBadgeFormValues ( ilPropertyFormGUI  $a_form,
ilBadge  $a_badge,
ilBadgeType  $a_type 
)
protected

Definition at line 459 of file class.ilBadgeManagementGUI.php.

References ilBadgeType\getConfigGUIInstance(), ilBadge\getConfiguration(), ilBadge\getCriteria(), ilBadge\getDescription(), ilBadge\getImage(), ilBadge\getImagePath(), ilPropertyFormGUI\getItemByPostVar(), ilBadge\getTitle(), ilBadge\getValid(), and ilBadge\isActive().

Referenced by editBadge(), and executeCommand().

463  : void {
464  $a_form->getItemByPostVar('act')->setChecked($a_badge->isActive());
465  $a_form->getItemByPostVar('title')->setValue($a_badge->getTitle());
466  $a_form->getItemByPostVar('desc')->setValue($a_badge->getDescription());
467  $a_form->getItemByPostVar('crit')->setValue($a_badge->getCriteria());
468  $a_form->getItemByPostVar('img')->setValue($a_badge->getImage());
469  $a_form->getItemByPostVar('img')->setImage($a_badge->getImagePath());
470  $a_form->getItemByPostVar('valid')->setValue($a_badge->getValid());
471 
472  $custom = $a_type->getConfigGUIInstance();
473  if ($custom instanceof ilBadgeTypeGUI) {
474  $custom->importConfigToForm($a_form, $a_badge->getConfiguration());
475  }
476  }
getConfiguration()
getItemByPostVar(string $a_post_var)
getConfigGUIInstance()
Get GUI config instance.
getImagePath(bool $a_full_path=true)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setTabs()

ilBadgeManagementGUI::setTabs ( string  $a_active)
protected

Definition at line 109 of file class.ilBadgeManagementGUI.php.

References $ctrl, $lng, $tabs, and ilLanguage\txt().

Referenced by listBadges(), and listUsers().

109  : void
110  {
111  $ilTabs = $this->tabs;
112  $lng = $this->lng;
113  $ilCtrl = $this->ctrl;
114 
115  $ilTabs->addSubTab(
116  'badges',
117  $lng->txt('obj_bdga'),
118  $ilCtrl->getLinkTarget($this, 'listBadges')
119  );
120 
121  $ilTabs->addSubTab(
122  'users',
123  $lng->txt('users'),
124  $ilCtrl->getLinkTarget($this, 'listUsers')
125  );
126 
127  $ilTabs->activateSubTab($a_active);
128  }
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...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toggleBadges()

ilBadgeManagementGUI::toggleBadges ( bool  $a_status)
protected

Definition at line 660 of file class.ilBadgeManagementGUI.php.

References $ctrl, $lng, getBadgesFromMultiAction(), and ilLanguage\txt().

Referenced by activateBadges(), and deactivateBadges().

660  : void
661  {
662  $ilCtrl = $this->ctrl;
663  $lng = $this->lng;
664 
665  $badge_ids = $this->getBadgesFromMultiAction();
666 
667  foreach ($badge_ids as $badge_id) {
668  $badge = new ilBadge($badge_id);
669  $badge->setActive($a_status);
670  $badge->update();
671  }
672 
673  $this->tpl->setOnScreenMessage('success', $lng->txt('settings_saved'), true);
674  $ilCtrl->redirect($this, 'listBadges');
675  }
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...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateBadge()

ilBadgeManagementGUI::updateBadge ( )
protected

Definition at line 478 of file class.ilBadgeManagementGUI.php.

References $ctrl, Vendor\Package\$e, $lng, editBadge(), hasWrite(), initBadgeForm(), and ilLanguage\txt().

478  : void
479  {
480  $ilCtrl = $this->ctrl;
481  $lng = $this->lng;
482 
483  $badge_id = $this->request->getBadgeId();
484  if (!$badge_id ||
485  !$this->hasWrite()) {
486  $ilCtrl->redirect($this, 'listBadges');
487  }
488 
489  $ilCtrl->setParameter($this, 'bid', $badge_id);
490 
491  $badge = new ilBadge($badge_id);
492  $type = $badge->getTypeInstance();
493  $custom = $type->getConfigGUIInstance();
494  if ($custom &&
495  !($custom instanceof ilBadgeTypeGUI)) {
496  $custom = null;
497  }
498  $form = $this->initBadgeForm('update', $type, $badge->getTypeId());
499  if ($form->checkInput() &&
500  (!$custom || $custom->validateForm($form))) {
501  $badge->setActive($form->getInput('act'));
502  $badge->setTitle($form->getInput('title'));
503  $badge->setDescription($form->getInput('desc'));
504  $badge->setCriteria($form->getInput('crit'));
505  $badge->setValid($form->getInput('valid'));
506 
507  if ($custom) {
508  $badge->setConfiguration($custom->getConfigFromForm($form));
509  }
510 
511  $badge->update();
512 
513  try {
514  $badge->uploadImage($_FILES["img"]);
515  } catch (BadgeException $e) {
516  if ($e->getCode() === BadgeException::EXCEPTION_MOVE_UPLOADED_IMAGE_FAILED) {
517  $this->tpl->setOnScreenMessage('failure', $lng->txt('badge_update_image_processing_failed'), true);
518  $ilCtrl->redirect($this, "listBadges");
519  }
520  }
521 
522  $this->tpl->setOnScreenMessage('success', $lng->txt('settings_saved'), true);
523  $ilCtrl->redirect($this, 'listBadges');
524  }
525 
526  $this->tpl->setOnScreenMessage('failure', $lng->txt('form_input_not_valid'));
527  $form->setValuesByPost();
528  $this->editBadge($form);
529  }
initBadgeForm(string $a_mode, ilBadgeType $a_type, string $a_type_unique_id)
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...
editBadge(ilPropertyFormGUI $a_form=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

Field Documentation

◆ $access

ilAccessHandler ilBadgeManagementGUI::$access
private

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

Referenced by hasWrite().

◆ $ctrl

◆ $lng

◆ $parent_obj_id

int ilBadgeManagementGUI::$parent_obj_id
private

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

◆ $parent_obj_type

string ilBadgeManagementGUI::$parent_obj_type
private

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

◆ $request

ilBadgeGUIRequest ilBadgeManagementGUI::$request
private

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

◆ $session_repo

ilBadgeManagementSessionRepository ilBadgeManagementGUI::$session_repo
private

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

◆ $tabs

ilTabsGUI ilBadgeManagementGUI::$tabs
private

◆ $toolbar

ilToolbarGUI ilBadgeManagementGUI::$toolbar
private

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

Referenced by listBadges(), and listUsers().

◆ $tpl

◆ $ui_factory

ILIAS UI Factory ilBadgeManagementGUI::$ui_factory
private

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

◆ $user

ilObjUser ilBadgeManagementGUI::$user
private

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

Referenced by assignBadge().


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