[svn r10566] a little bit of cleanup

skala
Patrick Cool 19 years ago
parent 77c4e90620
commit e5ffd54388
  1. 39
      main/survey/attach_existingsurvey.php

@ -20,7 +20,7 @@
/**
* @package dokeos.survey
* @author
* @version $Id: attach_existingsurvey.php 10550 2006-12-24 16:17:25Z pcool $
* @version $Id: attach_existingsurvey.php 10566 2006-12-28 20:06:35Z pcool $
*/
/*
@ -31,35 +31,50 @@
// name of the language file that needs to be included
$language_file = 'survey';
// including the global dokeos file
require_once ('../inc/global.inc.php');
//api_protect_admin_script();
// including additional libraries
/** @todo check if these are all needed */
/** @todo check if the starting / is needed. api_get_path probably ends with an / */
require_once (api_get_path(LIBRARY_PATH).'/fileManage.lib.php');
require_once (api_get_path(CONFIGURATION_PATH) ."/add_course.conf.php");
require_once (api_get_path(LIBRARY_PATH)."/add_course.lib.inc.php");
require_once (api_get_path(LIBRARY_PATH)."/course.lib.php");
require (api_get_path(LIBRARY_PATH)."/groupmanager.lib.php");
require_once (api_get_path(LIBRARY_PATH)."/groupmanager.lib.php");
require_once (api_get_path(LIBRARY_PATH)."/surveymanager.lib.php");
require_once (api_get_path(LIBRARY_PATH)."/usermanager.lib.php");
/** @todo replace this with the correct code */
$status = surveymanager::get_status();
if($status==5)
{
api_protect_admin_script();
}
require_once (api_get_path(LIBRARY_PATH)."/usermanager.lib.php");
// Database table definitions
$table_user = Database :: get_main_table(TABLE_MAIN_USER);
$table_survey = Database :: get_course_table('survey');
$table_group = Database :: get_course_table('survey_group');
$table_question = Database :: get_course_table('questions');
$table_course = Database :: get_main_table(TABLE_MAIN_COURSE);
$table_course_survey_rel = Database :: get_main_table(TABLE_MAIN_COURSE_SURVEY);
// Path variables
/** @todo these variables are probably not used here */
$coursePathWeb = api_get_path(WEB_COURSE_PATH);
$coursePathSys = api_get_path(SYS_COURSE_PATH);
$MonthsLong = array(get_lang('JanuaryLong'), get_lang('FebruaryLong'), get_lang('"MarchLong'), get_lang('AprilLong'), get_lang('MayLong'), get_lang('JuneLong'), get_lang('JulyLong'), get_lang('AugustLong'), get_lang('SeptemberLong'), get_lang('OctoberLong'), get_lang('NovemberLong'), get_lang('DecemberLong'));
$arr_date = explode("-",date("Y-m-d"));
$curr_year = $arr_date[0];
$curr_month = $arr_date[1];
$curr_day = $arr_date[2];
$coursePathWeb = api_get_path(WEB_COURSE_PATH);
$coursePathSys = api_get_path(SYS_COURSE_PATH);
$table_user = Database :: get_main_table(TABLE_MAIN_USER);
$cidReq = $_REQUEST['cidReq'];
$db_name = $_REQUEST['db_name'];
$table_survey = Database :: get_course_table('survey');
$table_group = Database :: get_course_table('survey_group');
$table_question = Database :: get_course_table('questions');
$table_course = Database :: get_main_table(TABLE_MAIN_COURSE);
$table_course_survey_rel = Database :: get_main_table(TABLE_MAIN_COURSE_SURVEY);
$tool_name = get_lang('CreateNewSurvey');
$tool_name1 = get_lang('CreateNewSurvey');
$interbreadcrumb[] = array ("url" => "survey_list.php", "name" => get_lang('Survey'));

Loading…
Cancel
Save