117 switch (
$DIC->ctrl()->getNextClass($this)) {
118 case "iltestevaluationgui":
119 require_once
'Modules/Test/classes/class.ilTestEvaluationGUI.php';
123 $DIC->tabs()->clearTargets();
124 $DIC->tabs()->clearSubTabs();
125 $DIC->ctrl()->forwardCommand($gui);
128 case 'ilassquestionpagegui':
129 require_once
'Modules/Test/classes/class.ilAssQuestionPageCommandForwarder.php';
132 $forwarder->forward();
137 $command =
$DIC->ctrl()->getCmd(self::CMD_SHOW_PARTICIPANTS) .
'Cmd';
148 require_once
'Modules/Test/classes/tables/class.ilParticipantsTestResultsTableGUI.php';
150 $tableGUI->setTitle(
$DIC->language()->txt(
'tst_tbl_results_grades'));
167 $this->questionSetConfig->getDepenciesInVulnerableStateMessage(
$DIC->language())
174 $participantList = $this->
getTestObj()->getActiveParticipantList();
175 $participantList = $participantList->getAccessFilteredList($manageParticipantFilter);
176 $participantList = $participantList->getAccessFilteredList($accessResultsFilter);
178 $scoredParticipantList = $participantList->getScoredParticipantList();
180 require_once
'Modules/Test/classes/tables/class.ilTestParticipantsTableGUI.php';
184 $tableGUI->setAccessResultsCommandsEnabled(
188 $tableGUI->setManageResultsCommandsEnabled(
192 if ($scoredParticipantList->hasScorings()) {
197 $tableGUI->setAnonymity($this->
getTestObj()->getAnonymity());
199 $tableGUI->initColumns();
200 $tableGUI->initCommands();
202 $tableGUI->setData($participantList->getScoringsTableRows());
204 $DIC->ui()->mainTemplate()->setContent($tableGUI->getHTML());
214 require_once
'Services/UIComponent/Button/classes/class.ilLinkButton.php';
216 $delete_all_results_btn->setCaption(
'delete_all_user_data');
217 $delete_all_results_btn->setUrl(
$DIC->ctrl()->getLinkTarget($this,
'deleteAllUserResults'));
229 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
231 $cgui->setFormAction(
$DIC->ctrl()->getFormAction($this));
232 $cgui->setHeaderText(
$DIC->language()->txt(
"delete_all_user_data_confirmation"));
233 $cgui->setCancel(
$DIC->language()->txt(
"cancel"), self::CMD_SHOW_PARTICIPANTS);
234 $cgui->setConfirm(
$DIC->language()->txt(
"proceed"), self::CMD_PERFORM_DELETE_ALL_USER_RESULTS);
236 $DIC->ui()->mainTemplate()->setContent($cgui->getHTML());
246 require_once
'Modules/Test/classes/class.ilTestParticipantAccessFilter.php';
251 require_once
'Modules/Test/classes/class.ilTestParticipantData.php';
254 $participantData->setParticipantAccessFilter($accessFilter);
255 $participantData->load($this->
getTestObj()->getTestId());
257 $this->
getTestObj()->removeTestResults($participantData);
259 ilUtil::sendSuccess(
$DIC->language()->txt(
"tst_all_user_data_deleted"),
true);
260 $DIC->ctrl()->redirect($this, self::CMD_SHOW_PARTICIPANTS);
270 if (!is_array(
$_POST[
"chbUser"]) || count(
$_POST[
"chbUser"]) == 0) {
272 $DIC->ctrl()->redirect($this);
275 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
277 $cgui->setHeaderText(
$DIC->language()->txt(
"confirm_delete_single_user_data"));
279 $cgui->setFormAction(
$DIC->ctrl()->getFormAction($this));
280 $cgui->setCancel(
$DIC->language()->txt(
"cancel"), self::CMD_SHOW_PARTICIPANTS);
281 $cgui->setConfirm(
$DIC->language()->txt(
"confirm"), self::CMD_PERFORM_DELETE_SELECTED_USER_RESULTS);
283 require_once
'Modules/Test/classes/class.ilTestParticipantAccessFilter.php';
286 require_once
'Modules/Test/classes/class.ilTestParticipantData.php';
289 $participantData->setParticipantAccessFilter($accessFilter);
291 $participantData->setActiveIdsFilter((array)
$_POST[
"chbUser"]);
293 $participantData->load($this->
getTestObj()->getTestId());
295 foreach ($participantData->getActiveIds() as $activeId) {
296 if ($this->testObj->getAnonymity()) {
297 $username =
$DIC->language()->txt(
'anonymous');
299 $username = $participantData->getFormatedFullnameByActiveId($activeId);
307 $DIC->language()->txt(
"usr")
311 $DIC->ui()->mainTemplate()->setContent($cgui->getHTML());
321 if (isset(
$_POST[
"chbUser"]) && is_array(
$_POST[
"chbUser"]) && count(
$_POST[
"chbUser"])) {
322 require_once
'Modules/Test/classes/class.ilTestParticipantAccessFilter.php';
325 require_once
'Modules/Test/classes/class.ilTestParticipantData.php';
328 $participantData->setParticipantAccessFilter($accessFilter);
329 $participantData->setActiveIdsFilter(
$_POST[
"chbUser"]);
331 $participantData->load($this->
getTestObj()->getTestId());
333 $this->
getTestObj()->removeTestResults($participantData);
335 ilUtil::sendSuccess(
$DIC->language()->txt(
"tst_selected_user_data_deleted"),
true);
338 $DIC->ctrl()->redirect($this, self::CMD_SHOW_PARTICIPANTS);
349 $this->
showUserResults($show_pass_details =
true, $show_answers =
true, $show_reached_points =
true);
360 $this->
showUserResults($show_pass_details =
false, $show_answers =
true);
371 $this->
showUserResults($show_pass_details =
true, $show_answers =
false);
379 protected function showUserResults($show_pass_details, $show_answers, $show_reached_points =
false)
383 $DIC->tabs()->clearTargets();
384 $DIC->tabs()->clearSubTabs();
386 $show_user_results =
$_SESSION[
"show_user_results"];
388 if (!is_array($show_user_results) || count($show_user_results) == 0) {
390 $DIC->ctrl()->redirect($this, self::CMD_SHOW_PARTICIPANTS);
394 $template = $this->
createUserResults($show_pass_details, $show_answers, $show_reached_points, $show_user_results);
397 $DIC->ui()->mainTemplate()->setVariable(
"ADM_CONTENT", $template->get());
399 if ($this->
getTestObj()->getShowSolutionAnswersOnly()) {
413 public function createUserResults($show_pass_details, $show_answers, $show_reached_points, $show_user_results)
422 $DIC->tabs()->setBackTarget(
423 $DIC->language()->txt(
'back'),
424 $DIC->ctrl()->getLinkTarget($this, self::CMD_SHOW_PARTICIPANTS)
428 require_once
'Services/Link/classes/class.ilLink.php';
430 $DIC->tabs()->setBack2Target(
$DIC->language()->txt(
'back_to_objective_container'), $courseLink);
433 $template =
new ilTemplate(
"tpl.il_as_tst_participants_result_output.html",
true,
true,
"Modules/Test");
435 require_once
'Modules/Test/classes/toolbars/class.ilTestResultsToolbarGUI.php';
438 $DIC->ctrl()->setParameter($this,
'pdf',
'1');
439 $toolbar->setPdfExportLinkTarget(
$DIC->ctrl()->getLinkTarget($this,
$DIC->ctrl()->getCmd()));
440 $DIC->ctrl()->setParameter($this,
'pdf',
'');
443 if (isset(
$_GET[
'show_best_solutions'])) {
444 $_SESSION[
'tst_results_show_best_solutions'] =
true;
445 } elseif (isset(
$_GET[
'hide_best_solutions'])) {
446 $_SESSION[
'tst_results_show_best_solutions'] =
false;
447 } elseif (!isset(
$_SESSION[
'tst_results_show_best_solutions'])) {
448 $_SESSION[
'tst_results_show_best_solutions'] =
false;
451 if (
$_SESSION[
'tst_results_show_best_solutions']) {
452 $DIC->ctrl()->setParameter($this,
'hide_best_solutions',
'1');
453 $toolbar->setHideBestSolutionsLinkTarget(
$DIC->ctrl()->getLinkTarget($this,
$DIC->ctrl()->getCmd()));
454 $DIC->ctrl()->setParameter($this,
'hide_best_solutions',
'');
456 $DIC->ctrl()->setParameter($this,
'show_best_solutions',
'1');
457 $toolbar->setShowBestSolutionsLinkTarget(
$DIC->ctrl()->getLinkTarget($this,
$DIC->ctrl()->getCmd()));
458 $DIC->ctrl()->setParameterByClass(
'',
'show_best_solutions',
'');
462 require_once
'Modules/Test/classes/class.ilTestParticipantData.php';
463 require_once
'Modules/Test/classes/class.ilTestParticipantAccessFilter.php';
467 $participantData->setParticipantAccessFilter(
471 $participantData->setActiveIdsFilter($show_user_results);
473 $participantData->load($this->
getTestObj()->getTestId());
474 $toolbar->setParticipantSelectorOptions($participantData->getOptionArray());
477 $template->setVariable(
'RESULTS_TOOLBAR', $toolbar->getHTML());
479 include_once
"./Modules/Test/classes/class.ilTestServiceGUI.php";
482 $serviceGUI->setParticipantData($participantData);
484 require_once
'Modules/Test/classes/class.ilTestSessionFactory.php';
488 foreach ($show_user_results as $key => $active_id) {
489 if (!in_array($active_id, $participantData->getActiveIds())) {
495 if ($active_id > 0) {
496 $results = $serviceGUI->getResultsOfUserOutput(
497 $testSessionFactory->getSession($active_id),
499 $this->getTestObj()->_getResultPass($active_id),
507 if ($count < count($show_user_results)) {
508 $template->touchBlock(
"break");
510 $template->setCurrentBlock(
"user_result");
511 $template->setVariable(
"USER_RESULT",
$results);
512 $template->parseCurrentBlock();
519 $this->getTestObj()->getTitleFilenameCompliant(),
532 if (!isset(
$_GET[
'pdf'])) {
536 if (!(
bool)
$_GET[
'pdf']) {
An exception for terminatinating execution or to throw for unit testing.
Confirmation screen class.
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
static prepareGenerationRequest($service, $purpose)
Prepare the content processing for a PDF generation request This function should be called as in a re...
setTestAccess($testAccess)
showDetailedResultsCmd()
Shows the pass overview and the answers of one ore more users for the scored pass.
showPassOverviewCmd()
Shows the pass overview of the scored pass for one ore more users.
confirmDeleteSelectedUserDataCmd()
Deletes the selected user data for the test object.
executeCommand()
Execute Command.
showUserAnswersCmd()
Shows the answers of one ore more users for the scored pass.
showUserResults($show_pass_details, $show_answers, $show_reached_points=false)
Shows the pass overview of the scored pass for one ore more users.
showParticipantsCmd()
show participants command
confirmDeleteAllUserResultsCmd()
Deletes all user data for the test object.
const CMD_SHOW_PARTICIPANTS
const CMD_CONFIRM_DELETE_ALL_USER_RESULTS
setQuestionSetConfig($questionSetConfig)
createUserResults($show_pass_details, $show_answers, $show_reached_points, $show_user_results)
const CMD_CONFIRM_DELETE_SELECTED_USER_RESULTS
setObjectiveParent($objectiveParent)
addDeleteAllTestResultsButton(ilToolbarGUI $toolbar)
deleteSingleUserResultsCmd()
Asks for a confirmation to delete selected user data of the test object.
const CMD_PERFORM_DELETE_SELECTED_USER_RESULTS
deleteAllUserResultsCmd()
Asks for a confirmation to delete all user data of the test object.
const CMD_PERFORM_DELETE_ALL_USER_RESULTS
special template class to simplify handling of ITX/PEAR
Output class for assessment test evaluation.
static generatePDF($pdf_output, $output_mode, $filename=null, $purpose=null)
const PDF_OUTPUT_DOWNLOAD
static getManageParticipantsUserFilter($refId)
static getAccessResultsUserFilter($refId)
Service GUI class for tests.
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
const PDF_USER_RESULT
PDF Purposes.