ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilSurveyEvaluationGUI.php
Go to the documentation of this file.
1 <?php
2  /*
3  +----------------------------------------------------------------------------+
4  | ILIAS open source |
5  +----------------------------------------------------------------------------+
6  | Copyright (c) 1998-2001 ILIAS open source, University of Cologne |
7  | |
8  | This program is free software; you can redistribute it and/or |
9  | modify it under the terms of the GNU General Public License |
10  | as published by the Free Software Foundation; either version 2 |
11  | of the License, or (at your option) any later version. |
12  | |
13  | This program is distributed in the hope that it will be useful, |
14  | but WITHOUT ANY WARRANTY; without even the implied warranty of |
15  | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16  | GNU General Public License for more details. |
17  | |
18  | You should have received a copy of the GNU General Public License |
19  | along with this program; if not, write to the Free Software |
20  | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21  +----------------------------------------------------------------------------+
22 */
23 
24 include_once "./Modules/Survey/classes/inc.SurveyConstants.php";
25 
38 {
39  var $object;
40  var $lng;
41  var $tpl;
42  var $ctrl;
43 
52  function ilSurveyEvaluationGUI($a_object)
53  {
54  global $lng, $tpl, $ilCtrl;
55 
56  $this->lng =& $lng;
57  $this->tpl =& $tpl;
58  $this->ctrl =& $ilCtrl;
59  $this->object =& $a_object;
60  }
61 
65  function &executeCommand()
66  {
67  $cmd = $this->ctrl->getCmd();
68  $next_class = $this->ctrl->getNextClass($this);
69 
70  $cmd = $this->getCommand($cmd);
71  switch($next_class)
72  {
73  default:
74  $ret =& $this->$cmd();
75  break;
76  }
77  return $ret;
78  }
79 
80  function getCommand($cmd)
81  {
82  return $cmd;
83  }
84 
93  {
94  global $rbacsystem;
95  global $ilUser;
96 
97  if ($rbacsystem->checkAccess("write", $_GET["ref_id"]))
98  {
99  // people with write access always have access to the evaluation
100  $_SESSION["anon_evaluation_access"] = $_GET["ref_id"];
101  return $this->evaluation();
102  }
103  if ($this->object->getEvaluationAccess() == EVALUATION_ACCESS_ALL)
104  {
105  // if the evaluation access is open for all users, grant it
106  $_SESSION["anon_evaluation_access"] = $_GET["ref_id"];
107  return $this->evaluation();
108  }
109  $surveycode = $this->object->getUserAccessCode($ilUser->getId());
110  if ($this->object->isAnonymizedParticipant($surveycode))
111  {
112  $_SESSION["anon_evaluation_access"] = $_GET["ref_id"];
113  return $this->evaluation();
114  }
115  $this->tpl->setVariable("TABS", "");
116  $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.il_svy_svy_evaluation_checkaccess.html", "Modules/Survey");
117  $this->tpl->setCurrentBlock("adm_content");
118  $this->tpl->setVariable("AUTHENTICATION_NEEDED", $this->lng->txt("svy_check_evaluation_authentication_needed"));
119  $this->tpl->setVariable("FORM_ACTION", $this->ctrl->getFormAction($this, "checkAnonymizedEvaluationAccess"));
120  $this->tpl->setVariable("EVALUATION_CHECKACCESS_INTRODUCTION", $this->lng->txt("svy_check_evaluation_access_introduction"));
121  $this->tpl->setVariable("VALUE_CHECK", $this->lng->txt("ok"));
122  $this->tpl->setVariable("VALUE_CANCEL", $this->lng->txt("cancel"));
123  $this->tpl->setVariable("TEXT_SURVEY_CODE", $this->lng->txt("survey_code"));
124  $this->tpl->parseCurrentBlock();
125  }
126 
135  {
136  $surveycode = $_POST["surveycode"];
137  if ($this->object->isAnonymizedParticipant($surveycode))
138  {
139  $_SESSION["anon_evaluation_access"] = $_GET["ref_id"];
140  $this->evaluation();
141  }
142  else
143  {
144  ilUtil::sendFailure($this->lng->txt("svy_check_evaluation_wrong_key", true));
145  $this->cancelEvaluationAccess();
146  }
147  }
148 
157  {
158  include_once "./Services/Utilities/classes/class.ilUtil.php";
159  global $tree;
160  $path = $tree->getPathFull($this->object->getRefID());
161  ilUtil::redirect("repository.php?cmd=frameset&ref_id=" . $path[count($path) - 2]["child"]);
162  }
163 
171  function evaluationdetails()
172  {
173  $this->evaluation(1);
174  }
175 
176  function exportCumulatedResults($details = 0)
177  {
178  $format_bold = "";
179  $format_percent = "";
180  $format_datetime = "";
181  $format_title = "";
182  $surveyname = ilUtil::getASCIIFilename(preg_replace("/\s/", "_", $this->object->getTitle()));
183 
184  switch ($_POST["export_format"])
185  {
186  case TYPE_XLS:
187  include_once "./Services/Excel/classes/class.ilExcelWriterAdapter.php";
188  $excelfile = ilUtil::ilTempnam();
189  $adapter = new ilExcelWriterAdapter($excelfile, FALSE);
190  $workbook = $adapter->getWorkbook();
191  $workbook->setVersion(8); // Use Excel97/2000 Format
192  // Creating a worksheet
193  $format_bold =& $workbook->addFormat();
194  $format_bold->setBold();
195  $format_percent =& $workbook->addFormat();
196  $format_percent->setNumFormat("0.00%");
197  $format_datetime =& $workbook->addFormat();
198  $format_datetime->setNumFormat("DD/MM/YYYY hh:mm:ss");
199  $format_title =& $workbook->addFormat();
200  $format_title->setBold();
201  $format_title->setColor('black');
202  $format_title->setPattern(1);
203  $format_title->setFgColor('silver');
204  $format_title->setAlign('center');
205  // Creating a worksheet
206  include_once ("./Services/Excel/classes/class.ilExcelUtils.php");
207  $mainworksheet =& $workbook->addWorksheet();
208  $mainworksheet->writeString(0, 0, ilExcelUtils::_convert_text($this->lng->txt("title"), $_POST["export_format"]), $format_bold);
209  $mainworksheet->writeString(0, 1, ilExcelUtils::_convert_text($this->lng->txt("question"), $_POST["export_format"]), $format_bold);
210  $mainworksheet->writeString(0, 2, ilExcelUtils::_convert_text($this->lng->txt("question_type"), $_POST["export_format"]), $format_bold);
211  $mainworksheet->writeString(0, 3, ilExcelUtils::_convert_text($this->lng->txt("users_answered"), $_POST["export_format"]), $format_bold);
212  $mainworksheet->writeString(0, 4, ilExcelUtils::_convert_text($this->lng->txt("users_skipped"), $_POST["export_format"]), $format_bold);
213  $mainworksheet->writeString(0, 5, ilExcelUtils::_convert_text($this->lng->txt("mode"), $_POST["export_format"]), $format_bold);
214  $mainworksheet->writeString(0, 6, ilExcelUtils::_convert_text($this->lng->txt("mode_text"), $_POST["export_format"]), $format_bold);
215  $mainworksheet->writeString(0, 7, ilExcelUtils::_convert_text($this->lng->txt("mode_nr_of_selections"), $_POST["export_format"]), $format_bold);
216  $mainworksheet->writeString(0, 8, ilExcelUtils::_convert_text($this->lng->txt("median"), $_POST["export_format"]), $format_bold);
217  $mainworksheet->writeString(0, 9, ilExcelUtils::_convert_text($this->lng->txt("arithmetic_mean"), $_POST["export_format"]), $format_bold);
218  break;
219  case (TYPE_SPSS):
220  $csvfile = array();
221  $csvrow = array();
222  array_push($csvrow, $this->lng->txt("title"));
223  array_push($csvrow, $this->lng->txt("question"));
224  array_push($csvrow, $this->lng->txt("question_type"));
225  array_push($csvrow, $this->lng->txt("users_answered"));
226  array_push($csvrow, $this->lng->txt("users_skipped"));
227  array_push($csvrow, $this->lng->txt("mode"));
228 
229  //array_push($csvrow, $this->lng->txt("mode_text"));
230 
231 
232  array_push($csvrow, $this->lng->txt("mode_nr_of_selections"));
233  array_push($csvrow, $this->lng->txt("median"));
234  array_push($csvrow, $this->lng->txt("arithmetic_mean"));
235  array_push($csvfile, $csvrow);
236  break;
237  }
238  $questions =& $this->object->getSurveyQuestions();
239  $counter++;
240  foreach ($questions as $data)
241  {
242  include_once "./Modules/SurveyQuestionPool/classes/class.SurveyQuestion.php";
243  $question = SurveyQuestion::_instanciateQuestion($data["question_id"]);
244 
245  $eval = $this->object->getCumulatedResults($question);
246  switch ($_POST["export_format"])
247  {
248  case TYPE_XLS:
249  $counter = $question->setExportCumulatedXLS($mainworksheet, $format_title, $format_bold, $eval, $counter);
250  break;
251  case (TYPE_SPSS):
252  $csvrows =& $question->setExportCumulatedCVS($eval);
253  foreach ($csvrows as $csvrow)
254  {
255  array_push($csvfile, $csvrow);
256  }
257  break;
258  }
259  if ($details)
260  {
261  switch ($_POST["export_format"])
262  {
263  case TYPE_XLS:
264  $question->setExportDetailsXLS($workbook, $format_title, $format_bold, $eval);
265  break;
266  }
267  }
268  }
269 
270  switch ($_POST["export_format"])
271  {
272  case TYPE_XLS:
273  // Let's send the file
274  $workbook->close();
275  ilUtil::deliverFile($excelfile, "$surveyname.xls", "application/vnd.ms-excel");
276  exit();
277  break;
278  case TYPE_SPSS:
279  $csv = "";
280  $separator = ";";
281  foreach ($csvfile as $csvrow)
282  {
283  $csvrow =& $this->object->processCSVRow($csvrow, TRUE, $separator);
284  $csv .= join($csvrow, $separator) . "\n";
285  }
286  include_once "./Services/Utilities/classes/class.ilUtil.php";
287  ilUtil::deliverData($csv, "$surveyname.csv");
288  exit();
289  break;
290  }
291  }
292 
293  public function exportData()
294  {
295  if (strlen($_POST["export_format"]))
296  {
297  $this->exportCumulatedResults(0);
298  return;
299  }
300  else
301  {
302  $this->ctrl->redirect($this, 'evaluation');
303  }
304  }
305 
306  public function exportDetailData()
307  {
308  if (strlen($_POST["export_format"]))
309  {
310  $this->exportCumulatedResults(1);
311  return;
312  }
313  else
314  {
315  $this->ctrl->redirect($this, 'evaluation');
316  }
317  }
318 
319  public function printEvaluation()
320  {
321  ilUtil::sendInfo($this->lng->txt('use_browser_print_function'), true);
322  $this->ctrl->redirect($this, 'evaluation');
323  }
324 
325  function evaluation($details = 0)
326  {
327  global $ilUser;
328  global $rbacsystem;
329  global $ilias;
330 
331  if (!$rbacsystem->checkAccess("read",$_GET["ref_id"]))
332  {
333  ilUtil::sendFailure($this->lng->txt("permission_denied"));
334  return;
335  }
336  switch ($this->object->getEvaluationAccess())
337  {
339  if (!$rbacsystem->checkAccess("write", $_GET["ref_id"]))
340  {
341  ilUtil::sendFailure($this->lng->txt("permission_denied"));
342  return;
343  }
344  break;
346  include_once "./Modules/Survey/classes/class.ilObjSurveyAccess.php";
347  if (!($rbacsystem->checkAccess("write",$_GET["ref_id"]) || ilObjSurveyAccess::_hasEvaluationAccess($this->object->getId(), $ilUser->getId())))
348  {
349  ilUtil::sendFailure($this->lng->txt("permission_denied"));
350  return;
351  }
352  break;
354  if (($this->object->getAnonymize() == 1) && ($_SESSION["anon_evaluation_access"] != $_GET["ref_id"]))
355  {
357  return;
358  }
359  break;
360  }
361 
362  $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.il_svy_svy_evaluation.html", "Modules/Survey");
363  $questions =& $this->object->getSurveyQuestions();
364  $data = array();
365  $counter = 1;
366  foreach ($questions as $qdata)
367  {
368  include_once "./Modules/SurveyQuestionPool/classes/class.SurveyQuestion.php";
369  $question_gui = SurveyQuestion::_instanciateQuestionGUI($qdata["question_id"]);
370  $question = $question_gui->object;
371  $c = $question->getCumulatedResultData($this->object->getSurveyId(), $counter);
372  if (is_array($c[0]))
373  {
374  foreach ($c as $a)
375  {
376  array_push($data, $a);
377  }
378  }
379  else
380  {
381  array_push($data, $c);
382  }
383  $counter++;
384  if ($details)
385  {
386  $detail = $question_gui->getCumulatedResultsDetails($this->object->getSurveyId(), $counter-1);
387  $this->tpl->setCurrentBlock("detail");
388  $this->tpl->setVariable("DETAIL", $detail);
389  $this->tpl->parseCurrentBlock();
390  }
391  }
392  include_once "./Modules/Survey/classes/tables/class.ilSurveyResultsCumulatedTableGUI.php";
393  $table_gui = new ilSurveyResultsCumulatedTableGUI($this, 'evaluation', $detail);
394  $table_gui->setData($data);
395  $this->tpl->setVariable('CUMULATED', $table_gui->getHTML());
396  $this->tpl->addCss("./Modules/Survey/templates/default/survey_print.css", "print");
397  }
398 
406  function exportUserSpecificResults($export_format)
407  {
408  global $ilLog;
409  $surveyname = ilUtil::getASCIIFilename(preg_replace("/\s/", "_", $this->object->getTitle()));
410  $csvfile = array();
411  $csvrow = array();
412  $questions = array();
413  $questions =& $this->object->getSurveyQuestions(true);
414  array_push($csvrow, $this->lng->txt("username"));
415  if ($this->object->canExportSurveyCode())
416  {
417  array_push($csvrow, $this->lng->txt("codes"));
418  }
419  if ($this->object->getAnonymize() == ANONYMIZE_OFF)
420  {
421  array_push($csvrow, $this->lng->txt("gender"));
422  }
423  $cellcounter = 1;
424  foreach ($questions as $question_id => $question_data)
425  {
426  include_once "./Modules/SurveyQuestionPool/classes/class.SurveyQuestion.php";
427  $question = SurveyQuestion::_instanciateQuestion($question_data["question_id"]);
428  $question->addUserSpecificResultsExportTitles($csvrow);
429  $questions[$question_data["question_id"]] = $question;
430  }
431  array_push($csvfile, $csvrow);
432  $participants =& $this->object->getSurveyFinishedIds();
433 
434  foreach ($participants as $user_id)
435  {
436  $resultset =& $this->object->getEvaluationByUser($questions, $user_id);
437  $csvrow = array();
438  array_push($csvrow, $resultset["name"]);
439  if ($this->object->canExportSurveyCode())
440  {
441  array_push($csvrow, $user_id);
442  }
443  if ($this->object->getAnonymize() == ANONYMIZE_OFF)
444  {
445  array_push($csvrow, $resultset["gender"]);
446  }
447  foreach ($questions as $question_id => $question)
448  {
449  $question->addUserSpecificResultsData($csvrow, $resultset);
450  }
451  array_push($csvfile, $csvrow);
452  }
453  switch ($export_format)
454  {
455  case TYPE_XLS:
456  include_once "./Services/Excel/classes/class.ilExcelWriterAdapter.php";
457  $excelfile = ilUtil::ilTempnam();
458  $adapter = new ilExcelWriterAdapter($excelfile, FALSE);
459  $workbook = $adapter->getWorkbook();
460  $workbook->setVersion(8); // Use Excel97/2000 Format
461  // Creating a worksheet
462  $format_bold =& $workbook->addFormat();
463  $format_bold->setBold();
464  $format_percent =& $workbook->addFormat();
465  $format_percent->setNumFormat("0.00%");
466  $format_datetime =& $workbook->addFormat();
467  $format_datetime->setNumFormat("DD/MM/YYYY hh:mm:ss");
468  $format_title =& $workbook->addFormat();
469  $format_title->setBold();
470  $format_title->setColor('black');
471  $format_title->setPattern(1);
472  $format_title->setFgColor('silver');
473  $format_title_plain =& $workbook->addFormat();
474  $format_title_plain->setColor('black');
475  $format_title_plain->setPattern(1);
476  $format_title_plain->setFgColor('silver');
477  // Creating a worksheet
478  $pages = floor((count($csvfile[0])) / 250) + 1;
479  $worksheets = array();
480  for ($i = 0; $i < $pages; $i++)
481  {
482  $worksheets[$i] =& $workbook->addWorksheet();
483  }
484  $row = 0;
485  include_once "./Services/Excel/classes/class.ilExcelUtils.php";
486  foreach ($csvfile as $csvrow)
487  {
488  $col = 0;
489  if ($row == 0)
490  {
491  $worksheet = 0;
492  $mainworksheet =& $worksheets[$worksheet];
493  foreach ($csvrow as $text)
494  {
495  $mainworksheet->writeString($row, $col++, ilExcelUtils::_convert_text($text, $_POST["export_format"]), $format_title);
496  if ($col % 251 == 0)
497  {
498  $worksheet++;
499  $col = 1;
500  $mainworksheet =& $worksheets[$worksheet];
501  $mainworksheet->writeString($row, 0, ilExcelUtils::_convert_text($csvrow[0], $_POST["export_format"]), $format_title);
502  }
503  }
504  }
505  else
506  {
507  $worksheet = 0;
508  $mainworksheet =& $worksheets[$worksheet];
509  foreach ($csvrow as $text)
510  {
511  if (is_numeric($text))
512  {
513  $mainworksheet->writeNumber($row, $col++, $text);
514  }
515  else
516  {
517  $mainworksheet->writeString($row, $col++, ilExcelUtils::_convert_text($text, $_POST["export_format"]));
518  }
519  if ($col % 251 == 0)
520  {
521  $worksheet++;
522  $col = 1;
523  $mainworksheet =& $worksheets[$worksheet];
524  $mainworksheet->writeString($row, 0, ilExcelUtils::_convert_text($csvrow[0], $_POST["export_format"]));
525  }
526  }
527  }
528  $row++;
529  }
530  $workbook->close();
531  ilUtil::deliverFile($excelfile, "$surveyname.xls", "application/vnd.ms-excel");
532  exit();
533  break;
534  case TYPE_SPSS:
535  $csv = "";
536  $separator = ";";
537  foreach ($csvfile as $csvrow)
538  {
539  $csvrow =& str_replace("\n", " ", $this->object->processCSVRow($csvrow, TRUE, $separator));
540  $csv .= join($csvrow, $separator) . "\n";
541  }
542  include_once "./Services/Utilities/classes/class.ilUtil.php";
543  ilUtil::deliverData($csv, "$surveyname.csv");
544  exit();
545  break;
546  }
547  }
548 
556  function evaluationuser()
557  {
558  global $ilAccess, $ilLog;
559 
560  if (!$ilAccess->checkAccess("write", "", $this->object->getRefId()))
561  {
562  ilUtil::sendFailure($this->lng->txt("no_permission"), TRUE);
563  $this->ctrl->redirectByClass("ilObjSurveyGUI", "infoScreen");
564  }
565  if (!is_array($_POST))
566  {
567  $_POST = array();
568  }
569  if (array_key_exists("export_format", $_POST))
570  {
571  return $this->exportUserSpecificResults($_POST["export_format"]);
572  }
573 
574  $this->tpl->addCss("./Modules/Survey/templates/default/survey_print.css", "print");
575  $userResults =& $this->object->getUserSpecificResults();
577  $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.il_svy_svy_evaluation_user.html", "Modules/Survey");
578  $counter = 0;
579  $classes = array("tblrow1top", "tblrow2top");
580  $questions =& $this->object->getSurveyQuestions(true);
581  $this->tpl->setCurrentBlock("headercell");
582  $this->tpl->setVariable("TEXT_HEADER_CELL", $this->lng->txt("username"));
583  $this->tpl->parseCurrentBlock();
584  if ($this->object->getAnonymize() == ANONYMIZE_OFF)
585  {
586  $this->tpl->setCurrentBlock("headercell");
587  $this->tpl->setVariable("TEXT_HEADER_CELL", $this->lng->txt("gender"));
588  $this->tpl->parseCurrentBlock();
589  }
590  $this->tpl->setCurrentBlock("headercell");
591  $this->tpl->setVariable("TEXT_HEADER_CELL", $this->lng->txt("question"));
592  $this->tpl->parseCurrentBlock();
593 
594  $this->tpl->setCurrentBlock("headercell");
595  $this->tpl->setVariable("TEXT_HEADER_CELL", $this->lng->txt("results"));
596  $this->tpl->parseCurrentBlock();
597 
598  $cellcounter = 1;
599  $participants =& $this->object->getSurveyParticipants();
600  foreach ($participants as $data)
601  {
602  $this->tpl->setCurrentBlock("bodycell");
603  $this->tpl->setVariable("COLOR_CLASS", $classes[$counter % 2]);
604  $this->tpl->setVariable("TEXT_BODY_CELL", $data["sortname"]);
605  $this->tpl->parseCurrentBlock();
606  if ($this->object->getAnonymize() == ANONYMIZE_OFF)
607  {
608  $this->tpl->setCurrentBlock("bodycell");
609  $this->tpl->setVariable("COLOR_CLASS", $classes[$counter % 2]);
610  $this->tpl->setVariable("TEXT_BODY_CELL", $data["gender"]);
611  $this->tpl->parseCurrentBlock();
612  }
613  $intro = TRUE;
614  $questioncounter = 1;
615  foreach ($questions as $question_id => $question_data)
616  {
617  if ($intro)
618  {
619  $intro = FALSE;
620  }
621  else
622  {
623  if ($this->object->getAnonymize() == ANONYMIZE_OFF)
624  {
625  $this->tpl->setCurrentBlock("bodycell");
626  $this->tpl->setVariable("COLOR_CLASS", $classes[$counter % 2]);
627  $this->tpl->parseCurrentBlock();
628  }
629  $this->tpl->setCurrentBlock("bodycell");
630  $this->tpl->setVariable("COLOR_CLASS", $classes[$counter % 2]);
631  $this->tpl->parseCurrentBlock();
632  }
633  $this->tpl->setCurrentBlock("bodycell");
634  $this->tpl->setVariable("COLOR_CLASS", $classes[$counter % 2]);
635  $this->tpl->setVariable("TEXT_BODY_CELL", $questioncounter++ . ". " . $question_data["title"]);
636  $this->tpl->parseCurrentBlock();
637 
638  $found = $userResults[$question_id][$data["active_id"]];
639  $text = "";
640  if (is_array($found))
641  {
642  $text = implode("<br />", $found);
643  }
644  else
645  {
646  $text = $found;
647  }
648  if (strlen($text) == 0) $text = $this->lng->txt("skipped");
649  $this->tpl->setCurrentBlock("bodycell");
650  $this->tpl->setVariable("COLOR_CLASS", $classes[$counter % 2]);
651  $this->tpl->setVariable("TEXT_BODY_CELL", $text);
652  $this->tpl->parseCurrentBlock();
653  $this->tpl->setCurrentBlock("row");
654  $this->tpl->parse("row");
655  }
656  $counter++;
657  }
658  $this->tpl->setCurrentBlock("generic_css");
659  $this->tpl->setVariable("LOCATION_GENERIC_STYLESHEET", "./Modules/Survey/templates/default/evaluation_print.css");
660  $this->tpl->setVariable("MEDIA_GENERIC_STYLESHEET", "print");
661  $this->tpl->parseCurrentBlock();
662  $this->tpl->setCurrentBlock("adm_content");
663  $this->tpl->setVariable("EXPORT_DATA", $this->lng->txt("export_data_as"));
664  $this->tpl->setVariable("TEXT_EXCEL", $this->lng->txt("exp_type_excel"));
665  $this->tpl->setVariable("TEXT_CSV", $this->lng->txt("exp_type_csv"));
666  $this->tpl->setVariable("BTN_EXPORT", $this->lng->txt("export"));
667  $this->tpl->setVariable("BTN_PRINT", $this->lng->txt("print"));
668  $this->tpl->setVariable("FORM_ACTION", $this->ctrl->getFormAction($this, "evaluationuser"));
669  $this->tpl->setVariable("PRINT_ACTION", $this->ctrl->getFormAction($this, "evaluationuser"));
670  $this->tpl->setVariable("CMD_EXPORT", "evaluationuser");
671  $this->tpl->parseCurrentBlock();
672  }
673 
681  function outChart()
682  {
683  $survey_id = $_GET["survey"];
684  $question_id = $_GET["question"];
685  $type = (strlen($_GET["type"])) ? $_GET["type"] : "";
686  $question =& $this->object->_instanciateQuestion($question_id);
687  $question->outChart($survey_id, $type);
688  }
689 }
690 ?>