ILIAS  release_4-4 Revision
All Data Structures Namespaces Files Functions Variables Modules Pages
class.assOrderingHorizontalGUI.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 require_once './Modules/TestQuestionPool/classes/class.assQuestionGUI.php';
5 require_once './Modules/TestQuestionPool/interfaces/interface.ilGuiQuestionScoringAdjustable.php';
6 require_once './Modules/Test/classes/inc.AssessmentConstants.php';
7 
22 {
31  function __construct($id = -1)
32  {
33  parent::__construct();
34  include_once "./Modules/TestQuestionPool/classes/class.assOrderingHorizontal.php";
35  $this->object = new assOrderingHorizontal();
36  $this->setErrorMessage($this->lng->txt("msg_form_save_error"));
37  if ($id >= 0)
38  {
39  $this->object->loadFromDb($id);
40  }
41  }
42 
43  function getCommand($cmd)
44  {
45  return $cmd;
46  }
47 
55  public function writePostData($always = false)
56  {
57  $hasErrors = (!$always) ? $this->editQuestion(true) : false;
58  if (!$hasErrors)
59  {
62  $this->saveTaxonomyAssignments();
63  return 0;
64  }
65  return 1;
66  }
67 
73  public function editQuestion($checkonly = FALSE)
74  {
75  $save = $this->isSaveCommand();
76  $this->getQuestionTemplate();
77 
78  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
79  $form = new ilPropertyFormGUI();
80  $form->setFormAction($this->ctrl->getFormAction($this));
81  $form->setTitle($this->outQuestionType());
82  $form->setMultipart(FALSE);
83  $form->setTableWidth("100%");
84  $form->setId("orderinghorizontal");
85 
86  $this->addBasicQuestionFormProperties( $form );
87  $this->populateQuestionSpecificFormPart( $form );
88 
89 
90  $this->populateTaxonomyFormSection($form);
91 
92  $this->addQuestionFormCommandButtons($form);
93 
94  $errors = false;
95 
96  if ($save)
97  {
98  $form->setValuesByPost();
99  $errors = !$form->checkInput();
100  $form->setValuesByPost(); // again, because checkInput now performs the whole stripSlashes handling and we need this if we don't want to have duplication of backslashes
101  if ($errors) $checkonly = false;
102  }
103 
104  if (!$checkonly) $this->tpl->setVariable("QUESTION_DATA", $form->getHTML());
105  return $errors;
106  }
107 
108  function outQuestionForTest($formaction, $active_id, $pass = NULL, $is_postponed = FALSE, $use_post_solutions = FALSE, $show_feedback = FALSE)
109  {
110  $test_output = $this->getTestOutput($active_id, $pass, $is_postponed, $use_post_solutions, $show_feedback);
111  $this->tpl->setVariable("QUESTION_OUTPUT", $test_output);
112  $this->tpl->setVariable("FORMACTION", $formaction);
113  }
114 
129  $active_id,
130  $pass = NULL,
131  $graphicalOutput = FALSE,
132  $result_output = FALSE,
133  $show_question_only = TRUE,
134  $show_feedback = FALSE,
135  $show_correct_solution = FALSE,
136  $show_manual_scoring = FALSE,
137  $show_question_text = TRUE
138  )
139  {
140  // get the solution of the user for the active pass or from the last pass if allowed
141  $template = new ilTemplate("tpl.il_as_qpl_orderinghorizontal_output_solution.html", TRUE, TRUE, "Modules/TestQuestionPool");
142 
143  $solutionvalue = "";
144  if (($active_id > 0) && (!$show_correct_solution))
145  {
146  $solutions =& $this->object->getSolutionValues($active_id, $pass);
147  if (strlen($solutions[0]["value1"]))
148  {
149  $elements = split("{::}", $solutions[0]["value1"]);
150  foreach ($elements as $id => $element)
151  {
152  $template->setCurrentBlock("element");
153  $template->setVariable("ELEMENT_ID", "e$id");
154  $template->setVariable("ELEMENT_VALUE", ilUtil::prepareFormOutput($element));
155  $template->parseCurrentBlock();
156  }
157  }
158  $solutionvalue = str_replace("{::}", " ", $solutions[0]["value1"]);
159  }
160  else
161  {
162  $elements = $this->object->getOrderingElements();
163  foreach ($elements as $id => $element)
164  {
165  $template->setCurrentBlock("element");
166  $template->setVariable("ELEMENT_ID", "e$id");
167  $template->setVariable("ELEMENT_VALUE", ilUtil::prepareFormOutput($element));
168  $template->parseCurrentBlock();
169  }
170  $solutionvalue = join($this->object->getOrderingElements(), " ");
171  }
172 
173  if (($active_id > 0) && (!$show_correct_solution))
174  {
175  $reached_points = $this->object->getReachedPoints($active_id, $pass);
176  if ($graphicalOutput)
177  {
178  // output of ok/not ok icons for user entered solutions
179  if ($reached_points == $this->object->getMaximumPoints())
180  {
181  $template->setCurrentBlock("icon_ok");
182  $template->setVariable("ICON_OK", ilUtil::getImagePath("icon_ok.png"));
183  $template->setVariable("TEXT_OK", $this->lng->txt("answer_is_right"));
184  $template->parseCurrentBlock();
185  }
186  else
187  {
188  $template->setCurrentBlock("icon_ok");
189  if ($reached_points > 0)
190  {
191  $template->setVariable("ICON_NOT_OK", ilUtil::getImagePath("icon_mostly_ok.png"));
192  $template->setVariable("TEXT_NOT_OK", $this->lng->txt("answer_is_not_correct_but_positive"));
193  }
194  else
195  {
196  $template->setVariable("ICON_NOT_OK", ilUtil::getImagePath("icon_not_ok.png"));
197  $template->setVariable("TEXT_NOT_OK", $this->lng->txt("answer_is_wrong"));
198  }
199  $template->parseCurrentBlock();
200  }
201  }
202  }
203  else
204  {
205  $reached_points = $this->object->getPoints();
206  }
207 
208  if ($result_output)
209  {
210  $resulttext = ($reached_points == 1) ? "(%s " . $this->lng->txt("point") . ")" : "(%s " . $this->lng->txt("points") . ")";
211  $template->setVariable("RESULT_OUTPUT", sprintf($resulttext, $reached_points));
212  }
213  if($show_question_text==true)
214  {
215  $template->setVariable("QUESTIONTEXT", $this->object->prepareTextareaOutput($this->object->getQuestion(), TRUE));
216  }
217 // $template->setVariable("SOLUTION_TEXT", ilUtil::prepareFormOutput($solutionvalue));
218  if ($this->object->textsize >= 10) echo $template->setVariable("STYLE", " style=\"font-size: " . $this->object->textsize . "%;\"");
219 
220  $questionoutput = $template->get();
221  $solutiontemplate = new ilTemplate("tpl.il_as_tst_solution_output.html",TRUE, TRUE, "Modules/TestQuestionPool");
222  $solutiontemplate->setVariable("SOLUTION_OUTPUT", $questionoutput);
223 
224 
225  $feedback = '';
226  if($show_feedback)
227  {
228  $fb = $this->getGenericFeedbackOutput($active_id, $pass);
229  $feedback .= strlen($fb) ? $fb : '';
230 
231  $fb = $this->getSpecificFeedbackOutput($active_id, $pass);
232  $feedback .= strlen($fb) ? $fb : '';
233  }
234  if (strlen($feedback)) $solutiontemplate->setVariable("FEEDBACK", $this->object->prepareTextareaOutput( $feedback, true ));
235  $solutionoutput = $solutiontemplate->get();
236  if (!$show_question_only)
237  {
238  // get page object output
239  $solutionoutput = '<div class="ilc_question_Standard">'.$solutionoutput. $feedback."</div>" ;
240  }
241  return $solutionoutput;
242  }
243 
244  function getPreview($show_question_only = FALSE)
245  {
246  $template = new ilTemplate("tpl.il_as_qpl_orderinghorizontal_preview.html",TRUE, TRUE, "Modules/TestQuestionPool");
247  $elements = $this->object->getRandomOrderingElements();
248  foreach ($elements as $id => $element)
249  {
250  $template->setCurrentBlock("element");
251  $template->setVariable("ELEMENT_ID", "e$id");
252  $template->setVariable("ELEMENT_VALUE", ilUtil::prepareFormOutput($element));
253 
254  $template->parseCurrentBlock();
255  }
256  if ($this->object->textsize >= 10) echo $template->setVariable("STYLE", " style=\"font-size: " . $this->object->textsize . "%;\"");
257  $template->setVariable("QUESTIONTEXT", $this->object->prepareTextareaOutput($this->object->getQuestion(), TRUE));
258  $questionoutput = $template->get();
259  if (!$show_question_only)
260  {
261  // get page object output
262  $questionoutput = $this->getILIASPage($questionoutput);
263  }
264  include_once "./Services/YUI/classes/class.ilYuiUtil.php";
266  $this->tpl->addJavascript("./Modules/TestQuestionPool/templates/default/orderinghorizontal.js");
267  return $questionoutput;
268  }
269 
270  function getTestOutput($active_id, $pass = NULL, $is_postponed = FALSE, $use_post_solutions = FALSE, $show_feedback = FALSE)
271  {
272  // generate the question output
273  $template = new ilTemplate("tpl.il_as_qpl_orderinghorizontal_output.html",TRUE, TRUE, "Modules/TestQuestionPool");
274  $elements = $this->object->getRandomOrderingElements();
275 
276  if ($active_id)
277  {
278  $solutions = NULL;
279  include_once "./Modules/Test/classes/class.ilObjTest.php";
280  if (!ilObjTest::_getUsePreviousAnswers($active_id, true))
281  {
282  if (is_null($pass)) $pass = ilObjTest::_getPass($active_id);
283  }
284  $solutions =& $this->object->getSolutionValues($active_id, $pass);
285  if (count($solutions) == 1)
286  {
287  $elements = split("{::}", $solutions[0]["value1"]);
288  }
289  }
290  if (strlen($_SESSION['qst_selection']))
291  {
292  $this->object->moveRight($_SESSION['qst_selection'], $active_id, $pass);
293  unset($_SESSION['qst_selection']);
294  $solutions =& $this->object->getSolutionValues($active_id, $pass);
295  if (count($solutions) == 1)
296  {
297  $elements = split("{::}", $solutions[0]["value1"]);
298  }
299  }
300  if (count($solutions) == 0)
301  {
302  $_SESSION['qst_ordering_horizontal_elements'] = $elements;
303  }
304  else
305  {
306  unset($_SESSION['qst_ordering_horizontal_elements']);
307  }
308  $idx = 0;
309  foreach ($elements as $id => $element)
310  {
311  $template->setCurrentBlock("element");
312  $template->setVariable("ELEMENT_ID", "e_" . $this->object->getId() . "_$id");
313  $template->setVariable("ORDERING_VALUE", ilUtil::prepareFormOutput($element));
314  $template->setVariable("ELEMENT_VALUE", ilUtil::prepareFormOutput($element));
315  $this->ctrl->setParameterByClass('iltestoutputgui', 'qst_selection', $idx);
316  $idx++;
317  $url = $this->ctrl->getLinkTargetByClass('iltestoutputgui', 'gotoQuestion');
318  $template->setVariable("MOVE_RIGHT", $url);
319  $template->setVariable("TEXT_MOVE_RIGHT", $this->lng->txt('move_right'));
320  $template->setVariable("RIGHT_IMAGE", ilUtil::getImagePath('nav_arr_R.png'));
321  $template->parseCurrentBlock();
322  }
323  if ($this->object->textsize >= 10) echo $template->setVariable("STYLE", " style=\"font-size: " . $this->object->textsize . "%;\"");
324  $template->setVariable("VALUE_ORDERRESULT", ' value="' . join($elements, '{::}') . '"');
325  $template->setVariable("QUESTIONTEXT", $this->object->prepareTextareaOutput($this->object->getQuestion(), TRUE));
326  $questionoutput = $template->get();
327  if (!$show_question_only)
328  {
329  // get page object output
330  $questionoutput = $this->getILIASPage($questionoutput);
331  }
332  include_once "./Services/YUI/classes/class.ilYuiUtil.php";
334  $this->tpl->addJavascript("./Modules/TestQuestionPool/templates/default/orderinghorizontal.js");
335  $questionoutput = $template->get();
336  $pageoutput = $this->outQuestionPage("", $is_postponed, $active_id, $questionoutput);
337  return $pageoutput;
338  }
339 
345  function saveFeedback()
346  {
347  include_once "./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php";
348  $errors = $this->feedback(true);
349  $this->object->saveFeedbackGeneric(0, $_POST["feedback_incomplete"]);
350  $this->object->saveFeedbackGeneric(1, $_POST["feedback_complete"]);
351  $this->object->cleanupMediaObjectUsage();
352  parent::saveFeedback();
353  }
354 
362  function setQuestionTabs()
363  {
364  global $rbacsystem, $ilTabs;
365 
366  $this->ctrl->setParameterByClass("ilAssQuestionPageGUI", "q_id", $_GET["q_id"]);
367  include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
368  $q_type = $this->object->getQuestionType();
369 
370  if (strlen($q_type))
371  {
372  $classname = $q_type . "GUI";
373  $this->ctrl->setParameterByClass(strtolower($classname), "sel_question_types", $q_type);
374  $this->ctrl->setParameterByClass(strtolower($classname), "q_id", $_GET["q_id"]);
375  }
376 
377  if ($_GET["q_id"])
378  {
379  if ($rbacsystem->checkAccess('write', $_GET["ref_id"]))
380  {
381  // edit page
382  $ilTabs->addTarget("edit_page",
383  $this->ctrl->getLinkTargetByClass("ilAssQuestionPageGUI", "edit"),
384  array("edit", "insert", "exec_pg"),
385  "", "", $force_active);
386  }
387 
388  // edit page
389  $ilTabs->addTarget("preview",
390  $this->ctrl->getLinkTargetByClass("ilAssQuestionPageGUI", "preview"),
391  array("preview"),
392  "ilAssQuestionPageGUI", "", $force_active);
393  }
394 
395  $force_active = false;
396  if ($rbacsystem->checkAccess('write', $_GET["ref_id"]))
397  {
398  $url = "";
399  if ($classname) $url = $this->ctrl->getLinkTargetByClass($classname, "editQuestion");
400  $commands = $_POST["cmd"];
401  if (is_array($commands))
402  {
403  foreach ($commands as $key => $value)
404  {
405  if (preg_match("/^suggestrange_.*/", $key, $matches))
406  {
407  $force_active = true;
408  }
409  }
410  }
411  // edit question properties
412  $ilTabs->addTarget("edit_question",
413  $url,
414  array("editQuestion", "save", "saveEdit", "originalSyncForm"),
415  $classname, "", $force_active);
416  }
417 
418  // add tab for question feedback within common class assQuestionGUI
419  $this->addTab_QuestionFeedback($ilTabs);
420 
421  // add tab for question hint within common class assQuestionGUI
422  $this->addTab_QuestionHints($ilTabs);
423 
424  if ($_GET["q_id"])
425  {
426  $ilTabs->addTarget("solution_hint",
427  $this->ctrl->getLinkTargetByClass($classname, "suggestedsolution"),
428  array("suggestedsolution", "saveSuggestedSolution", "outSolutionExplorer", "cancel",
429  "addSuggestedSolution","cancelExplorer", "linkChilds", "removeSuggestedSolution"
430  ),
431  $classname,
432  ""
433  );
434  }
435 
436  // Assessment of questions sub menu entry
437  if ($_GET["q_id"])
438  {
439  $ilTabs->addTarget("statistics",
440  $this->ctrl->getLinkTargetByClass($classname, "assessment"),
441  array("assessment"),
442  $classname, "");
443  }
444 
445  if (($_GET["calling_test"] > 0) || ($_GET["test_ref_id"] > 0))
446  {
447  $ref_id = $_GET["calling_test"];
448  if (strlen($ref_id) == 0) $ref_id = $_GET["test_ref_id"];
449 
450  global $___test_express_mode;
451 
452  if (!$_GET['test_express_mode'] && !$___test_express_mode) {
453  $ilTabs->setBackTarget($this->lng->txt("backtocallingtest"), "ilias.php?baseClass=ilObjTestGUI&cmd=questions&ref_id=$ref_id");
454  }
455  else {
457  $ilTabs->setBackTarget($this->lng->txt("backtocallingtest"), $link);
458  }
459  }
460  else
461  {
462  $ilTabs->setBackTarget($this->lng->txt("qpl"), $this->ctrl->getLinkTargetByClass("ilobjquestionpoolgui", "questions"));
463  }
464  }
465 
466  function getSpecificFeedbackOutput($active_id, $pass)
467  {
468  $output = '<table class="ilTstSpecificFeedbackTable"><tbody>';
469 
470  if(strpos($this->object->getOrderText(),'::'))
471  {
472  $answers = explode('::', $this->object->getOrderText());
473  } else {
474  $answers = explode(' ', $this->object->getOrderText());
475  }
476 
477  foreach($answers as $idx => $answer)
478  {
479  $feedback = $this->object->feedbackOBJ->getSpecificAnswerFeedbackTestPresentation(
480  $this->object->getId(), $idx
481  );
482 
483  $output .= "<tr><td><b><i>{$answer}</i></b></td><td>{$feedback}</td></tr>";
484  }
485 
486  $output .= '</tbody></table>';
487 
488  return $this->object->prepareTextareaOutput($output, TRUE);
489  }
490 
491  public function writeQuestionSpecificPostData($always = true)
492  {
493  $this->object->setTextSize( $_POST["textsize"] );
494  $this->object->setOrderText( $_POST["ordertext"] );
495  $this->object->setPoints( $_POST["points"] );
496  }
497 
508  {
509  return array('ordertext', 'textsize');
510  }
511 
513  {
514  // ordertext
515  $ordertext = new ilTextAreaInputGUI($this->lng->txt( "ordertext" ), "ordertext");
516  $ordertext->setValue( $this->object->prepareTextareaOutput( $this->object->getOrderText() ) );
517  $ordertext->setRequired( TRUE );
518  $ordertext->setInfo( sprintf( $this->lng->txt( "ordertext_info" ), $this->object->separator ) );
519  $ordertext->setRows( 10 );
520  $ordertext->setCols( 80 );
521  $form->addItem( $ordertext );
522  // textsize
523  $textsize = new ilNumberInputGUI($this->lng->txt( "textsize" ), "textsize");
524  $textsize->setValue( $this->object->getTextSize() );
525  $textsize->setInfo( $this->lng->txt( "textsize_info" ) );
526  $textsize->setSize( 6 );
527  $textsize->setMinValue( 10 );
528  $textsize->setRequired( FALSE );
529  $form->addItem( $textsize );
530  // points
531  $points = new ilNumberInputGUI($this->lng->txt( "points" ), "points");
532 
533  $points->allowDecimals( true );
534  // mbecker: Fix for mantis bug 7866: Predefined values schould make sense.
535  // This implements a default value of "1" for this question type.
536  if ($this->object->getPoints() == null)
537  {
538  $points->setValue( "1" );
539  }
540  else
541  {
542  $points->setValue( $this->object->getPoints() );
543  }
544  $points->setRequired( TRUE );
545  $points->setSize( 3 );
546  $points->setMinValue( 0.0 );
547  $points->setMinvalueShouldBeGreater( true );
548  $form->addItem( $points );
549  }
550 
559  public function getAggregatedAnswersView($relevant_answers)
560  {
561  $passes = array();
562  foreach($relevant_answers as $pass)
563  {
564  $passes[$pass['active_fi'].'-'.$pass['pass']] = '-';
565  }
566  $passcount = count($passes);
567 
568  foreach($relevant_answers as $pass)
569  {
570  $actives[$pass['active_fi']] = $pass['active_fi'];
571  }
572  $usercount = count($actives);
573  $tpl = new ilTemplate('tpl.il_as_aggregated_answers_header.html', true, true, "Modules/TestQuestionPool");
574  $tpl->setVariable('HEADERTEXT', $this->lng->txt('overview'));
575  $tpl->setVariable('NUMBER_OF_USERS_INFO', $this->lng->txt('number_of_users'));
576  $tpl->setVariable('NUMBER_OF_USERS', $usercount);
577  $tpl->setVariable('NUMBER_OF_PASSES_INFO', $this->lng->txt('number_of_passes'));
578  $tpl->setVariable('NUMBER_OF_PASSES', $passcount);
579 
580  $header = $tpl->get();
581 
582  $variants = $this->renderAggregateView(
583  $this->aggregateAnswers($relevant_answers, $this->object->getOrderText())
584  )->get();
585 
586  return $header . $variants ;
587  }
588 
589  public function aggregateAnswers($relevant_answers_chosen, $answer_defined_on_question)
590  {
591  $aggregate = array();
592  foreach($relevant_answers_chosen as $answer)
593  {
594  $answer = str_replace($this->object->getAnswerSeparator(), '&nbsp;&nbsp;-&nbsp;&nbsp;', $answer);
595  if (in_array($answer['value1'], $aggregate))
596  {
597  $aggregate[$answer['value1']] = $aggregate[$answer['value1']]+1;
598  }
599  else
600  {
601  $aggregate[$answer['value1']] = 1;
602  }
603  }
604 
605  return $aggregate;
606  }
607 
613  public function renderAggregateView($aggregate)
614  {
615  $tpl = new ilTemplate('tpl.il_as_aggregated_answers_table.html', true, true, "Modules/TestQuestionPool");
616  $tpl->setVariable( 'OPTION_HEADER', $this->lng->txt( 'answer_variant' ) );
617  $tpl->setVariable( 'COUNT_HEADER', $this->lng->txt( 'count' ) );
618  $tpl->setVariable( 'AGGREGATION_HEADER', $this->lng->txt( 'aggregated_answers_variants' ) );
619  foreach ($aggregate as $key => $line_data)
620  {
621  $tpl->setCurrentBlock( 'aggregaterow' );
622  $tpl->setVariable( 'COUNT', $line_data );
623  $tpl->setVariable( 'OPTION', $key );
624  $tpl->parseCurrentBlock();
625  }
626  return $tpl;
627  }
628 }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
Class for horizontal ordering questions.
addBasicQuestionFormProperties($form)
Add basic question form properties: assessment: title, author, description, question, working time.
$_POST['username']
Definition: cron.php:12
setValue($a_value)
Set Value.
getPreview($show_question_only=FALSE)
addTab_QuestionHints(ilTabsGUI $tabs)
adds the hints tab to ilTabsGUI
editQuestion($checkonly=FALSE)
Creates an output of the edit form for the question.
This class represents a property form user interface.
getSolutionOutput( $active_id, $pass=NULL, $graphicalOutput=FALSE, $result_output=FALSE, $show_question_only=TRUE, $show_feedback=FALSE, $show_correct_solution=FALSE, $show_manual_scoring=FALSE, $show_question_text=TRUE)
Get the question solution output.
saveFeedback()
Saves the feedback for a single choice question.
$_GET["client_id"]
_getPass($active_id)
Retrieves the actual pass of a given user for a given test.
outQuestionForTest($formaction, $active_id, $pass=NULL, $is_postponed=FALSE, $use_post_solutions=FALSE, $show_feedback=FALSE)
$cmd
Definition: sahs_server.php:35
$errors
setValue($a_value)
Set Value.
The assOrderingHorizontalGUI class encapsulates the GUI representation for horizontal ordering questi...
addItem($a_item)
Add Item (Property, SectionHeader).
getQuestionTemplate()
get question template
getTestOutput($active_id, $pass=NULL, $is_postponed=FALSE, $use_post_solutions=FALSE, $show_feedback=FALSE)
populateTaxonomyFormSection(ilPropertyFormGUI $form)
populateQuestionSpecificFormPart(\ilPropertyFormGUI $form)
allowDecimals($a_value)
Toggle Decimals.
static getReturnToPageLink($q_id=null)
getILIASPage($html="")
Returns the ILIAS Page around a question.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
This class represents a number property in a property form.
special template class to simplify handling of ITX/PEAR
getAggregatedAnswersView($relevant_answers)
Returns an html string containing a question specific representation of the answers so far given in t...
aggregateAnswers($relevant_answers_chosen, $answer_defined_on_question)
addTab_QuestionFeedback(ilTabsGUI $tabs)
adds the feedback tab to ilTabsGUI
writeQuestionSpecificPostData($always=true)
Extracts the question specific values from $_POST and applies them to the data object.
Basic GUI class for assessment questions.
setErrorMessage($errormessage)
_getUsePreviousAnswers($active_id, $user_active_user_setting=false)
Returns if the previous results should be hidden for a learner.
static initDragDropAnimation()
init drag & drop and animation
__construct($id=-1)
assOrderingHorizontalGUI constructor
$ref_id
Definition: sahs_server.php:39
setQuestionTabs()
Sets the ILIAS tabs for this question type.
This class represents a text area property in a property form.
outQuestionPage($a_temp_var, $a_postponed=false, $active_id="", $html="")
output question page
getAfterParticipationSuppressionQuestionPostVars()
Returns a list of postvars which will be suppressed in the form output when used in scoring adjustmen...
getGenericFeedbackOutput($active_id, $pass)
Returns the answer specific feedback for the question.
Interface ilGuiQuestionScoringAdjustable.
addQuestionFormCommandButtons($form)
Add the command buttons of a question properties form.
writePostData($always=false)
Evaluates a posted edit form and writes the form data in the question object.