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

@ilCtrl_Calls ilAssignmentPresentationGUI: ilExSubmissionGUI More...

+ Collaboration diagram for ilAssignmentPresentationGUI:

Public Member Functions

 __construct (ilObjExercise $exc, InternalDomainService $domain_service, InternalGUIService $gui_service)
 
 executeCommand ()
 
 showAssignment ()
 

Protected Member Functions

 setTabs ()
 

Protected Attributes

ilCtrl $ctrl
 
ilGlobalTemplateInterface $main_tpl
 
ILIAS Exercise Assignment AssignmentManager $ass_manager
 
int $ass_id
 
ILIAS DI UIServices $ui
 
ilLanguage $lng
 
ilTabsGUI $tabs
 
ILIAS Exercise Assignment PanelBuilderUI $panel_builder
 
ilObjUser $user
 
ilObjExercise $exc
 
InternalDomainService $domain_service
 
InternalGUIService $gui_service
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilAssignmentPresentationGUI::__construct ( ilObjExercise  $exc,
InternalDomainService  $domain_service,
InternalGUIService  $gui_service 
)

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

46 {
47 $this->domain_service = $domain_service;
48 $this->gui_service = $gui_service;
49 $this->ctrl = $gui_service->ctrl();
50 $this->main_tpl = $gui_service->ui()->mainTemplate();
51 $this->exc = $exc;
52 $this->user = $domain_service->user();
53 $this->ass_manager = $domain_service->assignment()->assignments(
54 $exc->getId(),
55 $this->user->getId()
56 );
57 $this->panel_builder = $gui_service->assignment()->panelBuilder(
58 $this->exc,
59 $domain_service->assignment()->mandatoryAssignments($this->exc)
60 );
61 $this->ass_id = $gui_service->request()->getAssId();
62 $this->ctrl->saveParameter($this, "ass_id");
63 $this->ui = $gui_service->ui();
64 $this->tabs = $gui_service->tabs();
65 $this->lng = $domain_service->lng();
66 }
request(?array $query_params=null, ?array $post_data=null)
Get request wrapper.

References $domain_service, $exc, $gui_service, ILIAS\Exercise\InternalDomainService\assignment(), ILIAS\Exercise\InternalGUIService\assignment(), ILIAS\Repository\ctrl(), ilObject\getId(), ILIAS\Repository\lng(), ILIAS\Exercise\InternalGUIService\request(), ILIAS\Repository\tabs(), ILIAS\Repository\ui(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

Member Function Documentation

◆ executeCommand()

ilAssignmentPresentationGUI::executeCommand ( )

Definition at line 68 of file class.ilAssignmentPresentationGUI.php.

68 : void
69 {
71
72 $next_class = $ctrl->getNextClass($this);
73 $cmd = $ctrl->getCmd("showAssignment");
74
75
76 switch ($next_class) {
77
78 case "ilexsubmissiongui":
79 $ctrl->setReturn($this, "");
80 $random_manager = $this->domain_service->assignment()->randomAssignments($this->exc);
81 if (!$random_manager->isAssignmentVisible($this->ass_id, $this->user->getId())) {
82 return;
83 }
84 $this->setTabs();
85 $this->tabs->activateTab("submission");
86 $sub_gui = $this->gui_service->getSubmissionGUI();
87 $this->ctrl->forwardCommand($sub_gui);
88 break;
89
90 default:
91 $this->ctrl->setParameterByClass(ilObjExerciseGUI::class, "from_overview", null);
92 if (in_array($cmd, ["showAssignment"])) {
93 $this->$cmd();
94 }
95 }
96 }
getNextClass($a_gui_class=null)
@inheritDoc
getCmd(?string $fallback_command=null)
@inheritDoc
setReturn(object $a_gui_obj, ?string $a_cmd=null)
@inheritDoc

References $ctrl, ILIAS\Repository\ctrl(), ilCtrl\getCmd(), ilCtrl\getNextClass(), ilCtrl\setReturn(), setTabs(), and ILIAS\Repository\tabs().

+ Here is the call graph for this function:

◆ setTabs()

ilAssignmentPresentationGUI::setTabs ( )
protected

Definition at line 108 of file class.ilAssignmentPresentationGUI.php.

108 : void
109 {
110 $this->tabs->setBackTarget(
111 $this->lng->txt("exc_assignment_list"),
112 $this->ctrl->getLinkTargetByClass(ilObjExerciseGUI::class, "showOverview")
113 );
114 $ass = $this->ass_manager->get($this->ass_id);
115 foreach ($this->panel_builder->getPanelViews($ass, $this->user->getId()) as $view) {
116 $this->tabs->addTab(
117 $view["id"],
118 $view["txt"],
119 $view["url"]
120 );
121 }
122 }

References ILIAS\Repository\lng(), and ILIAS\Repository\tabs().

Referenced by executeCommand(), and showAssignment().

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

◆ showAssignment()

ilAssignmentPresentationGUI::showAssignment ( )

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

98 : void
99 {
100 $this->setTabs();
101 $this->tabs->activateTab("ass");
102 $r = $this->ui->renderer();
103 $ass = $this->ass_manager->get($this->ass_id);
104 $panel = $this->panel_builder->getPanel($ass, $this->user->getId());
105 $this->main_tpl->setContent($r->render($panel));
106 }

References setTabs(), ILIAS\Repository\tabs(), ILIAS\Repository\ui(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

Field Documentation

◆ $ass_id

int ilAssignmentPresentationGUI::$ass_id
protected

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

◆ $ass_manager

ILIAS Exercise Assignment AssignmentManager ilAssignmentPresentationGUI::$ass_manager
protected

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

◆ $ctrl

ilCtrl ilAssignmentPresentationGUI::$ctrl
protected

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

Referenced by executeCommand().

◆ $domain_service

InternalDomainService ilAssignmentPresentationGUI::$domain_service
protected

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

Referenced by __construct().

◆ $exc

ilObjExercise ilAssignmentPresentationGUI::$exc
protected

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

Referenced by __construct().

◆ $gui_service

InternalGUIService ilAssignmentPresentationGUI::$gui_service
protected

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

Referenced by __construct().

◆ $lng

ilLanguage ilAssignmentPresentationGUI::$lng
protected

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

◆ $main_tpl

ilGlobalTemplateInterface ilAssignmentPresentationGUI::$main_tpl
protected

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

◆ $panel_builder

ILIAS Exercise Assignment PanelBuilderUI ilAssignmentPresentationGUI::$panel_builder
protected

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

◆ $tabs

ilTabsGUI ilAssignmentPresentationGUI::$tabs
protected

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

◆ $ui

ILIAS DI UIServices ilAssignmentPresentationGUI::$ui
protected

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

◆ $user

ilObjUser ilAssignmentPresentationGUI::$user
protected

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


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