ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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 73 of file class.ilAssQuestionPreviewSettings.php.

74 {
76 }

References $contextRefId.

◆ init()

ilAssQuestionPreviewSettings::init ( )

◆ initSettingsFromPostParameters()

ilAssQuestionPreviewSettings::initSettingsFromPostParameters ( )
private

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

59 {
60 // get from post or from toolbar instance if possible
61
62 $this->setGenericFeedbackEnabled(true);
63 $this->setSpecificFeedbackEnabled(true);
64 $this->setHintProvidingEnabled(true);
65 $this->setBestSolutionEnabled(true);
66 }
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 47 of file class.ilAssQuestionPreviewSettings.php.

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

References $bestSolutionEnabled.

Referenced by isInstantFeedbackNavigationRequired().

+ Here is the caller graph for this function:

◆ isGenericFeedbackEnabled()

ilAssQuestionPreviewSettings::isGenericFeedbackEnabled ( )

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

References $genericFeedbackEnabled.

Referenced by isInstantFeedbackNavigationRequired().

+ Here is the caller graph for this function:

◆ isHintProvidingEnabled()

ilAssQuestionPreviewSettings::isHintProvidingEnabled ( )

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

References $hintProvidingEnabled.

Referenced by isHintProvidingNavigationRequired().

+ Here is the caller graph for this function:

◆ isHintProvidingNavigationRequired()

ilAssQuestionPreviewSettings::isHintProvidingNavigationRequired ( )

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

References isHintProvidingEnabled().

+ Here is the call graph for this function:

◆ isInstantFeedbackNavigationRequired()

ilAssQuestionPreviewSettings::isInstantFeedbackNavigationRequired ( )

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

119 {
120 if( $this->isGenericFeedbackEnabled() )
121 {
122 return true;
123 }
124
125 if( $this->isSpecificFeedbackEnabled() )
126 {
127 return true;
128 }
129
130 if( $this->isBestSolutionEnabled() )
131 {
132 return true;
133 }
134
135 return false;
136 }

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

+ Here is the call graph for this function:

◆ isSpecificFeedbackEnabled()

ilAssQuestionPreviewSettings::isSpecificFeedbackEnabled ( )

Definition at line 93 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 40 of file class.ilAssQuestionPreviewSettings.php.

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

109 {
110 $this->bestSolutionEnabled = $bestSolutionEnabled;
111 }

References $bestSolutionEnabled.

Referenced by initSettingsFromPostParameters(), and initSettingsWithTestObject().

+ Here is the caller graph for this function:

◆ setContextRefId()

ilAssQuestionPreviewSettings::setContextRefId (   $contextRefId)

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

69 {
70 $this->contextRefId = $contextRefId;
71 }

References $contextRefId.

◆ setGenericFeedbackEnabled()

ilAssQuestionPreviewSettings::setGenericFeedbackEnabled (   $genericFeedbackEnabled)

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

79 {
80 $this->genericFeedbackEnabled = $genericFeedbackEnabled;
81 }

References $genericFeedbackEnabled.

Referenced by initSettingsFromPostParameters(), and initSettingsWithTestObject().

+ Here is the caller graph for this function:

◆ setHintProvidingEnabled()

ilAssQuestionPreviewSettings::setHintProvidingEnabled (   $hintProvidingEnabled)

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

99 {
100 $this->hintProvidingEnabled = $hintProvidingEnabled;
101 }

References $hintProvidingEnabled.

Referenced by initSettingsFromPostParameters(), and initSettingsWithTestObject().

+ Here is the caller graph for this function:

◆ setSpecificFeedbackEnabled()

ilAssQuestionPreviewSettings::setSpecificFeedbackEnabled (   $specificFeedbackEnabled)

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

89 {
90 $this->specificFeedbackEnabled = $specificFeedbackEnabled;
91 }

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: