68 $this->main_tpl = $DIC->ui()->mainTemplate();
145 switch ($DIC->ctrl()->getNextClass($this)) {
146 case 'ilrepositorysearchgui':
148 require_once
'Modules/Test/classes/class.ilTestParticipantAccessFilter.php';
149 require_once
'Services/Search/classes/class.ilRepositorySearchGUI.php';
152 $gui->setCallback($this, self::CALLBACK_ADD_PARTICIPANT, array());
159 $DIC->ctrl()->setReturn($this, self::CMD_SHOW);
160 $DIC->ctrl()->forwardCommand($gui);
164 case "iltestevaluationgui":
166 require_once
'Modules/Test/classes/class.ilTestEvaluationGUI.php';
171 $DIC->tabs()->clearTargets();
172 $DIC->tabs()->clearSubTabs();
174 $DIC->ctrl()->forwardCommand($gui);
180 $command = $DIC->ctrl()->getCmd(self::CMD_SHOW) .
'Cmd';
189 require_once
'Modules/Test/classes/class.ilTestParticipantAccessFilter.php';
191 $a_user_ids = call_user_func_array($filterCallback, [$a_user_ids]);
195 if (is_array($a_user_ids)) {
197 foreach ($a_user_ids as $user_id) {
198 $client_ip = $_POST[
"client_ip"][
$i] ??
'';
199 $this->
getTestObj()->inviteUser($user_id, $client_ip);
206 $message = $DIC->language()->txt(
"tst_invited_selected_users");
209 $this->main_tpl->setOnScreenMessage(
'info',
$message,
true);
211 $this->main_tpl->setOnScreenMessage(
'info', $DIC->language()->txt(
"tst_invited_nobody"),
true);
215 $DIC->ctrl()->redirect($this, self::CMD_SHOW);
226 require_once
'Modules/Test/classes/tables/class.ilTestParticipantsTableGUI.php';
229 $tableGUI->setParticipantHasSolutionsFilterEnabled(
230 (
bool) $this->
getTestObj()->getFixedParticipants()
233 if ($this->
getTestObj()->getFixedParticipants()) {
234 $tableGUI->setTitle($DIC->language()->txt(
'tst_tbl_invited_users'));
236 $tableGUI->setTitle($DIC->language()->txt(
'tst_tbl_participants'));
248 $tableGUI->initFilter($this->
getTestObj()->getFixedParticipants());
249 $tableGUI->writeFilterToSession();
250 $tableGUI->resetOffset();
260 $tableGUI->resetFilter();
261 $tableGUI->resetOffset();
275 if ($this->
getTestObj()->getFixedParticipants()) {
276 $participantList = $this->
getTestObj()->getInvitedParticipantList()->getAccessFilteredList(
280 $tableGUI->setData($this->
applyFilterCriteria($participantList->getParticipantsTableRows()));
281 $tableGUI->setRowKeyDataField(
'usr_id');
282 $tableGUI->setManageInviteesCommandsEnabled(
true);
283 $tableGUI->setDescription($DIC->language()->txt(
"fixed_participants_hint"));
285 $participantList = $this->
getTestObj()->getActiveParticipantList()->getAccessFilteredList(
289 $tableGUI->setData($participantList->getParticipantsTableRows());
290 $tableGUI->setRowKeyDataField(
'active_id');
293 $tableGUI->setManageResultsCommandsEnabled(
true);
298 $tableGUI->setAnonymity($this->
getTestObj()->getAnonymity());
300 $tableGUI->initColumns();
301 $tableGUI->initCommands();
303 $tableGUI->initFilter();
304 $tableGUI->setFilterCommand(self::CMD_SET_FILTER);
305 $tableGUI->setResetCommand(self::CMD_RESET_FILTER);
307 $DIC->ui()->mainTemplate()->setContent($DIC->ctrl()->getHTML($tableGUI));
320 if (!is_string($selected_pax)) {
324 $filter = unserialize($selected_pax, [
'allowed_classes' =>
false]);
326 if (!is_string($filter) || $filter ===
'all') {
332 foreach ($in_rows as $row) {
333 $query = $DIC->database()->query(
334 'SELECT count(solution_id) count 336 WHERE active_fi = ' . $DIC->database()->quote($row[
'active_id'])
337 .
' HAVING count ' . ($filter ===
'withSolutions' ?
'>' :
'=') .
' 0' 340 if (is_array($DIC->database()->fetchAssoc(
$query))) {
352 if ($this->
getTestObj()->getFixedParticipants()) {
357 $DIC->toolbar()->addSeparator();
374 include_once
'./Services/Search/classes/class.ilRepositorySearchGUI.php';
379 'auto_complete_name' => $DIC->language()->txt(
'user'),
380 'submit_name' => $DIC->language()->txt(
'add')
384 require_once
'Services/UIComponent/Button/classes/class.ilLinkButton.php';
386 $search_btn->setCaption(
'tst_search_users');
387 $search_btn->setUrl($DIC->ctrl()->getLinkTargetByClass(
'ilRepositorySearchGUI',
'start'));
401 $finish_all_user_passes_btn->setCaption(
'finish_all_user_passes');
402 $finish_all_user_passes_btn->setUrl($DIC->ctrl()->getLinkTargetByClass(
'iltestevaluationgui',
'finishAllUserPasses'));
413 require_once
'Modules/Test/classes/class.ilTestParticipantAccessFilter.php';
415 $a_user_ids = call_user_func_array($filterCallback, [(array) $_POST[
"chbUser"]]);
417 if (is_array($a_user_ids)) {
418 foreach ($a_user_ids as $user_id) {
419 $this->
getTestObj()->setClientIP($user_id, $_POST[
"clientip_" . $user_id]);
422 $this->main_tpl->setOnScreenMessage(
'info', $DIC->language()->txt(
"select_one_user"),
true);
424 $DIC->ctrl()->redirect($this, self::CMD_SHOW);
434 require_once
'Modules/Test/classes/class.ilTestParticipantAccessFilter.php';
436 $a_user_ids = call_user_func_array($filterCallback, [(array) $_POST[
"chbUser"]]);
438 if (is_array($a_user_ids)) {
439 foreach ($a_user_ids as $user_id) {
443 $this->main_tpl->setOnScreenMessage(
'info', $DIC->language()->txt(
"select_one_user"),
true);
446 $DIC->ctrl()->redirect($this, self::CMD_SHOW);
static get(string $a_var)
setObjectiveParent(ilTestObjectiveOrientedContainer $objectiveParent)
removeParticipantsCmd()
remove participants command
addParticipants($a_user_ids=array())
resetFilterCmd()
reset table filter command
setFilterCmd()
set table filter command
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
executeCommand()
Execute Command.
__construct(ilObjTest $testObj, ilTestQuestionSetConfig $questionSetConfig)
ilTestParticipantsGUI constructor.
static fillAutoCompleteToolbar(object $parent_object, ilToolbarGUI $toolbar=null, array $a_options=[], bool $a_sticky=false)
array( auto_complete_name = $lng->txt('user'), auto_complete_size = 15, user_type = array(ilCoursePar...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
addUserSearchControls(ilToolbarGUI $toolbar)
saveClientIpCmd()
save client ip command
ilGlobalTemplateInterface $main_tpl
const CALLBACK_ADD_PARTICIPANT
applyFilterCriteria($in_rows)
static getManageParticipantsUserFilter($refId)
initToolbarControls(ilTestParticipantList $participantList)
addFinishAllPassesButton(ilToolbarGUI $toolbar)
setTestAccess(ilTestAccess $testAccess)
setQuestionSetConfig($questionSetConfig)