[svn r14636] Cleanup - Removed unused db_escape_string()

Cleanup - Added comment before call to check_first_last_question()
Cleanup - Added documentation to check_first_last_question()
skala
Yannick Warnier 18 years ago
parent 5791a8291a
commit fa403f1133
  1. 14
      main/survey/reporting.php
  2. 12
      main/survey/survey.lib.php
  3. 5
      main/survey/survey.php

@ -20,7 +20,7 @@
* @package dokeos.survey
* @author unknown, the initial survey that did not make it in 1.8 because of bad code
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University: cleanup, refactoring and rewriting large parts of the code
* @version $Id: reporting.php 14635 2008-03-17 21:43:24Z yannoo $
* @version $Id: reporting.php 14636 2008-03-17 22:24:08Z yannoo $
*
* @todo The question has to be more clearly indicated (same style as when filling the survey)
*/
@ -37,6 +37,16 @@ require ('../inc/global.inc.php');
*/
if ($_POST['export_report'])
{
if($_POST['export_xls'])
{
$data = export_complete_report();
$filename = 'fileexport.csv';
echo $data;
exit;
}
else
{
$data = export_complete_report();
$filename = 'fileexport.csv';
@ -62,7 +72,7 @@ if ($_POST['export_report'])
echo $data;
exit;
}
}
// including additional libraries

@ -1787,11 +1787,13 @@ class score extends question
}
}
function db_escape_string($value)
{
}
/**
* Checks whether the given survey has a pagebreak question as the first or the last question.
* If so, break the current process, displaying an error message
* @param integer Survey ID (database ID)
* @param boolean Optional. Whether to continue the current process or exit when breaking condition found. Defaults to true (do not break).
* @return void
*/
function check_first_last_question($survey_id, $continue=true)
{
// table definitions

@ -21,7 +21,7 @@ Tel. +32 (2) 211 34 56
* @package dokeos.survey
* @author unknown
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University: cleanup, refactoring and rewriting large parts of the code
* @version $Id: survey.php 13296 2007-09-27 02:19:40Z yannoo $
* @version $Id: survey.php 14636 2008-03-17 22:24:08Z yannoo $
*
* @todo use quickforms for the forms
*/
@ -40,7 +40,7 @@ require_once (api_get_path(LIBRARY_PATH)."/course.lib.php");
/** @todo this has to be moved to a more appropriate place (after the display_header of the code)*/
if (!api_is_allowed_to_edit())
{
Display :: display_header();
Display :: display_header(get_lang('Survey'));
Display :: display_error_message(get_lang('NotAllowed'), false);
Display :: display_footer();
exit;
@ -96,6 +96,7 @@ if (isset($_GET['message']))
}
}
// We exit here is the first or last question is a pagebreak (which causes errors)
check_first_last_question($_GET['survey_id']);
// Action links

Loading…
Cancel
Save