"survey_list.php", "name" => get_lang('Survey')); $surveyid = $_GET['surveyid']; $surveyname = SurveyManager::pick_surveyname($surveyid); if(isset($_GET['direction'])){ $sql = 'SELECT * FROM '.$table_group.' WHERE group_id='.intval($_GET['id_group']); $rs = api_sql_query($sql, __FILE__, __LINE__); $group = mysql_fetch_object($rs); if(is_object($group)){ $_GET['direction'] == 'up' ? $operateur = '-' : $operateur = '+'; $sql = 'UPDATE '.$table_group.' SET sortby='.$group->sortby.' WHERE sortby='.$group->sortby.$operateur.'1' ; $rs = api_sql_query($sql,__FILE__,__LINE__); $sql = 'UPDATE '.$table_group.' SET sortby='.$group->sortby.$operateur.'1'.' WHERE group_id='.intval($_GET['id_group']); $rs = api_sql_query($sql,__FILE__,__LINE__); } } if(isset($_REQUEST['delete'])) { $group_id = $_REQUEST['group_delete']; $surveyid = $_REQUEST['surveyid']; SurveyManager::delete_group($group_id); header("Location:create_new_group.php?surveyid=$surveyid"); exit; } if ($_POST['action'] == 'new_group') { $surveyid = $_POST['surveyid']; $groupname = $_POST['groupname']; $surveyintroduction = $_POST['content']; if(isset($_POST['back'])) { header("location:select_question_group.php?surveyid=$surveyid"); exit; } $groupname=trim($groupname); if(empty ($groupname)) { $error_message = get_lang('PleaseEnterGroupName'); } else { $groupid = SurveyManager::create_group($surveyid,$groupname,$surveyintroduction,$table_group); if(isset($_POST['next']) && $groupid) { header("location:addanother.php?surveyid=$surveyid&newgroupid=$groupid"); exit; }elseif(isset($_POST['saveandexit']) && $groupid){ header("location:survey_list.php"); exit; } else { $error_message = "This Group Already Exists !"; } } } Display::display_header($tool_name1); ?> 0) { $i=0; //$surveys = array (); while ($obj = mysql_fetch_object($res)) { $gid=$obj->group_id; $gname = $obj->groupname; $survey = array (); $survey[] = $obj->groupname; $gid=$obj->group_id; $idd=surveymanager::pick_author($surveyid); $author=surveymanager::get_survey_author($idd); $surveyname=surveymanager::pick_surveyname($surveyid); $survey[] = $surveyname; $survey[] = $author; $directions = ''; if($i < $countGroups-1){ $directions .= ''; } else { $directions .= ''; } if($i > 0){ $directions .= ''; } else { $directions .= ''; } $directions .= '
'; $survey[] = $directions; $survey[] = ''.get_lang('Edit').'' .''.get_lang('Delete').'' ; $surveys[] = $survey; $i++; } $table_header[] = array (get_lang('QuesGroup'), true); $table_header[] = array (get_lang('SurveyName'), true); $table_header[] = array (get_lang('Author'), true); $table_header[] = array (get_lang('OrderBy'), true); $table_header[] = array (' ', false); Display :: display_sortable_table($table_header, $surveys, array ('column'=>get_lang('OrderBy')), array (), $parameters); } else { echo get_lang('NoSearchResults'); } echo ''.get_lang('BackToQuestions').'

'; api_display_tool_title($tool_name); ?>
  BasePath = api_get_path(WEB_PATH) . 'main/inc/lib/fckeditor/' ; $oFCKeditor->Height = '300'; $oFCKeditor->Width = '600'; $oFCKeditor->Value = $content; $oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js"; $oFCKeditor->ToolbarSet = "Survey"; $sql="SELECT isocode FROM ".$table_languages." WHERE english_name='".$_SESSION["_course"]["language"]."'"; $result_sql=api_sql_query($sql); $isocode_language=mysql_result($result_sql,0,0); $oFCKeditor->Config['DefaultLanguage'] = $isocode_language; $return = $oFCKeditor->CreateHtml(); echo $return; ?>