111 if( $this->questionOBJ->isAdditionalContentEditingModePageObject() )
123 return $genericFeedbackTestPresentationHTML;
149 $this->lng->txt(
'feedback_complete_solution'),
'feedback_complete',
150 $this->questionOBJ->isAdditionalContentEditingModePageObject()
154 $this->lng->txt(
'feedback_incomplete_solution'),
'feedback_incomplete',
155 $this->questionOBJ->isAdditionalContentEditingModePageObject()
179 if( $this->questionOBJ->isAdditionalContentEditingModePageObject() )
193 $valueFeedbackSolutionComplete = $this->questionOBJ->prepareTextareaOutput(
197 $valueFeedbackSolutionIncomplete = $this->questionOBJ->prepareTextareaOutput(
202 $form->
getItemByPostVar(
'feedback_complete')->setValue($valueFeedbackSolutionComplete);
203 $form->
getItemByPostVar(
'feedback_incomplete')->setValue($valueFeedbackSolutionIncomplete);
226 if( !$this->questionOBJ->isAdditionalContentEditingModePageObject() )
274 require_once
'Services/Form/classes/class.ilNonEditableValueGUI.php';
280 require_once
'Services/Form/classes/class.ilTextAreaInputGUI.php';
281 require_once
'Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php';
284 $property->setRequired(
false);
285 $property->setRows(10);
286 $property->setCols(80);
288 if( !$this->questionOBJ->getPreventRteUsage() )
290 $property->setUseRte(
true);
292 $property->addPlugin(
"latex");
293 $property->addButton(
"latex");
294 $property->addButton(
"pastelatex");
297 $property->setRTESupport($this->questionOBJ->getId(),
"qpl",
"assessment");
316 require_once
'Services/RTE/classes/class.ilRTE.php';
318 $correctness = $solutionCompleted ? 1 : 0;
320 $res = $this->db->queryF(
321 "SELECT * FROM {$this->getGenericFeedbackTableName()} WHERE question_fi = %s AND correctness = %s",
322 array(
'integer',
'text'), array($questionId, $correctness)
325 $feedbackContent = null;
327 while(
$row = $this->db->fetchAssoc(
$res) )
333 return $feedbackContent;
361 require_once
'Services/RTE/classes/class.ilRTE.php';
363 $correctness = $solutionCompleted ? 1 : 0;
367 if( strlen($feedbackContent) )
377 'feedback' => array(
'clob', $feedbackContent),
378 'tstamp' => array(
'integer', time())
381 'feedback_id' => array(
'integer', $feedbackId)
390 'feedback_id' => array(
'integer', $feedbackId),
391 'question_fi' => array(
'integer', $questionId),
392 'correctness' => array(
'text', $correctness),
393 'feedback' => array(
'clob', $feedbackContent),
394 'tstamp' => array(
'integer', time())
424 if( $isAdditionalContentEditingModePageObject )
437 $this->db->manipulateF(
438 "DELETE FROM {$this->getGenericFeedbackTableName()} WHERE question_fi = %s", array(
'integer'), array($questionId)
478 $res = $this->db->queryF(
479 "SELECT * FROM {$this->getGenericFeedbackTableName()} WHERE question_fi = %s",
480 array(
'integer'), array($originalQuestionId)
483 while(
$row = $this->db->fetchAssoc(
$res) )
488 'feedback_id' => array(
'integer', $feedbackId),
489 'question_fi' => array(
'integer', $duplicateQuestionId),
490 'correctness' => array(
'text',
$row[
'correctness']),
491 'feedback' => array(
'clob',
$row[
'feedback']),
492 'tstamp' => array(
'integer', time())
495 if( $this->questionOBJ->isAdditionalContentEditingModePageObject() )
522 final public function syncFeedback($originalQuestionId, $duplicateQuestionId)
539 $this->db->manipulateF(
540 "DELETE FROM {$this->getGenericFeedbackTableName()} WHERE question_fi = %s", array(
'integer'), array($originalQuestionId)
545 "SELECT * FROM {$this->getGenericFeedbackTableName()} WHERE question_fi = %s", array(
'integer'), array($duplicateQuestionId)
554 'feedback_id' => array(
'integer', $nextId),
555 'question_fi' => array(
'integer', $originalQuestionId),
556 'correctness' => array(
'text',
$row[
'correctness']),
557 'feedback' => array(
'clob',
$row[
'feedback']),
558 'tstamp' => array(
'integer', time())
574 $res = $this->db->queryF(
575 "SELECT feedback_id FROM {$this->getGenericFeedbackTableName()} WHERE question_fi = %s AND correctness = %s",
576 array(
'integer',
'text'), array($questionId, (
int)$solutionCompleted)
581 while(
$row = $this->db->fetchAssoc(
$res) )
583 $feedbackId =
$row[
'feedback_id'];
626 return "$link<br /><br />$content";
640 include_once(
"./Modules/TestQuestionPool/classes/feedback/class.ilAssQuestionFeedback.php");
643 return "ilAssGenFeedbackPage".$gui;
647 return "ilAssSpecFeedbackPage".$gui;
665 $this->ctrl->setParameterByClass($cl,
'feedback_type', $pageObjectType);
666 $this->ctrl->setParameterByClass($cl,
'feedback_id', $pageObjectId);
668 $linkHREF = $this->ctrl->getLinkTargetByClass($cl,
'edit');
669 $linkTEXT = $this->lng->txt(
'tst_question_feedback_edit_page');
671 return "<a href='$linkHREF'>$linkTEXT</a>";
681 $this->page_obj_output_mode = $a_val;
708 require_once
'Modules/TestQuestionPool/classes/feedback/class.'.$cl.
'.php';
712 $mode = ($ilCtrl->isAsynch())
716 $pageObjectGUI =
new $cl($pageObjectId);
717 $pageObjectGUI->setOutputMode($mode);
719 return $pageObjectGUI->presentation($mode);
734 require_once
'Modules/TestQuestionPool/classes/feedback/class.'.$cl.
'.php';
738 $pageObject =
new $cl($pageObjectId);
739 return $pageObject->getXMLContent();
754 include_once(
"./Modules/TestQuestionPool/classes/feedback/class.ilAssGenFeedbackPage.php");
758 $pageObject->setParentId($this->questionOBJ->getId());
759 $pageObject->setId($pageObjectId);
760 $pageObject->createFromXML();
765 include_once(
"./Modules/TestQuestionPool/classes/feedback/class.ilAssSpecFeedbackPage.php");
769 $pageObject->setParentId($this->questionOBJ->getId());
770 $pageObject->setId($pageObjectId);
771 $pageObject->createFromXML();
786 final protected function createPageObject($pageObjectType, $pageObjectId, $pageObjectContent)
789 require_once
'Modules/TestQuestionPool/classes/feedback/class.'.$cl.
'.php';
791 $pageObject =
new $cl();
792 $pageObject->setParentId($this->questionOBJ->getId());
793 $pageObject->setId($pageObjectId);
794 $pageObject->setXMLContent($pageObjectContent);
795 $pageObject->createFromXML();
809 final protected function duplicatePageObject($pageObjectType, $originalPageObjectId, $duplicatePageObjectId, $duplicatePageObjectParentId)
812 require_once
'Modules/TestQuestionPool/classes/feedback/class.'.$cl.
'.php';
814 $pageObject =
new $cl($originalPageObjectId);
815 $pageObject->setParentId($duplicatePageObjectParentId);
816 $pageObject->setId($duplicatePageObjectId);
817 $pageObject->createFromXML();
832 include_once(
"./Modules/TestQuestionPool/classes/feedback/class.ilAssGenFeedbackPage.php");
836 $pageObject->delete();
841 include_once(
"./Modules/TestQuestionPool/classes/feedback/class.ilAssSpecFeedbackPage.php");
845 $pageObject->delete();
888 switch( $feedbackPageObjectType )
890 case self::PAGE_OBJECT_TYPE_GENERIC_FEEDBACK:
891 case self::PAGE_OBJECT_TYPE_SPECIFIC_FEEDBACK:
919 return $pageObjectId;
933 if( $this->questionOBJ->isAdditionalContentEditingModePageObject() )
945 return $genericFeedbackExportPresentation;
971 if( $this->questionOBJ->isAdditionalContentEditingModePageObject() )