ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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.

References $contextRefId.

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

Member Function Documentation

◆ getContextRefId()

ilAssQuestionPreviewSettings::getContextRefId ( )

◆ init()

ilAssQuestionPreviewSettings::init ( )

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

References initSettingsFromPostParameters(), initSettingsWithTestObject(), and isTestRefId().

+ Here is the call graph for this function:

◆ initSettingsFromPostParameters()

ilAssQuestionPreviewSettings::initSettingsFromPostParameters ( )
private

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

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

Referenced by init().

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)
+ 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.

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

Referenced by init().

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  }
setSpecificFeedbackEnabled($specificFeedbackEnabled)
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
+ 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().

139  {
140  return $this->isHintProvidingEnabled();
141  }
+ Here is the call graph for this function:

◆ isInstantFeedbackNavigationRequired()

ilAssQuestionPreviewSettings::isInstantFeedbackNavigationRequired ( )

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

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

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  }
+ 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.

References ilObject\_lookupType().

Referenced by init().

41  {
42  $objectType = ilObject::_lookupType($this->contextRefId, true);
43 
44  return $objectType == 'tst';
45  }
static _lookupType($a_id, $a_reference=false)
lookup object type
+ 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.

References $bestSolutionEnabled.

Referenced by initSettingsFromPostParameters(), and initSettingsWithTestObject().

109  {
110  $this->bestSolutionEnabled = $bestSolutionEnabled;
111  }
+ Here is the caller graph for this function:

◆ setContextRefId()

ilAssQuestionPreviewSettings::setContextRefId (   $contextRefId)

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

References $contextRefId.

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

◆ setGenericFeedbackEnabled()

ilAssQuestionPreviewSettings::setGenericFeedbackEnabled (   $genericFeedbackEnabled)

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

References $genericFeedbackEnabled.

Referenced by initSettingsFromPostParameters(), and initSettingsWithTestObject().

79  {
80  $this->genericFeedbackEnabled = $genericFeedbackEnabled;
81  }
+ Here is the caller graph for this function:

◆ setHintProvidingEnabled()

ilAssQuestionPreviewSettings::setHintProvidingEnabled (   $hintProvidingEnabled)

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

References $hintProvidingEnabled.

Referenced by initSettingsFromPostParameters(), and initSettingsWithTestObject().

99  {
100  $this->hintProvidingEnabled = $hintProvidingEnabled;
101  }
+ Here is the caller graph for this function:

◆ setSpecificFeedbackEnabled()

ilAssQuestionPreviewSettings::setSpecificFeedbackEnabled (   $specificFeedbackEnabled)

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

References $specificFeedbackEnabled.

Referenced by initSettingsFromPostParameters(), and initSettingsWithTestObject().

89  {
90  $this->specificFeedbackEnabled = $specificFeedbackEnabled;
91  }
+ 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: