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

UI for random assignment (ui) More...

+ Collaboration diagram for ilExcRandomAssignmentGUI:

Public Member Functions

 __construct (UIServices $ui, ilToolbarGUI $toolbar, ilLanguage $lng, ilCtrl $ctrl, Mandatory\RandomAssignmentsManager $random_manager)
 
 executeCommand ()
 
 renderStartPage ()
 

Protected Member Functions

 startExercise ()
 

Protected Attributes

ilGlobalTemplateInterface $main_tpl
 
Mandatory RandomAssignmentsManager $random_manager
 
ilToolbarGUI $toolbar
 
ilLanguage $lng
 
ilCtrl $ctrl
 
UIServices $ui
 

Detailed Description

UI for random assignment (ui)

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

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

Constructor & Destructor Documentation

◆ __construct()

ilExcRandomAssignmentGUI::__construct ( UIServices  $ui,
ilToolbarGUI  $toolbar,
ilLanguage  $lng,
ilCtrl  $ctrl,
Mandatory\RandomAssignmentsManager  $random_manager 
)

Member Function Documentation

◆ executeCommand()

ilExcRandomAssignmentGUI::executeCommand ( )

Definition at line 51 of file class.ilExcRandomAssignmentGUI.php.

51 : void
52 {
54
55 $next_class = $ctrl->getNextClass($this);
56 $cmd = $ctrl->getCmd("startExercise");
57
58 switch ($next_class) {
59 default:
60 if ($cmd === "startExercise") {
61 $this->$cmd();
62 }
63 }
64 }
getNextClass($a_gui_class=null)
@inheritDoc
getCmd(?string $fallback_command=null)
@inheritDoc

References $ctrl, ilCtrl\getCmd(), and ilCtrl\getNextClass().

+ Here is the call graph for this function:

◆ renderStartPage()

ilExcRandomAssignmentGUI::renderStartPage ( )
Exceptions
ilCtrlException
ilDatabaseException
ilDateTimeException
ilObjectNotFoundException

Definition at line 72 of file class.ilExcRandomAssignmentGUI.php.

72 : void
73 {
76
77 $but = $this->ui->factory()->button()->primary(
78 $lng->txt("exc_start_exercise"),
79 $this->ctrl->getLinkTarget($this, "startExercise")
80 );
82 $info_gui = new ilInfoScreenGUI($this);
83
84 $info_gui->addSection($lng->txt("exc_random_assignment"));
85 $info_gui->addProperty(
86 " ",
87 $lng->txt("exc_random_assignment_info")
88 );
89 $info_gui->addProperty(
90 $lng->txt("exc_rand_overall_ass"),
91 $this->random_manager->getTotalNumberOfAssignments()
92 );
93 $info_gui->addProperty(
94 $lng->txt("exc_rand_nr_mandatory"),
95 $this->random_manager->getNumberOfMandatoryAssignments()
96 );
97 $this->main_tpl->setContent($info_gui->getHTML());
98 }
Class ilInfoScreenGUI.
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...
addComponent(\ILIAS\UI\Component\Component $a_comp)

References $lng, $toolbar, ilToolbarGUI\addComponent(), ilLanguage\txt(), and ILIAS\Repository\ui().

+ Here is the call graph for this function:

◆ startExercise()

ilExcRandomAssignmentGUI::startExercise ( )
protected

Definition at line 100 of file class.ilExcRandomAssignmentGUI.php.

100 : void
101 {
102 $this->random_manager->startExercise();
103 $this->ctrl->redirectByClass("ilObjExerciseGUI", "showOverview");
104 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

Field Documentation

◆ $ctrl

ilCtrl ilExcRandomAssignmentGUI::$ctrl
protected

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

Referenced by __construct(), and executeCommand().

◆ $lng

ilLanguage ilExcRandomAssignmentGUI::$lng
protected

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

Referenced by __construct(), and renderStartPage().

◆ $main_tpl

ilGlobalTemplateInterface ilExcRandomAssignmentGUI::$main_tpl
protected

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

◆ $random_manager

Mandatory RandomAssignmentsManager ilExcRandomAssignmentGUI::$random_manager
protected

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

Referenced by __construct().

◆ $toolbar

ilToolbarGUI ilExcRandomAssignmentGUI::$toolbar
protected

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

Referenced by __construct(), and renderStartPage().

◆ $ui

UIServices ilExcRandomAssignmentGUI::$ui
protected

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

Referenced by __construct().


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