1<?php 2/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */ 3 4/** 5 * Interface ilGuiQuestionScoringAdjustable 6 * 7 * This is the extended interface for questions, which support the relevant object-class methods for post-test-scoring 8 * adjustments. This is the gui-part of the interfaces. 9 * 10 * In order to implement this interface from the current state in ILIAS 4.3, you need to refactor methods and extract 11 * code. populateQuestionSpecificFormPart and populateAnswerSpecificFormPart reside in editQuestion. 12 * The other methods, writeQuestionSpecificPostData and writeAnswerSpecificPostData are in writePostData. 13 * A good example how this is done can be found in class.assClozeTestGUI.php. 14 * 15 * @see ObjScoringAdjustable 16 * 17 * @author Maximilian Becker <mbecker@databay.de> 18 * 19 * @version $Id$ 20 * 21 * @ingroup ModulesTestQuestionPool 22 */ 23interface ilGuiQuestionScoringAdjustable 24{ 25 /** 26 * Adds the question specific forms parts to a question property form gui. 27 * 28 * @param ilPropertyFormGUI $form 29 * 30 * @return ilPropertyFormGUI 31 */ 32 public function populateQuestionSpecificFormPart(ilPropertyFormGUI $form); 33 34 /** 35 * Extracts the question specific values from $_POST and applies them 36 * to the data object. 37 * 38 * @param bool $always If true, a check for form validity is omitted. 39 * 40 * @return void 41 */ 42 public function writeQuestionSpecificPostData(ilPropertyFormGUI $form); 43 44 /** 45 * Returns a list of postvars which will be suppressed in the form output when used in scoring adjustment. 46 * The form elements will be shown disabled, so the users see the usual form but can only edit the settings, which 47 * make sense in the given context. 48 * 49 * E.g. array('cloze_type', 'image_filename') 50 * 51 * @return string[] 52 */ 53 public function getAfterParticipationSuppressionQuestionPostVars(); 54 55 /** 56 * Returns an html string containing a question specific representation of the answers so far 57 * given in the test for use in the right column in the scoring adjustment user interface. 58 * 59 * @param array $relevant_answers 60 * 61 * @return string 62 */ 63 public function getAggregatedAnswersView($relevant_answers); 64} 65