"survey_list.php", "name" => get_lang('Survey')); $course_id = $_SESSION['_course']['id']; $oldsurveyid=$_REQUEST['surveyid']; $gids = $_REQUEST['gids']; $survey_name=surveymanager::get_surveyname($db_name,$oldsurveyid); if ($_POST['action'] == 'add_survey') { $surveycode=$_POST['survey_code']; $surveytitle = $_POST['survey_title']; $surveysubtitle = $_POST['survey_subtitle']; //$cidReq = $dbNamePrefix.$_POST['cidReq']; $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']); $cidReq=$_REQUEST['cidReq']; $gids = $_POST['gids']; $db_name = $_REQUEST['db_name']; $surveyid = $_REQUEST['surveyid']; if(isset($_POST['back'])) { $cidReq=$_REQUEST['cidReq']; $surveyid=$_REQUEST['surveyid']; $db_name=$_REQUEST['db_name']; header("location:create_from_existing_survey.php?cidReq=$cidReq&surveyid=$surveyid&db_name=$db_name"); } $surveytitle=trim($surveytitle); $surveycode=trim($surveycode); 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 { $result=SurveyManager::get_survey_code($table_survey,$surveycode); if(!empty($result)) { $error_message=get_lang('thiscodealradyexist'); } else { $survey_id = SurveyManager::create_survey($surveycode, $surveytitle, $surveysubtitle, $author, $survey_language, $availablefrom, $availabletill, $isshare, $surveytemplate, $surveyintroduction, $surveythanks, $table_survey, $table_group); $cidReq=$_GET['cidReq']; $curr_dbname=SurveyManager::create_course_survey_rel($cidReq,$survey_id,$table_course,$table_course_survey_rel); $oldsurveyid=$_POST['surveyid']; $gids = $_POST['gids']; $db_name = $_REQUEST['db_name']; //surveymanager::insert_existing_groups($survey_id,$gids,$table_group,$table_question); surveymanager::import_group($survey_id,$gids,$db_name,$curr_dbname); /* $survey_id = SurveyManager::create_survey_attach($surveycode, $surveytitle, $surveysubtitle, $author, $survey_language, $availablefrom, $availabletill, $isshare, $surveytemplate, $surveyintroduction,$table_survey, $table_group); $oldsurveyid=$_POST['oldsurveyid']; SurveyManager::attach_survey($oldsurveyid,$survey_id,$table_group,$table_question); */ if (isset($_POST['next'])) { $cidReq=$_GET['cidReq']; header("location:select_question_group.php?surveyid=$survey_id&cidReq=$cidReq&curr_dbname=$curr_dbname"); exit; } else { $cidReq=$_GET['cidReq']; header("location:survey_list.php?&cidReq=$cidReq"); exit; } } } } Display::display_header($tool_name); api_display_tool_title($tool_name1); //echo "
";
//print_r($_SESSION);
//echo "
"; if( isset($error_message) ) { Display::display_error_message($error_message); } ?>
"; echo get_lang('author'); echo ""; echo ""; } ?>
"; UserManager::get_teacher_list($course_id, $author_id); echo "
 
 
 
  Yes No
 
  BasePath = 'FCKeditor/'; $oFCKeditor->Value = 'Enter your introduction text here'; $oFCKeditor->Width = '600' ; $oFCKeditor->Height = '400' ; $oFCKeditor->Create(); */ ?>