4 require_once
'Modules/TestQuestionPool/classes/feedback/class.ilAssMultiOptionQuestionFeedback.php';
42 if (!$this->questionOBJ->getSelfAssessmentEditingMode()) {
44 $header->setTitle($this->lng->txt(
'feedback_answers'));
47 require_once
'./Services/Form/classes/class.ilRadioGroupInputGUI.php';
48 require_once
'./Services/Form/classes/class.ilRadioOption.php';
52 new ilRadioOption($this->lng->txt(
'feedback_all'), self::FEEDBACK_SETTING_ALL),
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);
66 $propertyLabel = $this->questionOBJ->prepareTextareaOutput(
71 $propertyPostVar =
"feedback_answer_$index";
76 $this->questionOBJ->isAdditionalContentEditingModePageObject()
93 if (!$this->questionOBJ->getSelfAssessmentEditingMode()) {
95 $this->questionOBJ->getSpecificFeedbackSetting()
99 if ($this->questionOBJ->isAdditionalContentEditingModePageObject()) {
105 $value = $this->questionOBJ->prepareTextareaOutput(
128 if (!$this->questionOBJ->isAdditionalContentEditingModePageObject()) {
131 $this->questionOBJ->getId(),
133 $form->
getInput(
"feedback_answer_$index")
162 array(
'feedback_setting' =>
array(
'integer', $specificFeedbackSetting)),
163 array(
'question_fi' =>
array(
'integer', $questionId))
185 $res = $this->db->queryF(
186 "SELECT * FROM {$this->getSpecificFeedbackTableName()} WHERE question_fi = %s",
188 array($originalQuestionId)
191 while (
$row = $this->db->fetchAssoc(
$res)) {
195 'feedback_id' =>
array(
'integer', $nextId),
196 'question_fi' =>
array(
'integer', $duplicateQuestionId),
197 'answer' =>
array(
'integer',
$row[
'answer']),
198 'feedback' =>
array(
'text',
$row[
'feedback']),
202 if ($this->questionOBJ->isAdditionalContentEditingModePageObject()) {
224 $this->db->manipulateF(
225 "DELETE FROM {$this->getSpecificFeedbackTableName()} WHERE question_fi = %s",
227 array($originalQuestionId)
231 $res = $this->db->queryF(
232 "SELECT * FROM {$this->getSpecificFeedbackTableName()} WHERE question_fi = %s",
234 array($duplicateQuestionId)
238 while (
$row = $this->db->fetchAssoc(
$res)) {
242 'feedback_id' =>
array(
'integer', $nextId),
243 'question_fi' =>
array(
'integer', $originalQuestionId),
244 'answer' =>
array(
'integer',
$row[
'answer']),
245 'feedback' =>
array(
'text',
$row[
'feedback']),
253 $res = $this->db->queryF(
254 "SELECT feedback_setting FROM {$this->getSpecificQuestionTableName()} WHERE question_fi = %s",
256 array($sourceQuestionId)
263 array(
'feedback_setting' =>
array(
'integer',
$row[
'feedback_setting']) ),
264 array(
'question_fi' =>
array(
'integer', $targetQuestionId) )
syncSpecificFeedbackSetting($sourceQuestionId, $targetQuestionId)
This class represents an option in a radio group.
getAnswerOptionsByAnswerIndex()
returns the answer options mapped by answer index (can be overwritten by concrete question type class...
getPageObjectNonEditableValueHTML($pageObjectType, $pageObjectId)
returns html content to be used as value for non editable value form properties in feedback editing f...
saveSpecificAnswerFeedbackContent($questionId, $answerIndex, $feedbackContent)
saves SPECIFIC answer feedback content for the given question id and answer index to the database...
getSpecificAnswerFeedbackPageObjectType()
returns the type for specific feedback page objects defined in local constant
getSpecificFeedbackTableName()
returns the table name for specific feedback
completeSpecificFormProperties(ilPropertyFormGUI $form)
completes a given form object with the specific form properties required by this question type ...
const FEEDBACK_SETTING_CHECKED
buildAnswerOptionLabel($index, $answer)
builds an answer option label from given (mixed type) index and answer (can be overwritten by concret...
syncSpecificFeedback($originalQuestionId, $duplicateQuestionId)
syncs the SPECIFIC feedback from a duplicated question back to the original question ...
const FEEDBACK_SETTING_CORRECT
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 ...
foreach($_POST as $key=> $value) $res
if(isset($_POST['submit'])) $form
saveSpecificFormProperties(ilPropertyFormGUI $form)
saves a given form object's specific form properties relating to this question type ...
duplicateSpecificFeedback($originalQuestionId, $duplicateQuestionId)
duplicates the SPECIFIC feedback relating to the given original question id and saves it for the give...
duplicatePageObject($pageObjectType, $originalPageObjectId, $duplicatePageObjectId, $duplicatePageObjectParentId)
duplicates the page object with given type and original id to new page object with same type and give...
getSpecificQuestionTableName()
returns the name of question specific table
Create styles array
The data for the language used.
initSpecificFormProperties(ilPropertyFormGUI $form)
initialises a given form object's specific form properties relating to this question type ...
isSaveableInPageObjectEditingMode()
returns the fact that the feedback editing form is saveable in page object editing mode...
const FEEDBACK_SETTING_ALL
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
buildFeedbackContentFormProperty($label, $postVar, $asNonEditable)
builds and returns a form property gui object with the given label and postvar that is addable to pro...
saveSpecificFeedbackSetting($questionId, $specificFeedbackSetting)
saves the given specific feedback setting for the given question id to the db.