4require_once
'Modules/TestQuestionPool/classes/feedback/class.ilAssMultiOptionQuestionFeedback.php';
42 if( !$this->questionOBJ->getSelfAssessmentEditingMode() )
45 $header->setTitle($this->lng->txt(
'feedback_answers'));
48 require_once
'./Services/Form/classes/class.ilRadioGroupInputGUI.php';
49 require_once
'./Services/Form/classes/class.ilRadioOption.php';
53 new ilRadioOption($this->lng->txt(
'feedback_all'), self::FEEDBACK_SETTING_ALL),
true
56 new ilRadioOption($this->lng->txt(
'feedback_checked'), self::FEEDBACK_SETTING_CHECKED)
59 new ilRadioOption($this->lng->txt($this->questionOBJ->getSpecificFeedbackAllCorrectOptionLabel()), self::FEEDBACK_SETTING_CORRECT)
62 $feedback->setRequired(
true);
67 $propertyLabel = $this->questionOBJ->prepareTextareaOutput(
71 $propertyPostVar =
"feedback_answer_$index";
74 $propertyLabel , $propertyPostVar, $this->questionOBJ->isAdditionalContentEditingModePageObject()
91 if (!$this->questionOBJ->getSelfAssessmentEditingMode())
94 $this->questionOBJ->getSpecificFeedbackSetting()
99 if( $this->questionOBJ->isAdditionalContentEditingModePageObject() )
108 $value = $this->questionOBJ->prepareTextareaOutput(
129 if( !$this->questionOBJ->isAdditionalContentEditingModePageObject() )
136 $this->questionOBJ->getId(), $index, $form->
getInput(
"feedback_answer_$index")
164 array(
'feedback_setting' => array(
'integer', $specificFeedbackSetting)),
165 array(
'question_fi' => array(
'integer', $questionId))
187 $res = $this->db->queryF(
188 "SELECT * FROM {$this->getSpecificFeedbackTableName()} WHERE question_fi = %s", array(
'integer'), array($originalQuestionId)
191 while(
$row = $this->db->fetchAssoc(
$res) )
196 'feedback_id' => array(
'integer', $nextId),
197 'question_fi' => array(
'integer', $duplicateQuestionId),
198 'answer' => array(
'integer',
$row[
'answer']),
199 'feedback' => array(
'text',
$row[
'feedback']),
200 'tstamp' => array(
'integer', time())
203 if( $this->questionOBJ->isAdditionalContentEditingModePageObject() )
226 $this->db->manipulateF(
227 "DELETE FROM {$this->getSpecificFeedbackTableName()} WHERE question_fi = %s",
228 array(
'integer'), array($originalQuestionId)
232 $res = $this->db->queryF(
233 "SELECT * FROM {$this->getSpecificFeedbackTableName()} WHERE question_fi = %s",
234 array(
'integer'), array($duplicateQuestionId)
238 while(
$row = $this->db->fetchAssoc(
$res) )
243 'feedback_id' => array(
'integer', $nextId),
244 'question_fi' => array(
'integer', $originalQuestionId),
245 'answer' => array(
'integer',
$row[
'answer']),
246 'feedback' => array(
'text',
$row[
'feedback']),
247 'tstamp' => array(
'integer',time())
254 $res = $this->db->queryF(
255 "SELECT feedback_setting FROM {$this->getSpecificQuestionTableName()} WHERE question_fi = %s",
256 array(
'integer'), array($sourceQuestionId)
262 array(
'feedback_setting' => array(
'integer',
$row[
'feedback_setting']) ),
263 array(
'question_fi' => array(
'integer', $targetQuestionId) )
initSpecificFormProperties(ilPropertyFormGUI $form)
initialises a given form object's specific form properties relating to this question type
syncSpecificFeedback($originalQuestionId, $duplicateQuestionId)
syncs the SPECIFIC feedback from a duplicated question back to the original question
isSaveableInPageObjectEditingMode()
returns the fact that the feedback editing form is saveable in page object editing mode,...
saveSpecificFeedbackSetting($questionId, $specificFeedbackSetting)
saves the given specific feedback setting for the given question id to the db.
getSpecificQuestionTableName()
returns the name of question specific table
const FEEDBACK_SETTING_CHECKED
const FEEDBACK_SETTING_ALL
duplicateSpecificFeedback($originalQuestionId, $duplicateQuestionId)
duplicates the SPECIFIC feedback relating to the given original question id and saves it for the give...
const FEEDBACK_SETTING_CORRECT
completeSpecificFormProperties(ilPropertyFormGUI $form)
completes a given form object with the specific form properties required by this question type
syncSpecificFeedbackSetting($sourceQuestionId, $targetQuestionId)
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.
getSpecificAnswerFeedbackPageObjectId($questionId, $answerIndex)
returns a useable page object id for specific answer feedback page objects for the given question id ...
getAnswerOptionsByAnswerIndex()
returns the answer options mapped by answer index (can be overwritten by concrete question type class...
getSpecificFeedbackTableName()
returns the table name for specific feedback
saveSpecificAnswerFeedbackContent($questionId, $answerIndex, $feedbackContent)
saves SPECIFIC answer feedback content for the given question id and answer index to the database.
buildAnswerOptionLabel($index, $answer)
builds an answer option label from given (mixed type) index and answer (can be overwritten by concret...
getPageObjectNonEditableValueHTML($pageObjectType, $pageObjectId)
returns html content to be used as value for non editable value form properties in feedback editing f...
duplicatePageObject($pageObjectType, $originalPageObjectId, $duplicatePageObjectId, $duplicatePageObjectParentId)
duplicates the page object with given type and original id to new page object with same type and give...
getSpecificAnswerFeedbackPageObjectType()
returns the type for specific feedback page objects defined in local constant
buildFeedbackContentFormProperty($label, $postVar, $asNonEditable)
builds and returns a form property gui object with the given label and postvar that is addable to pro...
This class represents an option in a radio group.