ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilTestExpressPage Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Collaboration diagram for ilTestExpressPage:

Public Member Functions

 __construct ()
 

Static Public Member Functions

static getReturnToPageLink ($q_id=null)
 

Static Private Member Functions

static fetchTargetRefIdParameter ()
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning

Definition at line 19 of file class.ilTestExpressPage.php.

Constructor & Destructor Documentation

◆ __construct()

ilTestExpressPage::__construct ( )

Definition at line 21 of file class.ilTestExpressPage.php.

References $DIC.

22  {
23  global $DIC;
24  $this->testrequest = $DIC->test()->internal()->request();
25  }
global $DIC
Definition: feed.php:28

Member Function Documentation

◆ fetchTargetRefIdParameter()

static ilTestExpressPage::fetchTargetRefIdParameter ( )
staticprivate
Parameters
$params
Returns
mixed

Definition at line 61 of file class.ilTestExpressPage.php.

References $DIC.

62  {
63  global $DIC;
64  if ($DIC->test()->internal()->request()->raw('calling_test')) {
65  return $DIC->test()->internal()->request()->raw('calling_test');
66  } elseif ($DIC->test()->internal()->request()->raw('test_ref_id')) {
67  return $DIC->test()->internal()->request()->raw('test_ref_id');
68  }
69 
70  return $DIC->test()->internal()->request()->raw('ref_id');
71  }
global $DIC
Definition: feed.php:28

◆ getReturnToPageLink()

static ilTestExpressPage::getReturnToPageLink (   $q_id = null)
static

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

References $DIC, and $refId.

Referenced by assQuestionGUI\cancelSync(), ilAssQuestionPreviewGUI\initQuestion(), assQuestionGUI\save(), and assQuestionGUI\sync().

28  {
29  global $DIC;
30  $ilCtrl = $DIC['ilCtrl'];
31 
32  $q_id = $q_id ?: $DIC->test()->internal()->request()->raw('q_id');
33  $refId = self::fetchTargetRefIdParameter();
34 
35  if ($DIC->test()->internal()->request()->raw('q_id')) {
36  $q_id = $q_id ?: ($DIC->test()->internal()->request()->raw('prev_qid') ?? $DIC->test()->internal()->request()->raw('q_id'));
37 
38  $ilCtrl->setParameterByClass('iltestexpresspageobjectgui', 'test_express_mode', 1);
39  $ilCtrl->setParameterByClass('iltestexpresspageobjectgui', 'ref_id', $refId);
40  $ilCtrl->setParameterByClass('iltestexpresspageobjectgui', 'q_id', $q_id);
41 
42  return $ilCtrl->getLinkTargetByClass(
43  array('ilobjtestgui', 'iltestexpresspageobjectgui'),
44  'edit',
45  '',
46  false,
47  false
48  );
49  }
50 
51  $ilCtrl->setParameterByClass('ilobjtestgui', 'test_express_mode', 1);
52  $ilCtrl->setParameterByClass('ilobjtestgui', 'ref_id', $refId);
53 
54  return $ilCtrl->getLinkTargetByClass('ilobjtestgui', 'showQuestionsPerPage', '', false, false);
55  }
$refId
Definition: xapitoken.php:58
global $DIC
Definition: feed.php:28
+ Here is the caller graph for this function:

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