ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilAssMultiOptionQuestionFeedback Class Reference
+ Inheritance diagram for ilAssMultiOptionQuestionFeedback:
+ Collaboration diagram for ilAssMultiOptionQuestionFeedback:

Public Member Functions

 getSpecificAnswerFeedbackTestPresentation ($questionId, $answerIndex)
 returns the html of SPECIFIC feedback for the given question id and answer index for test presentation
 completeSpecificFormProperties (ilPropertyFormGUI $form)
 completes a given form object with the specific form properties required by this question type
 initSpecificFormProperties (ilPropertyFormGUI $form)
 initialises a given form object's specific form properties relating to this question type
 saveSpecificFormProperties (ilPropertyFormGUI $form)
 saves a given form object's specific form properties relating to this question type
 getSpecificAnswerFeedbackContent ($questionId, $answerIndex)
 returns the SPECIFIC answer feedback content for a given question id and answer index.
 saveSpecificAnswerFeedbackContent ($questionId, $answerIndex, $feedbackContent)
 saves SPECIFIC answer feedback content for the given question id and answer index to the database.
 deleteSpecificAnswerFeedbacks ($questionId, $isAdditionalContentEditingModePageObject)
 deletes all SPECIFIC answer feedback contents (and page objects if required) for the given question id
 getSpecificAnswerFeedbackExportPresentation ($questionId, $answerIndex)
 returns the generic feedback export presentation for given question id either for solution completed or incompleted
 importSpecificAnswerFeedback ($questionId, $answerIndex, $feedbackContent)
 imports the given feedback content as specific feedback for the given question id and answer index
 specificAnswerFeedbackExists ($answerIndexes)
- Public Member Functions inherited from ilAssQuestionFeedback
 __construct (assQuestion $questionOBJ, ilCtrl $ctrl, ilDB $db, ilLanguage $lng)
 constructor
 getGenericFeedbackTestPresentation ($questionId, $solutionCompleted)
 returns the html of GENERIC feedback for the given question id for test presentation (either for the complete solution or for the incomplete solution)
 completeGenericFormProperties (ilPropertyFormGUI $form)
 completes a given form object with the GENERIC form properties required by all question types
 initGenericFormProperties (ilPropertyFormGUI $form)
 initialises a given form object's GENERIC form properties relating to all question types
 saveGenericFormProperties (ilPropertyFormGUI $form)
 saves a given form object's GENERIC form properties relating to all question types
 isSaveableInPageObjectEditingMode ()
 returns the fact wether the feedback editing form is saveable in page object editing or not.
 getGenericFeedbackContent ($questionId, $solutionCompleted)
 returns the GENERIC feedback content for a given question state.
 saveGenericFeedbackContent ($questionId, $solutionCompleted, $feedbackContent)
 saves GENERIC feedback content for the given question id to the database.
 deleteGenericFeedbacks ($questionId, $isAdditionalContentEditingModePageObject)
 deletes all GENERIC feedback contents (and page objects if required) for the given question id
 duplicateFeedback ($originalQuestionId, $duplicateQuestionId)
 duplicates the feedback relating to the given original question id and saves it for the given duplicate question id
 syncFeedback ($originalQuestionId, $duplicateQuestionId)
 syncs the feedback from a duplicated question back to the original question
 getClassNameByType ($a_type, $a_gui=false)
 Get class name by type.
 setPageObjectOutputMode ($a_val)
 Set page object output mode.
 getPageObjectOutputMode ()
 Get page object output mode.
 getGenericFeedbackExportPresentation ($questionId, $solutionCompleted)
 returns the generic feedback export presentation for given question id either for solution completed or incompleted
 importGenericFeedback ($questionId, $solutionCompleted, $feedbackContent)
 imports the given feedback content as generic feedback for the given question id for either the complete or incomplete solution

Data Fields

const TABLE_NAME_SPECIFIC_FEEDBACK = 'qpl_fb_specific'
 table name for specific feedback
- Data Fields inherited from ilAssQuestionFeedback
const PAGE_OBJECT_TYPE_GENERIC_FEEDBACK = 'qfbg'
 type for generic feedback page objects
const PAGE_OBJECT_TYPE_SPECIFIC_FEEDBACK = 'qfbs'
 type for specific feedback page objects
const FEEDBACK_SOLUTION_INCOMPLETE_PAGE_OBJECT_ID = 1
 id for page object relating to generic incomplete solution feedback
const FEEDBACK_SOLUTION_COMPLETE_PAGE_OBJECT_ID = 2
 id for page object relating to generic complete solution feedback
const TABLE_NAME_GENERIC_FEEDBACK = 'qpl_fb_generic'
 table name for specific feedback

Protected Member Functions

 duplicateSpecificFeedback ($originalQuestionId, $duplicateQuestionId)
 duplicates the SPECIFIC feedback relating to the given original question id and saves it for the given duplicate question id
 syncSpecificFeedback ($originalQuestionId, $duplicateQuestionId)
 syncs the SPECIFIC feedback from a duplicated question back to the original question
 getSpecificAnswerFeedbackId ($questionId, $answerIndex)
 returns the SPECIFIC answer feedback ID for a given question id and answer index.
 getSpecificAnswerFeedbackIdByAnswerIndexMap ($questionId)
 returns an array mapping feedback ids to answer indexes for all answer options of question
 getSpecificFeedbackTableName ()
 returns the table name for specific feedback
 getAnswerOptionsByAnswerIndex ()
 returns the answer options mapped by answer index (can be overwritten by concrete question type class)
 buildAnswerOptionLabel ($index, $answer)
 builds an answer option label from given (mixed type) index and answer (can be overwritten by concrete question types)
 getSpecificAnswerFeedbackPageObjectId ($questionId, $answerIndex)
 returns a useable page object id for specific answer feedback page objects for the given question id and answer index (using the id sequence of non page object specific answer feedback)
- Protected Member Functions inherited from ilAssQuestionFeedback
 buildFeedbackContentFormProperty ($label, $postVar, $asNonEditable)
 builds and returns a form property gui object with the given label and postvar that is addable to property forms depending on the given flag "asNonEditable" it returns a ...
 getGenericFeedbackId ($questionId, $solutionCompleted)
 returns the SPECIFIC answer feedback ID for a given question id and answer index.
 getGenericFeedbackTableName ()
 returns the table name for specific feedback
 getPageObjectNonEditableValueHTML ($pageObjectType, $pageObjectId)
 returns html content to be used as value for non editable value form properties in feedback editing form
 getPageObjectContent ($pageObjectType, $pageObjectId)
 returns the content of page object with given type and id
 getPageObjectXML ($pageObjectType, $pageObjectId)
 returns the xml of page object with given type and id
 createPageObject ($pageObjectType, $pageObjectId, $pageObjectContent)
 creates a new page object with given page object id and page object type and passed page object content
 duplicatePageObject ($pageObjectType, $originalPageObjectId, $duplicatePageObjectId, $duplicatePageObjectParentId)
 duplicates the page object with given type and original id to new page object with same type and given duplicate id and duplicate parent id
 ensurePageObjectDeleted ($pageObjectType, $pageObjectId)
 ensures a no more existing page object for given type and id
 getGenericFeedbackPageObjectType ()
 returns the type for generic feedback page objects defined in local constant
 getSpecificAnswerFeedbackPageObjectType ()
 returns the type for specific feedback page objects defined in local constant
 getGenericFeedbackPageObjectId ($questionId, $solutionCompleted)
 returns a useable page object id for generic feedback page objects for the given question id for either the complete or incomplete solution (using the id sequence of non page object generic feedback)

Additional Inherited Members

- Static Public Member Functions inherited from ilAssQuestionFeedback
static isValidFeedbackPageObjectType ($feedbackPageObjectType)
 returns the fact wether the given page object type relates to generic or specific feedback page objects
- Protected Attributes inherited from ilAssQuestionFeedback
 $questionOBJ = null
 $ctrl = null
 $db = null
 $lng = null
 $page_obj_output_mode = "presentation"

Detailed Description

Definition at line 17 of file class.ilAssMultiOptionQuestionFeedback.php.

Member Function Documentation

ilAssMultiOptionQuestionFeedback::buildAnswerOptionLabel (   $index,
  $answer 
)
protected

builds an answer option label from given (mixed type) index and answer (can be overwritten by concrete question types)

protected

Parameters
integer$index
mixed$answer
Returns
string $answerOptionLabel

Reimplemented in ilAssClozeTestFeedback, ilAssErrorTextFeedback, ilAssMatchingQuestionFeedback, ilAssOrderingHorizontalFeedback, ilAssImagemapQuestionFeedback, and ilAssTextQuestionFeedback.

Definition at line 384 of file class.ilAssMultiOptionQuestionFeedback.php.

Referenced by ilAssConfigurableMultiOptionQuestionFeedback\completeSpecificFormProperties(), and completeSpecificFormProperties().

{
return $answer->getAnswertext();
}

+ Here is the caller graph for this function:

ilAssMultiOptionQuestionFeedback::completeSpecificFormProperties ( ilPropertyFormGUI  $form)

completes a given form object with the specific form properties required by this question type

public

Parameters
ilPropertyFormGUI$form

Reimplemented from ilAssQuestionFeedback.

Reimplemented in ilAssConfigurableMultiOptionQuestionFeedback.

Definition at line 59 of file class.ilAssMultiOptionQuestionFeedback.php.

References ilPropertyFormGUI\addItem(), buildAnswerOptionLabel(), ilAssQuestionFeedback\buildFeedbackContentFormProperty(), and getAnswerOptionsByAnswerIndex().

{
if( !$this->questionOBJ->getSelfAssessmentEditingMode() )
{
$header = new ilFormSectionHeaderGUI();
$header->setTitle($this->lng->txt('feedback_answers'));
$form->addItem($header);
foreach( $this->getAnswerOptionsByAnswerIndex() as $index => $answer )
{
$propertyLabel = $this->questionOBJ->prepareTextareaOutput(
$this->buildAnswerOptionLabel($index, $answer), true
);
$propertyPostVar = "feedback_answer_$index";
$propertyLabel , $propertyPostVar, $this->questionOBJ->isAdditionalContentEditingModePageObject()
));
}
}
}

+ Here is the call graph for this function:

ilAssMultiOptionQuestionFeedback::deleteSpecificAnswerFeedbacks (   $questionId,
  $isAdditionalContentEditingModePageObject 
)

deletes all SPECIFIC answer feedback contents (and page objects if required) for the given question id

public

Parameters
integer$questionId
boolean$isAdditionalContentEditingModePageObject

Reimplemented from ilAssQuestionFeedback.

Definition at line 216 of file class.ilAssMultiOptionQuestionFeedback.php.

References ilAssQuestionFeedback\ensurePageObjectDeleted(), getSpecificAnswerFeedbackIdByAnswerIndexMap(), and ilAssQuestionFeedback\getSpecificAnswerFeedbackPageObjectType().

{
if( $isAdditionalContentEditingModePageObject )
{
foreach( $this->getSpecificAnswerFeedbackIdByAnswerIndexMap($questionId) as $answerIndex => $pageObjectId )
{
}
}
$this->db->manipulateF(
"DELETE FROM {$this->getSpecificFeedbackTableName()} WHERE question_fi = %s",
array('integer'), array($questionId)
);
}

+ Here is the call graph for this function:

ilAssMultiOptionQuestionFeedback::duplicateSpecificFeedback (   $originalQuestionId,
  $duplicateQuestionId 
)
protected

duplicates the SPECIFIC feedback relating to the given original question id and saves it for the given duplicate question id

protected

Parameters
integer$originalQuestionId
integer$duplicateQuestionId

Reimplemented from ilAssQuestionFeedback.

Reimplemented in ilAssConfigurableMultiOptionQuestionFeedback.

Definition at line 239 of file class.ilAssMultiOptionQuestionFeedback.php.

References $res, $row, ilAssQuestionFeedback\duplicatePageObject(), ilAssQuestionFeedback\getSpecificAnswerFeedbackPageObjectType(), and getSpecificFeedbackTableName().

{
$res = $this->db->queryF(
"SELECT * FROM {$this->getSpecificFeedbackTableName()} WHERE question_fi = %s",
array('integer'), array($originalQuestionId)
);
while( $row = $this->db->fetchAssoc($res) )
{
$nextId = $this->db->nextId($this->getSpecificFeedbackTableName());
$this->db->insert($this->getSpecificFeedbackTableName(), array(
'feedback_id' => array('integer', $nextId),
'question_fi' => array('integer', $duplicateQuestionId),
'answer' => array('integer', $row['answer']),
'feedback' => array('text', $row['feedback']),
'tstamp' => array('integer', time())
));
if( $this->questionOBJ->isAdditionalContentEditingModePageObject() )
{
$pageObjectType = $this->getSpecificAnswerFeedbackPageObjectType();
$this->duplicatePageObject($pageObjectType, $row['feedback_id'], $nextId, $duplicateQuestionId);
}
}
}

+ Here is the call graph for this function:

ilAssMultiOptionQuestionFeedback::getAnswerOptionsByAnswerIndex ( )
protected

returns the answer options mapped by answer index (can be overwritten by concrete question type class)

Returns
array $answerOptionsByAnswerIndex

Reimplemented in ilAssClozeTestFeedback, ilAssErrorTextFeedback, ilAssMatchingQuestionFeedback, and ilAssOrderingHorizontalFeedback.

Definition at line 370 of file class.ilAssMultiOptionQuestionFeedback.php.

Referenced by ilAssConfigurableMultiOptionQuestionFeedback\completeSpecificFormProperties(), completeSpecificFormProperties(), ilAssConfigurableMultiOptionQuestionFeedback\initSpecificFormProperties(), initSpecificFormProperties(), saveSpecificFormProperties(), and ilAssConfigurableMultiOptionQuestionFeedback\saveSpecificFormProperties().

{
return $this->questionOBJ->getAnswers();
}

+ Here is the caller graph for this function:

ilAssMultiOptionQuestionFeedback::getSpecificAnswerFeedbackContent (   $questionId,
  $answerIndex 
)

returns the SPECIFIC answer feedback content for a given question id and answer index.

public

Parameters
integer$questionId
boolean$answerIndex
Returns
string $feedbackContent

Reimplemented from ilAssQuestionFeedback.

Definition at line 142 of file class.ilAssMultiOptionQuestionFeedback.php.

References $res, $row, and ilRTE\_replaceMediaObjectImageSrc().

Referenced by getSpecificAnswerFeedbackExportPresentation(), getSpecificAnswerFeedbackTestPresentation(), ilAssConfigurableMultiOptionQuestionFeedback\initSpecificFormProperties(), and initSpecificFormProperties().

{
require_once 'Services/RTE/classes/class.ilRTE.php';
$res = $this->db->queryF(
"SELECT * FROM {$this->getSpecificFeedbackTableName()} WHERE question_fi = %s AND answer = %s",
array('integer','integer'), array($questionId, $answerIndex)
);
while( $row = $this->db->fetchAssoc($res) )
{
$feedbackContent = ilRTE::_replaceMediaObjectImageSrc($row['feedback'], 1);
break;
}
return $feedbackContent;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilAssMultiOptionQuestionFeedback::getSpecificAnswerFeedbackExportPresentation (   $questionId,
  $answerIndex 
)

returns the generic feedback export presentation for given question id either for solution completed or incompleted

public

Parameters
integer$questionId
integer$answerIndex
Returns
string $specificAnswerFeedbackExportPresentation

Reimplemented from ilAssQuestionFeedback.

Definition at line 421 of file class.ilAssMultiOptionQuestionFeedback.php.

References ilAssQuestionFeedback\getPageObjectXML(), getSpecificAnswerFeedbackContent(), getSpecificAnswerFeedbackPageObjectId(), and ilAssQuestionFeedback\getSpecificAnswerFeedbackPageObjectType().

Referenced by specificAnswerFeedbackExists().

{
if( $this->questionOBJ->isAdditionalContentEditingModePageObject() )
{
$specificAnswerFeedbackExportPresentation = $this->getPageObjectXML(
$this->getSpecificAnswerFeedbackPageObjectId($questionId, $answerIndex)
);
}
else
{
$specificAnswerFeedbackExportPresentation = $this->getSpecificAnswerFeedbackContent(
$questionId, $answerIndex
);
}
return $specificAnswerFeedbackExportPresentation;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilAssMultiOptionQuestionFeedback::getSpecificAnswerFeedbackId (   $questionId,
  $answerIndex 
)
finalprotected

returns the SPECIFIC answer feedback ID for a given question id and answer index.

protected

Parameters
integer$questionId
boolean$answerIndex
Returns
string $feedbackId

Definition at line 309 of file class.ilAssMultiOptionQuestionFeedback.php.

References $res, and $row.

Referenced by getSpecificAnswerFeedbackPageObjectId(), and saveSpecificAnswerFeedbackContent().

{
$res = $this->db->queryF(
"SELECT feedback_id FROM {$this->getSpecificFeedbackTableName()} WHERE question_fi = %s AND answer = %s",
array('integer','integer'), array($questionId, $answerIndex)
);
$feedbackId = null;
while( $row = $this->db->fetchAssoc($res) )
{
$feedbackId = $row['feedback_id'];
break;
}
return $feedbackId;
}

+ Here is the caller graph for this function:

ilAssMultiOptionQuestionFeedback::getSpecificAnswerFeedbackIdByAnswerIndexMap (   $questionId)
finalprotected

returns an array mapping feedback ids to answer indexes for all answer options of question

protected

Parameters
integer$questionId
Returns
array $feedbackIdByAnswerIndexMap

Definition at line 336 of file class.ilAssMultiOptionQuestionFeedback.php.

References $res, and $row.

Referenced by deleteSpecificAnswerFeedbacks().

{
$res = $this->db->queryF(
"SELECT feedback_id, answer FROM {$this->getSpecificFeedbackTableName()} WHERE question_fi = %s",
array('integer'), array($questionId)
);
$feedbackIdByAnswerIndexMap = array();
while( $row = $this->db->fetchAssoc($res) )
{
$feedbackIdByAnswerIndexMap[ $row['answer'] ] = $row['feedback_id'];
}
return $feedbackIdByAnswerIndexMap;
}

+ Here is the caller graph for this function:

ilAssMultiOptionQuestionFeedback::getSpecificAnswerFeedbackPageObjectId (   $questionId,
  $answerIndex 
)
finalprotected

returns a useable page object id for specific answer feedback page objects for the given question id and answer index (using the id sequence of non page object specific answer feedback)

protected

Parameters
integer$questionId
integer$answerIndex
Returns
integer $pageObjectId

Definition at line 400 of file class.ilAssMultiOptionQuestionFeedback.php.

References getSpecificAnswerFeedbackId(), and saveSpecificAnswerFeedbackContent().

Referenced by getSpecificAnswerFeedbackExportPresentation(), getSpecificAnswerFeedbackTestPresentation(), importSpecificAnswerFeedback(), ilAssConfigurableMultiOptionQuestionFeedback\initSpecificFormProperties(), and initSpecificFormProperties().

{
$pageObjectId = $this->getSpecificAnswerFeedbackId($questionId, $answerIndex);
if( !$pageObjectId )
{
$pageObjectId = $this->saveSpecificAnswerFeedbackContent($questionId, $answerIndex, null);
}
return $pageObjectId;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilAssMultiOptionQuestionFeedback::getSpecificAnswerFeedbackTestPresentation (   $questionId,
  $answerIndex 
)

returns the html of SPECIFIC feedback for the given question id and answer index for test presentation

public

Parameters
integer$questionId
integer$answerIndex
Returns
string $specificAnswerFeedbackTestPresentationHTML

Reimplemented from ilAssQuestionFeedback.

Definition at line 33 of file class.ilAssMultiOptionQuestionFeedback.php.

References ilAssQuestionFeedback\getPageObjectContent(), getSpecificAnswerFeedbackContent(), getSpecificAnswerFeedbackPageObjectId(), and ilAssQuestionFeedback\getSpecificAnswerFeedbackPageObjectType().

{
if( $this->questionOBJ->isAdditionalContentEditingModePageObject() )
{
$specificAnswerFeedbackTestPresentationHTML = $this->getPageObjectContent(
$this->getSpecificAnswerFeedbackPageObjectId($questionId, $answerIndex)
);
}
else
{
$specificAnswerFeedbackTestPresentationHTML = $this->getSpecificAnswerFeedbackContent(
$questionId, $answerIndex
);
}
return $specificAnswerFeedbackTestPresentationHTML;
}

+ Here is the call graph for this function:

ilAssMultiOptionQuestionFeedback::getSpecificFeedbackTableName ( )
finalprotected
ilAssMultiOptionQuestionFeedback::importSpecificAnswerFeedback (   $questionId,
  $answerIndex,
  $feedbackContent 
)

imports the given feedback content as specific feedback for the given question id and answer index

public

Parameters
integer$questionId
integer$answerIndex
string$feedbackContent

Reimplemented from ilAssQuestionFeedback.

Definition at line 449 of file class.ilAssMultiOptionQuestionFeedback.php.

References ilAssQuestionFeedback\createPageObject(), getSpecificAnswerFeedbackPageObjectId(), ilAssQuestionFeedback\getSpecificAnswerFeedbackPageObjectType(), and saveSpecificAnswerFeedbackContent().

{
if( $this->questionOBJ->isAdditionalContentEditingModePageObject() )
{
$pageObjectId = $this->getSpecificAnswerFeedbackPageObjectId($questionId, $answerIndex);
$pageObjectType = $this->getSpecificAnswerFeedbackPageObjectType();
$this->createPageObject($pageObjectType, $pageObjectId, $feedbackContent);
}
else
{
$this->saveSpecificAnswerFeedbackContent($questionId, $answerIndex, $feedbackContent);
}
}

+ Here is the call graph for this function:

ilAssMultiOptionQuestionFeedback::initSpecificFormProperties ( ilPropertyFormGUI  $form)

initialises a given form object's specific form properties relating to this question type

public

Parameters
ilPropertyFormGUI$form

Reimplemented from ilAssQuestionFeedback.

Reimplemented in ilAssConfigurableMultiOptionQuestionFeedback.

Definition at line 89 of file class.ilAssMultiOptionQuestionFeedback.php.

References getAnswerOptionsByAnswerIndex(), ilPropertyFormGUI\getItemByPostVar(), ilAssQuestionFeedback\getPageObjectNonEditableValueHTML(), getSpecificAnswerFeedbackContent(), getSpecificAnswerFeedbackPageObjectId(), and ilAssQuestionFeedback\getSpecificAnswerFeedbackPageObjectType().

{
if (!$this->questionOBJ->getSelfAssessmentEditingMode())
{
foreach( $this->getAnswerOptionsByAnswerIndex() as $index => $answer )
{
if( $this->questionOBJ->isAdditionalContentEditingModePageObject() )
{
$this->getSpecificAnswerFeedbackPageObjectId($this->questionOBJ->getId(), $index)
);
}
else
{
$value = $this->questionOBJ->prepareTextareaOutput(
$this->getSpecificAnswerFeedbackContent($this->questionOBJ->getId(), $index)
);
}
$form->getItemByPostVar("feedback_answer_$index")->setValue($value);
}
}
}

+ Here is the call graph for this function:

ilAssMultiOptionQuestionFeedback::saveSpecificAnswerFeedbackContent (   $questionId,
  $answerIndex,
  $feedbackContent 
)

saves SPECIFIC answer feedback content for the given question id and answer index to the database.

public

Parameters
integer$questionId
integer$answerIndex
string$feedbackContent
Returns
integer $feedbackId

Reimplemented from ilAssQuestionFeedback.

Definition at line 169 of file class.ilAssMultiOptionQuestionFeedback.php.

References ilRTE\_replaceMediaObjectImageSrc(), getSpecificAnswerFeedbackId(), and getSpecificFeedbackTableName().

Referenced by getSpecificAnswerFeedbackPageObjectId(), importSpecificAnswerFeedback(), saveSpecificFormProperties(), and ilAssConfigurableMultiOptionQuestionFeedback\saveSpecificFormProperties().

{
require_once 'Services/RTE/classes/class.ilRTE.php';
if( strlen($feedbackContent) )
{
$feedbackContent = ilRTE::_replaceMediaObjectImageSrc($feedbackContent, 0);
}
$feedbackId = $this->getSpecificAnswerFeedbackId($questionId, $answerIndex);
if( $feedbackId )
{
$this->db->update($this->getSpecificFeedbackTableName(),
array(
'feedback' => array('text', $feedbackContent),
'tstamp' => array('integer', time())
),
array(
'feedback_id' => array('integer', $feedbackId),
)
);
}
else
{
$feedbackId = $this->db->nextId($this->getSpecificFeedbackTableName());
$this->db->insert($this->getSpecificFeedbackTableName(), array(
'feedback_id' => array('integer', $feedbackId),
'question_fi' => array('integer', $questionId),
'answer' => array('integer', $answerIndex),
'feedback' => array('text', $feedbackContent),
'tstamp' => array('integer', time())
));
}
return $feedbackId;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilAssMultiOptionQuestionFeedback::saveSpecificFormProperties ( ilPropertyFormGUI  $form)

saves a given form object's specific form properties relating to this question type

public

Parameters
ilPropertyFormGUI$form

Reimplemented from ilAssQuestionFeedback.

Reimplemented in ilAssConfigurableMultiOptionQuestionFeedback.

Definition at line 121 of file class.ilAssMultiOptionQuestionFeedback.php.

References getAnswerOptionsByAnswerIndex(), ilPropertyFormGUI\getInput(), and saveSpecificAnswerFeedbackContent().

{
if( !$this->questionOBJ->isAdditionalContentEditingModePageObject() )
{
foreach( $this->getAnswerOptionsByAnswerIndex() as $index => $answer )
{
$this->questionOBJ->getId(), $index, $form->getInput("feedback_answer_$index")
);
}
}
}

+ Here is the call graph for this function:

ilAssMultiOptionQuestionFeedback::specificAnswerFeedbackExists (   $answerIndexes)

Definition at line 464 of file class.ilAssMultiOptionQuestionFeedback.php.

References getSpecificAnswerFeedbackExportPresentation().

{
foreach($answerIndexes as $answerIndex)
{
$fb = $this->getSpecificAnswerFeedbackExportPresentation($this->questionOBJ->getId(), $answerIndex);
if( strlen($fb) )
{
return true;
}
}
return false;
}

+ Here is the call graph for this function:

ilAssMultiOptionQuestionFeedback::syncSpecificFeedback (   $originalQuestionId,
  $duplicateQuestionId 
)
protected

syncs the SPECIFIC feedback from a duplicated question back to the original question

protected

Parameters
integer$originalQuestionId
integer$duplicateQuestionId

Reimplemented from ilAssQuestionFeedback.

Reimplemented in ilAssConfigurableMultiOptionQuestionFeedback.

Definition at line 273 of file class.ilAssMultiOptionQuestionFeedback.php.

References $res, $row, and getSpecificFeedbackTableName().

{
// delete specific feedback of the original
$this->db->manipulateF(
"DELETE FROM {$this->getSpecificFeedbackTableName()} WHERE question_fi = %s", array('integer'), array($originalQuestionId)
);
// get specific feedback of the actual question
$res = $this->db->queryF(
"SELECT * FROM {$this->getSpecificFeedbackTableName()} WHERE question_fi = %s", array('integer'), array($duplicateQuestionId)
);
// save specific feedback to the original
while( $row = $this->db->fetchAssoc($res) )
{
$nextId = $this->db->nextId($this->getSpecificFeedbackTableName());
$this->db->insert($this->getSpecificFeedbackTableName(), array(
'feedback_id' => array('integer', $nextId),
'question_fi' => array('integer', $originalQuestionId),
'answer' => array('integer',$row['answer']),
'feedback' => array('text',$row['feedback']),
'tstamp' => array('integer',time())
));
}
}

+ Here is the call graph for this function:

Field Documentation

const ilAssMultiOptionQuestionFeedback::TABLE_NAME_SPECIFIC_FEEDBACK = 'qpl_fb_specific'

table name for specific feedback

Definition at line 22 of file class.ilAssMultiOptionQuestionFeedback.php.

Referenced by getSpecificFeedbackTableName().


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