59 if (!($this->
getTestObj()->getProcessingTimeInSeconds() > 0)) {
63 if ($this->
getTestObj()->getNrOfTries() != 1) {
81 switch ($DIC->ctrl()->getNextClass($this)) {
84 $command = $DIC->ctrl()->getCmd(self::CMD_SHOW_LIST) .
'Cmd';
97 include_once
"./Modules/Test/classes/tables/class.ilTimingOverviewTableGUI.php";
99 $tableGUI->addCommandButton(self::CMD_SHOW_FORM, $DIC->language()->txt(
'timing'));
102 require_once
'Modules/Test/classes/class.ilTestParticipantList.php';
104 $participantList->initializeFromDbRows($this->
getTestObj()->getTestParticipants());
106 $participantList = $participantList->getAccessFilteredList(
110 $addons = $this->
getTestObj()->getTimeExtensionsOfParticipants();
112 $tableData = array();
113 foreach ($participantList as $participant) {
116 $time = $this->
getTestObj()->getStartingTimeOfUser($participant->getActiveId());
122 $tblRow[
'started'] = $started;
124 $tblRow[
'started'] =
'';
127 if ($addons[$participant->getActiveId()] > 0) {
128 $tblRow[
'extratime'] = $addons[$participant->getActiveId()];
131 $tblRow[
'login'] = $participant->getLogin();
134 $tblRow[
'name'] = $DIC->language()->txt(
"anonymous");
136 $tblRow[
'name'] = $participant->getLastname() .
', ' . $participant->getFirstname();
139 $tableData[] = $tblRow;
142 $tableGUI->setData($tableData);
144 $DIC->ui()->mainTemplate()->setContent($DIC->ctrl()->getHTML($tableGUI));
154 $DIC->ui()->mainTemplate()->setContent($this->
buildTimingForm()->getHTML());
164 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
166 $form->setFormAction($DIC->ctrl()->getFormAction($this));
167 $form->setTableWidth(
"100%");
168 $form->setId(
"tst_change_workingtime");
169 $form->setTitle($DIC->language()->txt(
"tst_change_workingtime"));
172 require_once
'Modules/Test/classes/class.ilTestParticipantList.php';
174 $participantList->initializeFromDbRows($this->
getTestObj()->getTestParticipants());
176 $participantList = $participantList->getAccessFilteredList(
180 $addons = $this->
getTestObj()->getTimeExtensionsOfParticipants();
182 $participantslist =
new ilSelectInputGUI($DIC->language()->txt(
'participants'),
"participant");
185 '' => $DIC->language()->txt(
'please_select'),
186 '0' => $DIC->language()->txt(
'all_participants')
189 foreach ($participantList as $participant) {
193 $name = $DIC->language()->txt(
"anonymous");
195 $name = $participant->getLastname() .
', ' . $participant->getFirstname();
198 $time = $this->
getTestObj()->getStartingTimeOfUser($participant->getActiveId());
203 if ($addons[$participant->getActiveId()] > 0) {
204 $started .=
", " . $DIC->language()->txt(
'extratime') .
': ' . $addons[$participant->getActiveId()] .
' ' . $DIC->language()->txt(
'minutes');
207 $options[$participant->getActiveId()] = $participant->getLogin() .
' (' .
$name .
')' . $started;
210 $participantslist->setRequired(
true);
211 $participantslist->setOptions($options);
212 $form->addItem($participantslist);
215 $extratime =
new ilNumberInputGUI($DIC->language()->txt(
"extratime"),
"extratime");
216 $extratime->
setInfo($DIC->language()->txt(
'tst_extratime_info'));
217 $extratime->setRequired(
true);
218 $extratime->setMinValue(0);
219 $extratime->setMinvalueShouldBeGreater(
false);
220 $extratime->setSuffix($DIC->language()->txt(
'minutes'));
221 $extratime->setSize(5);
222 $form->addItem($extratime);
224 if (is_array(
$_POST) && strlen(
$_POST[
'cmd'][
'timing'])) {
228 $form->addCommandButton(self::CMD_SET_TIMING, $DIC->language()->txt(
"save"));
229 $form->addCommandButton(self::CMD_SHOW_LIST, $DIC->language()->txt(
"cancel"));
243 if (
$form->checkInput()) {
245 $form->getInput(
'participant'),
246 $form->getInput(
'extratime')
249 ilUtil::sendSuccess(sprintf($DIC->language()->txt(
'tst_extratime_added'),
$form->getInput(
'extratime')),
true);
250 $DIC->ctrl()->redirect($this, self::CMD_SHOW_LIST);
253 $DIC->ui()->mainTemplate()->setVariable(
"ADM_CONTENT",
$form->getHTML());
showListCmd()
show list command
const CMD_SHOW_LIST
Command Constants.
isExtraTimeFeatureAvailable()
showFormCmd()
show form command
static accessViolationRedirect()
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date public.
if(isset($_POST['submit'])) $form
Class ilTimingOverviewTableGUI.
executeCommand()
Execute Command.
static getManageParticipantsUserFilter($refId)
__construct(ilObjTest $testObj)
ilTestParticipantsTimeExtensionGUI constructor.
setTimingCmd()
set timing command