ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilBadgeManagementGUI Class Reference

Class ilBadgeManagementGUI. More...

+ Collaboration diagram for ilBadgeManagementGUI:

Public Member Functions

 __construct (int $a_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 ()
 

Protected Attributes

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

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilBadgeManagementGUI::__construct ( int  $a_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->tpl = $DIC["tpl"];
55  $this->user = $DIC->user();
56  $lng = $DIC->language();
57 
58  $this->parent_ref_id = $a_parent_ref_id;
59  $this->parent_obj_id = $a_parent_obj_id
60  ?: ilObject::_lookupObjId($a_parent_ref_id);
61  $this->parent_obj_type = $a_parent_obj_type
62  ?: ilObject::_lookupType($this->parent_obj_id);
63 
64  if (!ilBadgeHandler::getInstance()->isObjectActive($this->parent_obj_id)) {
65  throw new ilException("inactive object");
66  }
67 
68  $lng->loadLanguageModule("badge");
69 
70  $this->request = new ilBadgeGUIRequest(
71  $DIC->http(),
72  $DIC->refinery()
73  );
74 
75  $this->session_repo = new ilBadgeManagementSessionRepository();
76  }
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 669 of file class.ilBadgeManagementGUI.php.

References toggleBadges().

669  : void
670  {
671  $this->toggleBadges(true);
672  }
+ 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, $tpl, $type, 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 
244  $handler = ilBadgeHandler::getInstance();
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)
$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:

◆ applyAwardBadgeUserSelection()

ilBadgeManagementGUI::applyAwardBadgeUserSelection ( )
protected

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

References awardBadgeUserSelection().

763  : void
764  {
765  $tbl = new ilBadgeUserTableGUI($this, "awardBadgeUserSelection", $this->parent_ref_id);
766  $tbl->resetOffset();
767  $tbl->writeFilterToSession();
768  $this->awardBadgeUserSelection();
769  }
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  }
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:

◆ applyListUsers()

ilBadgeManagementGUI::applyListUsers ( )
protected

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

References listUsers().

709  : void
710  {
711  $tbl = new ilBadgeUserTableGUI($this, "listUsers", $this->parent_ref_id);
712  $tbl->resetOffset();
713  $tbl->writeFilterToSession();
714  $this->listUsers();
715  }
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 779 of file class.ilBadgeManagementGUI.php.

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

779  : void
780  {
781  $ilCtrl = $this->ctrl;
783  $lng = $this->lng;
784 
785  $user_ids = $this->request->getIds();
786  $badge_id = $this->request->getBadgeId();
787  if (!$user_ids ||
788  !$badge_id ||
789  !$this->hasWrite()) {
790  $ilCtrl->redirect($this, "listUsers");
791  }
792 
793  $new_badges = [];
794  foreach ($user_ids as $user_id) {
795  if (!ilBadgeAssignment::exists($badge_id, (int) $user_id)) {
796  $ass = new ilBadgeAssignment($badge_id, (int) $user_id);
797  $ass->setAwardedBy($ilUser->getId());
798  $ass->store();
799 
800  $new_badges[$user_id][] = $badge_id;
801  }
802  }
803 
804  ilBadgeHandler::getInstance()->sendNotification($new_badges, $this->parent_ref_id);
805 
806  $this->tpl->setOnScreenMessage('success', $lng->txt("settings_saved"), true);
807  $ilCtrl->redirect($this, "listUsers");
808  }
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...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static exists(int $a_badge_id, int $a_user_id)
$ilUser
Definition: imgupload.php:34
+ Here is the call graph for this function:

◆ awardBadgeUserSelection()

ilBadgeManagementGUI::awardBadgeUserSelection ( )
protected

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

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

Referenced by applyAwardBadgeUserSelection(), and resetAwardBadgeUserSelection().

725  : void
726  {
727  $ilCtrl = $this->ctrl;
728  $tpl = $this->tpl;
729  $ilTabs = $this->tabs;
730  $lng = $this->lng;
731 
732  $bid = $this->request->getBadgeId();
733  if (!$bid ||
734  !$this->hasWrite()) {
735  $ilCtrl->redirect($this, "listUsers");
736  }
737 
738  $manual = array_keys(ilBadgeHandler::getInstance()->getAvailableManualBadges($this->parent_obj_id, $this->parent_obj_type));
739  if (!in_array($bid, $manual, true)) {
740  $ilCtrl->redirect($this, "listUsers");
741  }
742 
743  $back_target = "listUsers";
744  if ($this->request->getTgt() === "bdgl") {
745  $ilCtrl->saveParameter($this, "tgt");
746  $back_target = "listBadges";
747  }
748 
749  $ilTabs->clearTargets();
750  $ilTabs->setBackTarget(
751  $lng->txt("back"),
752  $ilCtrl->getLinkTarget($this, $back_target)
753  );
754 
755  $ilCtrl->setParameter($this, "bid", $bid);
756 
757  $badge = new ilBadge($bid);
758 
759  $tbl = new ilBadgeUserTableGUI($this, "awardBadgeUserSelection", $this->parent_ref_id, $badge);
760  $tpl->setContent($tbl->getHTML());
761  }
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 609 of file class.ilBadgeManagementGUI.php.

References $ctrl, and ilCtrl\redirect().

609  : void
610  {
611  $ilCtrl = $this->ctrl;
612 
613  $this->session_repo->clear();
614  $ilCtrl->redirect($this, "listBadges");
615  }
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 810 of file class.ilBadgeManagementGUI.php.

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

810  : void
811  {
812  $ilCtrl = $this->ctrl;
813  $lng = $this->lng;
814  $tpl = $this->tpl;
815  $ilTabs = $this->tabs;
816 
817  $user_ids = $this->request->getIds();
818  $badge_id = $this->request->getBadgeId();
819  if (!$user_ids ||
820  !$badge_id ||
821  !$this->hasWrite()) {
822  $ilCtrl->redirect($this, "listUsers");
823  }
824 
825  $ilTabs->clearTargets();
826  $ilTabs->setBackTarget(
827  $lng->txt("back"),
828  $ilCtrl->getLinkTarget($this, "listUsers")
829  );
830 
831  $badge = new ilBadge($badge_id);
832 
833  $ilCtrl->setParameter($this, "bid", $badge->getId());
834 
835  $confirmation_gui = new ilConfirmationGUI();
836  $confirmation_gui->setFormAction($ilCtrl->getFormAction($this));
837  $confirmation_gui->setHeaderText(sprintf($lng->txt("badge_assignment_deletion_confirmation"), $badge->getTitle()));
838  $confirmation_gui->setCancel($lng->txt("cancel"), "listUsers");
839  $confirmation_gui->setConfirm($lng->txt("delete"), "deassignBadge");
840 
841  $assigned_users = ilBadgeAssignment::getAssignedUsers($badge->getId());
842 
843  foreach ($user_ids as $user_id) {
844  if (in_array($user_id, $assigned_users)) {
845  $confirmation_gui->addItem(
846  "id[]",
847  $user_id,
848  ilUserUtil::getNamePresentation($user_id, false, false, "", true)
849  );
850  }
851  }
852 
853  $tpl->setContent($confirmation_gui->getHTML());
854  }
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:
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)
setContent(string $a_html)
Sets content for standard template.
ilGlobalTemplateInterface $tpl
clearTargets()
clear all targets
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:

◆ confirmDeleteBadges()

ilBadgeManagementGUI::confirmDeleteBadges ( )
protected

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

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

527  : void
528  {
529  $ilCtrl = $this->ctrl;
530  $lng = $this->lng;
531  $tpl = $this->tpl;
532  $ilTabs = $this->tabs;
533 
534  $badge_ids = $this->getBadgesFromMultiAction();
535 
536  $ilTabs->clearTargets();
537  $ilTabs->setBackTarget(
538  $lng->txt("back"),
539  $ilCtrl->getLinkTarget($this, "listBadges")
540  );
541 
542  $confirmation_gui = new ilConfirmationGUI();
543  $confirmation_gui->setFormAction($ilCtrl->getFormAction($this));
544  $confirmation_gui->setHeaderText($lng->txt("badge_deletion_confirmation"));
545  $confirmation_gui->setCancel($lng->txt("cancel"), "listBadges");
546  $confirmation_gui->setConfirm($lng->txt("delete"), "deleteBadges");
547 
548  foreach ($badge_ids as $badge_id) {
549  $badge = new ilBadge($badge_id);
550  $confirmation_gui->addItem("id[]", (string) $badge_id, $badge->getTitle() .
551  " (" . count(ilBadgeAssignment::getInstancesByBadgeId($badge_id)) . ")");
552  }
553 
554  $tpl->setContent($confirmation_gui->getHTML());
555  }
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
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:

◆ copyBadges()

ilBadgeManagementGUI::copyBadges ( )
protected

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

References $ctrl, and getBadgesFromMultiAction().

594  : void
595  {
596  $ilCtrl = $this->ctrl;
597 
598  $badge_ids = $this->getBadgesFromMultiAction();
599 
600  $clip_ids = $this->session_repo->getBadgeIds();
601  $clip_ids = array_unique(
602  array_merge($clip_ids, $badge_ids)
603  );
604  $this->session_repo->setBadgeIds($clip_ids);
605 
606  $ilCtrl->redirect($this, "listBadges");
607  }
+ Here is the call graph for this function:

◆ deactivateBadges()

ilBadgeManagementGUI::deactivateBadges ( )
protected

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

References toggleBadges().

674  : void
675  {
676  $this->toggleBadges(false);
677  }
+ Here is the call graph for this function:

◆ deassignBadge()

ilBadgeManagementGUI::deassignBadge ( )
protected

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

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

856  : void
857  {
858  $ilCtrl = $this->ctrl;
859  $lng = $this->lng;
860 
861  $user_ids = $this->request->getIds();
862  $badge_id = $this->request->getBadgeId();
863  if (!$user_ids ||
864  !$badge_id ||
865  !$this->hasWrite()) {
866  $ilCtrl->redirect($this, "listUsers");
867  }
868 
869  foreach ($user_ids as $user_id) {
870  $ass = new ilBadgeAssignment($badge_id, (int) $user_id);
871  $ass->delete();
872  }
873 
874  $this->tpl->setOnScreenMessage('success', $lng->txt("settings_saved"), true);
875  $ilCtrl->redirect($this, "listUsers");
876  }
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...
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:

◆ deleteBadges()

ilBadgeManagementGUI::deleteBadges ( )
protected

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

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

557  : void
558  {
559  $ilCtrl = $this->ctrl;
560  $lng = $this->lng;
561 
562  $badge_ids = $this->getBadgesFromMultiAction();
563 
564  foreach ($badge_ids as $badge_id) {
565  $badge = new ilBadge($badge_id);
566  $badge->delete();
567  }
568 
569  $this->tpl->setOnScreenMessage('success', $lng->txt("settings_saved"), true);
570  $ilCtrl->redirect($this, "listBadges");
571  }
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 425 of file class.ilBadgeManagementGUI.php.

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

Referenced by updateBadge().

425  : void
426  {
427  $ilCtrl = $this->ctrl;
428  $tpl = $this->tpl;
429  $lng = $this->lng;
430 
431  $badge_id = $this->request->getBadgeId();
432  if (!$badge_id ||
433  !$this->hasWrite()) {
434  $ilCtrl->redirect($this, "listBadges");
435  }
436 
437  $ilCtrl->setParameter($this, "bid", $badge_id);
438 
439  $badge = new ilBadge($badge_id);
440 
441  $static_cnt = ilBadgeHandler::getInstance()->countStaticBadgeInstances($badge);
442  if ($static_cnt) {
443  $this->tpl->setOnScreenMessage('info', sprintf($lng->txt("badge_edit_with_published"), $static_cnt));
444  }
445 
446  if (!$a_form) {
447  $type = $badge->getTypeInstance();
448  $a_form = $this->initBadgeForm("edit", $type, $badge->getTypeId());
449  $this->setBadgeFormValues($a_form, $badge, $type);
450  }
451 
452  $tpl->setContent($a_form->getHTML());
453  }
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...
$type
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 78 of file class.ilBadgeManagementGUI.php.

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

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

◆ getBadgesFromMultiAction()

ilBadgeManagementGUI::getBadgesFromMultiAction ( )
protected
Returns
int[]

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

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

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

581  : array
582  {
583  $ilCtrl = $this->ctrl;
584 
585  $badge_ids = $this->request->getIds();
586  if (!$badge_ids ||
587  !$this->hasWrite()) {
588  $ilCtrl->redirect($this, "listBadges");
589  }
590 
591  return $badge_ids;
592  }
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 620 of file class.ilBadgeManagementGUI.php.

References $res, and ilBadgeHandler\getInstance().

Referenced by listBadges(), and pasteBadges().

620  : array
621  {
622  $res = [];
623 
624  $valid_types = array_keys(ilBadgeHandler::getInstance()->getAvailableTypesForObjType($this->parent_obj_type));
625 
626  foreach ($this->session_repo->getBadgeIds() as $badge_id) {
627  $badge = new ilBadge($badge_id);
628  if (in_array($badge->getTypeId(), $valid_types, true)) {
629  $res[] = $badge;
630  }
631  }
632 
633  return $res;
634  }
$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 132 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().

132  : bool
133  {
134  $ilAccess = $this->access;
135  return $ilAccess->checkAccess("write", "", $this->parent_ref_id);
136  }
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(), 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->setRequired(true);
274  $form->addItem($title);
275 
276  $desc = new ilTextAreaInputGUI($lng->txt("description"), "desc");
277  $desc->setRequired(true);
278  $form->addItem($desc);
279 
280  $crit = new ilTextAreaInputGUI($lng->txt("badge_criteria"), "crit");
281  $crit->setRequired(true);
282  $form->addItem($crit);
283 
284  if ($a_mode === "create") {
285  // upload
286 
287  $img_mode = new ilRadioGroupInputGUI($lng->txt("image"), "img_mode");
288  $img_mode->setRequired(true);
289  $img_mode->setValue("tmpl");
290  $form->addItem($img_mode);
291 
292  $img_mode_tmpl = new ilRadioOption($lng->txt("badge_image_from_template"), "tmpl");
293  $img_mode->addOption($img_mode_tmpl);
294 
295  $img_mode_up = new ilRadioOption($lng->txt("badge_image_from_upload"), "up");
296  $img_mode->addOption($img_mode_up);
297 
298  $img_upload = new ilImageFileInputGUI($lng->txt("file"), "img");
299  $img_upload->setRequired(true);
300  $img_upload->setSuffixes(["png", "svg"]);
301  $img_mode_up->addSubItem($img_upload);
302 
303  // templates
304 
305  $valid_templates = ilBadgeImageTemplate::getInstancesByType($a_type_unique_id);
306  if (count($valid_templates)) {
307  $options = [];
308  $options[""] = $lng->txt("please_select");
309  foreach ($valid_templates as $tmpl) {
310  $options[$tmpl->getId()] = $tmpl->getTitle();
311  }
312 
313  $tmpl = new ilSelectInputGUI($lng->txt("badge_image_template_form"), "tmpl");
314  $tmpl->setRequired(true);
315  $tmpl->setOptions($options);
316  $img_mode_tmpl->addSubItem($tmpl);
317  } else {
318  // no templates, activate upload
319  $img_mode_tmpl->setDisabled(true);
320  $img_mode->setValue("up");
321  }
322  } else {
323  $img_upload = new ilImageFileInputGUI($lng->txt("image"), "img");
324  $img_upload->setSuffixes(["png", "svg"]);
325  $img_upload->setAllowDeletion(false);
326  $img_upload->setUseCache(false);
327  $form->addItem($img_upload);
328  }
329 
330  $valid = new ilTextInputGUI($lng->txt("badge_valid"), "valid");
331  $form->addItem($valid);
332 
333  $custom = $a_type->getConfigGUIInstance();
334  if ($custom instanceof ilBadgeTypeGUI) {
335  $custom->initConfigForm($form, $this->parent_ref_id);
336  }
337 
338  // :TODO: valid date/period
339 
340  if ($a_mode === "create") {
341  $form->addCommandButton("saveBadge", $lng->txt("save"));
342  } else {
343  $form->addCommandButton("updateBadge", $lng->txt("save"));
344  }
345  $form->addCommandButton("listBadges", $lng->txt("cancel"));
346 
347  return $form;
348  }
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)
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.
This class represents a checkbox property in a property form.
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 file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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 138 of file class.ilBadgeManagementGUI.php.

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

Referenced by applyBadgeFilter(), and resetBadgeFilter().

138  : void
139  {
140  $ilToolbar = $this->toolbar;
141  $lng = $this->lng;
142  $ilCtrl = $this->ctrl;
143  $tpl = $this->tpl;
144 
145  $this->setTabs("badges");
146 
147  if ($this->hasWrite()) {
148  $handler = ilBadgeHandler::getInstance();
149  $valid_types = $handler->getAvailableTypesForObjType($this->parent_obj_type);
150  if ($valid_types) {
151  $options = [];
152  foreach ($valid_types as $id => $type) {
153  $options[$id] = ($this->parent_obj_type !== "bdga")
155  : $type->getCaption();
156  }
157  asort($options);
158 
159  $drop = new ilSelectInputGUI($lng->txt("type"), "type");
160  $drop->setOptions($options);
161  $ilToolbar->addInputItem($drop, true);
162 
163  $ilToolbar->setFormAction($ilCtrl->getFormAction($this, "addBadge"));
164  $ilToolbar->addFormButton($lng->txt("create"), "addBadge");
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...
$type
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)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ listUsers()

ilBadgeManagementGUI::listUsers ( )
protected

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

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

Referenced by applyListUsers(), and resetListUsers().

684  : void
685  {
686  $lng = $this->lng;
687  $ilCtrl = $this->ctrl;
688  $ilToolbar = $this->toolbar;
689  $tpl = $this->tpl;
690 
691  $this->setTabs("users");
692 
693  if ($this->hasWrite()) {
694  $manual = ilBadgeHandler::getInstance()->getAvailableManualBadges($this->parent_obj_id, $this->parent_obj_type);
695  if (count($manual)) {
696  $drop = new ilSelectInputGUI($lng->txt("badge_badge"), "bid");
697  $drop->setOptions($manual);
698  $ilToolbar->addInputItem($drop, true);
699 
700  $ilToolbar->setFormAction($ilCtrl->getFormAction($this, "awardBadgeUserSelection"));
701  $ilToolbar->addFormButton($lng->txt("badge_award_badge"), "awardBadgeUserSelection");
702  }
703  }
704 
705  $tbl = new ilBadgeUserTableGUI($this, "listUsers", $this->parent_ref_id);
706  $tpl->setContent($tbl->getHTML());
707  }
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:

◆ pasteBadges()

ilBadgeManagementGUI::pasteBadges ( )
protected

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

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

636  : void
637  {
638  $ilCtrl = $this->ctrl;
639 
640  $clip_ids = $this->session_repo->getBadgeIds();
641  if (!$this->hasWrite() || count($clip_ids) === 0) {
642  $ilCtrl->redirect($this, "listBadges");
643  }
644 
645  foreach ($this->getValidBadgesFromClipboard() as $badge) {
646  $badge->copy($this->parent_obj_id);
647  }
648 
649  $ilCtrl->redirect($this, "listBadges");
650  }
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 771 of file class.ilBadgeManagementGUI.php.

References awardBadgeUserSelection().

771  : void
772  {
773  $tbl = new ilBadgeUserTableGUI($this, "awardBadgeUserSelection", $this->parent_ref_id);
774  $tbl->resetOffset();
775  $tbl->resetFilter();
776  $this->awardBadgeUserSelection();
777  }
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  }
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:

◆ resetListUsers()

ilBadgeManagementGUI::resetListUsers ( )
protected

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

References listUsers().

717  : void
718  {
719  $tbl = new ilBadgeUserTableGUI($this, "listUsers", $this->parent_ref_id);
720  $tbl->resetOffset();
721  $tbl->resetFilter();
722  $this->listUsers();
723  }
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 350 of file class.ilBadgeManagementGUI.php.

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

350  : void
351  {
352  $ilCtrl = $this->ctrl;
353  $lng = $this->lng;
354 
355  $type_id = $this->request->getType();
356  if (!$type_id ||
357  !$this->hasWrite()) {
358  $ilCtrl->redirect($this, "listBadges");
359  }
360 
361  $ilCtrl->setParameter($this, "type", $type_id);
362 
363  $handler = ilBadgeHandler::getInstance();
364  $type = $handler->getTypeInstanceByUniqueId($type_id);
365  if (!$type) {
366  $ilCtrl->redirect($this, "listBadges");
367  }
368 
369  $form = $this->initBadgeForm("create", $type, $type_id);
370  $custom = $type->getConfigGUIInstance();
371 
372  if ($form->checkInput() &&
373  (!$custom || $custom->validateForm($form))) {
374  $badge = new ilBadge();
375  $badge->setParentId($this->parent_obj_id); // :TODO: ref_id?
376  $badge->setTypeId($type_id);
377  $badge->setActive($form->getInput("act"));
378  $badge->setTitle($form->getInput("title"));
379  $badge->setDescription($form->getInput("desc"));
380  $badge->setCriteria($form->getInput("crit"));
381  $badge->setValid($form->getInput("valid"));
382 
383  if ($custom instanceof ilBadgeTypeGUI) {
384  $badge->setConfiguration($custom->getConfigFromForm($form));
385  }
386 
387  $badge->create();
388 
389 
390 
391  try {
392  if ($form->getInput('img_mode') === 'up') {
393  $badge->uploadImage($_FILES['img']);
394  } else {
395  $tmpl = new ilBadgeImageTemplate($form->getInput('tmpl'));
396  $badge->importImage($tmpl->getImage(), $tmpl->getImagePath());
397  }
398  } catch (BadgeException $e) {
399  $delete = false;
400  switch ($e->getCode()) {
401  case BadgeException::EXCEPTION_FILE_NOT_FOUND:
402  $this->tpl->setOnScreenMessage('failure', $lng->txt('badge_uploaded_image_file_not_found'), true);
403  $delete = true;
404  break;
405  case BadgeException::EXCEPTION_MOVE_UPLOADED_IMAGE_FAILED:
406  $this->tpl->setOnScreenMessage('failure', $lng->txt('badge_create_image_processing_failed'), true);
407  $delete = true;
408  break;
409  }
410 
411  if ($delete) {
412  $badge->delete();
413  $ilCtrl->redirect($this, "listBadges");
414  }
415  }
416 
417  $this->tpl->setOnScreenMessage('success', $lng->txt("settings_saved"), true);
418  $ilCtrl->redirect($this, "listBadges");
419  }
420 
421  $form->setValuesByPost();
422  $this->addBadge($form);
423  }
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...
$type
addBadge(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:

◆ setBadgeFormValues()

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

Definition at line 455 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().

459  : void {
460  $a_form->getItemByPostVar("act")->setChecked($a_badge->isActive());
461  $a_form->getItemByPostVar("title")->setValue($a_badge->getTitle());
462  $a_form->getItemByPostVar("desc")->setValue($a_badge->getDescription());
463  $a_form->getItemByPostVar("crit")->setValue($a_badge->getCriteria());
464  $a_form->getItemByPostVar("img")->setValue($a_badge->getImage());
465  $a_form->getItemByPostVar("img")->setImage($a_badge->getImagePath());
466  $a_form->getItemByPostVar("valid")->setValue($a_badge->getValid());
467 
468  $custom = $a_type->getConfigGUIInstance();
469  if ($custom instanceof ilBadgeTypeGUI) {
470  $custom->importConfigToForm($a_form, $a_badge->getConfiguration());
471  }
472  }
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 111 of file class.ilBadgeManagementGUI.php.

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

Referenced by listBadges(), and listUsers().

111  : void
112  {
113  $ilTabs = $this->tabs;
114  $lng = $this->lng;
115  $ilCtrl = $this->ctrl;
116 
117  $ilTabs->addSubTab(
118  "badges",
119  $lng->txt("obj_bdga"),
120  $ilCtrl->getLinkTarget($this, "listBadges")
121  );
122 
123  $ilTabs->addSubTab(
124  "users",
125  $lng->txt("users"),
126  $ilCtrl->getLinkTarget($this, "listUsers")
127  );
128 
129  $ilTabs->activateSubTab($a_active);
130  }
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 652 of file class.ilBadgeManagementGUI.php.

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

Referenced by activateBadges(), and deactivateBadges().

652  : void
653  {
654  $ilCtrl = $this->ctrl;
655  $lng = $this->lng;
656 
657  $badge_ids = $this->getBadgesFromMultiAction();
658 
659  foreach ($badge_ids as $badge_id) {
660  $badge = new ilBadge($badge_id);
661  $badge->setActive($a_status);
662  $badge->update();
663  }
664 
665  $this->tpl->setOnScreenMessage('success', $lng->txt("settings_saved"), true);
666  $ilCtrl->redirect($this, "listBadges");
667  }
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 474 of file class.ilBadgeManagementGUI.php.

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

474  : void
475  {
476  $ilCtrl = $this->ctrl;
477  $lng = $this->lng;
478 
479  $badge_id = $this->request->getBadgeId();
480  if (!$badge_id ||
481  !$this->hasWrite()) {
482  $ilCtrl->redirect($this, "listBadges");
483  }
484 
485  $ilCtrl->setParameter($this, "bid", $badge_id);
486 
487  $badge = new ilBadge($badge_id);
488  $type = $badge->getTypeInstance();
489  $custom = $type->getConfigGUIInstance();
490  if ($custom &&
491  !($custom instanceof ilBadgeTypeGUI)) {
492  $custom = null;
493  }
494  $form = $this->initBadgeForm("update", $type, $badge->getTypeId());
495  if ($form->checkInput() &&
496  (!$custom || $custom->validateForm($form))) {
497  $badge->setActive($form->getInput("act"));
498  $badge->setTitle($form->getInput("title"));
499  $badge->setDescription($form->getInput("desc"));
500  $badge->setCriteria($form->getInput("crit"));
501  $badge->setValid($form->getInput("valid"));
502 
503  if ($custom) {
504  $badge->setConfiguration($custom->getConfigFromForm($form));
505  }
506 
507  $badge->update();
508 
509  try {
510  $badge->uploadImage($_FILES["img"]);
511  } catch (BadgeException $e) {
512  if ($e->getCode() === BadgeException::EXCEPTION_MOVE_UPLOADED_IMAGE_FAILED) {
513  $this->tpl->setOnScreenMessage('failure', $lng->txt('badge_update_image_processing_failed'), true);
514  $ilCtrl->redirect($this, "listBadges");
515  }
516  }
517 
518  $this->tpl->setOnScreenMessage('success', $lng->txt("settings_saved"), true);
519  $ilCtrl->redirect($this, "listBadges");
520  }
521 
522  $this->tpl->setOnScreenMessage('failure', $lng->txt("form_input_not_valid"));
523  $form->setValuesByPost();
524  $this->editBadge($form);
525  }
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...
$type
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
protected

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

Referenced by hasWrite().

◆ $ctrl

◆ $lng

◆ $parent_obj_id

int ilBadgeManagementGUI::$parent_obj_id
protected

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

◆ $parent_obj_type

string ilBadgeManagementGUI::$parent_obj_type
protected

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

◆ $parent_ref_id

int ilBadgeManagementGUI::$parent_ref_id
protected

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

◆ $request

ilBadgeGUIRequest ilBadgeManagementGUI::$request
protected

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

◆ $session_repo

ilBadgeManagementSessionRepository ilBadgeManagementGUI::$session_repo
protected

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

◆ $tabs

ilTabsGUI ilBadgeManagementGUI::$tabs
protected

◆ $toolbar

ilToolbarGUI ilBadgeManagementGUI::$toolbar
protected

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

Referenced by listBadges(), and listUsers().

◆ $tpl

◆ $user

ilObjUser ilBadgeManagementGUI::$user
protected

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

Referenced by assignBadge().


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