ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
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.

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

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  }
getCmd(string $fallback_command=null)
getNextClass($a_gui_class=null)
+ 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.

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

72  : void
73  {
75  $lng = $this->lng;
76 
77  $but = $this->ui->factory()->button()->primary(
78  $lng->txt("exc_start_exercise"),
79  $this->ctrl->getLinkTarget($this, "startExercise")
80  );
81  $toolbar->addComponent($but);
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)
+ Here is the call graph for this function:

◆ startExercise()

ilExcRandomAssignmentGUI::startExercise ( )
protected

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

References ILIAS\Repository\ctrl().

100  : void
101  {
102  $this->random_manager->startExercise();
103  $this->ctrl->redirectByClass("ilObjExerciseGUI", "showOverview");
104  }
+ 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: