"survey_list.php", "name" => get_lang('Survey')); $coursePathWeb = api_get_path(WEB_COURSE_PATH); $coursePathSys = api_get_path(SYS_COURSE_PATH); $maxFilledSpace = get_setting('default_document_quotum'); $course_code = $id; //note confusion again: int id - string id - string code... $surveyid = $_REQUEST['surveyid']; $formSent=0; if ($_POST['action'] == 'update_survey') { $formSent=1; $cidReq=$_GET['cidReq']; $surveyid=$_REQUEST['surveyid']; $surveycode=$_POST['survey_code']; $surveytitle = $_POST['survey_title']; $surveysubtitle = $_POST['survey_subtitle']; $author = $_POST['author']; $survey_language = $_POST['survey_language']; $availablefrom = $_POST['fyear']."-".$_POST['fmonth']."-".$_POST['fday']; $availabletill = $_POST['end_fyear']."-".$_POST['end_fmonth']."-".$_POST['end_fday']; $isshare = $_POST['isshare']; $surveytemplate = $_POST['template']; $surveyintroduction = $_POST['content']; $surveythanks = $_POST['thanks']; $savailablefrom=mktime(0,0,0,$_POST['fmonth'],$_POST['fday'], $_POST['fyear']); $savailabletill=mktime(0,0,0,$_POST['end_fmonth'],$_POST['end_fday'], $_POST['end_fyear']); $surveytitle=trim($surveytitle); $surveycode=trim($surveycode); if(isset($_POST['back'])){ header("location:survey_list.php?cidReq=$cidReq"); exit; } if(empty ($surveytitle)) { $error_message = get_lang('PleaseEnterSurveyTitle'); } elseif ($savailabletill<=$savailablefrom){ $error_message = get_lang('PleaseEnterValidDate'); } elseif (empty ($surveycode)){ $error_message = get_lang('PleaseEnterValidCode'); } else { $cidReq = $_GET['cidReq']; $table_survey = Database :: get_course_table('survey'); $curr_dbname=SurveyManager::update_survey($surveyid,$surveycode,$surveytitle,$surveysubtitle,$author,$survey_language,$availablefrom,$availabletill,$isshare,$surveytemplate,$surveyintroduction,$surveythanks,$cidReq,$table_course); if(isset($_POST['next'])) { header("location:select_question_group.php?surveyid=$surveyid&cidReq=$cidReq&curr_dbname=$curr_dbname"); exit; } else { header("location:survey_list.php?cidReq=$cidReq"); exit; } } } Display::display_header($tool_name); api_display_tool_title($tool_name); if( isset($error_message) ) { Display::display_error_message($error_message); } ?> avail_from); $avail_year_from = $arr_avail_from['0']; $avail_month_from = $arr_avail_from['1']; $avail_day_from = $arr_avail_from['2']; $arr_avail_till = explode("-",$obj->avail_till); $avail_year_till = $arr_avail_till['0']; $avail_month_till = $arr_avail_till['1']; $avail_day_till = $arr_avail_till['2']; $template = $obj->template; $lang=$obj->lang; ?>
author); ?>
 
 
 
  is_shared=='1') echo "checked";?>>Yes is_shared=='0') echo "checked";?>>No
  intro,'300px'); ?>
  surveythanks,'200px'); ?>