ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f87
class.ilAssQuestionFeedback.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
14 abstract class ilAssQuestionFeedback
15 {
20 
25 
30 
35 
39  const TABLE_NAME_GENERIC_FEEDBACK = 'qpl_fb_generic';
40 
47  protected $questionOBJ = null;
48 
55  protected $ctrl = null;
56 
63  protected $db = null;
64 
71  protected $lng = null;
72 
79  protected $page_obj_output_mode = "presentation";
80 
92  {
93  $this->questionOBJ = $questionOBJ;
94 
95  $this->ctrl = $ctrl;
96  $this->lng = $lng;
97  $this->db = $db;
98  }
99 
109  public function getGenericFeedbackTestPresentation($questionId, $solutionCompleted)
110  {
111  if( $this->questionOBJ->isAdditionalContentEditingModePageObject() )
112  {
113  $genericFeedbackTestPresentationHTML = $this->getPageObjectContent(
115  $this->getGenericFeedbackPageObjectId($questionId, $solutionCompleted)
116  );
117  }
118  else
119  {
120  $genericFeedbackTestPresentationHTML = $this->getGenericFeedbackContent($questionId, $solutionCompleted);
121  }
122 
123  return $genericFeedbackTestPresentationHTML;
124  }
125 
136  abstract public function getSpecificAnswerFeedbackTestPresentation($questionId, $answerIndex);
137 
147  {
149  $this->lng->txt('feedback_complete_solution'), 'feedback_complete',
150  $this->questionOBJ->isAdditionalContentEditingModePageObject()
151  ));
152 
154  $this->lng->txt('feedback_incomplete_solution'), 'feedback_incomplete',
155  $this->questionOBJ->isAdditionalContentEditingModePageObject()
156  ));
157  }
158 
167  abstract public function completeSpecificFormProperties(ilPropertyFormGUI $form);
168 
177  final public function initGenericFormProperties(ilPropertyFormGUI $form)
178  {
179  if( $this->questionOBJ->isAdditionalContentEditingModePageObject() )
180  {
181  $pageObjectType = $this->getGenericFeedbackPageObjectType();
182 
183  $valueFeedbackSolutionComplete = $this->getPageObjectNonEditableValueHTML(
184  $pageObjectType, $this->getGenericFeedbackPageObjectId($this->questionOBJ->getId(), true)
185  );
186 
187  $valueFeedbackSolutionIncomplete = $this->getPageObjectNonEditableValueHTML(
188  $pageObjectType, $this->getGenericFeedbackPageObjectId($this->questionOBJ->getId(), false)
189  );
190  }
191  else
192  {
193  $valueFeedbackSolutionComplete = $this->questionOBJ->prepareTextareaOutput(
194  $this->getGenericFeedbackContent($this->questionOBJ->getId(), true)
195  );
196 
197  $valueFeedbackSolutionIncomplete = $this->questionOBJ->prepareTextareaOutput(
198  $this->getGenericFeedbackContent($this->questionOBJ->getId(), false)
199  );
200  }
201 
202  $form->getItemByPostVar('feedback_complete')->setValue($valueFeedbackSolutionComplete);
203  $form->getItemByPostVar('feedback_incomplete')->setValue($valueFeedbackSolutionIncomplete);
204  }
205 
214  abstract public function initSpecificFormProperties(ilPropertyFormGUI $form);
215 
224  final public function saveGenericFormProperties(ilPropertyFormGUI $form)
225  {
226  if( !$this->questionOBJ->isAdditionalContentEditingModePageObject() )
227  {
228  $this->saveGenericFeedbackContent($this->questionOBJ->getId(), false, $form->getInput('feedback_incomplete'));
229  $this->saveGenericFeedbackContent($this->questionOBJ->getId(), true, $form->getInput('feedback_complete'));
230  }
231  }
232 
241  abstract public function saveSpecificFormProperties(ilPropertyFormGUI $form);
242 
252  {
253  return false;
254  }
255 
270  final protected function buildFeedbackContentFormProperty($label, $postVar, $asNonEditable)
271  {
272  if($asNonEditable)
273  {
274  require_once 'Services/Form/classes/class.ilNonEditableValueGUI.php';
275 
276  $property = new ilNonEditableValueGUI($label, $postVar, true);
277  }
278  else
279  {
280  require_once 'Services/Form/classes/class.ilTextAreaInputGUI.php';
281  require_once 'Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php';
282 
283  $property = new ilTextAreaInputGUI($label, $postVar);
284  $property->setRequired(false);
285  $property->setRows(10);
286  $property->setCols(80);
287 
288  if( !$this->questionOBJ->getPreventRteUsage() )
289  {
290  $property->setUseRte(true);
291  $property->setRteTags(ilObjAdvancedEditing::_getUsedHTMLTags("assessment"));
292  $property->addPlugin("latex");
293  $property->addButton("latex");
294  $property->addButton("pastelatex");
295  }
296 
297  $property->setRTESupport($this->questionOBJ->getId(), "qpl", "assessment");
298  }
299 
300  return $property;
301  }
302 
314  final public function getGenericFeedbackContent($questionId, $solutionCompleted)
315  {
316  require_once 'Services/RTE/classes/class.ilRTE.php';
317 
318  $correctness = $solutionCompleted ? 1 : 0;
319 
320  $res = $this->db->queryF(
321  "SELECT * FROM {$this->getGenericFeedbackTableName()} WHERE question_fi = %s AND correctness = %s",
322  array('integer', 'text'), array($questionId, $correctness)
323  );
324 
325  $feedbackContent = null;
326 
327  while( $row = $this->db->fetchAssoc($res) )
328  {
329  $feedbackContent = ilRTE::_replaceMediaObjectImageSrc($row['feedback'], 1);
330  break;
331  }
332 
333  return $feedbackContent;
334  }
335 
345  abstract public function getSpecificAnswerFeedbackContent($questionId, $answerIndex);
346 
355  abstract public function getAllSpecificAnswerFeedbackContents($questionId);
356 
369  final public function saveGenericFeedbackContent($questionId, $solutionCompleted, $feedbackContent)
370  {
371  require_once 'Services/RTE/classes/class.ilRTE.php';
372 
373  $correctness = $solutionCompleted ? 1 : 0;
374 
375  $feedbackId = $this->getGenericFeedbackId($questionId, $solutionCompleted);
376 
377  if( strlen($feedbackContent) )
378  {
379  $feedbackContent = ilRTE::_replaceMediaObjectImageSrc($feedbackContent, 0);
380  }
381 
382  if( $feedbackId )
383  {
384  $this->db->update(
386  array(
387  'feedback' => array('clob', $feedbackContent),
388  'tstamp' => array('integer', time())
389  ),
390  array(
391  'feedback_id' => array('integer', $feedbackId)
392  )
393  );
394  }
395  else
396  {
397  $feedbackId = $this->db->nextId($this->getGenericFeedbackTableName());
398 
399  $this->db->insert($this->getGenericFeedbackTableName(), array(
400  'feedback_id' => array('integer', $feedbackId),
401  'question_fi' => array('integer', $questionId),
402  'correctness' => array('text', $correctness), // text ?
403  'feedback' => array('clob', $feedbackContent),
404  'tstamp' => array('integer', time())
405  ));
406  }
407 
408  return $feedbackId;
409  }
410 
421  abstract public function saveSpecificAnswerFeedbackContent($questionId, $answerIndex, $feedbackContent);
422 
432  final public function deleteGenericFeedbacks($questionId, $isAdditionalContentEditingModePageObject)
433  {
434  if( $isAdditionalContentEditingModePageObject )
435  {
438  $this->getGenericFeedbackPageObjectId($questionId, true)
439  );
440 
443  $this->getGenericFeedbackPageObjectId($questionId, false)
444  );
445  }
446 
447  $this->db->manipulateF(
448  "DELETE FROM {$this->getGenericFeedbackTableName()} WHERE question_fi = %s", array('integer'), array($questionId)
449  );
450  }
451 
460  abstract public function deleteSpecificAnswerFeedbacks($questionId, $isAdditionalContentEditingModePageObject);
461 
471  final public function duplicateFeedback($originalQuestionId, $duplicateQuestionId)
472  {
473  $this->duplicateGenericFeedback($originalQuestionId, $duplicateQuestionId);
474  $this->duplicateSpecificFeedback($originalQuestionId, $duplicateQuestionId);
475  }
476 
486  final private function duplicateGenericFeedback($originalQuestionId, $duplicateQuestionId)
487  {
488  $res = $this->db->queryF(
489  "SELECT * FROM {$this->getGenericFeedbackTableName()} WHERE question_fi = %s",
490  array('integer'), array($originalQuestionId)
491  );
492 
493  while( $row = $this->db->fetchAssoc($res) )
494  {
495  $feedbackId = $this->db->nextId($this->getGenericFeedbackTableName());
496 
497  $this->db->insert($this->getGenericFeedbackTableName(), array(
498  'feedback_id' => array('integer', $feedbackId),
499  'question_fi' => array('integer', $duplicateQuestionId),
500  'correctness' => array('text', $row['correctness']),
501  'feedback' => array('clob', $row['feedback']),
502  'tstamp' => array('integer', time())
503  ));
504 
505  if( $this->questionOBJ->isAdditionalContentEditingModePageObject() )
506  {
507  $pageObjectType = $this->getGenericFeedbackPageObjectType();
508  $this->duplicatePageObject($pageObjectType, $row['feedback_id'], $feedbackId, $duplicateQuestionId);
509  }
510  }
511  }
512 
522  abstract protected function duplicateSpecificFeedback($originalQuestionId, $duplicateQuestionId);
523 
532  final public function syncFeedback($originalQuestionId, $duplicateQuestionId)
533  {
534  $this->syncGenericFeedback($originalQuestionId, $duplicateQuestionId);
535  $this->syncSpecificFeedback($originalQuestionId, $duplicateQuestionId);
536  }
537 
546  final private function syncGenericFeedback($originalQuestionId, $duplicateQuestionId)
547  {
548  // delete generic feedback of the original question
549  $this->db->manipulateF(
550  "DELETE FROM {$this->getGenericFeedbackTableName()} WHERE question_fi = %s", array('integer'), array($originalQuestionId)
551  );
552 
553  // get generic feedback of the actual (duplicated) question
554  $result = $this->db->queryF(
555  "SELECT * FROM {$this->getGenericFeedbackTableName()} WHERE question_fi = %s", array('integer'), array($duplicateQuestionId)
556  );
557 
558  // save generic feedback to the original question
559  while( $row = $this->db->fetchAssoc($result) )
560  {
561  $nextId = $this->db->nextId($this->getGenericFeedbackTableName());
562 
563  $this->db->insert($this->getGenericFeedbackTableName(), array(
564  'feedback_id' => array('integer', $nextId),
565  'question_fi' => array('integer', $originalQuestionId),
566  'correctness' => array('text', $row['correctness']),
567  'feedback' => array('clob', $row['feedback']),
568  'tstamp' => array('integer', time())
569  ));
570  }
571  }
572 
582  final protected function getGenericFeedbackId($questionId, $solutionCompleted)
583  {
584  $res = $this->db->queryF(
585  "SELECT feedback_id FROM {$this->getGenericFeedbackTableName()} WHERE question_fi = %s AND correctness = %s",
586  array('integer','text'), array($questionId, (int)$solutionCompleted)
587  );
588 
589  $feedbackId = null;
590 
591  while( $row = $this->db->fetchAssoc($res) )
592  {
593  $feedbackId = $row['feedback_id'];
594  break;
595  }
596 
597  return $feedbackId;
598  }
599 
608  abstract protected function syncSpecificFeedback($originalQuestionId, $duplicateQuestionId);
609 
616  final protected function getGenericFeedbackTableName()
617  {
618  return self::TABLE_NAME_GENERIC_FEEDBACK;
619  }
620 
631  final protected function getPageObjectNonEditableValueHTML($pageObjectType, $pageObjectId)
632  {
633  $link = $this->getPageObjectEditingLink($pageObjectType, $pageObjectId);
634  $content = $this->getPageObjectContent($pageObjectType, $pageObjectId);
635 
636  return "$link<br /><br />$content";
637  }
638 
645  function getClassNameByType($a_type, $a_gui = false)
646  {
647  $gui = ($a_gui)
648  ? "GUI"
649  : "";
650  include_once("./Modules/TestQuestionPool/classes/feedback/class.ilAssQuestionFeedback.php");
652  {
653  return "ilAssGenFeedbackPage".$gui;
654  }
656  {
657  return "ilAssSpecFeedbackPage".$gui;
658  }
659  }
660 
661 
672  final private function getPageObjectEditingLink($pageObjectType, $pageObjectId)
673  {
674  $cl = $this->getClassNameByType($pageObjectType, true);
675  $this->ctrl->setParameterByClass($cl, 'feedback_type', $pageObjectType);
676  $this->ctrl->setParameterByClass($cl, 'feedback_id', $pageObjectId);
677 
678  $linkHREF = $this->ctrl->getLinkTargetByClass($cl, 'edit');
679  $linkTEXT = $this->lng->txt('tst_question_feedback_edit_page');
680 
681  return "<a href='$linkHREF'>$linkTEXT</a>";
682  }
683 
689  final public function setPageObjectOutputMode($a_val)
690  {
691  $this->page_obj_output_mode = $a_val;
692  }
693 
699  final public function getPageObjectOutputMode()
700  {
702  }
703 
713  final protected function getPageObjectContent($pageObjectType, $pageObjectId)
714  {
715  global $ilCtrl;
716 
717  $cl = $this->getClassNameByType($pageObjectType, true);
718  require_once 'Modules/TestQuestionPool/classes/feedback/class.'.$cl.'.php';
719 
720  $this->ensurePageObjectExists($pageObjectType, $pageObjectId);
721 
722  $mode = ($ilCtrl->isAsynch())
723  ? "presentation"
724  : $this->getPageObjectOutputMode();
725 
726  $pageObjectGUI = new $cl($pageObjectId);
727  $pageObjectGUI->setOutputMode($mode);
728 
729  return $pageObjectGUI->presentation($mode);
730  }
731 
741  final protected function getPageObjectXML($pageObjectType, $pageObjectId)
742  {
743  $cl = $this->getClassNameByType($pageObjectType);
744  require_once 'Modules/TestQuestionPool/classes/feedback/class.'.$cl.'.php';
745 
746  $this->ensurePageObjectExists($pageObjectType, $pageObjectId);
747 
748  $pageObject = new $cl($pageObjectId);
749  return $pageObject->getXMLContent();
750  }
751 
760  final private function ensurePageObjectExists($pageObjectType, $pageObjectId)
761  {
763  {
764  include_once("./Modules/TestQuestionPool/classes/feedback/class.ilAssGenFeedbackPage.php");
765  if( !ilAssGenFeedbackPage::_exists($pageObjectType, $pageObjectId) )
766  {
767  $pageObject = new ilAssGenFeedbackPage();
768  $pageObject->setParentId($this->questionOBJ->getId());
769  $pageObject->setId($pageObjectId);
770  $pageObject->createFromXML();
771  }
772  }
774  {
775  include_once("./Modules/TestQuestionPool/classes/feedback/class.ilAssSpecFeedbackPage.php");
776  if( !ilAssSpecFeedbackPage::_exists($pageObjectType, $pageObjectId) )
777  {
778  $pageObject = new ilAssSpecFeedbackPage();
779  $pageObject->setParentId($this->questionOBJ->getId());
780  $pageObject->setId($pageObjectId);
781  $pageObject->createFromXML();
782  }
783  }
784  }
785 
796  final protected function createPageObject($pageObjectType, $pageObjectId, $pageObjectContent)
797  {
798  $cl = $this->getClassNameByType($pageObjectType);
799  require_once 'Modules/TestQuestionPool/classes/feedback/class.'.$cl.'.php';
800 
801  $pageObject = new $cl();
802  $pageObject->setParentId($this->questionOBJ->getId());
803  $pageObject->setId($pageObjectId);
804  $pageObject->setXMLContent($pageObjectContent);
805  $pageObject->createFromXML();
806  }
807 
819  final protected function duplicatePageObject($pageObjectType, $originalPageObjectId, $duplicatePageObjectId, $duplicatePageObjectParentId)
820  {
821  $cl = $this->getClassNameByType($pageObjectType);
822  require_once 'Modules/TestQuestionPool/classes/feedback/class.'.$cl.'.php';
823 
824  $pageObject = new $cl($originalPageObjectId);
825  $pageObject->setParentId($duplicatePageObjectParentId);
826  $pageObject->setId($duplicatePageObjectId);
827  $pageObject->createFromXML();
828  }
829 
838  final protected function ensurePageObjectDeleted($pageObjectType, $pageObjectId)
839  {
841  {
842  include_once("./Modules/TestQuestionPool/classes/feedback/class.ilAssGenFeedbackPage.php");
843  if( ilAssGenFeedbackPage::_exists($pageObjectType, $pageObjectId) )
844  {
845  $pageObject = new ilAssGenFeedbackPage($pageObjectId);
846  $pageObject->delete();
847  }
848  }
850  {
851  include_once("./Modules/TestQuestionPool/classes/feedback/class.ilAssSpecFeedbackPage.php");
852  if( ilAssSpecFeedbackPage::_exists($pageObjectType, $pageObjectId) )
853  {
854  $pageObject = new ilAssSpecFeedbackPage($pageObjectId);
855  $pageObject->delete();
856  }
857  }
858  }
859 
868  final protected function getGenericFeedbackPageObjectType()
869  {
870  return self::PAGE_OBJECT_TYPE_GENERIC_FEEDBACK;
871  }
872 
881  final protected function getSpecificAnswerFeedbackPageObjectType()
882  {
883  return self::PAGE_OBJECT_TYPE_SPECIFIC_FEEDBACK;
884  }
885 
896  final public static function isValidFeedbackPageObjectType($feedbackPageObjectType)
897  {
898  switch( $feedbackPageObjectType )
899  {
900  case self::PAGE_OBJECT_TYPE_GENERIC_FEEDBACK:
901  case self::PAGE_OBJECT_TYPE_SPECIFIC_FEEDBACK:
902 
903  return true;
904  }
905 
906  return false;
907  }
908 
920  final protected function getGenericFeedbackPageObjectId($questionId, $solutionCompleted)
921  {
922  $pageObjectId = $this->getGenericFeedbackId($questionId, $solutionCompleted);
923 
924  if( !$pageObjectId )
925  {
926  $pageObjectId = $this->saveGenericFeedbackContent($questionId, $solutionCompleted, null);
927  }
928 
929  return $pageObjectId;
930  }
931 
941  public function getGenericFeedbackExportPresentation($questionId, $solutionCompleted)
942  {
943  if( $this->questionOBJ->isAdditionalContentEditingModePageObject() )
944  {
945  $genericFeedbackExportPresentation = $this->getPageObjectXML(
947  $this->getGenericFeedbackPageObjectId($questionId, $solutionCompleted)
948  );
949  }
950  else
951  {
952  $genericFeedbackExportPresentation = $this->getGenericFeedbackContent($questionId, $solutionCompleted);
953  }
954 
955  return $genericFeedbackExportPresentation;
956  }
957 
968  abstract public function getSpecificAnswerFeedbackExportPresentation($questionId, $answerIndex);
969 
979  public function importGenericFeedback($questionId, $solutionCompleted, $feedbackContent)
980  {
981  if( $this->questionOBJ->isAdditionalContentEditingModePageObject() )
982  {
983  $pageObjectId = $this->getGenericFeedbackPageObjectId($questionId, $solutionCompleted);
984  $pageObjectType = $this->getGenericFeedbackPageObjectType();
985 
986  $this->createPageObject($pageObjectType, $pageObjectId, $feedbackContent);
987  }
988  else
989  {
990  $this->saveGenericFeedbackContent($questionId, $solutionCompleted, $feedbackContent);
991  }
992  }
993 
1004  abstract public function importSpecificAnswerFeedback($questionId, $answerIndex, $feedbackContent);
1005 }
initSpecificFormProperties(ilPropertyFormGUI $form)
initialises a given form object&#39;s SPECIFIC form properties relating to this question type ...
This class provides processing control methods.
__construct(assQuestion $questionOBJ, ilCtrl $ctrl, ilDB $db, ilLanguage $lng)
constructor
createPageObject($pageObjectType, $pageObjectId, $pageObjectContent)
creates a new page object with given page object id and page object type and passed page object conte...
getItemByPostVar($a_post_var)
Get Item by POST variable.
$result
getPageObjectNonEditableValueHTML($pageObjectType, $pageObjectId)
returns html content to be used as value for non editable value form properties in feedback editing f...
This class represents a property form user interface.
ensurePageObjectExists($pageObjectType, $pageObjectId)
ensures an existing page object with given type and id
getPageObjectOutputMode()
Get page object output mode.
getGenericFeedbackTestPresentation($questionId, $solutionCompleted)
returns the html of GENERIC feedback for the given question id for test presentation (either for the ...
getSpecificAnswerFeedbackPageObjectType()
returns the type for specific feedback page objects defined in local constant
Abstract basic class which is to be extended by the concrete assessment question type classes...
getGenericFeedbackTableName()
returns the table name for specific feedback
static isValidFeedbackPageObjectType($feedbackPageObjectType)
returns the fact wether the given page object type relates to generic or specific feedback page objec...
addItem($a_item)
Add Item (Property, SectionHeader).
saveSpecificFormProperties(ilPropertyFormGUI $form)
saves a given form object&#39;s SPECIFIC form properties relating to this question type ...
getSpecificAnswerFeedbackTestPresentation($questionId, $answerIndex)
returns the html of SPECIFIC feedback for the given question id and answer index for test presentatio...
static _replaceMediaObjectImageSrc($a_text, $a_direction=0, $nic=IL_INST_ID)
replaces image source from mob image urls with the mob id or replaces mob id with the correct image s...
deleteGenericFeedbacks($questionId, $isAdditionalContentEditingModePageObject)
deletes all GENERIC feedback contents (and page objects if required) for the given question id ...
getGenericFeedbackContent($questionId, $solutionCompleted)
returns the GENERIC feedback content for a given question state.
getClassNameByType($a_type, $a_gui=false)
Get class name by type.
global $ilCtrl
Definition: ilias.php:18
Generic feedback page object.
getSpecificAnswerFeedbackContent($questionId, $answerIndex)
returns the SPECIFIC feedback content for a given question id and answer index.
getGenericFeedbackPageObjectId($questionId, $solutionCompleted)
returns a useable page object id for generic feedback page objects for the given question id for eith...
getPageObjectContent($pageObjectType, $pageObjectId)
returns the content of page object with given type and id
static _exists($a_parent_type, $a_id, $a_lang="")
Checks whether page exists.
syncSpecificFeedback($originalQuestionId, $duplicateQuestionId)
syncs the SPECIFIC feedback from a duplicated question back to the original question ...
const TABLE_NAME_GENERIC_FEEDBACK
table name for specific feedback
duplicateGenericFeedback($originalQuestionId, $duplicateQuestionId)
duplicates the GENERIC feedback relating to the given original question id and saves it for the given...
importSpecificAnswerFeedback($questionId, $answerIndex, $feedbackContent)
imports the given feedback content as specific feedback for the given question id and answer index ...
saveSpecificAnswerFeedbackContent($questionId, $answerIndex, $feedbackContent)
saves SPECIFIC feedback content for the given question id and answer index to the database...
const PAGE_OBJECT_TYPE_GENERIC_FEEDBACK
type for generic feedback page objects
duplicatePageObject($pageObjectType, $originalPageObjectId, $duplicatePageObjectId, $duplicatePageObjectParentId)
duplicates the page object with given type and original id to new page object with same type and give...
duplicateSpecificFeedback($originalQuestionId, $duplicateQuestionId)
duplicates the SPECIFIC feedback relating to the given original question id and saves it for the give...
getInput($a_post_var, $ensureValidation=true)
Returns the value of a HTTP-POST variable, identified by the passed id.
syncFeedback($originalQuestionId, $duplicateQuestionId)
syncs the feedback from a duplicated question back to the original question
importGenericFeedback($questionId, $solutionCompleted, $feedbackContent)
imports the given feedback content as generic feedback for the given question id for either the compl...
const FEEDBACK_SOLUTION_INCOMPLETE_PAGE_OBJECT_ID
id for page object relating to generic incomplete solution feedback
deleteSpecificAnswerFeedbacks($questionId, $isAdditionalContentEditingModePageObject)
deletes all SPECIFIC feedback contents for the given question id
Specific feedback page object.
isSaveableInPageObjectEditingMode()
returns the fact wether the feedback editing form is saveable in page object editing or not...
getGenericFeedbackExportPresentation($questionId, $solutionCompleted)
returns the generic feedback export presentation for given question id either for solution completed ...
saveGenericFormProperties(ilPropertyFormGUI $form)
saves a given form object&#39;s GENERIC form properties relating to all question types ...
getPageObjectXML($pageObjectType, $pageObjectId)
returns the xml of page object with given type and id
const FEEDBACK_SOLUTION_COMPLETE_PAGE_OBJECT_ID
id for page object relating to generic complete solution feedback
getGenericFeedbackId($questionId, $solutionCompleted)
returns the SPECIFIC answer feedback ID for a given question id and answer index. ...
Database Wrapper.
Definition: class.ilDB.php:28
ensurePageObjectDeleted($pageObjectType, $pageObjectId)
ensures a no more existing page object for given type and id
This class represents a non editable value in a property form.
& _getUsedHTMLTags($a_module="")
Returns an array of all allowed HTML tags for text editing.
This class represents a text area property in a property form.
duplicateFeedback($originalQuestionId, $duplicateQuestionId)
duplicates the feedback relating to the given original question id and saves it for the given duplica...
completeGenericFormProperties(ilPropertyFormGUI $form)
completes a given form object with the GENERIC form properties required by all question types ...
completeSpecificFormProperties(ilPropertyFormGUI $form)
completes a given form object with the SPECIFIC form properties required by this question type ...
initGenericFormProperties(ilPropertyFormGUI $form)
initialises a given form object&#39;s GENERIC form properties relating to all question types ...
getGenericFeedbackPageObjectType()
returns the type for generic feedback page objects defined in local constant
saveGenericFeedbackContent($questionId, $solutionCompleted, $feedbackContent)
saves GENERIC feedback content for the given question id to the database.
language handling
buildFeedbackContentFormProperty($label, $postVar, $asNonEditable)
builds and returns a form property gui object with the given label and postvar that is addable to pro...
setPageObjectOutputMode($a_val)
Set page object output mode.
getAllSpecificAnswerFeedbackContents($questionId)
returns the SPECIFIC feedback content for a given question id and answer index.
getSpecificAnswerFeedbackExportPresentation($questionId, $answerIndex)
returns the generic feedback export presentation for given question id either for solution completed ...
getPageObjectEditingLink($pageObjectType, $pageObjectId)
returns a link to page object editor for page object with given type and id
const PAGE_OBJECT_TYPE_SPECIFIC_FEEDBACK
type for specific feedback page objects
syncGenericFeedback($originalQuestionId, $duplicateQuestionId)
syncs the GENERIC feedback from a duplicated question back to the original question ...