ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilAssQuestionPreviewSettings Class Reference
+ Collaboration diagram for ilAssQuestionPreviewSettings:

Public Member Functions

 __construct ($contextRefId)
 
 init ()
 
 isTestRefId ()
 
 setContextRefId ($contextRefId)
 
 getContextRefId ()
 
 isReachedPointsEnabled ()
 
 setReachedPointsEnabled (bool $reachedPointsEnabled)
 
 setGenericFeedbackEnabled ($genericFeedbackEnabled)
 
 isGenericFeedbackEnabled ()
 
 setSpecificFeedbackEnabled ($specificFeedbackEnabled)
 
 isSpecificFeedbackEnabled ()
 
 setHintProvidingEnabled ($hintProvidingEnabled)
 
 isHintProvidingEnabled ()
 
 setBestSolutionEnabled ($bestSolutionEnabled)
 
 isBestSolutionEnabled ()
 
 isInstantFeedbackNavigationRequired ()
 
 isHintProvidingNavigationRequired ()
 

Protected Attributes

 $reachedPointsEnabled = false
 

Private Member Functions

 initSettingsWithTestObject ()
 
 initSettingsFromPostParameters ()
 

Private Attributes

 $contextRefId = null
 
 $genericFeedbackEnabled = false
 
 $specificFeedbackEnabled = false
 
 $hintProvidingEnabled = false
 
 $bestSolutionEnabled = false
 

Detailed Description

Definition at line 11 of file class.ilAssQuestionPreviewSettings.php.

Constructor & Destructor Documentation

◆ __construct()

ilAssQuestionPreviewSettings::__construct (   $contextRefId)

Definition at line 28 of file class.ilAssQuestionPreviewSettings.php.

29 {
30 $this->contextRefId = $contextRefId;
31 }

References $contextRefId.

Member Function Documentation

◆ getContextRefId()

ilAssQuestionPreviewSettings::getContextRefId ( )

Definition at line 78 of file class.ilAssQuestionPreviewSettings.php.

79 {
81 }

References $contextRefId.

◆ init()

ilAssQuestionPreviewSettings::init ( )

◆ initSettingsFromPostParameters()

ilAssQuestionPreviewSettings::initSettingsFromPostParameters ( )
private

Definition at line 62 of file class.ilAssQuestionPreviewSettings.php.

63 {
64 // get from post or from toolbar instance if possible
65
66 $this->setGenericFeedbackEnabled(true);
67 $this->setSpecificFeedbackEnabled(true);
68 $this->setHintProvidingEnabled(true);
69 $this->setBestSolutionEnabled(true);
70 $this->setReachedPointsEnabled(true);
71 }
setReachedPointsEnabled(bool $reachedPointsEnabled)

References setBestSolutionEnabled(), setGenericFeedbackEnabled(), setHintProvidingEnabled(), setReachedPointsEnabled(), and setSpecificFeedbackEnabled().

Referenced by init().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initSettingsWithTestObject()

ilAssQuestionPreviewSettings::initSettingsWithTestObject ( )
private

Definition at line 49 of file class.ilAssQuestionPreviewSettings.php.

50 {
51 /* @var ilObjTest $testOBJ */
52 $testOBJ = ilObjectFactory::getInstanceByRefId($this->contextRefId);
53 $testOBJ->loadFromDb();
54
55 $this->setGenericFeedbackEnabled($testOBJ->getGenericAnswerFeedback());
56 $this->setSpecificFeedbackEnabled($testOBJ->getSpecificAnswerFeedback());
57 $this->setHintProvidingEnabled($testOBJ->isOfferingQuestionHintsEnabled());
58 $this->setBestSolutionEnabled($testOBJ->getInstantFeedbackSolution());
59 $this->setReachedPointsEnabled($testOBJ->getAnswerFeedbackPoints());
60 }
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id

References ilObjectFactory\getInstanceByRefId(), setBestSolutionEnabled(), setGenericFeedbackEnabled(), setHintProvidingEnabled(), setReachedPointsEnabled(), and setSpecificFeedbackEnabled().

Referenced by init().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isBestSolutionEnabled()

ilAssQuestionPreviewSettings::isBestSolutionEnabled ( )

Definition at line 134 of file class.ilAssQuestionPreviewSettings.php.

References $bestSolutionEnabled.

Referenced by isInstantFeedbackNavigationRequired().

+ Here is the caller graph for this function:

◆ isGenericFeedbackEnabled()

ilAssQuestionPreviewSettings::isGenericFeedbackEnabled ( )

Definition at line 104 of file class.ilAssQuestionPreviewSettings.php.

References $genericFeedbackEnabled.

Referenced by isInstantFeedbackNavigationRequired().

+ Here is the caller graph for this function:

◆ isHintProvidingEnabled()

ilAssQuestionPreviewSettings::isHintProvidingEnabled ( )

Definition at line 124 of file class.ilAssQuestionPreviewSettings.php.

References $hintProvidingEnabled.

Referenced by isHintProvidingNavigationRequired().

+ Here is the caller graph for this function:

◆ isHintProvidingNavigationRequired()

ilAssQuestionPreviewSettings::isHintProvidingNavigationRequired ( )

Definition at line 156 of file class.ilAssQuestionPreviewSettings.php.

References isHintProvidingEnabled().

+ Here is the call graph for this function:

◆ isInstantFeedbackNavigationRequired()

ilAssQuestionPreviewSettings::isInstantFeedbackNavigationRequired ( )

Definition at line 139 of file class.ilAssQuestionPreviewSettings.php.

140 {
141 if ($this->isGenericFeedbackEnabled()) {
142 return true;
143 }
144
145 if ($this->isSpecificFeedbackEnabled()) {
146 return true;
147 }
148
149 if ($this->isBestSolutionEnabled()) {
150 return true;
151 }
152
153 return false;
154 }

References isBestSolutionEnabled(), isGenericFeedbackEnabled(), and isSpecificFeedbackEnabled().

+ Here is the call graph for this function:

◆ isReachedPointsEnabled()

ilAssQuestionPreviewSettings::isReachedPointsEnabled ( )
Returns
bool

Definition at line 86 of file class.ilAssQuestionPreviewSettings.php.

References $reachedPointsEnabled.

◆ isSpecificFeedbackEnabled()

ilAssQuestionPreviewSettings::isSpecificFeedbackEnabled ( )

Definition at line 114 of file class.ilAssQuestionPreviewSettings.php.

References $specificFeedbackEnabled.

Referenced by isInstantFeedbackNavigationRequired().

+ Here is the caller graph for this function:

◆ isTestRefId()

ilAssQuestionPreviewSettings::isTestRefId ( )

Definition at line 42 of file class.ilAssQuestionPreviewSettings.php.

43 {
44 $objectType = ilObject::_lookupType($this->contextRefId, true);
45
46 return $objectType == 'tst';
47 }
static _lookupType($a_id, $a_reference=false)
lookup object type

References ilObject\_lookupType().

Referenced by init().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setBestSolutionEnabled()

ilAssQuestionPreviewSettings::setBestSolutionEnabled (   $bestSolutionEnabled)

Definition at line 129 of file class.ilAssQuestionPreviewSettings.php.

130 {
131 $this->bestSolutionEnabled = $bestSolutionEnabled;
132 }

References $bestSolutionEnabled.

Referenced by initSettingsFromPostParameters(), and initSettingsWithTestObject().

+ Here is the caller graph for this function:

◆ setContextRefId()

ilAssQuestionPreviewSettings::setContextRefId (   $contextRefId)

Definition at line 73 of file class.ilAssQuestionPreviewSettings.php.

74 {
75 $this->contextRefId = $contextRefId;
76 }

References $contextRefId.

◆ setGenericFeedbackEnabled()

ilAssQuestionPreviewSettings::setGenericFeedbackEnabled (   $genericFeedbackEnabled)

Definition at line 99 of file class.ilAssQuestionPreviewSettings.php.

100 {
101 $this->genericFeedbackEnabled = $genericFeedbackEnabled;
102 }

References $genericFeedbackEnabled.

Referenced by initSettingsFromPostParameters(), and initSettingsWithTestObject().

+ Here is the caller graph for this function:

◆ setHintProvidingEnabled()

ilAssQuestionPreviewSettings::setHintProvidingEnabled (   $hintProvidingEnabled)

Definition at line 119 of file class.ilAssQuestionPreviewSettings.php.

120 {
121 $this->hintProvidingEnabled = $hintProvidingEnabled;
122 }

References $hintProvidingEnabled.

Referenced by initSettingsFromPostParameters(), and initSettingsWithTestObject().

+ Here is the caller graph for this function:

◆ setReachedPointsEnabled()

ilAssQuestionPreviewSettings::setReachedPointsEnabled ( bool  $reachedPointsEnabled)
Parameters
bool$reachedPointsEnabled

Definition at line 94 of file class.ilAssQuestionPreviewSettings.php.

95 {
96 $this->reachedPointsEnabled = $reachedPointsEnabled;
97 }

References $reachedPointsEnabled.

Referenced by initSettingsFromPostParameters(), and initSettingsWithTestObject().

+ Here is the caller graph for this function:

◆ setSpecificFeedbackEnabled()

ilAssQuestionPreviewSettings::setSpecificFeedbackEnabled (   $specificFeedbackEnabled)

Definition at line 109 of file class.ilAssQuestionPreviewSettings.php.

110 {
111 $this->specificFeedbackEnabled = $specificFeedbackEnabled;
112 }

References $specificFeedbackEnabled.

Referenced by initSettingsFromPostParameters(), and initSettingsWithTestObject().

+ Here is the caller graph for this function:

Field Documentation

◆ $bestSolutionEnabled

ilAssQuestionPreviewSettings::$bestSolutionEnabled = false
private

◆ $contextRefId

ilAssQuestionPreviewSettings::$contextRefId = null
private

◆ $genericFeedbackEnabled

ilAssQuestionPreviewSettings::$genericFeedbackEnabled = false
private

◆ $hintProvidingEnabled

ilAssQuestionPreviewSettings::$hintProvidingEnabled = false
private

◆ $reachedPointsEnabled

ilAssQuestionPreviewSettings::$reachedPointsEnabled = false
protected

◆ $specificFeedbackEnabled

ilAssQuestionPreviewSettings::$specificFeedbackEnabled = false
private

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