"survey_list.php?cidReq=$cidReq&n=$n", "name" => get_lang('Survey')); $cidReq = $_REQUEST['cidReq']; $curr_dbname = $_REQUEST['curr_dbname']; $groupid=$_REQUEST['groupid']; $surveyid=$_REQUEST['surveyid']; $qid=$_REQUEST['qid']; $qtype=$_REQUEST['qtype']; $table_question = Database :: get_course_table('questions'); $Add = get_lang("updatequestiontype"); $Multi = get_lang("MultipleChoiceSingle"); $tool_name = $Add.$Multi; $rs=SurveyManager::get_question_data($qid,$curr_dbname); $sql = "SELECT * FROM $curr_dbname.questions WHERE qid = '$qid'"; $res = api_sql_query($sql); $obj = mysql_fetch_object($res); for($i=0,$check=0;$i<10;$i++) { $temp = a.$i; if($obj->$temp) $check++; } if(isset($_REQUEST['questtype'])) $add_question12=$_REQUEST['questtype']; else $add_question12=$rs->qtype; if (isset($_POST['update'])) { $qid=$_POST['qid']; $alignment=$_POST['alignment']; if(isset($_POST['enterquestion'])) $enter_question=$_POST['enterquestion']; else $enter_question=$rs->caption; if(isset($_POST['mutlichkboxtext'])) $answers=$_POST['mutlichkboxtext']; else { $answers=array(); $i=1; while($rs) { $ans=a.$i; $answers[]=$rs->$ans; $i++; } } $open_ans=""; $count=count($_POST['mutlichkboxtext']); $noans=0; $nopoint=0; for($i=0;$i<$count;$i++) { $answers[$i]=trim($answers[$i]); if(empty($answers[$i])) $noans++; } $enter_question=trim($enter_question); if(empty($enter_question)) $error_message = get_lang('PleaseEnterAQuestion')."
"; if ($noans) $error_message = $error_message."
".get_lang('PleasFillAllAnswer'); if(isset($error_message)); //Display::display_error_message($error_message); else { $questtype=$rs->qtype; $curr_dbname = $_REQUEST['curr_dbname']; $enter_question = addslashes($enter_question); SurveyManager::update_question($qid,$questtype,$enter_question,$alignment,$answers,$open_ans,$curr_dbname); $cidReq = $_GET['cidReq']; header("location:select_question_group.php?groupid=$groupid&surveyid=$surveyid&cidReq=$cidReq&curr_dbname=$curr_dbname"); exit; } } if(isset($_POST['back'])) { $groupid = $_REQUEST['groupid']; $surveyid = $_REQUEST['surveyid']; $curr_dbname = $_REQUEST['curr_dbname']; header("location:select_question_group.php?groupid=$groupid&surveyid=$surveyid&cidReq=$cidReq&curr_dbname=$curr_dbname"); exit; } Display::display_header($tool_name); api_display_tool_title($tool_name); if( isset($error_message) ) { Display::display_error_message($error_message); } ?>
 
alignment=='horizontal' || $_POST['alignment']=='horizontal'){?>checked>Horizontal
alignment=='vertical' || $_POST['alignment']=='vertical'){?>checked>Vertical

Question
Enter the question.  
caption,'200px');?>

Answer
Enter the answers.    
10) $end=10; } else { $end=10; $error_message = get_lang('YouCanntAddmorethanTen')."
"; if( isset($error_message) ) { Display::display_error_message($error_message); } } } } for($i=$start;$i<=$end;$i++) { if($i==$jd) { $end++; } else { $k=$i-1; $val="a".$i; $sco="r".$i; if(isset($_POST['mutlichkboxtext'])) { $post_text1=$_POST['mutlichkboxtext']; $post_text = stripslashes($post_text1[$i-1]); } else $post_text=stripslashes($rs->$val); ?> $start) { ?>
" style="cursor:hand"> " style="cursor:hand"> " value="" onclick="this.form.submit();">
Add   New Answer


template) { case "template1": $temp = 'white'; break; case "template2": $temp = 'bluebreeze'; break; case "template3": $temp = 'brown'; break; case "template4": $temp = 'grey'; break; case "template5": $temp = 'blank'; break; } ?>