ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilAssQuestionPreviewSettings Class Reference
+ Collaboration diagram for ilAssQuestionPreviewSettings:

Public Member Functions

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

Private Member Functions

 isTestRefId ()
 
 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 23 of file class.ilAssQuestionPreviewSettings.php.

24 {
25 $this->contextRefId = $contextRefId;
26 }

References $contextRefId.

Member Function Documentation

◆ getContextRefId()

ilAssQuestionPreviewSettings::getContextRefId ( )

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

71 {
73 }

References $contextRefId.

◆ init()

ilAssQuestionPreviewSettings::init ( )

◆ initSettingsFromPostParameters()

ilAssQuestionPreviewSettings::initSettingsFromPostParameters ( )
private

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

56 {
57 // get from post or from toolbar instance if possible
58
59 $this->setGenericFeedbackEnabled(true);
60 $this->setSpecificFeedbackEnabled(true);
61 $this->setHintProvidingEnabled(true);
62 $this->setBestSolutionEnabled(true);
63 }
setSpecificFeedbackEnabled($specificFeedbackEnabled)

References setBestSolutionEnabled(), setGenericFeedbackEnabled(), setHintProvidingEnabled(), 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 44 of file class.ilAssQuestionPreviewSettings.php.

45 {
46 $testOBJ = ilObjectFactory::getInstanceByRefId($this->contextRefId);
47 $testOBJ->loadFromDb();
48
49 $this->setGenericFeedbackEnabled($testOBJ->getGenericAnswerFeedback());
50 $this->setSpecificFeedbackEnabled($testOBJ->getSpecificAnswerFeedback());
51 $this->setHintProvidingEnabled($testOBJ->isOfferingQuestionHintsEnabled());
52 $this->setBestSolutionEnabled($testOBJ->getInstantFeedbackSolution());
53 }
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(), 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 110 of file class.ilAssQuestionPreviewSettings.php.

References $bestSolutionEnabled.

Referenced by isInstantFeedbackNavigationRequired().

+ Here is the caller graph for this function:

◆ isGenericFeedbackEnabled()

ilAssQuestionPreviewSettings::isGenericFeedbackEnabled ( )

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

References $genericFeedbackEnabled.

Referenced by isInstantFeedbackNavigationRequired().

+ Here is the caller graph for this function:

◆ isHintProvidingEnabled()

ilAssQuestionPreviewSettings::isHintProvidingEnabled ( )

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

References $hintProvidingEnabled.

Referenced by isHintProvidingNavigationRequired().

+ Here is the caller graph for this function:

◆ isHintProvidingNavigationRequired()

ilAssQuestionPreviewSettings::isHintProvidingNavigationRequired ( )

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

References isHintProvidingEnabled().

+ Here is the call graph for this function:

◆ isInstantFeedbackNavigationRequired()

ilAssQuestionPreviewSettings::isInstantFeedbackNavigationRequired ( )

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

116 {
117 if ($this->isGenericFeedbackEnabled()) {
118 return true;
119 }
120
121 if ($this->isSpecificFeedbackEnabled()) {
122 return true;
123 }
124
125 if ($this->isBestSolutionEnabled()) {
126 return true;
127 }
128
129 return false;
130 }

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

+ Here is the call graph for this function:

◆ isSpecificFeedbackEnabled()

ilAssQuestionPreviewSettings::isSpecificFeedbackEnabled ( )

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

References $specificFeedbackEnabled.

Referenced by isInstantFeedbackNavigationRequired().

+ Here is the caller graph for this function:

◆ isTestRefId()

ilAssQuestionPreviewSettings::isTestRefId ( )
private

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

38 {
39 $objectType = ilObject::_lookupType($this->contextRefId, true);
40
41 return $objectType == 'tst';
42 }
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 105 of file class.ilAssQuestionPreviewSettings.php.

106 {
107 $this->bestSolutionEnabled = $bestSolutionEnabled;
108 }

References $bestSolutionEnabled.

Referenced by initSettingsFromPostParameters(), and initSettingsWithTestObject().

+ Here is the caller graph for this function:

◆ setContextRefId()

ilAssQuestionPreviewSettings::setContextRefId (   $contextRefId)

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

66 {
67 $this->contextRefId = $contextRefId;
68 }

References $contextRefId.

◆ setGenericFeedbackEnabled()

ilAssQuestionPreviewSettings::setGenericFeedbackEnabled (   $genericFeedbackEnabled)

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

76 {
77 $this->genericFeedbackEnabled = $genericFeedbackEnabled;
78 }

References $genericFeedbackEnabled.

Referenced by initSettingsFromPostParameters(), and initSettingsWithTestObject().

+ Here is the caller graph for this function:

◆ setHintProvidingEnabled()

ilAssQuestionPreviewSettings::setHintProvidingEnabled (   $hintProvidingEnabled)

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

96 {
97 $this->hintProvidingEnabled = $hintProvidingEnabled;
98 }

References $hintProvidingEnabled.

Referenced by initSettingsFromPostParameters(), and initSettingsWithTestObject().

+ Here is the caller graph for this function:

◆ setSpecificFeedbackEnabled()

ilAssQuestionPreviewSettings::setSpecificFeedbackEnabled (   $specificFeedbackEnabled)

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

86 {
87 $this->specificFeedbackEnabled = $specificFeedbackEnabled;
88 }

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

◆ $specificFeedbackEnabled

ilAssQuestionPreviewSettings::$specificFeedbackEnabled = false
private

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