ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
class.assFileUploadGUI.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/Test/classes/inc.AssessmentConstants.php';
6 require_once './Modules/TestQuestionPool/interfaces/interface.ilGuiQuestionScoringAdjustable.php';
7 
23 {
24  const REUSE_FILES_TBL_POSTVAR = 'reusefiles';
25  const DELETE_FILES_TBL_POSTVAR = 'deletefiles';
26 
35  public function __construct($id = -1)
36  {
37  parent::__construct();
38  include_once "./Modules/TestQuestionPool/classes/class.assFileUpload.php";
39  $this->object = new assFileUpload();
40  $this->setErrorMessage($this->lng->txt("msg_form_save_error"));
41  if ($id >= 0)
42  {
43  $this->object->loadFromDb($id);
44  }
45  }
46 
50  protected function writePostData($always = false)
51  {
52  $hasErrors = (!$always) ? $this->editQuestion(true) : false;
53  if (!$hasErrors)
54  {
55  require_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
58  $this->saveTaxonomyAssignments();
59  return 0;
60  }
61  return 1;
62  }
63 
65  {
66  $this->object->setPoints( $_POST["points"] );
67  $this->object->setMaxSize( $_POST["maxsize"] );
68  $this->object->setAllowedExtensions( $_POST["allowedextensions"] );
69  $this->object->setCompletionBySubmission( $_POST['completion_by_submission'] == 1 ? true : false );
70  }
71 
77  public function editQuestion($checkonly = FALSE)
78  {
79  $save = $this->isSaveCommand();
80  $this->getQuestionTemplate();
81 
82  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
83  $form = new ilPropertyFormGUI();
84  $this->editForm = $form;
85 
86  $form->setFormAction($this->ctrl->getFormAction($this));
87  $form->setTitle($this->outQuestionType());
88  $form->setMultipart(false);
89  $form->setTableWidth("100%");
90  $form->setId("assfileupload");
91 
92  $this->addBasicQuestionFormProperties($form);
93  $this->populateQuestionSpecificFormPart( $form );
94 
95  $this->populateTaxonomyFormSection($form);
96  $this->addQuestionFormCommandButtons($form);
97 
98  $errors = false;
99 
100  if ($save)
101  {
102  $form->setValuesByPost();
103  $errors = !$form->checkInput();
104  $form->setValuesByPost(); // again, because checkInput now performs the whole stripSlashes handling and
105  // we need this if we don't want to have duplication of backslashes
106  if ($errors) $checkonly = false;
107  }
108 
109  if (!$checkonly) $this->tpl->setVariable("QUESTION_DATA", $form->getHTML());
110  return $errors;
111  }
112 
114  {
115  // maxsize
116  $maxsize = new ilNumberInputGUI($this->lng->txt( "maxsize" ), "maxsize");
117  $maxsize->setValue( $this->object->getMaxSize() );
118  $maxsize->setInfo( $this->lng->txt( "maxsize_info" ) );
119  $maxsize->setSize( 10 );
120  $maxsize->setMinValue( 0 );
121  $maxsize->setMaxValue( $this->determineMaxFilesize() );
122  $maxsize->setRequired( FALSE );
123  $form->addItem( $maxsize );
124 
125  // allowedextensions
126  $allowedextensions = new ilTextInputGUI($this->lng->txt( "allowedextensions" ), "allowedextensions");
127  $allowedextensions->setInfo( $this->lng->txt( "allowedextensions_info" ) );
128  $allowedextensions->setValue( $this->object->getAllowedExtensions() );
129  $allowedextensions->setRequired( FALSE );
130  $form->addItem( $allowedextensions );
131 
132  // points
133  $points = new ilNumberInputGUI($this->lng->txt( "points" ), "points");
134  $points->allowDecimals(true);
135  $points->setValue( is_numeric( $this->object->getPoints() ) && $this->object->getPoints(
136  ) >= 0 ? $this->object->getPoints() : ''
137  );
138  $points->setRequired( TRUE );
139  $points->setSize( 3 );
140  $points->setMinValue( 0.0 );
141  $points->setMinvalueShouldBeGreater( false );
142  $form->addItem( $points );
143 
144  $subcompl = new ilCheckboxInputGUI($this->lng->txt( 'ass_completion_by_submission'
145  ), 'completion_by_submission');
146  $subcompl->setInfo( $this->lng->txt( 'ass_completion_by_submission_info' ) );
147  $subcompl->setValue( 1 );
148  $subcompl->setChecked( $this->object->isCompletionBySubmissionEnabled() );
149  $form->addItem( $subcompl );
150  return $form;
151  }
152 
156  public function determineMaxFilesize()
157  {
158  //mbecker: Quick fix for mantis bug 8595: Change size file
159  $upload_max_filesize = get_cfg_var( "upload_max_filesize" );
160  // get the value for the maximal post data from the php.ini (if available)
161  $post_max_size = get_cfg_var( "post_max_size" );
162 
163  //convert from short-string representation to "real" bytes
164  $multiplier_a = array( "K" => 1024, "M" => 1024 * 1024, "G" => 1024 * 1024 * 1024 );
165  $umf_parts = preg_split( "/(\d+)([K|G|M])/",
166  $upload_max_filesize,
167  -1,
168  PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY
169  );
170  $pms_parts = preg_split( "/(\d+)([K|G|M])/",
171  $post_max_size,
172  -1,
173  PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY
174  );
175 
176  if (count( $umf_parts ) == 2)
177  {
178  $upload_max_filesize = $umf_parts[0] * $multiplier_a[$umf_parts[1]];
179  }
180 
181  if (count( $pms_parts ) == 2)
182  {
183  $post_max_size = $pms_parts[0] * $multiplier_a[$pms_parts[1]];
184  }
185 
186  // use the smaller one as limit
187  $max_filesize = min( $upload_max_filesize, $post_max_size );
188 
189  if (!$max_filesize)
190  {
191  $max_filesize = max( $upload_max_filesize, $post_max_size );
192  return $max_filesize;
193  }
194  return $max_filesize;
195  }
196 
211  $active_id,
212  $pass = NULL,
213  $graphicalOutput = FALSE,
214  $result_output = FALSE,
215  $show_question_only = TRUE,
216  $show_feedback = FALSE,
217  $show_correct_solution = FALSE,
218  $show_manual_scoring = FALSE,
219  $show_question_text = TRUE
220  )
221  {
222  // get the solution of the user for the active pass or from the last pass if allowed
223  $template = new ilTemplate("tpl.il_as_qpl_fileupload_output_solution.html", TRUE, TRUE, "Modules/TestQuestionPool");
224 
225  $solutionvalue = "";
226  if (($active_id > 0) && (!$show_correct_solution))
227  {
228  $solutions =& $this->object->getSolutionValues($active_id, $pass);
229  include_once "./Modules/Test/classes/class.ilObjTest.php";
230  if (!ilObjTest::_getUsePreviousAnswers($active_id, true))
231  {
232  if (is_null($pass)) $pass = ilObjTest::_getPass($active_id);
233  }
234  $solutions =& $this->object->getSolutionValues($active_id, $pass);
235 
236  $files = ($show_manual_scoring) ? $this->object->getUploadedFilesForWeb($active_id, $pass) : $this->object->getUploadedFiles($active_id, $pass);
237  include_once "./Modules/TestQuestionPool/classes/tables/class.assFileUploadFileTableGUI.php";
238  $table_gui = new assFileUploadFileTableGUI($this->getTargetGuiClass(), 'gotoquestion');
239  $table_gui->setTitle($this->lng->txt('already_delivered_files'), 'icon_file.svg', $this->lng->txt('already_delivered_files'));
240  $table_gui->setData($files);
241  // hey: prevPassSolutions - table refactored
242  #$table_gui->initCommand(
243  #$this->buildFileTableDeleteButtonInstance(), assFileUploadGUI::DELETE_FILES_TBL_POSTVAR
244  #);
245  // hey.
246  $table_gui->setRowTemplate("tpl.il_as_qpl_fileupload_file_view_row.html", "Modules/TestQuestionPool");
247  $table_gui->setSelectAllCheckbox("");
248  // hey: prevPassSolutions - table refactored
249  #$table_gui->clearCommandButtons();
250  #$table_gui->disable('select_all');
251  // hey.
252  $table_gui->disable('numinfo');
253  $template->setCurrentBlock("files");
254  $template->setVariable('FILES', $table_gui->getHTML());
255  $template->parseCurrentBlock();
256  }
257 
258  if (strlen($this->object->getAllowedExtensions()))
259  {
260  $template->setCurrentBlock("allowed_extensions");
261  $template->setVariable("TXT_ALLOWED_EXTENSIONS", $this->object->prepareTextareaOutput($this->lng->txt("allowedextensions") . ": " . $this->object->getAllowedExtensions()));
262  $template->parseCurrentBlock();
263  }
264  $template->setVariable("CMD_UPLOAD", $this->getQuestionActionCmd());
265  $template->setVariable("TEXT_UPLOAD", $this->object->prepareTextareaOutput($this->lng->txt('upload')));
266  $template->setVariable("TXT_UPLOAD_FILE", $this->object->prepareTextareaOutput($this->lng->txt('file_add')));
267  $template->setVariable("TXT_MAX_SIZE", $this->object->prepareTextareaOutput($this->lng->txt('file_notice') . " " . $this->object->getMaxFilesizeAsString()));
268 
269  if (($active_id > 0) && (!$show_correct_solution))
270  {
271  $reached_points = $this->object->getReachedPoints($active_id, $pass);
272  if ($graphicalOutput)
273  {
274  // output of ok/not ok icons for user entered solutions
275  if ($reached_points == $this->object->getMaximumPoints())
276  {
277  $template->setCurrentBlock("icon_ok");
278  $template->setVariable("ICON_OK", ilUtil::getImagePath("icon_ok.svg"));
279  $template->setVariable("TEXT_OK", $this->lng->txt("answer_is_right"));
280  $template->parseCurrentBlock();
281  }
282  else
283  {
284  $template->setCurrentBlock("icon_ok");
285  if ($reached_points > 0)
286  {
287  $template->setVariable("ICON_NOT_OK", ilUtil::getImagePath("icon_mostly_ok.svg"));
288  $template->setVariable("TEXT_NOT_OK", $this->lng->txt("answer_is_not_correct_but_positive"));
289  }
290  else
291  {
292  $template->setVariable("ICON_NOT_OK", ilUtil::getImagePath("icon_not_ok.svg"));
293  $template->setVariable("TEXT_NOT_OK", $this->lng->txt("answer_is_wrong"));
294  }
295  $template->parseCurrentBlock();
296  }
297  }
298  }
299  else
300  {
301  $reached_points = $this->object->getPoints();
302  }
303 
304  if ($result_output)
305  {
306  $resulttext = ($reached_points == 1) ? "(%s " . $this->lng->txt("point") . ")" : "(%s " . $this->lng->txt("points") . ")";
307  $template->setVariable("RESULT_OUTPUT", sprintf($resulttext, $reached_points));
308  }
309  if ($show_question_text==true)
310  {
311  $template->setVariable("QUESTIONTEXT", $this->object->prepareTextareaOutput($this->object->getQuestion(), TRUE));
312  }
313  $questionoutput = $template->get();
314  $solutiontemplate = new ilTemplate("tpl.il_as_tst_solution_output.html",TRUE, TRUE, "Modules/TestQuestionPool");
315  $feedback = ($show_feedback && !$this->isTestPresentationContext()) ? $this->getAnswerFeedbackOutput($active_id, $pass) : "";
316  if (strlen($feedback))
317  {
318  $cssClass = ( $this->hasCorrectSolution($active_id, $pass) ?
320  );
321 
322  $solutiontemplate->setVariable("ILC_FB_CSS_CLASS", $cssClass);
323  $solutiontemplate->setVariable("FEEDBACK", $this->object->prepareTextareaOutput( $feedback, true ));
324  }
325  $solutiontemplate->setVariable("SOLUTION_OUTPUT", $questionoutput);
326  $solutionoutput = $solutiontemplate->get();
327  if (!$show_question_only)
328  {
329  // get page object output
330  $solutionoutput = $this->getILIASPage($solutionoutput);
331  }
332  return $solutionoutput;
333  }
334 
335  function getPreview($show_question_only = FALSE, $showInlineFeedback = false)
336  {
337  $template = new ilTemplate("tpl.il_as_qpl_fileupload_output.html",TRUE, TRUE, "Modules/TestQuestionPool");
338 
339  if( is_object($this->getPreviewSession()) )
340  {
341  $files = $this->object->getPreviewFileUploads($this->getPreviewSession());
342  include_once "./Modules/TestQuestionPool/classes/tables/class.assFileUploadFileTableGUI.php";
343  $table_gui = new assFileUploadFileTableGUI(null , $this->getQuestionActionCmd(), 'ilAssQuestionPreview');
344  $table_gui->setTitle($this->lng->txt('already_delivered_files'), 'icon_file.svg', $this->lng->txt('already_delivered_files'));
345  $table_gui->setData($files);
346  // hey: prevPassSolutions - support file reuse with table
347  $table_gui->initCommand(
350  );
351  // hey.
352  $template->setCurrentBlock("files");
353  $template->setVariable('FILES', $table_gui->getHTML());
354  $template->parseCurrentBlock();
355  }
356 
357  if (strlen($this->object->getAllowedExtensions()))
358  {
359  $template->setCurrentBlock("allowed_extensions");
360  $template->setVariable("TXT_ALLOWED_EXTENSIONS", $this->object->prepareTextareaOutput($this->lng->txt("allowedextensions") . ": " . $this->object->getAllowedExtensions()));
361  $template->parseCurrentBlock();
362  }
363  $template->setVariable("QUESTIONTEXT", $this->object->prepareTextareaOutput($this->object->question, TRUE));
364  $template->setVariable("CMD_UPLOAD", $this->getQuestionActionCmd());
365  $template->setVariable("TEXT_UPLOAD", $this->object->prepareTextareaOutput($this->lng->txt('upload')));
366  $template->setVariable("TXT_UPLOAD_FILE", $this->object->prepareTextareaOutput($this->lng->txt('file_add')));
367  $template->setVariable("TXT_MAX_SIZE", $this->object->prepareTextareaOutput($this->lng->txt('file_notice') . " " . $this->object->getMaxFilesizeAsString()));
368 
369  $questionoutput = $template->get();
370  if (!$show_question_only)
371  {
372  // get page object output
373  $questionoutput = $this->getILIASPage($questionoutput);
374  }
375  return $questionoutput;
376  }
377 
378  // hey: prevPassSolutions - pass will be always available from now on
379  function getTestOutput($active_id, $pass, $is_postponed = FALSE, $use_post_solutions = FALSE, $show_feedback = FALSE)
380  // hey.
381  {
382  // generate the question output
383  $template = new ilTemplate("tpl.il_as_qpl_fileupload_output.html",TRUE, TRUE, "Modules/TestQuestionPool");
384 
385  if ($active_id)
386  {
387  // hey: prevPassSolutions - obsolete due to central check
388  #$solutions = NULL;
389  #include_once "./Modules/Test/classes/class.ilObjTest.php";
390  #if (!ilObjTest::_getUsePreviousAnswers($active_id, true))
391  #{
392  # if (is_null($pass)) $pass = ilObjTest::_getPass($active_id);
393  #}
394  $files = $this->object->getTestOutputSolutions($active_id, $pass);
395  // hey.
396  include_once "./Modules/TestQuestionPool/classes/tables/class.assFileUploadFileTableGUI.php";
397  $table_gui = new assFileUploadFileTableGUI(null , $this->getQuestionActionCmd());
398  $table_gui->setTitle($this->lng->txt('already_delivered_files'), 'icon_file.svg', $this->lng->txt('already_delivered_files'));
399  $table_gui->setData($files);
400  // hey: prevPassSolutions - support file reuse with table
401  $table_gui->initCommand(
404  );
405  // hey.
406  $template->setCurrentBlock("files");
407  $template->setVariable('FILES', $table_gui->getHTML());
408  $template->parseCurrentBlock();
409  }
410 
411  if (strlen($this->object->getAllowedExtensions()))
412  {
413  $template->setCurrentBlock("allowed_extensions");
414  $template->setVariable("TXT_ALLOWED_EXTENSIONS", $this->object->prepareTextareaOutput($this->lng->txt("allowedextensions") . ": " . $this->object->getAllowedExtensions()));
415  $template->parseCurrentBlock();
416  }
417  $template->setVariable("QUESTIONTEXT", $this->object->prepareTextareaOutput($this->object->question, TRUE));
418  $template->setVariable("CMD_UPLOAD", $this->getQuestionActionCmd());
419  $template->setVariable("TEXT_UPLOAD", $this->object->prepareTextareaOutput($this->lng->txt('upload')));
420  $template->setVariable("TXT_UPLOAD_FILE", $this->object->prepareTextareaOutput($this->lng->txt('file_add')));
421  $template->setVariable("TXT_MAX_SIZE", $this->object->prepareTextareaOutput($this->lng->txt('file_notice') . " " . $this->object->getMaxFilesizeAsString()));
422 
423  $questionoutput = $template->get();
424  if (!$show_question_only)
425  {
426  // get page object output
427  $questionoutput = $this->getILIASPage($questionoutput);
428  }
429  $questionoutput = $template->get();
430  $pageoutput = $this->outQuestionPage("", $is_postponed, $active_id, $questionoutput);
431  return $pageoutput;
432  }
433 
441  function setQuestionTabs()
442  {
443  global $rbacsystem, $ilTabs;
444 
445  $ilTabs->clearTargets();
446 
447  $this->ctrl->setParameterByClass("ilAssQuestionPageGUI", "q_id", $_GET["q_id"]);
448  include_once "./Modules/TestQuestionPool/classes/class.assQuestion.php";
449  $q_type = $this->object->getQuestionType();
450 
451  if (strlen($q_type))
452  {
453  $classname = $q_type . "GUI";
454  $this->ctrl->setParameterByClass(strtolower($classname), "sel_question_types", $q_type);
455  $this->ctrl->setParameterByClass(strtolower($classname), "q_id", $_GET["q_id"]);
456  }
457 
458  if ($_GET["q_id"])
459  {
460  if ($rbacsystem->checkAccess('write', $_GET["ref_id"]))
461  {
462  // edit page
463  $ilTabs->addTarget("edit_page",
464  $this->ctrl->getLinkTargetByClass("ilAssQuestionPageGUI", "edit"),
465  array("edit", "insert", "exec_pg"),
466  "", "", $force_active);
467  }
468 
469  $this->addTab_QuestionPreview($ilTabs);
470  }
471 
472  $force_active = false;
473  if ($rbacsystem->checkAccess('write', $_GET["ref_id"]))
474  {
475  $url = "";
476  if ($classname) $url = $this->ctrl->getLinkTargetByClass($classname, "editQuestion");
477  // edit question properties
478  $ilTabs->addTarget("edit_question",
479  $url,
480  array("editQuestion", "save", "cancel", "saveEdit"),
481  $classname, "");
482  }
483 
484  // add tab for question feedback within common class assQuestionGUI
485  $this->addTab_QuestionFeedback($ilTabs);
486 
487  // add tab for question hint within common class assQuestionGUI
488  $this->addTab_QuestionHints($ilTabs);
489 
490  // add tab for question's suggested solution within common class assQuestionGUI
491  $this->addTab_SuggestedSolution($ilTabs, $classname);
492 
493  // Assessment of questions sub menu entry
494  if ($_GET["q_id"])
495  {
496  $ilTabs->addTarget("statistics",
497  $this->ctrl->getLinkTargetByClass($classname, "assessment"),
498  array("assessment"),
499  $classname, "");
500  }
501 
502  if (($_GET["calling_test"] > 0) || ($_GET["test_ref_id"] > 0))
503  {
504  $ref_id = $_GET["calling_test"];
505  if (strlen($ref_id) == 0) $ref_id = $_GET["test_ref_id"];
506 
507  global $___test_express_mode;
508 
509  if (!$_GET['test_express_mode'] && !$___test_express_mode) {
510  $ilTabs->setBackTarget($this->lng->txt("backtocallingtest"), "ilias.php?baseClass=ilObjTestGUI&cmd=questions&ref_id=$ref_id");
511  }
512  else {
514  $ilTabs->setBackTarget($this->lng->txt("backtocallingtest"), $link);
515  }
516  }
517  else
518  {
519  $ilTabs->setBackTarget($this->lng->txt("qpl"), $this->ctrl->getLinkTargetByClass("ilobjquestionpoolgui", "questions"));
520  }
521  }
522 
523  function getSpecificFeedbackOutput($active_id, $pass)
524  {
525  $output = "";
526  return $this->object->prepareTextareaOutput($output, TRUE);
527  }
528 
539  {
540  return array();
541  }
542 
551  public function getAggregatedAnswersView($relevant_answers)
552  {
553  // Empty implementation here since a feasible way to aggregate answer is not known.
554  return ''; //print_r($relevant_answers,true);
555  }
556 
557  // hey: prevPassSolutions - shown files needs to be chosen so upload can replace or complete fileset
562  {
563  require_once 'Modules/TestQuestionPool/classes/questions/class.ilAssFileUploadFileTableDeleteButton.php';
565  }
566 
571  {
572  require_once 'Modules/TestQuestionPool/classes/questions/class.ilAssFileUploadFileTableReuseButton.php';
574  }
575 
580  {
581  if( $this->object->getTestPresentationConfig()->isSolutionInitiallyPrefilled() )
582  {
583  return $this->buildFileTableReuseButtonInstance();
584  }
585 
586  return $this->buildFileTableDeleteButtonInstance();
587  }
588 
590  {
591  if( $this->object->getTestPresentationConfig()->isSolutionInitiallyPrefilled() )
592  {
594  }
595 
597  }
598  // hey.
599 
600  // hey: prevPassSolutions - overwrite common prevPassSolution-Checkbox
602  {
603  return $this->lng->txt('use_previous_solution_advice_file_upload');
604  }
605 
607  {
608  return '';
609  }
610  // hey.
611 
612  public function getFormEncodingType()
613  {
614  return self::FORM_ENCODING_MULTIPART;
615  }
616 }
$files
Definition: add-vimline.php:18
hasCorrectSolution($activeId, $passIndex)
addTab_QuestionPreview(ilTabsGUI $tabsGUI)
addBasicQuestionFormProperties($form)
Add basic question form properties: assessment: title, author, description, question, working time.
static _getPass($active_id)
Retrieves the actual pass of a given user for a given test.
setValue($a_value)
Set Value.
addTab_QuestionHints(ilTabsGUI $tabs)
adds the hints tab to ilTabsGUI
This class represents a property form user interface.
$_GET["client_id"]
getPreview($show_question_only=FALSE, $showInlineFeedback=false)
This class represents a checkbox property in a property form.
addItem($a_item)
Add Item (Property, SectionHeader).
$url
Definition: shib_logout.php:72
getQuestionTemplate()
get question template
writeQuestionSpecificPostData(ilPropertyFormGUI $form)
Extracts the question specific values from $_POST and applies them to the data object.
Class for file upload questions.
populateTaxonomyFormSection(ilPropertyFormGUI $form)
allowDecimals($a_value)
Toggle Decimals.
setInfo($a_info)
Set Information Text.
getAggregatedAnswersView($relevant_answers)
Returns an html string containing a question specific representation of the answers so far given in t...
if(!is_dir( $entity_dir)) exit("Fatal Error ([A-Za-z0-9]+)\+" &#(? foreach( $entity_files as $file) $output
writePostData($always=false)
{}
static getReturnToPageLink($q_id=null)
setQuestionTabs()
Sets the ILIAS tabs for this question type.
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
This class represents a text property in a property form.
addTab_QuestionFeedback(ilTabsGUI $tabs)
adds the feedback tab to ilTabsGUI
Basic GUI class for assessment questions.
populateQuestionSpecificFormPart(ilPropertyFormGUI $form)
Adds the question specific forms parts to a question property form gui.
setErrorMessage($errormessage)
Create styles array
The data for the language used.
The assFileUploadGUI class encapsulates the GUI representation for file upload questions.
getAnswerFeedbackOutput($active_id, $pass)
Returns the answer generic feedback depending on the results of the question.
getSpecificFeedbackOutput($active_id, $pass)
editQuestion($checkonly=FALSE)
Creates an output of the edit form for the question.
$errors
$ref_id
Definition: sahs_server.php:39
Create new PHPExcel object
obj_idprivate
getTestOutput($active_id, $pass, $is_postponed=FALSE, $use_post_solutions=FALSE, $show_feedback=FALSE)
__construct($id=-1)
assFileUploadGUI constructor
outQuestionPage($a_temp_var, $a_postponed=false, $active_id="", $html="")
output question page
Interface ilGuiQuestionScoringAdjustable.
static _getUsePreviousAnswers($active_id, $user_active_user_setting=false)
Returns if the previous results should be hidden for a learner.
getAfterParticipationSuppressionQuestionPostVars()
Returns a list of postvars which will be suppressed in the form output when used in scoring adjustmen...
$_POST["username"]
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.
addTab_SuggestedSolution(ilTabsGUI $tabs, $classname)
addQuestionFormCommandButtons($form)
Add the command buttons of a question properties form.