|
|
|
@ -20,7 +20,7 @@ |
|
|
|
|
/** |
|
|
|
|
* @package dokeos.survey |
|
|
|
|
* @author |
|
|
|
|
* @version $Id: select_question_group.php 10584 2007-01-02 15:09:21Z pcool $ |
|
|
|
|
* @version $Id: select_question_group.php 10603 2007-01-06 17:01:47Z pcool $ |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -61,27 +61,21 @@ if (!api_is_allowed_to_edit()) |
|
|
|
|
exit; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$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); |
|
|
|
|
// Database table definitions |
|
|
|
|
/** @todo use database constants for the survey tables */ |
|
|
|
|
$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_survey_group = Database :: get_course_table('survey_group'); |
|
|
|
|
|
|
|
|
|
$cidReq = $_GET['cidReq']; |
|
|
|
|
$db_name = $_REQUEST['db_name']; |
|
|
|
|
$curr_dbname = $_REQUEST['curr_dbname']; |
|
|
|
|
//$table_survey = Database :: get_course_table('survey'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$tool_name1 = get_lang('AddQuestionGroup'); |
|
|
|
|
$tool_name = get_lang('AddQuestionGroup'); |
|
|
|
|
$interbreadcrumb[] = array ("url" => "survey_list.php", "name" => get_lang('Survey')); |
|
|
|
|
/*if($page = $_REQUEST['page']) |
|
|
|
|
{ |
|
|
|
|
$interbreadcrumb[] = array ("url" => "create_new_survey.php?surveyid=$surveyid&cidReq=$cidReq&curr_dbname=$curr_dbname&page=$page", "name" => get_lang('CreateNewSurvey')); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
$interbreadcrumb[] = array ("url" => "create_new_survey.php?surveyid=$surveyid&cidReq=$cidReq&curr_dbname=$curr_dbname&page=$page", "name" => get_lang('CreateFromExistingSurvey')); |
|
|
|
|
}*/ |
|
|
|
|
$coursePathWeb = api_get_path(WEB_COURSE_PATH); |
|
|
|
|
$coursePathSys = api_get_path(SYS_COURSE_PATH); |
|
|
|
|
$default_group = '0'; |
|
|
|
|
$new_group = '1'; |
|
|
|
|
$existing_group = '2'; |
|
|
|
@ -94,20 +88,22 @@ $flag = $_REQUEST['flag']; |
|
|
|
|
$action1 = $_REQUEST['action1']; |
|
|
|
|
$sort = $_REQUEST['sortby']; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(!isset($page_nr)||!isset($column)||!isset($per_page)) |
|
|
|
|
{ |
|
|
|
|
$page_nr =1; |
|
|
|
|
$column =0; |
|
|
|
|
$per_page = 10; |
|
|
|
|
$page_nr =1; |
|
|
|
|
$column =0; |
|
|
|
|
$per_page = 10; |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
$page_nr = $_REQUEST['page_nr']; |
|
|
|
|
$column = $_REQUEST['column']; |
|
|
|
|
$per_page = $_REQUEST['per_page']; |
|
|
|
|
$page_nr = $_REQUEST['page_nr']; |
|
|
|
|
$column = $_REQUEST['column']; |
|
|
|
|
$per_page = $_REQUEST['per_page']; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
$sql="SELECT * FROM $curr_dbname.questions WHERE gid='$groupid' AND survey_id = '$surveyid'"; |
|
|
|
|
$sql="SELECT * FROM $table_question WHERE gid='$groupid' AND survey_id = '$surveyid'"; |
|
|
|
|
$res=api_sql_query($sql,__FILE__,__LINE__); |
|
|
|
|
$obj=mysql_fetch_object($res); |
|
|
|
|
$number=mysql_num_rows($res); |
|
|
|
@ -166,38 +162,38 @@ for($i=1;$i<=$number;$i++) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
if ($_POST['action'] == 'selectquestion_group') |
|
|
|
|
{ |
|
|
|
|
$surveyid = $_POST['newsurveyid']; |
|
|
|
|
$questiongroup = $_POST['question_group']; |
|
|
|
|
if (isset($questiongroup)) |
|
|
|
|
$questiongroup = $_POST['question_group']; |
|
|
|
|
if (isset($questiongroup)) |
|
|
|
|
{ |
|
|
|
|
$cidReq=$_REQUEST['cidReq']; |
|
|
|
|
$exiztinggroup = $_POST['exiztinggroup']; |
|
|
|
|
$curr_dbname = $_REQUEST['curr_dbname']; |
|
|
|
|
header("Location:existing_surveys_new.php?cidReq=$cidReq&surveyid=$surveyid&curr_dbname=$curr_dbname"); |
|
|
|
|
header("Location:existing_surveys_new.php?cidReq=$cidReq&surveyid=$surveyid"); |
|
|
|
|
exit; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//from question_added |
|
|
|
|
if (isset($_POST['back'])) |
|
|
|
|
{ |
|
|
|
|
$groupid = $_POST['groupid']; |
|
|
|
|
$surveyid = $_POST['surveyid']; |
|
|
|
|
$cidReq=$_REQUEST['cidReq']; |
|
|
|
|
$curr_dbname = $_REQUEST['curr_dbname']; |
|
|
|
|
$page = $_REQUEST['page']; |
|
|
|
|
header("Location:create_new_survey.php?surveyid=$surveyid&cidReq=$cidReq&curr_dbname=$curr_dbname&page=$page"); |
|
|
|
|
header("Location:create_new_survey.php?surveyid=$surveyid&cidReq=$cidReq&page=$page"); |
|
|
|
|
//header("Location:select_question_type.php?groupid=$groupid&surveyid=$surveyid&cidReq=$cidReq"); |
|
|
|
|
exit; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (isset($_POST['addanother'])) |
|
|
|
|
{ |
|
|
|
|
$groupid = $_POST['groupid']; |
|
|
|
|
$surveyid = $_POST['surveyid']; |
|
|
|
|
$cidReq=$_REQUEST['cidReq']; |
|
|
|
|
$curr_dbname = $_REQUEST['curr_dbname']; |
|
|
|
|
header("Location:addanother.php?surveyid=$surveyid&cidReq=$cidReq&curr_dbname=$curr_dbname"); |
|
|
|
|
header("Location:addanother.php?surveyid=$surveyid&cidReq=$cidReq"); |
|
|
|
|
//header("Location:select_question_type.php?groupid=$groupid&surveyid=$surveyid&cidReq=$cidReq"); |
|
|
|
|
exit; |
|
|
|
|
} |
|
|
|
@ -206,13 +202,11 @@ if (isset($_POST['addanotherg'])) |
|
|
|
|
//$groupid = $_POST['groupid']; |
|
|
|
|
$surveyid = $_POST['surveyid']; |
|
|
|
|
$cidReq=$_REQUEST['cidReq']; |
|
|
|
|
$curr_dbname = $_REQUEST['curr_dbname']; |
|
|
|
|
header("Location:create_new_group.php?surveyid=$surveyid&cidReq=$cidReq&curr_dbname=$curr_dbname"); |
|
|
|
|
header("Location:create_new_group.php?surveyid=$surveyid&cidReq=$cidReq"); |
|
|
|
|
exit; |
|
|
|
|
} |
|
|
|
|
if(isset($_REQUEST['delete'])) |
|
|
|
|
{ |
|
|
|
|
$curr_dbname = $_REQUEST['curr_dbname']; |
|
|
|
|
if(isset($_REQUEST['qid'])) |
|
|
|
|
{ |
|
|
|
|
$endloop=count($_REQUEST['qid']); |
|
|
|
@ -220,13 +214,14 @@ if(isset($_REQUEST['delete'])) |
|
|
|
|
for($i=0;$i<$endloop;$i++) |
|
|
|
|
{ |
|
|
|
|
$qid2=$qid1[$i]; |
|
|
|
|
$query="DELETE FROM $curr_dbname.questions WHERE qid='$qid2'"; |
|
|
|
|
$query="DELETE FROM $table_question WHERE qid='$qid2'"; |
|
|
|
|
api_sql_query($query); |
|
|
|
|
header("Location:select_question_group.php?surveyid=$surveyid&cidReq=$cidReq&curr_dbname=$curr_dbname"); |
|
|
|
|
header("Location:select_question_group.php?surveyid=$surveyid&cidReq=$cidReq"); |
|
|
|
|
exit; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (isset($_POST['finish'])) |
|
|
|
|
{ |
|
|
|
|
$cidReq=$_REQUEST['cidReq']; |
|
|
|
@ -236,54 +231,52 @@ if (isset($_POST['finish'])) |
|
|
|
|
|
|
|
|
|
if(isset($action1)) |
|
|
|
|
{ |
|
|
|
|
$curr_dbname = $_REQUEST['curr_dbname']; |
|
|
|
|
$groupid = $_REQUEST['gid']; |
|
|
|
|
$surveyid = $_REQUEST['surveyid']; |
|
|
|
|
$qid = $_GET['qid']; |
|
|
|
|
$pre_qid = $_GET['pre_qid']; |
|
|
|
|
$post_qid = $_GET['post_qid']; |
|
|
|
|
$direction = $_GET['direction']; |
|
|
|
|
$pre_sort = $_GET['pre_sort']; |
|
|
|
|
$sort = $_GET['sortby']; |
|
|
|
|
$post_sort = $_GET['post_sort']; |
|
|
|
|
if($direction=="up") |
|
|
|
|
{ |
|
|
|
|
$sql_update2="UPDATE $curr_dbname.questions SET sortby='".$sort."' WHERE qid='".$pre_qid."'"; |
|
|
|
|
mysql_query($sql_update2); |
|
|
|
|
$sql_update1="UPDATE $curr_dbname.questions SET sortby='".$pre_sort."' WHERE qid='".$qid."'"; |
|
|
|
|
$groupid = $_REQUEST['gid']; |
|
|
|
|
$surveyid = $_REQUEST['surveyid']; |
|
|
|
|
$qid = $_GET['qid']; |
|
|
|
|
$pre_qid = $_GET['pre_qid']; |
|
|
|
|
$post_qid = $_GET['post_qid']; |
|
|
|
|
$direction = $_GET['direction']; |
|
|
|
|
$pre_sort = $_GET['pre_sort']; |
|
|
|
|
$sort = $_GET['sortby']; |
|
|
|
|
$post_sort = $_GET['post_sort']; |
|
|
|
|
if($direction=="up") |
|
|
|
|
{ |
|
|
|
|
$sql_update2="UPDATE $table_question SET sortby='".$sort."' WHERE qid='".$pre_qid."'"; |
|
|
|
|
mysql_query($sql_update2); |
|
|
|
|
$sql_update1="UPDATE $table_question SET sortby='".$pre_sort."' WHERE qid='".$qid."'"; |
|
|
|
|
mysql_query($sql_update1); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
$sql_update1="UPDATE $table_question SET sortby='".$sort."' WHERE qid='".$post_qid."'"; |
|
|
|
|
mysql_query($sql_update1); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
$sql_update1="UPDATE $curr_dbname.questions SET sortby='".$sort."' WHERE qid='".$post_qid."'"; |
|
|
|
|
mysql_query($sql_update1); |
|
|
|
|
$sql_update2="UPDATE $curr_dbname.questions SET sortby='".$post_sort."' WHERE qid='".$qid."'"; |
|
|
|
|
mysql_query($sql_update2); |
|
|
|
|
$sql_update2="UPDATE $table_question SET sortby='".$post_sort."' WHERE qid='".$qid."'"; |
|
|
|
|
mysql_query($sql_update2); |
|
|
|
|
} |
|
|
|
|
//surveymanager::move_question($direction,$qid,$pre_sort,$sort,$post_sort,$curr_dbname); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//surveymanager::move_question($direction,$qid,$pre_sort,$sort,$post_sort,$curr_dbname); |
|
|
|
|
} |
|
|
|
|
Display::display_header($tool_name1); |
|
|
|
|
api_display_tool_title("Survey Name : ".$sname); |
|
|
|
|
api_display_tool_title($tool_name); |
|
|
|
|
if($flag==1) |
|
|
|
|
{ |
|
|
|
|
?> |
|
|
|
|
<div align="center"><strong><font color="#FF0000"><?echo get_lang('AlreadyImported');?></font></strong></div>
|
|
|
|
|
<? |
|
|
|
|
?> |
|
|
|
|
<div align="center"><strong><font color="#FF0000"><?php echo get_lang('AlreadyImported');?></font></strong></div>
|
|
|
|
|
<?php |
|
|
|
|
} |
|
|
|
|
if(isset($messege) && $messege ) |
|
|
|
|
{ |
|
|
|
|
?> |
|
|
|
|
<div align="center"><strong><font color="#FF0000">Already Imported !</font></strong></div> |
|
|
|
|
<? |
|
|
|
|
?> |
|
|
|
|
<div align="center"><strong><font color="#FF0000"><?php echo get_lang('AlreadyImported');?></font></strong></div>
|
|
|
|
|
<?php |
|
|
|
|
} |
|
|
|
|
?> |
|
|
|
|
|
|
|
|
|
<form method="post" action="<?php echo $_SERVER['PHP_SELF'];?>?cidReq=<?php echo $cidReq; ?>">
|
|
|
|
|
<input type="hidden" name="action" value="selectquestion_group"> |
|
|
|
|
<input type="hidden" name="newsurveyid" value="<?php echo $surveyid;?>">
|
|
|
|
|
<input type="hidden" name="curr_dbname" value="<?php echo $curr_dbname; ?>">
|
|
|
|
|
<input type="hidden" name="cidReq" value="<?php echo $_REQUEST['cidReq']; ?>">
|
|
|
|
|
<!--<input type="hidden" name="qid" value="<?php echo $_REQUEST['qid']; ?>">
|
|
|
|
|
<input type="hidden" name="direction" value="<?php echo $_REQUEST['direction']; ?>">-->
|
|
|
|
@ -306,12 +299,9 @@ if(isset($messege) && $messege ) |
|
|
|
|
</table> |
|
|
|
|
</form> |
|
|
|
|
<?php |
|
|
|
|
/*$query="SELECT * FROM $curr_dbname.survey WHERE survey_id='$surveyid'"; |
|
|
|
|
$result=api_sql_query($query);*/ |
|
|
|
|
$sql="SELECT * FROM $curr_dbname.survey_group WHERE survey_id='$surveyid' ORDER BY sortby"; |
|
|
|
|
$sql="SELECT * FROM $table_survey_group WHERE survey_id='$surveyid' ORDER BY sortby"; |
|
|
|
|
$res = api_sql_query($sql,__FILE__,__LINE__); |
|
|
|
|
$num=mysql_num_rows($res); |
|
|
|
|
$parameters['curr_dbname']=$curr_dbname; |
|
|
|
|
$parameters['surveyid']=$surveyid; |
|
|
|
|
$parameters['cidReq']=$cidReq; |
|
|
|
|
//$table_header[] = array (' ', false); |
|
|
|
@ -324,13 +314,13 @@ $result=api_sql_query($query);*/ |
|
|
|
|
$table_header[]=array('',true); |
|
|
|
|
$courses = array (); |
|
|
|
|
$question_number = 0; |
|
|
|
|
if($num){ |
|
|
|
|
|
|
|
|
|
if($num) |
|
|
|
|
{ |
|
|
|
|
for($i=0;$i<$num;$i++) |
|
|
|
|
{ |
|
|
|
|
$groupid=@mysql_result($res,$i,'group_id'); |
|
|
|
|
$gname=@mysql_result($res,$i,'groupname'); |
|
|
|
|
$sql="SELECT * FROM $curr_dbname.questions WHERE gid='$groupid' AND survey_id = '$surveyid' order by `sortby` asc"; |
|
|
|
|
$sql="SELECT * FROM $table_question WHERE gid='$groupid' AND survey_id = '$surveyid' order by `sortby` asc"; |
|
|
|
|
|
|
|
|
|
$res1=api_sql_query($sql,__FILE__,__LINE__); |
|
|
|
|
$num1=mysql_num_rows($res1); |
|
|
|
@ -358,19 +348,19 @@ $result=api_sql_query($query);*/ |
|
|
|
|
$course[] = $question_number.' - '.$question; |
|
|
|
|
if($num1==1) |
|
|
|
|
{ |
|
|
|
|
$course[] = '<a href='.$_SERVER['PHP_SELF'].'?gid='.$groupid.'&pre_sort='.$pre_sort.'&sortby='.$sort.'&post_sort='.$post_sort.'&surveyid='.$surveyid.'&pre_qid='.$pre_qid.'&qid='.$qid.'&post_qid='.$post_qid.'&curr_dbname='.$curr_dbname.'&cidReq='.$cidReq.'&page_nr='.$page_nr.'&per_page='.$per_page.'&column='.$column.'&action1=moveitem&direction=down></a> '.'<a href='.$_SERVER['PHP_SELF'].'?gid='.$groupid.'&pre_sort='.$pre_sort.'&sortby='.$sort.'&post_sort='.$post_sort.'&surveyid='.$surveyid.'&pre_qid='.$pre_qid.'&qid='.$qid.'&post_qid='.$post_qid.'&curr_dbname='.$curr_dbname.'&cidReq='.$cidReq.'&page_nr='.$page_nr.'&per_page='.$per_page.'&column='.$column.'&action1=moveitem&direction=up></a>'; |
|
|
|
|
$course[] = '<a href='.$_SERVER['PHP_SELF'].'?gid='.$groupid.'&pre_sort='.$pre_sort.'&sortby='.$sort.'&post_sort='.$post_sort.'&surveyid='.$surveyid.'&pre_qid='.$pre_qid.'&qid='.$qid.'&post_qid='.$post_qid.'&cidReq='.$cidReq.'&page_nr='.$page_nr.'&per_page='.$per_page.'&column='.$column.'&action1=moveitem&direction=down></a> '.'<a href='.$_SERVER['PHP_SELF'].'?gid='.$groupid.'&pre_sort='.$pre_sort.'&sortby='.$sort.'&post_sort='.$post_sort.'&surveyid='.$surveyid.'&pre_qid='.$pre_qid.'&qid='.$qid.'&post_qid='.$post_qid.'&cidReq='.$cidReq.'&page_nr='.$page_nr.'&per_page='.$per_page.'&column='.$column.'&action1=moveitem&direction=up></a>'; |
|
|
|
|
} |
|
|
|
|
elseif($k==0){ |
|
|
|
|
$course[] = '<a href='.$_SERVER['PHP_SELF'].'?gid='.$groupid.'&pre_sort='.$pre_sort.'&sortby='.$sort.'&post_sort='.$post_sort.'&surveyid='.$surveyid.'&pre_qid='.$pre_qid.'&qid='.$qid.'&post_qid='.$post_qid.'&curr_dbname='.$curr_dbname.'&cidReq='.$cidReq.'&page_nr='.$page_nr.'&per_page='.$per_page.'&column='.$column.'&action1=moveitem&direction=down><img src="../img/down.gif" border="0" title="lang_move_down"></a> '.'<a href='.$_SERVER['PHP_SELF'].'?gid='.$groupid.'&pre_sort='.$pre_sort.'&sortby='.$sort.'&post_sort='.$post_sort.'&surveyid='.$surveyid.'&pre_qid='.$pre_qid.'&qid='.$qid.'&post_qid='.$post_qid.'&curr_dbname='.$curr_dbname.'&cidReq='.$cidReq.'&page_nr='.$page_nr.'&per_page='.$per_page.'&column='.$column.'&action1=moveitem&direction=up></a>'; |
|
|
|
|
$course[] = '<a href='.$_SERVER['PHP_SELF'].'?gid='.$groupid.'&pre_sort='.$pre_sort.'&sortby='.$sort.'&post_sort='.$post_sort.'&surveyid='.$surveyid.'&pre_qid='.$pre_qid.'&qid='.$qid.'&post_qid='.$post_qid.'&cidReq='.$cidReq.'&page_nr='.$page_nr.'&per_page='.$per_page.'&column='.$column.'&action1=moveitem&direction=down><img src="../img/down.gif" border="0" title="lang_move_down"></a> '.'<a href='.$_SERVER['PHP_SELF'].'?gid='.$groupid.'&pre_sort='.$pre_sort.'&sortby='.$sort.'&post_sort='.$post_sort.'&surveyid='.$surveyid.'&pre_qid='.$pre_qid.'&qid='.$qid.'&post_qid='.$post_qid.'&cidReq='.$cidReq.'&page_nr='.$page_nr.'&per_page='.$per_page.'&column='.$column.'&action1=moveitem&direction=up></a>'; |
|
|
|
|
}elseif($k==$num1-1){ |
|
|
|
|
$course[] = '<a href='.$_SERVER['PHP_SELF'].'?gid='.$groupid.'&pre_sort='.$pre_sort.'&sortby='.$sort.'&post_sort='.$post_sort.'&surveyid='.$surveyid.'&pre_qid='.$pre_qid.'&qid='.$qid.'&post_qid='.$post_qid.'&curr_dbname='.$curr_dbname.'&cidReq='.$cidReq.'&page_nr='.$page_nr.'&per_page='.$per_page.'&column='.$column.'&action1=moveitem&direction=down></a> '.'<a href='.$_SERVER['PHP_SELF'].'?gid='.$groupid.'&pre_sort='.$pre_sort.'&sortby='.$sort.'&post_sort='.$post_sort.'&surveyid='.$surveyid.'&pre_qid='.$pre_qid.'&qid='.$qid.'&post_qid='.$post_qid.'&curr_dbname='.$curr_dbname.'&cidReq='.$cidReq.'&page_nr='.$page_nr.'&per_page='.$per_page.'&column='.$column.'&action1=moveitem&direction=up><img src="../img/up.gif" border="0" title="lang_move_up"></a>'; |
|
|
|
|
$course[] = '<a href='.$_SERVER['PHP_SELF'].'?gid='.$groupid.'&pre_sort='.$pre_sort.'&sortby='.$sort.'&post_sort='.$post_sort.'&surveyid='.$surveyid.'&pre_qid='.$pre_qid.'&qid='.$qid.'&post_qid='.$post_qid.'&cidReq='.$cidReq.'&page_nr='.$page_nr.'&per_page='.$per_page.'&column='.$column.'&action1=moveitem&direction=down></a> '.'<a href='.$_SERVER['PHP_SELF'].'?gid='.$groupid.'&pre_sort='.$pre_sort.'&sortby='.$sort.'&post_sort='.$post_sort.'&surveyid='.$surveyid.'&pre_qid='.$pre_qid.'&qid='.$qid.'&post_qid='.$post_qid.'&cidReq='.$cidReq.'&page_nr='.$page_nr.'&per_page='.$per_page.'&column='.$column.'&action1=moveitem&direction=up><img src="../img/up.gif" border="0" title="lang_move_up"></a>'; |
|
|
|
|
} |
|
|
|
|
else{ |
|
|
|
|
$course[] = '<a href='.$_SERVER['PHP_SELF'].'?gid='.$groupid.'&pre_sort='.$pre_sort.'&sortby='.$sort.'&post_sort='.$post_sort.'&surveyid='.$surveyid.'&pre_qid='.$pre_qid.'&qid='.$qid.'&post_qid='.$post_qid.'&curr_dbname='.$curr_dbname.'&cidReq='.$cidReq.'&page_nr='.$page_nr.'&per_page='.$per_page.'&column='.$column.'&action1=moveitem&direction=down><img src="../img/down.gif" border="0" title="lang_move_down"></a> '.'<a href='.$_SERVER['PHP_SELF'].'?gid='.$groupid.'&pre_sort='.$pre_sort.'&sortby='.$sort.'&post_sort='.$post_sort.'&surveyid='.$surveyid.'&pre_qid='.$pre_qid.'&qid='.$qid.'&post_qid='.$post_qid.'&curr_dbname='.$curr_dbname.'&cidReq='.$cidReq.'&page_nr='.$page_nr.'&per_page='.$per_page.'&column='.$column.'&action1=moveitem&direction=up><img src="../img/up.gif" border="0" title="lang_move_up"></a>'; |
|
|
|
|
$course[] = '<a href='.$_SERVER['PHP_SELF'].'?gid='.$groupid.'&pre_sort='.$pre_sort.'&sortby='.$sort.'&post_sort='.$post_sort.'&surveyid='.$surveyid.'&pre_qid='.$pre_qid.'&qid='.$qid.'&post_qid='.$post_qid.'&cidReq='.$cidReq.'&page_nr='.$page_nr.'&per_page='.$per_page.'&column='.$column.'&action1=moveitem&direction=down><img src="../img/down.gif" border="0" title="lang_move_down"></a> '.'<a href='.$_SERVER['PHP_SELF'].'?gid='.$groupid.'&pre_sort='.$pre_sort.'&sortby='.$sort.'&post_sort='.$post_sort.'&surveyid='.$surveyid.'&pre_qid='.$pre_qid.'&qid='.$qid.'&post_qid='.$post_qid.'&cidReq='.$cidReq.'&page_nr='.$page_nr.'&per_page='.$per_page.'&column='.$column.'&action1=moveitem&direction=up><img src="../img/up.gif" border="0" title="lang_move_up"></a>'; |
|
|
|
|
} |
|
|
|
|
$course[] = mysql_result($res1,$k,'qtype');//$obj->qtype; |
|
|
|
|
$course[] = @mysql_result($res,$i,'groupname'); |
|
|
|
|
$course[]='<a href="question_edit.php?qid='.$qid.'&cidReq='.$cidReq.'&curr_dbname='.$curr_dbname.'&qtype='.$q_type.'&groupid='.$groupid.'&surveyid='.$surveyid.'"><img src="../img/edit.gif" border="0" align="absmiddle" alt="'.get_lang('Edit').'"/></a>'.'<a href="select_question_group.php?delete=1&qid[]='.$qid.'&cidReq='.$cidReq.'&curr_dbname='.$curr_dbname.'&qtype='.$q_type.'&groupid='.$groupid.'&surveyid='.$surveyid.'" onclick="javascript:if(!confirm('."'".addslashes(htmlentities(get_lang('ConfirmYourChoice')))."'".')) return false;"><img src="../img/delete.gif" border="0" align="absmiddle" alt="'.get_lang('Delete').'"/></a>'; |
|
|
|
|
$course[]='<a href="question_edit.php?qid='.$qid.'&cidReq='.$cidReq.'&qtype='.$q_type.'&groupid='.$groupid.'&surveyid='.$surveyid.'"><img src="../img/edit.gif" border="0" align="absmiddle" alt="'.get_lang('Edit').'"/></a>'.'<a href="select_question_group.php?delete=1&qid[]='.$qid.'&cidReq='.$cidReq.'&qtype='.$q_type.'&groupid='.$groupid.'&surveyid='.$surveyid.'" onclick="javascript:if(!confirm('."'".addslashes(htmlentities(get_lang('ConfirmYourChoice')))."'".')) return false;"><img src="../img/delete.gif" border="0" align="absmiddle" alt="'.get_lang('Delete').'"/></a>'; |
|
|
|
|
|
|
|
|
|
$courses[] = $course; |
|
|
|
|
$x++; |
|
|
|
@ -381,13 +371,13 @@ $result=api_sql_query($query);*/ |
|
|
|
|
<form method="post" action="<?php echo $_SERVER['PHP_SELF'];?>?cidReq=<?php echo $cidReq; ?>">
|
|
|
|
|
<input type="hidden" name="groupid" value="<?php echo $groupid; ?>">
|
|
|
|
|
<input type="hidden" name="surveyid" value="<?php echo $surveyid; ?>">
|
|
|
|
|
<input type="hidden" name="curr_dbname" value="<?php echo $curr_dbname;?>">
|
|
|
|
|
<input type="hidden" name="page" value="<?php echo $page; ?>">
|
|
|
|
|
<? |
|
|
|
|
if(!empty($courses)) |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
SurveyManager :: display_sortable_table($groupid,$surveyid,$curr_dbname,$table_header, $courses, array (), array (), $parameters); |
|
|
|
|
/** @todo remove $curr_dbname from the parameters. This is not used. */ |
|
|
|
|
SurveyManager :: display_sortable_table($groupid,$surveyid,$curr_dbname,$table_header, $courses, array (), array (), $parameters); |
|
|
|
|
|
|
|
|
|
?> |
|
|
|
|
<!--<input type="submit" name="delete" value="<?php echo get_lang('Delete');?>">-->
|
|
|
|
@ -400,19 +390,13 @@ if(!empty($courses)) |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
?> |
|
|
|
|
<input type="submit" name="back" value="<?echo get_lang('Back');?>">
|
|
|
|
|
<input type="submit" name="addanother" value="<?echo get_lang('AddAnotherQuestion');?>">
|
|
|
|
|
<input type="submit" name="addanotherg" value="<?echo get_lang('AddNewGroup');?>">
|
|
|
|
|
<input type="submit" name="back" value="<?php echo get_lang('Back');?>">
|
|
|
|
|
<input type="submit" name="addanother" value="<?php echo get_lang('AddAnotherQuestion');?>">
|
|
|
|
|
<input type="submit" name="addanotherg" value="<?php echo get_lang('AddNewGroup');?>">
|
|
|
|
|
<? |
|
|
|
|
} |
|
|
|
|
?> |
|
|
|
|
</form> |
|
|
|
|
<!-- question_added--> |
|
|
|
|
<?php |
|
|
|
|
/* |
|
|
|
|
============================================================================== |
|
|
|
|
FOOTER |
|
|
|
|
============================================================================== |
|
|
|
|
*/ |
|
|
|
|
Display :: display_footer(); |
|
|
|
|
?> |