[svn r10705]

skala
Patrick Cool 19 years ago
parent f26f412b12
commit a97300e18e
  1. 67
      main/survey/attach_existingsurvey.php
  2. 75
      main/survey/attach_question.php
  3. 69
      main/survey/attach_survey.php
  4. 34
      main/survey/choose_language.php
  5. 4
      main/survey/complete_report.php
  6. 83
      main/survey/create_new_group.php
  7. 45
      main/survey/group_edit.php
  8. 202
      main/survey/mcma.php
  9. 177
      main/survey/mcma_edit.php
  10. 4
      main/survey/mcma_view.php
  11. 190
      main/survey/mcsa.php
  12. 163
      main/survey/mcsa_edit.php
  13. 195
      main/survey/numbered.php
  14. 164
      main/survey/numbered_edit.php
  15. 4
      main/survey/numbered_view.php
  16. 83
      main/survey/open.php
  17. 70
      main/survey/open_edit.php
  18. 4
      main/survey/open_view.php
  19. 4
      main/survey/question.php
  20. 4
      main/survey/question_list.php
  21. 11
      main/survey/question_list_new.php
  22. 78
      main/survey/select_question_group-uploaded.php
  23. 78
      main/survey/select_question_group.php
  24. 6
      main/survey/survey_blank.php
  25. 55
      main/survey/survey_edit.php
  26. 16
      main/survey/survey_report.php
  27. 8
      main/survey/survey_white.php
  28. 10
      main/survey/surveytemp_white.php
  29. 76
      main/survey/template1.php
  30. BIN
      main/survey/template1_files/bluetarget.gif
  31. 552
      main/survey/template1_files/chumpsoft.htm
  32. BIN
      main/survey/template1_files/invdot.gif
  33. 158
      main/survey/yesno.php
  34. 160
      main/survey/yesno_edit.php

@ -3,14 +3,14 @@
DOKEOS - elearning and course management software
For a full list of contributors, see documentation/credits.html
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
See "documentation/licence.html" more details.
Contact:
Contact:
Dokeos
Rue des Palais 44 Paleizenstraat
B-1030 Brussels - Belgium
@ -19,8 +19,8 @@
/**
* @package dokeos.survey
* @author
* @version $Id: attach_existingsurvey.php 10680 2007-01-11 21:26:23Z pcool $
* @author
* @version $Id: attach_existingsurvey.php 10705 2007-01-12 22:40:01Z pcool $
*/
/*
@ -28,7 +28,7 @@
INIT SECTION
==============================================================================
*/
// name of the language file that needs to be included
// name of the language file that needs to be included
$language_file = 'survey';
// including the global dokeos file
@ -71,16 +71,17 @@ $table_group = Database :: get_course_table(TABLE_SURVEY_GROUP);
$table_survey_question = Database :: get_course_table(TABLE_SURVEY_QUESTION);
$table_course = Database :: get_main_table(TABLE_MAIN_COURSE);
$table_course_survey_rel = Database :: get_main_table(TABLE_MAIN_COURSE_SURVEY);
$table_languages = Database::get_main_table(TABLE_MAIN_LANGUAGE);
// Language variables
$MonthsLong = array(get_lang('JanuaryLong'), get_lang('FebruaryLong'), get_lang('"MarchLong'), get_lang('AprilLong'), get_lang('MayLong'), get_lang('JuneLong'), get_lang('JulyLong'), get_lang('AugustLong'), get_lang('SeptemberLong'), get_lang('OctoberLong'), get_lang('NovemberLong'), get_lang('DecemberLong'));
$MonthsLong = array(get_lang('JanuaryLong'), get_lang('FebruaryLong'), get_lang('"MarchLong'), get_lang('AprilLong'), get_lang('MayLong'), get_lang('JuneLong'), get_lang('JulyLong'), get_lang('AugustLong'), get_lang('SeptemberLong'), get_lang('OctoberLong'), get_lang('NovemberLong'), get_lang('DecemberLong'));
$tool_name = get_lang('CreateNewSurvey');
$tool_name1 = get_lang('CreateNewSurvey');
// Breadcrumbs
$interbreadcrumb[] = array ("url" => "survey_list.php", "name" => get_lang('Survey'));
// Variables
// Variables
$arr_date = explode("-",date("Y-m-d"));
$curr_year = $arr_date[0];
$curr_month = $arr_date[1];
@ -112,7 +113,7 @@ if ($_POST['action'] == 'add_survey')
$surveytemplate = $_POST['template'];
$surveyintroduction = $_POST['content'];
$surveythanks = $_POST['thanks'];
$savailablefrom=mktime(0,0,0,$_POST['fmonth'],$_POST['fday'], $_POST['fyear']);
$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']);
$db_name = $_REQUEST['db_name'];
$surveyid = $_REQUEST['surveyid'];
@ -126,7 +127,7 @@ if ($_POST['action'] == 'add_survey')
$surveycode=trim($surveycode);
if(empty ($surveytitle))
{
$error_message = get_lang('PleaseEnterSurveyTitle');
$error_message = get_lang('PleaseEnterSurveyTitle');
}
elseif ($savailabletill<=$savailablefrom){
$error_message = get_lang('PleaseEnterValidDate');
@ -137,7 +138,7 @@ if ($_POST['action'] == 'add_survey')
else
{
$result=SurveyManager::get_survey_code($table_survey,$surveycode);
if(!empty($result))
{
$error_message=get_lang('ThisCodeAlreadyExist');
@ -160,7 +161,7 @@ if ($_POST['action'] == 'add_survey')
exit;
}
}
}
}
}
Display::display_header($tool_name);
api_display_tool_title($tool_name1);
@ -169,7 +170,7 @@ api_display_tool_title($tool_name1);
//echo "</pre>";
if( isset($error_message) )
{
Display::display_error_message($error_message);
Display::display_error_message($error_message);
}
?>
<SCRIPT LANGUAGE="JavaScript">
@ -213,13 +214,13 @@ window.open(inf+".htm", 'popup', 'width=600,height=600,toolbar = no, status = no
if($_SESSION['is_platformAdmin']=='1'||$_SESSION['is_courseAdmin'])
{
echo "<td>";
echo get_lang('Author');
echo get_lang('Author');
echo "</td>";
echo "<td>";
echo "<td>";
UserManager::get_teacher_list($course_id, $author_id);
echo "</td>";
}
?>
}
?>
</tr>
<tr>
<td><?php echo get_lang('SurveyLanguage'); ?>&nbsp;</td>
@ -233,9 +234,9 @@ window.open(inf+".htm", 'popup', 'width=600,height=600,toolbar = no, status = no
</tr>
<tr id="subtitle">
<td><?php echo get_lang('AvailableFrom'); ?>&nbsp;</td>
<td>
<td>
<select name="fday">
<?php
<?php
for($i=1;$i<=31;$i++){
if($i<=9) $val = "0".$i;
else $val = $i;
@ -248,7 +249,7 @@ window.open(inf+".htm", 'popup', 'width=600,height=600,toolbar = no, status = no
<!-- month: january ->
december -->
<select name="fmonth">
<?php
<?php
for($i=1;$i<count($MonthsLong);$i++)
{
if($i<=9)
@ -263,7 +264,7 @@ december -->
?>
</select>
<select name="fyear">
<?php
<?php
for($i=$curr_year;$i<=$curr_year+10;$i++){
if($i == $curr_year)
echo "<option value=\"$i\" selected>$i</option>\n";
@ -274,7 +275,7 @@ december -->
</select>
<a title="Calendar" href="javascript:openCalendar('new_calendar_item', 'f')"><img src="../img/calendar_select.gif" border="0" align="absmiddle"/></a></td>
</tr>
<tr id="subtitle">
<td><?php echo get_lang('AvailableTill'); ?>&nbsp;</td>
<td>
@ -286,14 +287,14 @@ december -->
$val = $i;
if ($val==$curr_day) $selected = "selected";
else $selected = "";
echo "<option value=\"$val\" $selected>$i</option>";
echo "<option value=\"$val\" $selected>$i</option>";
}
?>
</select>
<!-- month: january ->
december -->
<select name="end_fmonth">
<?php
<?php
for($i=1;$i<count($MonthsLong);$i++)
{
if($i<=9)
@ -308,7 +309,7 @@ december -->
?>
</select>
<select name="end_fyear">
<?php
<?php
for($i=$curr_year;$i<=$curr_year+10;$i++){
if($i == $curr_year+1)
echo "<option value=\"$i\" selected>$i</option>\n";
@ -350,14 +351,13 @@ december -->
$oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js";
$oFCKeditor->ToolbarSet = "Survey";
$TBL_LANGUAGES = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql="SELECT isocode FROM ".$TBL_LANGUAGES." WHERE english_name='".$_SESSION["_course"]["language"]."'";
$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;
?>
@ -375,15 +375,14 @@ december -->
$oFCKeditor->Value = $thanks;
$oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js";
$oFCKeditor->ToolbarSet = "Survey";
$TBL_LANGUAGES = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql="SELECT isocode FROM ".$TBL_LANGUAGES." WHERE english_name='".$_SESSION["_course"]["language"]."'";
$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;
?>
<br>

@ -3,14 +3,14 @@
DOKEOS - elearning and course management software
For a full list of contributors, see documentation/credits.html
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
See "documentation/licence.html" more details.
Contact:
Contact:
Dokeos
Rue des Palais 44 Paleizenstraat
B-1030 Brussels - Belgium
@ -19,8 +19,8 @@
/**
* @package dokeos.survey
* @author
* @version $Id: attach_question.php 10680 2007-01-11 21:26:23Z pcool $
* @author
* @version $Id: attach_question.php 10705 2007-01-12 22:40:01Z pcool $
*/
/*
@ -28,7 +28,7 @@
INIT SECTION
==============================================================================
*/
// name of the language file that needs to be included
// name of the language file that needs to be included
$language_file = 'survey';
// including the global dokeos file
@ -71,9 +71,10 @@ $table_group = Database :: get_course_table(TABLE_SURVEY_GROUP);
$table_survey_question = Database :: get_course_table(TABLE_SURVEY_QUESTION);
$table_course = Database :: get_main_table(TABLE_MAIN_COURSE);
$table_course_survey_rel = Database :: get_main_table(TABLE_MAIN_COURSE_SURVEY);
$table_languages = Database::get_main_table(TABLE_MAIN_LANGUAGE);
// Language variables
$MonthsLong = array(get_lang('JanuaryLong'), get_lang('FebruaryLong'), get_lang('"MarchLong'), get_lang('AprilLong'), get_lang('MayLong'), get_lang('JuneLong'), get_lang('JulyLong'), get_lang('AugustLong'), get_lang('SeptemberLong'), get_lang('OctoberLong'), get_lang('NovemberLong'), get_lang('DecemberLong'));
$MonthsLong = array(get_lang('JanuaryLong'), get_lang('FebruaryLong'), get_lang('"MarchLong'), get_lang('AprilLong'), get_lang('MayLong'), get_lang('JuneLong'), get_lang('JulyLong'), get_lang('AugustLong'), get_lang('SeptemberLong'), get_lang('OctoberLong'), get_lang('NovemberLong'), get_lang('DecemberLong'));
$tool_name = get_lang('CreateNewSurvey');
$tool_name1 = get_lang('CreateNewSurvey');
@ -110,22 +111,22 @@ if ($_POST['action'] == 'add_survey')
$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']);
$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']);
$qids=$_REQUEST['qids'];
$surveyid = $_REQUEST['surveyid'];
if(isset($_POST['back']))
{
$surveyid = $_REQUEST['surveyid'];
header("location:create_from_existing_survey.php?surveyid=$surveyid");
}
$surveytitle=trim($surveytitle);
$surveycode=trim($surveycode);
if(empty ($surveytitle))
{
$error_message = get_lang('PleaseEnterSurveyTitle');
$error_message = get_lang('PleaseEnterSurveyTitle');
}
elseif ($savailabletill<=$savailablefrom){
$error_message = get_lang('PleaseEnterValidDate');
@ -135,7 +136,7 @@ if ($_POST['action'] == 'add_survey')
}
else
{
$result=SurveyManager::get_survey_code($table_survey,$surveycode);
$result=SurveyManager::get_survey_code($table_survey,$surveycode);
if(!empty($result))
{
$error_message=get_lang('ThisCodeAlreadyExist');
@ -154,7 +155,7 @@ if ($_POST['action'] == 'add_survey')
exit;
}
else
{
{
header("location:select_question_group.php?surveyid=$survey_id&message=$message_me");
exit;
}
@ -165,7 +166,7 @@ if ($_POST['action'] == 'add_survey')
exit;
}
}
}
}
}
Display::display_header($tool_name);
api_display_tool_title($tool_name1);
@ -174,7 +175,7 @@ api_display_tool_title($tool_name1);
//echo "</pre>";
if( isset($error_message) )
{
Display::display_error_message($error_message);
Display::display_error_message($error_message);
}
?>
<SCRIPT LANGUAGE="JavaScript">
@ -220,13 +221,13 @@ window.open(inf+".htm", 'popup', 'width=900,height=800,toolbar = no, status = no
if($_SESSION['is_platformAdmin']=='1'||$_SESSION['is_courseAdmin'])
{
echo "<td>";
echo get_lang('Author');
echo get_lang('Author');
echo "</td>";
echo "<td>";
echo "<td>";
UserManager::get_teacher_list($course_id, $author_id);
echo "</td>";
}
?>
}
?>
</tr>
<tr>
<td><?php echo get_lang('SurveyLanguage'); ?>&nbsp;</td>
@ -240,9 +241,9 @@ window.open(inf+".htm", 'popup', 'width=900,height=800,toolbar = no, status = no
</tr>
<tr id="subtitle">
<td><?php echo get_lang('AvailableFrom'); ?>&nbsp;</td>
<td>
<td>
<select name="fday">
<?php
<?php
for($i=1;$i<=31;$i++){
if($i<=9) $val = "0".$i;
else $val = $i;
@ -255,7 +256,7 @@ window.open(inf+".htm", 'popup', 'width=900,height=800,toolbar = no, status = no
<!-- month: january ->
december -->
<select name="fmonth">
<?php
<?php
for($i=1;$i<count($MonthsLong);$i++)
{
if($i<=9)
@ -270,7 +271,7 @@ december -->
?>
</select>
<select name="fyear">
<?php
<?php
for($i=$curr_year;$i<=$curr_year+10;$i++){
if($i == $curr_year)
echo "<option value=\"$i\" selected>$i</option>\n";
@ -281,7 +282,7 @@ december -->
</select>
<a title="Calendar" href="javascript:openCalendar('new_calendar_item', 'f')"><img src="../img/calendar_select.gif" border="0" align="absmiddle"/></a></td>
</tr>
<tr id="subtitle">
<td><?php echo get_lang('AvailableTill'); ?>&nbsp;</td>
<td>
@ -293,14 +294,14 @@ december -->
$val = $i;
if ($val==$curr_day) $selected = "selected";
else $selected = "";
echo "<option value=\"$val\" $selected>$i</option>";
echo "<option value=\"$val\" $selected>$i</option>";
}
?>
</select>
<!-- month: january ->
december -->
<select name="end_fmonth">
<?php
<?php
for($i=1;$i<count($MonthsLong);$i++)
{
if($i<=9)
@ -315,7 +316,7 @@ december -->
?>
</select>
<select name="end_fyear">
<?php
<?php
for($i=$curr_year;$i<=$curr_year+10;$i++){
if($i == $curr_year+1)
echo "<option value=\"$i\" selected>$i</option>\n";
@ -356,15 +357,14 @@ december -->
$oFCKeditor->Value = $content;
$oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js";
$oFCKeditor->ToolbarSet = "Survey";
$TBL_LANGUAGES = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql="SELECT isocode FROM ".$TBL_LANGUAGES." WHERE english_name='".$_SESSION["_course"]["language"]."'";
$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;
?>
<br>
@ -381,15 +381,14 @@ december -->
$oFCKeditor->Value = $thanks;
$oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js";
$oFCKeditor->ToolbarSet = "Survey";
$TBL_LANGUAGES = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql="SELECT isocode FROM ".$TBL_LANGUAGES." WHERE english_name='".$_SESSION["_course"]["language"]."'";
$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;
?>
<br>

@ -3,14 +3,14 @@
DOKEOS - elearning and course management software
For a full list of contributors, see documentation/credits.html
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
See "documentation/licence.html" more details.
Contact:
Contact:
Dokeos
Rue des Palais 44 Paleizenstraat
B-1030 Brussels - Belgium
@ -19,8 +19,8 @@
/**
* @package dokeos.survey
* @author
* @version $Id: attach_survey.php 10680 2007-01-11 21:26:23Z pcool $
* @author
* @version $Id: attach_survey.php 10705 2007-01-12 22:40:01Z pcool $
*/
/*
@ -28,7 +28,7 @@
INIT SECTION
==============================================================================
*/
// name of the language file that needs to be included
// name of the language file that needs to be included
$language_file = 'survey';
// including the global dokeos file
@ -71,9 +71,10 @@ $table_survey_question = Database :: get_course_table(TABLE_SURVEY_QUESTION);
$table_user = Database :: get_main_table(TABLE_MAIN_USER);
$table_course = Database :: get_main_table(TABLE_MAIN_COURSE);
$table_course_survey_rel = Database :: get_main_table(TABLE_MAIN_COURSE_SURVEY);
$table_languages = Database::get_main_table(TABLE_MAIN_LANGUAGE);
// Language variables
$MonthsLong = array(get_lang('JanuaryLong'), get_lang('FebruaryLong'), get_lang('"MarchLong'), get_lang('AprilLong'), get_lang('MayLong'), get_lang('JuneLong'), get_lang('JulyLong'), get_lang('AugustLong'), get_lang('SeptemberLong'), get_lang('OctoberLong'), get_lang('NovemberLong'), get_lang('DecemberLong'));
$MonthsLong = array(get_lang('JanuaryLong'), get_lang('FebruaryLong'), get_lang('"MarchLong'), get_lang('AprilLong'), get_lang('MayLong'), get_lang('JuneLong'), get_lang('JulyLong'), get_lang('AugustLong'), get_lang('SeptemberLong'), get_lang('OctoberLong'), get_lang('NovemberLong'), get_lang('DecemberLong'));
$tool_name = get_lang('CreateNewSurvey');
$tool_name1 = get_lang('CreateNewSurvey');
@ -110,10 +111,10 @@ if ($_POST['action'] == 'add_survey')
$surveytemplate = $_POST['template'];
$surveyintroduction = $_POST['content'];
$surveythanks = $_POST['thanks'];
$savailablefrom=mktime(0,0,0,$_POST['fmonth'],$_POST['fday'], $_POST['fyear']);
$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']);
$gids = $_POST['gids'];
$surveyid = $_REQUEST['surveyid'];
$surveyid = $_REQUEST['surveyid'];
if(isset($_POST['back']))
{
$surveyid=$_REQUEST['surveyid'];
@ -123,7 +124,7 @@ if ($_POST['action'] == 'add_survey')
$surveycode=trim($surveycode);
if(empty ($surveytitle))
{
$error_message = get_lang('PleaseEnterSurveyTitle');
$error_message = get_lang('PleaseEnterSurveyTitle');
}
elseif ($savailabletill<=$savailablefrom){
$error_message = get_lang('PleaseEnterValidDate');
@ -134,7 +135,7 @@ if ($_POST['action'] == 'add_survey')
else
{
$result=SurveyManager::get_survey_code($table_survey,$surveycode);
if(!empty($result))
{
$error_message=get_lang('ThisCodeAlradyExists');
@ -163,7 +164,7 @@ if ($_POST['action'] == 'add_survey')
exit;
}
}
}
}
}
Display::display_header($tool_name);
api_display_tool_title($tool_name1);
@ -172,7 +173,7 @@ api_display_tool_title($tool_name1);
//echo "</pre>";
if( isset($error_message) )
{
Display::display_error_message($error_message);
Display::display_error_message($error_message);
}
?>
<SCRIPT LANGUAGE="JavaScript">
@ -216,13 +217,13 @@ window.open(inf+".htm", 'popup', 'width=900,height=800,toolbar = no, status = no
if($_SESSION['is_platformAdmin']=='1'||$_SESSION['is_courseAdmin'])
{
echo "<td>";
echo get_lang('Author');
echo get_lang('Author');
echo "</td>";
echo "<td>";
echo "<td>";
UserManager::get_teacher_list($course_id, $author_id);
echo "</td>";
}
?>
}
?>
</tr>
<tr>
<td><?php echo get_lang('SurveyLanguage'); ?>&nbsp;</td>
@ -236,9 +237,9 @@ window.open(inf+".htm", 'popup', 'width=900,height=800,toolbar = no, status = no
</tr>
<tr id="subtitle">
<td><?php echo get_lang('AvailableFrom'); ?>&nbsp;</td>
<td>
<td>
<select name="fday">
<?php
<?php
for($i=1;$i<=31;$i++){
if($i<=9) $val = "0".$i;
else $val = $i;
@ -251,7 +252,7 @@ window.open(inf+".htm", 'popup', 'width=900,height=800,toolbar = no, status = no
<!-- month: january ->
december -->
<select name="fmonth">
<?php
<?php
for($i=1;$i<count($MonthsLong);$i++)
{
if($i<=9)
@ -266,7 +267,7 @@ december -->
?>
</select>
<select name="fyear">
<?php
<?php
for($i=$curr_year;$i<=$curr_year+10;$i++){
if($i == $curr_year)
echo "<option value=\"$i\" selected>$i</option>\n";
@ -277,7 +278,7 @@ december -->
</select>
<a title="Calender" href="javascript:openCalendar('new_calendar_item', 'f')"><img src="../img/calendar_select.gif" border="0" align="absmiddle"/></a></td>
</tr>
<tr id="subtitle">
<td><?php echo get_lang('AvailableTill'); ?>&nbsp;</td>
<td>
@ -289,14 +290,14 @@ december -->
$val = $i;
if ($val==$curr_day) $selected = "selected";
else $selected = "";
echo "<option value=\"$val\" $selected>$i</option>";
echo "<option value=\"$val\" $selected>$i</option>";
}
?>
</select>
<!-- month: january ->
december -->
<select name="end_fmonth">
<?php
<?php
for($i=1;$i<count($MonthsLong);$i++)
{
if($i<=9)
@ -311,7 +312,7 @@ december -->
?>
</select>
<select name="end_fyear">
<?php
<?php
for($i=$curr_year;$i<=$curr_year+10;$i++){
if($i == $curr_year+1)
echo "<option value=\"$i\" selected>$i</option>\n";
@ -352,15 +353,14 @@ december -->
$oFCKeditor->Value = $content;
$oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js";
$oFCKeditor->ToolbarSet = "Survey";
$TBL_LANGUAGES = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql="SELECT isocode FROM ".$TBL_LANGUAGES." WHERE english_name='".$_SESSION["_course"]["language"]."'";
$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;
?>
<br>
@ -377,15 +377,14 @@ december -->
$oFCKeditor->Value = $thanks;
$oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js";
$oFCKeditor->ToolbarSet = "Survey";
$TBL_LANGUAGES = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql="SELECT isocode FROM ".$TBL_LANGUAGES." WHERE english_name='".$_SESSION["_course"]["language"]."'";
$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;
?>
<br>

@ -3,14 +3,14 @@
DOKEOS - elearning and course management software
For a full list of contributors, see documentation/credits.html
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
See "documentation/licence.html" more details.
Contact:
Contact:
Dokeos
Rue des Palais 44 Paleizenstraat
B-1030 Brussels - Belgium
@ -19,12 +19,12 @@
/**
* @package dokeos.survey
* @author
* @version $Id: choose_language.php 10578 2006-12-31 17:01:58Z pcool $
* @author
* @version $Id: choose_language.php 10705 2007-01-12 22:40:01Z pcool $
* @todo check if this file is used
*/
// name of the language file that needs to be included
// name of the language file that needs to be included
$language_file='survey';
// including the global dokeos file
@ -43,9 +43,7 @@ require_once (api_get_path(LIBRARY_PATH)."/usermanager.lib.php");
// Database table definitions
/** @todo use database constants for the survey tables */
// Path variables
/** @todo these variables are probably not used here */
$table_survey = Database :: get_course_table(TABLE_SURVEY);
// breadcrumbs
@ -69,17 +67,17 @@ $_SESSION["user_language_choice"]='english';
if(isset($_GET['next'])){
$lang = $_REQUEST['lang'];
$code_survey = $_REQUEST['code_survey'];
$sql = 'SELECT survey.survey_id
FROM '.$db_name.'.survey as survey
WHERE survey.code="'.addslashes($code_survey).'"
$sql = 'SELECT survey.survey_id
FROM '.$db_name.'.survey as survey
WHERE survey.code="'.addslashes($code_survey).'"
AND survey.lang="'.addslashes($lang).'"';
$rs = api_sql_query($sql, __FILE__, __LINE__);
$surveyid = mysql_result($rs,0,'survey_id');
header('Location:template1.php?'.$_SERVER['QUERY_STRING'].'&surveyid='.$surveyid);
}
@ -104,7 +102,7 @@ api_display_tool_title($surveyname);
api_display_tool_title($tool_name);
if($error_message)
{
Display::display_error_message($error_message);
Display::display_error_message($error_message);
}
?>
<link href="../css/survey_white.css" rel="stylesheet" type="text/css">
@ -127,10 +125,10 @@ if($error_message)
<input type="hidden" name="mail" value="<?php echo $mail;?>">
<input type="hidden" name="uid1" value="<?php echo $uid1;?>">
<input type="hidden" name="code_survey" value="<?php echo $code_survey;?>">
Select in which language you want to see this survey :
Select in which language you want to see this survey :
<select name="lang">
<?php
while($survey = mysql_fetch_object($res_sname)){
while($survey = mysql_fetch_object($res_sname)){
echo '<option value="'.$survey->lang.'">'.$survey->lang.'</option>';
}
?>

@ -20,7 +20,7 @@
/**
* @package dokeos.survey
* @author
* @version $Id: complete_report.php 10680 2007-01-11 21:26:23Z pcool $
* @version $Id: complete_report.php 10705 2007-01-12 22:40:01Z pcool $
*/
// name of the language file that needs to be included
@ -61,7 +61,7 @@ if (!api_is_allowed_to_edit())
// Database table definitions
/** @todo use database constants for the survey tables */
$tbl_user_survey = Database :: get_main_table(TABLE_MAIN_SURVEY_USER);
$tbl_questions = Database :: get_course_table(TABLE_SURVEY_QUESTION);
$table_survey_question = Database :: get_course_table(TABLE_SURVEY_QUESTION);
$tbl_questions_groups = Database :: get_course_table(TABLE_SURVEY_GROUP);
$tbl_answers = Database :: get_course_table(TABLE_SURVEY_REPORT);

@ -3,14 +3,14 @@
DOKEOS - elearning and course management software
For a full list of contributors, see documentation/credits.html
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
See "documentation/licence.html" more details.
Contact:
Contact:
Dokeos
Rue des Palais 44 Paleizenstraat
B-1030 Brussels - Belgium
@ -19,8 +19,8 @@
/**
* @package dokeos.survey
* @author
* @version $Id: create_new_group.php 10680 2007-01-11 21:26:23Z pcool $
* @author
* @version $Id: create_new_group.php 10705 2007-01-12 22:40:01Z pcool $
*/
/*
@ -28,7 +28,7 @@
INIT SECTION
==============================================================================
*/
// name of the language file that needs to be included
// name of the language file that needs to be included
$language_file = 'survey';
// including the global dokeos file
@ -68,7 +68,7 @@ $table_group = Database :: get_course_table(TABLE_SURVEY_GROUP);
$table_survey_question = Database :: get_course_table(TABLE_SURVEY_QUESTION);
$table_course = Database :: get_main_table(TABLE_MAIN_COURSE);
$table_survey_group = Database :: get_course_table(TABLE_SURVEY_GROUP);
$table_languages = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$tool_name1 = get_lang('CreateNewGroup');
@ -79,21 +79,21 @@ $surveyid = $_GET['surveyid'];
$surveyname = SurveyManager::pick_surveyname($surveyid);
if(isset($_GET['direction'])){
$sql = 'SELECT *
FROM '.$table_group.'
$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
$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
$sql = 'UPDATE '.$table_group.' SET
sortby='.$group->sortby.$operateur.'1'.'
WHERE group_id='.intval($_GET['id_group']);
$rs = api_sql_query($sql,__FILE__,__LINE__);
@ -106,7 +106,7 @@ if(isset($_REQUEST['delete']))
$surveyid = $_REQUEST['surveyid'];
SurveyManager::delete_group($group_id);
header("Location:create_new_group.php?surveyid=$surveyid");
exit;
exit;
}
if ($_POST['action'] == 'new_group')
{
@ -114,39 +114,39 @@ if ($_POST['action'] == 'new_group')
$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');
}
$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);
?>
@ -156,22 +156,22 @@ Display::display_header($tool_name1);
<?php
if( isset($error_message) )
{
Display::display_error_message($error_message);
Display::display_error_message($error_message);
}
$sql = "SELECT * FROM $table_survey_group WHERE survey_id='$surveyid' ORDER BY sortby ASC";
$parameters = array ();
$parameters['surveyid']=$surveyid;
$parameters['groupid']=$groupid;
$res = api_sql_query($sql,__FILE__,__LINE__);
$countGroups = mysql_num_rows($res);
if ($countGroups > 0)
{
{
$i=0;
//$surveys = array ();
//$surveys = array ();
while ($obj = mysql_fetch_object($res))
{
$gid=$obj->group_id;
@ -204,7 +204,7 @@ if( isset($error_message) )
;
$surveys[] = $survey;
$i++;
}
$table_header[] = array (get_lang('QuesGroup'), true);
$table_header[] = array (get_lang('SurveyName'), true);
@ -242,15 +242,14 @@ api_display_tool_title($tool_name);
$oFCKeditor->Value = $content;
$oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js";
$oFCKeditor->ToolbarSet = "Survey";
$TBL_LANGUAGES = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql="SELECT isocode FROM ".$TBL_LANGUAGES." WHERE english_name='".$_SESSION["_course"]["language"]."'";
$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;
?>
<br>
@ -267,7 +266,7 @@ api_display_tool_title($tool_name);
<?php
/*
==============================================================================
FOOTER
FOOTER
==============================================================================
*/
Display :: display_footer();

@ -3,14 +3,14 @@
DOKEOS - elearning and course management software
For a full list of contributors, see documentation/credits.html
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
See "documentation/licence.html" more details.
Contact:
Contact:
Dokeos
Rue des Palais 44 Paleizenstraat
B-1030 Brussels - Belgium
@ -19,8 +19,8 @@
/**
* @package dokeos.survey
* @author
* @version $Id: group_edit.php 10680 2007-01-11 21:26:23Z pcool $
* @author
* @version $Id: group_edit.php 10705 2007-01-12 22:40:01Z pcool $
*/
/*
@ -28,7 +28,7 @@
INIT SECTION
==============================================================================
*/
// name of the language file that needs to be included
// name of the language file that needs to be included
$language_file = 'survey';
// including the global dokeos file
@ -61,8 +61,12 @@ if (!api_is_allowed_to_edit())
exit;
}
// Database table definitions
/** @todo use database constants for the survey tables */
$table_group = Database :: get_course_table(TABLE_SURVEY_GROUP);
$table_user = Database :: get_main_table(TABLE_MAIN_USER);
$table_languages = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$tool_name1 = get_lang('CreateNewGroup');
$tool_name = get_lang('ModifyGroupInformation');
$interbreadcrumb[] = array ("url" => "survey_list.php?", "name" => get_lang('Survey'));
@ -71,11 +75,11 @@ $surveyid = $_GET['surveyid'];
if($_POST['action'] == 'new_group')
{
if(isset($_POST['back']))
{
$surveyid = $_REQUEST['surveyid'];
{
$surveyid = $_REQUEST['surveyid'];
header("location:create_new_group.php?surveyid=$surveyid");
exit;
}
}
}
if ($_POST['action'] == 'new_group')
{
@ -85,7 +89,7 @@ if ($_POST['action'] == 'new_group')
$groupname=trim($groupname);
if(empty ($groupname))
{
$error_message = get_lang('PleaseEnterGroupName');
$error_message = get_lang('PleaseEnterGroupName');
}
$introduction = $_REQUEST['content'];
if(isset($_POST['next']))
@ -93,7 +97,7 @@ if ($_POST['action'] == 'new_group')
$groupname=trim($groupname);
if(empty ($groupname))
{
$error_message = get_lang('PleaseEnterGroupName');
$error_message = get_lang('PleaseEnterGroupName');
}
else
{
@ -101,13 +105,13 @@ if ($_POST['action'] == 'new_group')
header("location:select_question_group.php?surveyid=$surveyid");
exit;
}
}
}
if(isset($_POST['saveandexit']))
{
{
$groupname=trim($groupname);
if(empty ($groupname))
{
$error_message = get_lang('PleaseEnterGroupName');
$error_message = get_lang('PleaseEnterGroupName');
}
else
{
@ -115,13 +119,13 @@ if ($_POST['action'] == 'new_group')
header("location:survey_list.php");
exit;
}
}
}
}
Display::display_header($tool_name1);
api_display_tool_title($tool_name);
if( isset($error_message) )
{
Display::display_error_message($error_message);
Display::display_error_message($error_message);
}
?>
<?php
@ -151,15 +155,14 @@ $introduction = $obj->introduction;
$oFCKeditor->Value = $introduction;
$oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js";
$oFCKeditor->ToolbarSet = "Survey";
$TBL_LANGUAGES = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql="SELECT isocode FROM ".$TBL_LANGUAGES." WHERE english_name='".$_SESSION["_course"]["language"]."'";
$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;
?>
<br>

@ -1,16 +1,16 @@
<?php
<?php
/*
DOKEOS - elearning and course management software
For a full list of contributors, see documentation/credits.html
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
See "documentation/licence.html" more details.
Contact:
Contact:
Dokeos
Rue des Palais 44 Paleizenstraat
B-1030 Brussels - Belgium
@ -19,11 +19,11 @@
/**
* @package dokeos.survey
* @author
* @version $Id: mcma.php 10680 2007-01-11 21:26:23Z pcool $
* @author
* @version $Id: mcma.php 10705 2007-01-12 22:40:01Z pcool $
*/
// name of the language file that needs to be included
// name of the language file that needs to be included
$language_file = 'survey';
// including the global dokeos file
@ -32,8 +32,7 @@ require_once ('../inc/global.inc.php');
// including additional libraries
/** @todo check if these are all needed */
/** @todo check if the starting / is needed. api_get_path probably ends with an / */
require_once ("select_question.php");
require_once ('select_question.php');
require_once (api_get_path(LIBRARY_PATH).'/fileManage.lib.php');
require_once (api_get_path(CONFIGURATION_PATH) ."/add_course.conf.php");
require_once (api_get_path(LIBRARY_PATH)."/add_course.lib.inc.php");
@ -59,6 +58,14 @@ if (!api_is_allowed_to_edit())
}
// Database table definitions
/** @todo use database constants for the survey tables */
$table_survey = Database :: get_course_table(TABLE_SURVEY);
$table_group = Database :: get_course_table(TABLE_SURVEY_GROUP);
$table_survey_question = Database :: get_course_table(TABLE_SURVEY_QUESTION);
$table_languages = Database::get_main_table(TABLE_MAIN_LANGUAGE);
if(isset($_REQUEST['questtype']))
{
$add_question12=$_REQUEST['questtype'];
@ -70,9 +77,8 @@ else
$add_question = $_REQUEST['add_question'];
$groupid = $_REQUEST['groupid'];
$surveyid = $_REQUEST['surveyid'];
$table_survey = Database :: get_course_table(TABLE_SURVEY);
$table_group = Database :: get_course_table(TABLE_SURVEY_GROUP);
$table_survey_question = Database :: get_course_table(TABLE_SURVEY_QUESTION);
$interbreadcrumb[] = array ("url" => "survey_list.php?n=$n", "name" => get_lang('Survey'));
@ -81,15 +87,15 @@ if ($_POST['action'] == 'addquestion')
{
$groupid = $_REQUEST['groupid'];
$surveyid = $_REQUEST['surveyid'];
$questtype = $_REQUEST['questtype'];
$questtype = $_REQUEST['questtype'];
$enter_question =$_POST['enterquestion'];
if(isset($_POST['next']))
{
$enter_question=$_POST['enterquestion'];
$answers=$_POST['mutlichkboxtext'];
$rating=$_POST['chkboxpoint'];
$answerT=$_POST['chkboxdefault1'];
$rating=$_POST['chkboxpoint'];
$answerT=$_POST['chkboxdefault1'];
$answerD=$_POST['chkboxdefault'];
$alignment=$_POST['alignment'];
$open_ans="";
@ -116,17 +122,17 @@ if ($_POST['action'] == 'addquestion')
$enter_question=trim($enter_question);
if(empty($enter_question))
$error_message = get_lang('PleaseEnterAQuestion')."<br>";
$error_message = get_lang('PleaseEnterAQuestion')."<br>";
if ($noans)
$error_message = $error_message."<br>".get_lang('PleasFillAllAnswer');
//if($number==1)
//$error_message = $error_message."<br>".get_lang('PleaseFillNumber');
//if($nopoint)
//$error_message = $error_message."<br>".get_lang('PleaseFillAllPoints');
//$error_message = $error_message."<br>".get_lang('PleaseFillAllPoints');
//if($true<1)
//$error_message=$error_message."<br>".get_lang('PleaseSelectOneTrue');
//if($default<1)
//$error_message=$error_message."<br>".get_lang('PleaseSelectOneDefault');
//$error_message=$error_message."<br>".get_lang('PleaseSelectOneDefault');
if(isset($error_message));
//Display::display_error_message($error_message);
else
@ -150,8 +156,8 @@ if ($_POST['action'] == 'addquestion')
{
$enter_question=$_POST['enterquestion'];
$answers=$_POST['mutlichkboxtext'];
$rating=$_POST['chkboxpoint'];
$answerT=$_POST['chkboxdefault1'];
$rating=$_POST['chkboxpoint'];
$answerT=$_POST['chkboxdefault1'];
$answerD=$_POST['chkboxdefault'];
$alignment=$_POST['alignment'];
$open_ans="";
@ -161,7 +167,7 @@ if ($_POST['action'] == 'addquestion')
$true=0;
$noans=0;
$nopoint=0;
for($i=0;$i<$count;$i++)
{
$answers[$i]=trim($answers[$i]);
@ -178,22 +184,22 @@ if ($_POST['action'] == 'addquestion')
$enter_question=trim($enter_question);
if(empty($enter_question))
$error_message = get_lang('PleaseEnterAQuestion')."<br>";
$error_message = get_lang('PleaseEnterAQuestion')."<br>";
if ($noans)
$error_message = $error_message."<br>".get_lang('PleasFillAllAnswer');
//if($nopoint)
//$error_message = $error_message."<br>".get_lang('PleaseFillAllPoints');
//$error_message = $error_message."<br>".get_lang('PleaseFillAllPoints');
//if($true<1)
//$error_message=$error_message."<br>".get_lang('PleaseSelectOneTrue');
//if($default<1)
//$error_message=$error_message."<br>".get_lang('PleaseSelectOneDefault');
//$error_message=$error_message."<br>".get_lang('PleaseSelectOneDefault');
if(isset($error_message));
//Display::display_error_message($error_message);
else
{
$groupid = $_REQUEST['groupid'];
$surveyid = $_REQUEST['surveyid'];
$enter_question = addslashes($enter_question); SurveyManager::create_question($groupid,$surveyid,$questtype,$enter_question,$alignment,$answers,$open_ans,$answerT,$answerD,$rating,$curr_dbname);
$enter_question = addslashes($enter_question); SurveyManager::create_question($groupid,$surveyid,$questtype,$enter_question,$alignment,$answers,$open_ans,$answerT,$answerD,$rating,$curr_dbname);
header("location:survey_list.php?n=$n");
exit;
}
@ -228,7 +234,7 @@ select_question_type($add_question12,$groupid,$surveyid,$cidReq,$curr_dbname);
<?php
if( isset($error_message) )
{
Display::display_error_message($error_message);
Display::display_error_message($error_message);
}
?>
<SCRIPT LANGUAGE="JAVASCRIPT">
@ -259,22 +265,22 @@ function checkLength(form){
</td></tr>
<tr><td><br></td></tr>
<tr>
<tr>
<td class="pagedetails_heading"><a class="form_text_bold"><strong>Question</strong></a></td>
</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="outerBorder_innertable">
<tr class="white_bg">
<td height="30" class="form_text1">
Enter the question.
<tr class="white_bg">
<td height="30" class="form_text1">
Enter the question.
</td>
<td class="form_text1" align="right">&nbsp;
</td>
</tr>
<tr class="form_bg">
<tr class="form_bg">
<td width="542" height="30" colspan="2" >
<?php
<?php
require_once(api_get_path(LIBRARY_PATH) . "/fckeditor/fckeditor.php");
$oFCKeditor = new FCKeditor('enterquestion') ;
$oFCKeditor->BasePath = api_get_path(WEB_PATH) . 'main/inc/lib/fckeditor/' ;
@ -283,41 +289,41 @@ function checkLength(form){
$oFCKeditor->Value = stripslashes($enterquestion);
$oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js";
$oFCKeditor->ToolbarSet = "Survey";
$TBL_LANGUAGES = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql="SELECT isocode FROM ".$TBL_LANGUAGES." WHERE english_name='".$_SESSION["_course"]["language"]."'";
$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;
?>
</td>
</tr>
</table>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="outerBorder_innertable">
<tr>
<tr>
<td class="pagedetails_heading"><a class="form_text_bold"><strong>Answer</strong></a></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="outerBorder_innertable">
<tr class="white_bg">
<tr class="white_bg">
<td height="30"><span class="form_text1">Enter the answers</span>.
</td>
<td>&nbsp;</td>
<td width="192" align="right">&nbsp; </td>
</tr>
</table>
</table>
<table ID="tblFields" width="70%" border="0" cellpadding="0" cellspacing="0" class="outerBorder_innertable">
<?php
$start=1;$end=5;$upx=2;$upy=1;$dwnx=0;$dwny=1;$jd=0;$sn=1;
$id="id";
$tempmutlichkboxtext="jkjk";
@ -331,7 +337,7 @@ function checkLength(form){
$end=count($_POST['mutlichkboxtext']);
//echo ",before 1st loop end=".$end;
for($i=$start;$i<=$end;$i++)
{
{
$id="id".$i."_x";
//echo ",".$id;
if(isset($_POST[$id]))
@ -339,7 +345,7 @@ function checkLength(form){
$jd=$i;
$flag=0;
$end=count($_POST['mutlichkboxtext']);
if($end<=3)
{
$end=3;
@ -352,16 +358,16 @@ function checkLength(form){
}
}
for($i=$start;$i<=$end;$i++)
{
$up="up".$i."_x";
$down="down".$i."_x";
if(isset($_POST[$up])||isset($_POST[$down]))
{
//if(isset($_POST['up2_x']))
//if(isset($_POST['up2_x']))
$flag=0;
if(isset($_POST[$up]))
{
@ -370,7 +376,7 @@ function checkLength(form){
$tempchkboxpoint=$_POST['chkboxpoint'];
$tempchkboxdefault1=$_POST['chkboxdefault1'];
$tempm= $tempmutlichkboxtext[$i-2];
$tempchkboxd=$tempchkboxdefault[$i-2];
$tempchkboxp=$tempchkboxpoint[$i-2];
@ -399,7 +405,7 @@ function checkLength(form){
$tempchkboxpoint=$_POST['chkboxpoint'];
$tempchkboxdefault1=$_POST['chkboxdefault1'];
$tempm= $tempmutlichkboxtext[$i];
$tempchkboxd=$tempchkboxdefault[$i];
$tempchkboxp=$tempchkboxpoint[$i];
@ -422,18 +428,18 @@ function checkLength(form){
}
//echo ",while checking up/down end=".$end;
$jd=0;
break;
break;
}
}
if($flag==1)
{
if(isset($_POST['addnewrows']))
{
$end=count($_POST['mutlichkboxtext']);
if($end<10)
{
$end=$end+$_POST['addnewrows'];
@ -446,7 +452,7 @@ function checkLength(form){
$error_message = get_lang('YouCantAddMoreThanTen')."<br>";
if( isset($error_message) )
{
Display::display_error_message($error_message);
Display::display_error_message($error_message);
}
}
//echo ",while checking select end=".$end;
@ -454,14 +460,14 @@ function checkLength(form){
$end=$end+$_POST['addnewrows'];*/
}
}
//echo ",after select end=".$end;
for($i=$start;$i<=$end;$i++)
{
if($i==$jd)
/*{
@ -478,29 +484,29 @@ function checkLength(form){
$post_text = $_POST['mutlichkboxtext'];
$post_check=$_POST['chkboxdefault'];
$post_point=$_POST['chkboxpoint'];
$post_true=$_POST['chkboxdefault1'];
?>
<tr class="form_bg" id="0">
<td width="16" height="30" align="left" class="form_text">
$post_true=$_POST['chkboxdefault1'];
?>
<tr class="form_bg" id="0">
<td width="16" height="30" align="left" class="form_text">
<?php echo $sn;?>
</td>
</td>
<td class="form_bg"><textarea name="mutlichkboxtext[]" cols="50" rows="3" class="text_field" style="width:100%;"><?php echo $post_text[$k]; ?></textarea>
</td>
</td>
<td width="10" class="form_text"><img src="../img/blank.gif" width="10" height="8">
</td>
<td width="10" class="form_text"><img src="../img/blank.gif" width="10" height="8">
</td>
</td>
<?php
if($i>$start)
{
?>
<td width="30" align="center" class="form_text1">
<input type="image" src="../img/up.gif" width="24" height="24" border="0" onclick="this.form.submit();" name="<?php echo "up".$i;?>" style="cursor:hand">
<td width="30" align="center" class="form_text1">
<input type="image" src="../img/up.gif" width="24" height="24" border="0" onclick="this.form.submit();" name="<?php echo "up".$i;?>" style="cursor:hand">
</td>
<?php }
else
{
?> <td width="30" align="center" class="form_text1">
?> <td width="30" align="center" class="form_text1">
</td>
<?php }
$sn++;
@ -509,52 +515,52 @@ function checkLength(form){
<?php if($i<$end)
{
?>
<td width="30" align="center" class="form_text">
<input type="image" src="../img/down.gif" width="24" height="24" border="0" onclick="this.form.submit();" name="<?php echo "down".$i;?>" style="cursor:hand">
<td width="30" align="center" class="form_text">
<input type="image" src="../img/down.gif" width="24" height="24" border="0" onclick="this.form.submit();" name="<?php echo "down".$i;?>" style="cursor:hand">
</td>
<?php }
else
{
?> <td width="30" align="center" class="form_text1">
?> <td width="30" align="center" class="form_text1">
</td>
<?php }
?>
<td width="30" align="center" class="form_text">
<input type="image" src="../img/delete.gif" width="24" height="24" border="0" style="cursor:hand" name="<?php echo "id".$i;?>" value="<?php echo $end;?>" onclick="this.form.submit();">
<input type="image" src="../img/delete.gif" width="24" height="24" border="0" style="cursor:hand" name="<?php echo "id".$i;?>" value="<?php echo $end;?>" onclick="this.form.submit();">
</tr>
<?php }
<?php }
}
?>
</table>
?>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr class="white_bg">
<tr class="white_bg">
<td height="30"><span class="form_text1">Add&nbsp;&nbsp;</span>
<select name="addnewrows" class="text_field_small" style="width:100px" onChange="this.form.submit();">
<!--<option value="1" <?php if(isset($_POST['addnewrows'])){if($_POST['addnewrows']=="1")echo "selected";}?>>1</option>
<option value="2" <?php if(isset($_POST['addnewrows'])){if($_POST['addnewrows']=="2")echo "selected";}?>>2</option>
<option value="3" <?php if(isset($_POST['addnewrows'])){if($_POST['addnewrows']=="3")echo "selected";}?>>3</option>
<option value="4" <?php if(isset($_POST['addnewrows'])){if($_POST['addnewrows']=="4")echo "selected";}?>>4</option>
<option value="5" <?php if(isset($_POST['addnewrows'])){if($_POST['addnewrows']=="5")echo "selected";}?>>5</option>-->
<option value="0" >0</option>
<option value="1" >1</option>
<option value="2" >2</option>
<option value="3" >3</option>
<option value="4" >4</option>
<option value="5" >5</option>
</select>
<a class="form_text1">New Answer</a>
<span class="form_text"><span class="form_text1">
</td>
</tr>
</table>
@ -562,7 +568,7 @@ function checkLength(form){
<br>
<br>
<div align="center">
<!--
<input type="hidden" name="type" value="mcma">-->
<input type="HIDDEN" name="end1" value="<?php echo $end; ?>">
@ -573,7 +579,7 @@ function checkLength(form){
?> <input type="hidden" name="add_question" value="<?php echo $_POST['add_question'];?>" >
<?php }
$sql = "SELECT * FROM survey WHERE survey_id='$surveyid'";
$sql = "SELECT * FROM $table_survey WHERE survey_id='$surveyid'";
$res=api_sql_query($sql);
$obj=mysql_fetch_object($res);
switch($obj->template)
@ -599,13 +605,13 @@ function checkLength(form){
<input type="submit" name="back" value="<?php echo get_lang('Back'); ?>">
<input type="submit" name="saveandexit" value="<?php echo get_lang('SaveAndExit');?>">
<input type="button" value="<?php echo get_lang('Preview');?>" onClick="preview('mcma','<?php echo $temp; ?>','<?php echo get_lang('MultipleChoiceMulti'); ?>')">
<input type="submit" name="next" value="<?php echo get_lang('Next'); ?>">
<input type="submit" name="next" value="<?php echo get_lang('Next'); ?>">
</div>
<!--this partcular field helps in identify the item to be add at the itemadd.php-->
</form>
</div>
<div id=bottomnav align="center"></DIV>
</body>
</html>

@ -1,16 +1,16 @@
<?php
<?php
/*
DOKEOS - elearning and course management software
For a full list of contributors, see documentation/credits.html
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
See "documentation/licence.html" more details.
Contact:
Contact:
Dokeos
Rue des Palais 44 Paleizenstraat
B-1030 Brussels - Belgium
@ -19,11 +19,11 @@
/**
* @package dokeos.survey
* @author
* @version $Id: mcma_edit.php 10680 2007-01-11 21:26:23Z pcool $
* @author
* @version $Id: mcma_edit.php 10705 2007-01-12 22:40:01Z pcool $
*/
// name of the language file that needs to be included
// name of the language file that needs to be included
$language_file = 'survey';
// including the global dokeos file
@ -57,10 +57,12 @@ if (!api_is_allowed_to_edit())
exit;
}
$table_survey = Database :: get_course_table(TABLE_SURVEY);
$table_group = Database :: get_course_table(TABLE_SURVEY_GROUP);
$table_survey_question = Database :: get_course_table(TABLE_SURVEY_QUESTION);
// Database table definitions
/** @todo use database constants for the survey tables */
$table_survey = Database :: get_course_table(TABLE_SURVEY);
$table_group = Database :: get_course_table(TABLE_SURVEY_GROUP);
$table_survey_question = Database :: get_course_table(TABLE_SURVEY_QUESTION);
$table_languages = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$n=$_REQUEST['n'];
$interbreadcrumb[] = array ("url" => "survey_list.php?n=$n", "name" => get_lang('Survey'));
@ -73,7 +75,7 @@ $Add = get_lang('UpdateQuestionType');
$Multi = get_lang('MultipleChoiceMulti');
$tool_name = $Add.$Multi;
$rs=SurveyManager::get_question_data($qid,$curr_dbname);
$sql = "SELECT * FROM questions WHERE qid = '$qid'";
$sql = "SELECT * FROM $table_survey_question WHERE qid = '$qid'";
$res = api_sql_query($sql);
$obj = mysql_fetch_object($res);
for($i=0,$check=0;$i<10;$i++)
@ -94,10 +96,10 @@ if(isset($_POST['update']))
{
$groupid = $_REQUEST['groupid'];
$surveyid = $_REQUEST['surveyid'];
$questtype = $_REQUEST['questtype'];
$questtype = $_REQUEST['questtype'];
$enter_question=$_POST['enterquestion'];
$alignment=$_POST['alignment'];
$enter_question=$_POST['enterquestion'];
$answers=$_POST['mutlichkboxtext'];
$open_ans="";
@ -111,7 +113,7 @@ if(isset($_POST['update']))
}
$enter_question=trim($enter_question);
if(empty($enter_question))
$error_message = get_lang('PleaseEnterAQuestion')."<br>";
$error_message = get_lang('PleaseEnterAQuestion')."<br>";
if ($noans)
$error_message = $error_message."<br>".get_lang('PleasFillAllAnswer');
if(isset($error_message));
@ -121,7 +123,7 @@ if(isset($_POST['update']))
$groupid = $_POST['groupid'];
$surveyid = $_POST['surveyid'];
$questtype = $_POST['questtype'];
$qid=$_POST['qid'];
$qid=$_POST['qid'];
$enter_question = addslashes($enter_question);
SurveyManager::update_question($qid,$questtype,$enter_question,$alignment,$answers,$open_ans,$curr_dbname);
header("location:select_question_group.php?groupid=$groupid&surveyid=$surveyid");
@ -141,7 +143,7 @@ Display::display_header($tool_name);
api_display_tool_title($tool_name);
if( isset($error_message) )
{
Display::display_error_message($error_message);
Display::display_error_message($error_message);
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
@ -166,22 +168,22 @@ if( isset($error_message) )
</td></tr>
<tr><td><br></td></tr>
<tr>
<tr>
<td class="pagedetails_heading"><a class="form_text_bold"><strong>Question</strong></a></td>
</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="outerBorder_innertable">
<tr class="white_bg">
<td height="30" class="form_text1">
Enter the question.
<tr class="white_bg">
<td height="30" class="form_text1">
Enter the question.
</td>
<td class="form_text1" align="right">&nbsp;
</td>
</tr>
<tr class="form_bg">
<tr class="form_bg">
<td width="542" height="30" colspan="2" >
<?php
<?php
require_once(api_get_path(LIBRARY_PATH) . "/fckeditor/fckeditor.php");
$oFCKeditor = new FCKeditor('enterquestion') ;
$oFCKeditor->BasePath = api_get_path(WEB_PATH) . 'main/inc/lib/fckeditor/' ;
@ -190,17 +192,16 @@ if( isset($error_message) )
$oFCKeditor->Value = $rs->caption;
$oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js";
$oFCKeditor->ToolbarSet = "Survey";
$TBL_LANGUAGES = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql="SELECT isocode FROM ".$TBL_LANGUAGES." WHERE english_name='".$_SESSION["_course"]["language"]."'";
$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;
if(isset($_POST['enterquestion']))
echo $_POST['enterquestion'];
else
@ -210,26 +211,26 @@ if( isset($error_message) )
</tr>
</table>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="outerBorder_innertable">
<tr>
<tr>
<td class="pagedetails_heading"><a class="form_text_bold"><strong>Answer</strong></a></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="outerBorder_innertable">
<tr class="white_bg">
<tr class="white_bg">
<td height="30"><span class="form_text1">Enter the answers</span>.
</td>
<td>&nbsp;</td>
<td width="192" align="right">&nbsp; </td>
</tr>
</table>
</table>
<table ID="tblFields" width="70%" border="0" cellpadding="0" cellspacing="0" class="outerBorder_innertable">
<?php
$start=1;$end=$check;$upx=2;$upy=1;$dwnx=0;$dwny=1;$jd=0;$sn=1;
$id="id";
$tempmutlichkboxtext="jkjk";
@ -240,7 +241,7 @@ if( isset($error_message) )
$end=count($_POST['mutlichkboxtext']);
//echo ",before 1st loop end=".$end;
for($i=$start;$i<=$end;$i++)
{
{
$id="id".$i."_x";
//echo ",".$id;
if(isset($_POST[$id]))
@ -248,7 +249,7 @@ if( isset($error_message) )
$jd=$i;
$flag=0;
$end=count($_POST['mutlichkboxtext']);
if($end<=3)
{
$end=3;
@ -261,16 +262,16 @@ if( isset($error_message) )
}
}
for($i=$start;$i<=$end;$i++)
{
$up="up".$i."_x";
$down="down".$i."_x";
if(isset($_POST[$up])||isset($_POST[$down]))
{
//if(isset($_POST['up2_x']))
//if(isset($_POST['up2_x']))
$flag=0;
if(isset($_POST[$up]))
{
@ -290,18 +291,18 @@ if( isset($error_message) )
}
//echo ",while checking up/down end=".$end;
$jd=0;
break;
break;
}
}
if($flag==1)
{
if(isset($_POST['addnewrows']))
{
$end=count($_POST['mutlichkboxtext']);
if($end<10)
{
$end=$end+$_POST['addnewrows'];
@ -314,19 +315,19 @@ if( isset($error_message) )
$error_message = get_lang('YouCantAddMoreThanTen')."<br>";
if( isset($error_message) )
{
Display::display_error_message($error_message);
Display::display_error_message($error_message);
}
}
}
}
//echo ",after select end=".$end;
for($i=$start;$i<=$end;$i++)
{
if($i==$jd)
{
@ -344,30 +345,30 @@ if( isset($error_message) )
$post_text1=$_POST['mutlichkboxtext'];
$post_text = stripslashes($post_text1[$i-1]);
}
else
else
$post_text=stripslashes($rs->$val);
?>
<tr class="form_bg" id="0">
<td width="16" height="30" align="left" class="form_text">
?>
<tr class="form_bg" id="0">
<td width="16" height="30" align="left" class="form_text">
<?php echo $sn;?>
</td>
</td>
<td class="form_bg"><textarea name="mutlichkboxtext[]" cols="50" rows="3" class="text_field" style="width:100%;"><?php echo $post_text; ?></textarea>
</td>
</td>
<td width="10" class="form_text"><img src="../img/blank.gif" width="10" height="8">
</td>
<td width="30" align="center" class="form_text">&nbsp;
<td width="30" align="center" class="form_text">&nbsp;
</td>
<?php
<?php
if($i>$start)
{
?>
<td width="30" align="center" class="form_text1">
<input type="image" src="../img/up.gif" width="24" height="24" border="0" onclick="this.form.submit();" name="<?echo "up".$i;?>" style="cursor:hand">
<td width="30" align="center" class="form_text1">
<input type="image" src="../img/up.gif" width="24" height="24" border="0" onclick="this.form.submit();" name="<?echo "up".$i;?>" style="cursor:hand">
</td>
<?php }
else
{
?> <td width="30" align="center" class="form_text1">
?> <td width="30" align="center" class="form_text1">
</td>
<?php }
$sn++;
@ -376,46 +377,46 @@ if( isset($error_message) )
<?php if($i<$end)
{
?>
<td width="30" align="center" class="form_text">
<input type="image" src="../img/down.gif" width="24" height="24" border="0" onclick="this.form.submit();" name="<?echo "down".$i;?>" style="cursor:hand">
<td width="30" align="center" class="form_text">
<input type="image" src="../img/down.gif" width="24" height="24" border="0" onclick="this.form.submit();" name="<?echo "down".$i;?>" style="cursor:hand">
</td>
<?php }
else
{
?> <td width="30" align="center" class="form_text1">
?> <td width="30" align="center" class="form_text1">
</td>
<?php }
?>
<td width="30" align="center" class="form_text">
<input type="image" src="../img/delete.gif" width="24" height="24" border="0" style="cursor:hand" name="<?php echo "id".$i;?>" value="<?php echo $end; ?>" onclick="this.form.submit();">
<input type="image" src="../img/delete.gif" width="24" height="24" border="0" style="cursor:hand" name="<?php echo "id".$i;?>" value="<?php echo $end; ?>" onclick="this.form.submit();">
</tr>
<?php }
<?php }
}
?>
</table>
?>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr class="white_bg">
<tr class="white_bg">
<td height="30"><span class="form_text1">Add&nbsp;&nbsp;</span>
<select name="addnewrows" class="text_field_small" style="width:100px" onChange="this.form.submit();">
<option value="0" >0</option>
<option value="1" >1</option>
<option value="2" >2</option>
<option value="3" >3</option>
<option value="4" >4</option>
<option value="5" >5</option>
</select>
<a class="form_text1">New Answer</a>
<span class="form_text"><span class="form_text1">
</td>
</tr>
</table>
@ -423,15 +424,15 @@ if( isset($error_message) )
<br>
<br>
<div align="center">
<input type="HIDDEN" name="end1" value="<?php echo $end; ?>">
<?php
<?php
if(isset($_POST['add_question']))
{
echo '<input type="hidden" name="add_question" value="'.$_POST['add_question'].'" />';
}
$sql = "SELECT * FROM survey WHERE survey_id='$surveyid'";
$sql = "SELECT * FROM $table_survey WHERE survey_id='$surveyid'";
$res=api_sql_query($sql);
$obj=mysql_fetch_object($res);
switch($obj->template)
@ -457,13 +458,13 @@ if( isset($error_message) )
<input type="submit" name="back" value="<?php echo get_lang('Back'); ?>">
<input type="button" value="<?php echo get_lang('Preview');?>" onClick="preview('mcma','<?php echo $temp; ?>','<?php echo $Multi; ?>')">
<input type="submit" name="update" value="<?php echo get_lang('Update'); ?>">
</div>
</form>
</div>
<div id=bottomnav align="center"></DIV>
</body>
</html>

@ -20,7 +20,7 @@
/**
* @package dokeos.survey
* @author
* @version $Id: mcma_view.php 10680 2007-01-11 21:26:23Z pcool $
* @version $Id: mcma_view.php 10705 2007-01-12 22:40:01Z pcool $
*/
// name of the language file that needs to be included
@ -62,7 +62,7 @@ $header2 = $header2." ".$gname;
$header3 = get_lang('Type');
$header3=$header3." ".$ques_type;
$ques_id = $_GET['qid'];
$sql = "SELECT * FROM $db_name.questions where qid='$ques_id'";
$sql = "SELECT * FROM $table_survey_question WHERE qid='$ques_id'";
$res = api_sql_query($sql);
$obj = mysql_fetch_object($res);
?>

@ -3,14 +3,14 @@
DOKEOS - elearning and course management software
For a full list of contributors, see documentation/credits.html
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
See "documentation/licence.html" more details.
Contact:
Contact:
Dokeos
Rue des Palais 44 Paleizenstraat
B-1030 Brussels - Belgium
@ -19,11 +19,11 @@
/**
* @package dokeos.survey
* @author
* @version $Id: mcsa.php 10680 2007-01-11 21:26:23Z pcool $
* @author
* @version $Id: mcsa.php 10705 2007-01-12 22:40:01Z pcool $
*/
// name of the language file that needs to be included
// name of the language file that needs to be included
$language_file = 'survey';
// including the global dokeos file
@ -69,7 +69,12 @@ else
$add_question = $_REQUEST['add_question'];
$groupid = $_REQUEST['groupid'];
$surveyid = $_REQUEST['surveyid'];
$table_survey_question = Database :: get_course_table(TABLE_SURVEY_QUESTION);
// Database table definitions
/** @todo use database constants for the survey tables */
$table_survey_question = Database :: get_course_table(TABLE_SURVEY_QUESTION);
$table_languages = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$Add = get_lang('AddNewQuestionType');
$Multi = get_lang('MultipleChoiceSingle');
$groupid = $_REQUEST['groupid'];
@ -79,46 +84,46 @@ $interbreadcrumb[] = array ("url" => "survey_list.php?n=$n", "name" => get_lang(
//$n=$_REQUEST['n'];
if ($_POST['action'] == 'addquestion')
{
$enter_question=$_POST['enterquestion'];
$enter_question=$_POST['enterquestion'];
if(isset($_POST['next']))
{
$enter_question=$_POST['enterquestion'];
$answers=$_POST['mutlichkboxtext'];
$rating=$_POST['chkboxpoint'];
$rating=$_POST['chkboxpoint'];
$answerT=$_POST['radiotrue'];
$answerD=$_POST['radiodefault'];
$alignment=$_POST['alignment'];
$open_ans="";
$count=count($_POST['mutlichkboxtext']);
$count=count($_POST['mutlichkboxtext']);
$noans=0;
$nopoint=0;
for($i=0;$i<$count;$i++)
{
{
$answers[$i]=trim($answers[$i]);
if(empty($answers[$i]))
$noans++;
if(empty($rating[$i])&&($rating[$i]!='0'))
$nopoint++;
}
$enter_question=trim($enter_question);
if(empty($enter_question))
$error_message = get_lang('PleaseEnterAQuestion')."<br>";
$error_message = get_lang('PleaseEnterAQuestion')."<br>";
if ($noans)
$error_message = $error_message."<br>".get_lang('PleasFillAllAnswer');
//if($nopoint)
//$error_message = $error_message."<br>".get_lang('PleaseFillAllPoints');
//$error_message = $error_message."<br>".get_lang('PleaseFillAllPoints');
//if(empty($_POST['radiotrue']))
// $error_message=$error_message."<br>".get_lang('PleaseSelectOneTrue');
//if(empty($_POST['radiodefault']))
//$error_message=$error_message."<br>".get_lang('PleaseSelectOneDefault');
if(isset($error_message));
//Display::display_error_message($error_message);
//Display::display_error_message($error_message);
else
{
$groupid = $_POST['groupid'];
$questtype = $_REQUEST['questtype'];
$surveyid = $_REQUEST['surveyid'];
$questtype = $_REQUEST['questtype'];
$surveyid = $_REQUEST['surveyid'];
$enter_question = addslashes($enter_question); SurveyManager::create_question($groupid,$surveyid,$questtype,$enter_question,$alignment,$answers,$open_ans,$answerT,$answerD,$rating,$curr_dbname);
header("location:select_question_group.php?groupid=$groupid&surveyid=$surveyid");
exit;
@ -135,44 +140,44 @@ if ($_POST['action'] == 'addquestion')
{
$enter_question=$_POST['enterquestion'];
$answers=$_POST['mutlichkboxtext'];
$rating=$_POST['chkboxpoint'];
$rating=$_POST['chkboxpoint'];
$answerT=$_POST['radiotrue'];
$answerD=$_POST['radiodefault'];
$alignment=$_POST['alignment'];
$open_ans="";
$count=count($_POST['mutlichkboxtext']);
$count=count($_POST['mutlichkboxtext']);
$noans=0;
$nopoint=0;
for($i=0;$i<$count;$i++)
{
{
$answers[$i]=trim($answers[$i]);
if(empty($answers[$i]))
$noans++;
if(!is_numeric($rating[$i]))
$number=1;
}
$enter_question=trim($enter_question);
if(empty($enter_question))
$error_message = get_lang('PleaseEnterAQuestion')."<br>";
$error_message = get_lang('PleaseEnterAQuestion')."<br>";
if ($noans)
$error_message = $error_message."<br>".get_lang('PleasFillAllAnswer');
//if($number==1)
//$error_message = $error_message."<br>".get_lang('PleaseFillNumber');
//if($nopoint)
//$error_message = $error_message."<br>".get_lang('PleaseFillAllPoints');
//$error_message = $error_message."<br>".get_lang('PleaseFillAllPoints');
//if(empty($_POST['radiotrue']))
// $error_message=$error_message."<br>".get_lang('PleaseSelectOneTrue');
//if(empty($_POST['radiodefault']))
//$error_message=$error_message."<br>".get_lang('PleaseSelectOneDefault');
if(isset($error_message));
//Display::display_error_message($error_message);
//Display::display_error_message($error_message);
else
{
$groupid = $_REQUEST['groupid'];
$surveyid = $_REQUEST['surveyid'];
$questtype = $_REQUEST['questtype'];
$enter_question = addslashes($enter_question); SurveyManager::create_question($groupid,$surveyid,$questtype,$enter_question,$alignment,$answers,$open_ans,$answerT,$answerD,$rating,$curr_dbname);
$enter_question = addslashes($enter_question); SurveyManager::create_question($groupid,$surveyid,$questtype,$enter_question,$alignment,$answers,$open_ans,$answerT,$answerD,$rating,$curr_dbname);
header("location:survey_list.php?n=$n");
exit;
}
@ -217,7 +222,7 @@ select_question_type($add_question12,$groupid,$surveyid,$cidReq,$curr_dbname);
<?php
if( isset($error_message) )
{
Display::display_error_message($error_message);
Display::display_error_message($error_message);
}
?>
<SCRIPT LANGUAGE="JAVASCRIPT">
@ -249,22 +254,22 @@ function checkLength(form){
</td></tr>
<tr><td><br></td></tr>
<tr>
<tr>
<td class="pagedetails_heading"><a class="form_text_bold"><strong>Question</strong></a></td>
</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="outerBorder_innertable">
<tr class="white_bg">
<td height="30" class="form_text1">
Enter the question.
<tr class="white_bg">
<td height="30" class="form_text1">
Enter the question.
</td>
<td class="form_text1" align="right">&nbsp;
</td>
</tr>
<tr class="form_bg">
<tr class="form_bg">
<td width="542" height="30" colspan="2" >
<?php
require_once(api_get_path(LIBRARY_PATH) . "/fckeditor/fckeditor.php");
$oFCKeditor = new FCKeditor('enterquestion') ;
$oFCKeditor->BasePath = api_get_path(WEB_PATH) . 'main/inc/lib/fckeditor/' ;
@ -273,48 +278,47 @@ function checkLength(form){
$oFCKeditor->Value = stripslashes($enterquestion);
$oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js";
$oFCKeditor->ToolbarSet = "Survey";
$TBL_LANGUAGES = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql="SELECT isocode FROM ".$TBL_LANGUAGES." WHERE english_name='".$_SESSION["_course"]["language"]."'";
$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;
?>
</td>
</tr>
</table>
<br>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="outerBorder_innertable">
<tr>
<tr>
<td class="pagedetails_heading"><a class="form_text_bold"><strong>Answer</strong></a></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="outerBorder_innertable">
<tr class="white_bg">
<tr class="white_bg">
<td height="30"><span class="form_text1">Enter the answers</span>.
</td>
<td>&nbsp;</td>
<td width="192" align="right">&nbsp; </td>
</tr>
</table>
<!--table for adding the multiple answers-->
<!--<a name="tbl">-->
</table>
<!--table for adding the multiple answers-->
<!--<a name="tbl">-->
<table ID="tblFields" width="70%" border="0" cellpadding="0" cellspacing="0" class="outerBorder_innertable">
<?php
<?php
$start=1;$end=5;$upx=2;$upy=1;$dwnx=0;$dwny=1;$jd=0;$sn=1;
$id="id";
$tempmutlichkboxtext="jkjk";
$tempmutlichkboxtext="jkjk";
if(isset($_POST['radiodefault']))
$tempradiodefault=$_POST['radiodefault'];
else
$tempradiodefault=1;
$tempchkboxpoint="jkjk";
$tempchkboxpoint="jkjk";
if(isset($_POST['radiotrue']))
$tempradiotrue=$_POST['radiotrue'];
else
@ -323,9 +327,9 @@ $start=1;$end=5;$upx=2;$upy=1;$dwnx=0;$dwny=1;$jd=0;$sn=1;
$down="down";
$flag=1;
if(isset($_POST['mutlichkboxtext']))
$end=count($_POST['mutlichkboxtext']);
$end=count($_POST['mutlichkboxtext']);
for($i=$start;$i<=$end;$i++)
{
{
$id="id".$i."_x";
//echo ",".$id;
if(isset($_POST[$id]))
@ -343,13 +347,13 @@ $start=1;$end=5;$upx=2;$upy=1;$dwnx=0;$dwny=1;$jd=0;$sn=1;
//echo ",while checking id,end=".$end;
}
}
}
for($i=$start;$i<=$end;$i++)
{
{
$up="up".$i."_x";
$down="down".$i."_x";
$down="down".$i."_x";
if(isset($_POST[$up])||isset($_POST[$down]))
{
{
$flag=0;
if(isset($_POST[$up]))
{
@ -362,9 +366,9 @@ $start=1;$end=5;$upx=2;$upy=1;$dwnx=0;$dwny=1;$jd=0;$sn=1;
if($tempradiotrue==$i)
$tempradiotrue--;
elseif($tempradiotrue==$i-1)
$tempradiotrue++;
$tempradiotrue++;
$tempm= $tempmutlichkboxtext[$i-2];
$tempchkboxp=$tempchkboxpoint[$i-2];
$tempchkboxp=$tempchkboxpoint[$i-2];
$tempmutlichkboxtext[$i-2]=$tempmutlichkboxtext[$i-1];
$tempchkboxpoint[$i-2]=$tempchkboxpoint[$i-1];
$tempmutlichkboxtext[$i-1]=$tempm;
@ -395,14 +399,14 @@ $start=1;$end=5;$upx=2;$upy=1;$dwnx=0;$dwny=1;$jd=0;$sn=1;
}
//echo ",while checking up/down end=".$end;
$jd=0;
break;
break;
}
}
}
if($flag==1)
{
if(isset($_POST['addnewrows']))
{
$end=count($_POST['mutlichkboxtext']);
{
$end=count($_POST['mutlichkboxtext']);
if($end<10)
{
$end=$end+$_POST['addnewrows'];
@ -415,15 +419,15 @@ $start=1;$end=5;$upx=2;$upy=1;$dwnx=0;$dwny=1;$jd=0;$sn=1;
$error_message = get_lang('YouCantAddMoreThanTen')."<br>";
if( isset($error_message) )
{
Display::display_error_message($error_message);
Display::display_error_message($error_message);
}
}
//echo ",while checking select end=".$end;
/*else
$end=$end+$_POST['addnewrows'];*/
}
}
//echo ",after select end=".$end;
}
//echo ",after select end=".$end;
for($i=$start;$i<=$end;$i++)
{
if($i==$jd)
@ -441,30 +445,30 @@ $start=1;$end=5;$upx=2;$upy=1;$dwnx=0;$dwny=1;$jd=0;$sn=1;
$post_text = $_POST['mutlichkboxtext'];
//$post_check=$_POST['radiodefault'];
$post_point=$_POST['chkboxpoint'];
//$post_true=$_POST['radiotrue'];
?>
<tr class="form_bg" id="0">
<td width="16" height="30" align="left" class="form_text">
//$post_true=$_POST['radiotrue'];
?>
<tr class="form_bg" id="0">
<td width="16" height="30" align="left" class="form_text">
<?php echo $sn;?>
</td>
</td>
<td class="form_bg"><textarea name="mutlichkboxtext[]" cols="50" rows="3" class="text_field" style="width:100%;"><?php echo $post_text[$k]; ?></textarea>
</td>
<td width="10" class="form_text"><img src="../img/blank.gif" width="10" height="8">
</td>
<td width="10" class="form_text"><img src="../img/blank.gif" width="10" height="8">
</td>
</td>
<?php if($i>$start)
{
?>
<td width="30" align="center" class="form_text1">
<input type="image" src="../img/up.gif" width="24" height="24" border="0" onclick="this.form.submit();" name="<?echo "up".$i;?>" style="cursor:hand">
<td width="30" align="center" class="form_text1">
<input type="image" src="../img/up.gif" width="24" height="24" border="0" onclick="this.form.submit();" name="<?echo "up".$i;?>" style="cursor:hand">
</td>
<?php }
else
{
?> <td width="30" align="center" class="form_text1">
?> <td width="30" align="center" class="form_text1">
</td>
<?php }
$sn++;
@ -473,43 +477,43 @@ $start=1;$end=5;$upx=2;$upy=1;$dwnx=0;$dwny=1;$jd=0;$sn=1;
<?php if($i<$end)
{
?>
<td width="30" align="center" class="form_text">
<input type="image" src="../img/down.gif" width="24" height="24" border="0" onclick="this.form.submit();" name="<?echo "down".$i;?>" style="cursor:hand">
<td width="30" align="center" class="form_text">
<input type="image" src="../img/down.gif" width="24" height="24" border="0" onclick="this.form.submit();" name="<?echo "down".$i;?>" style="cursor:hand">
</td>
<?php }
else
{
?> <td width="30" align="center" class="form_text1">
?> <td width="30" align="center" class="form_text1">
</td>
<?php }
?>
<td width="30" align="center" class="form_text">
<input type="image" src="../img/delete.gif" width="24" height="24" border="0" style="cursor:hand" name="<?php echo "id".$i;?>" value="<?php echo $end; ?>" onclick="this.form.submit();">
<td width="30" align="center" class="form_text">
<input type="image" src="../img/delete.gif" width="24" height="24" border="0" style="cursor:hand" name="<?php echo "id".$i;?>" value="<?php echo $end; ?>" onclick="this.form.submit();">
</tr>
<?php }
<?php }
}
?>
</table>
?>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr class="white_bg">
<tr class="white_bg">
<td height="30"><span class="form_text1">Add&nbsp;&nbsp;</span>
<select name="addnewrows" class="text_field_small" style="width:100px" onChange="this.form.submit();">
<select name="addnewrows" class="text_field_small" style="width:100px" onChange="this.form.submit();">
<option value="0" >0</option>
<option value="1" >1</option>
<option value="2" >2</option>
<option value="3" >3</option>
<option value="4" >4</option>
<option value="5" >5</option>
<option value="5" >5</option>
</select>
<a class="form_text1">New Answer</a>
<span class="form_text"><span class="form_text1">
<a class="form_text1">New Answer</a>
<span class="form_text"><span class="form_text1">
</td>
</tr>
</table>
<br>
<br>
<div align="center">
<div align="center">
<input type="HIDDEN" name="end1" value="<?php echo $end; ?>">
@ -518,7 +522,7 @@ $start=1;$end=5;$upx=2;$upy=1;$dwnx=0;$dwny=1;$jd=0;$sn=1;
?> <input type="hidden" name="add_question" value="<?php echo $_POST['add_question'];?>" >
<?php }
$sql = "SELECT * FROM survey WHERE survey_id='$surveyid'";
$sql = "SELECT * FROM $table_survey WHERE survey_id='$surveyid'";
$res=api_sql_query($sql);
$obj=mysql_fetch_object($res);
switch($obj->template)
@ -534,7 +538,7 @@ $start=1;$end=5;$upx=2;$upy=1;$dwnx=0;$dwny=1;$jd=0;$sn=1;
break;
case "template4":
$temp = 'grey';
break;
break;
case "template5":
$temp = 'blank';
break;
@ -543,10 +547,10 @@ $start=1;$end=5;$upx=2;$upy=1;$dwnx=0;$dwny=1;$jd=0;$sn=1;
<input type="submit" name="back" value="<?php echo get_lang('Back'); ?>">
<input type="submit" name="saveandexit" value="<?php echo get_lang('SaveAndExit');?>">
<input type="button" value="<?php echo get_lang('Preview');?>" onClick="preview('mcsa','<?php echo $temp; ?>','<?php echo $Multi; ?>')">
<input type="submit" name="next" value="<?php echo get_lang('Next'); ?>">
<input type="submit" name="next" value="<?php echo get_lang('Next'); ?>">
</div>
<!--this partcular field helps in identify the item to be add at the itemadd.php-->
</form>
</div>
<div id=bottomnav align="center"></DIV>

@ -3,14 +3,14 @@
DOKEOS - elearning and course management software
For a full list of contributors, see documentation/credits.html
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
See "documentation/licence.html" more details.
Contact:
Contact:
Dokeos
Rue des Palais 44 Paleizenstraat
B-1030 Brussels - Belgium
@ -19,11 +19,11 @@
/**
* @package dokeos.survey
* @author
* @version $Id: mcsa_edit.php 10680 2007-01-11 21:26:23Z pcool $
* @author
* @version $Id: mcsa_edit.php 10705 2007-01-12 22:40:01Z pcool $
*/
// name of the language file that needs to be included
// name of the language file that needs to be included
$language_file = 'survey';
// including the global dokeos file
@ -63,12 +63,16 @@ $groupid=$_REQUEST['groupid'];
$surveyid=$_REQUEST['surveyid'];
$qid=$_REQUEST['qid'];
$qtype=$_REQUEST['qtype'];
// Database table definitions
/** @todo use database constants for the survey tables */
$table_survey_question = Database :: get_course_table(TABLE_SURVEY_QUESTION);
$table_languages = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$Add = get_lang('UpdateQuestionType');
$Multi = get_lang('MultipleChoiceSingle');
$tool_name = $Add.$Multi;
$rs=SurveyManager::get_question_data($qid,$curr_dbname);
$sql = "SELECT * FROM questions WHERE qid = '$qid'";
$sql = "SELECT * FROM $table_survey_question WHERE qid = '$qid'";
$res = api_sql_query($sql);
$obj = mysql_fetch_object($res);
for($i=0,$check=0;$i<10;$i++)
@ -85,11 +89,11 @@ if (isset($_POST['update']))
{
$qid=$_POST['qid'];
$alignment=$_POST['alignment'];
if(isset($_POST['enterquestion']))
$enter_question=$_POST['enterquestion'];
else
$enter_question=$rs->caption;
$enter_question=$rs->caption;
if(isset($_POST['mutlichkboxtext']))
$answers=$_POST['mutlichkboxtext'];
else
@ -104,33 +108,33 @@ if (isset($_POST['update']))
}
}
$open_ans="";
$count=count($_POST['mutlichkboxtext']);
$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')."<br>";
$error_message = get_lang('PleaseEnterAQuestion')."<br>";
if ($noans)
$error_message = $error_message."<br>".get_lang('PleasFillAllAnswer');
if(isset($error_message));
//Display::display_error_message($error_message);
//Display::display_error_message($error_message);
else
{
$questtype=$rs->qtype;
$questtype=$rs->qtype;
$enter_question = addslashes($enter_question);
SurveyManager::update_question($qid,$questtype,$enter_question,$alignment,$answers,$open_ans,$curr_dbname);
header("location:select_question_group.php?groupid=$groupid&surveyid=$surveyid");
exit;
}
}
if(isset($_POST['back']))
@ -144,7 +148,7 @@ Display::display_header($tool_name);
api_display_tool_title($tool_name);
if( isset($error_message) )
{
Display::display_error_message($error_message);
Display::display_error_message($error_message);
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
@ -170,19 +174,19 @@ if( isset($error_message) )
</td></tr>
<tr><td><br></td></tr>
<tr>
<tr>
<td class="pagedetails_heading"><a class="form_text_bold"><strong>Question</strong></a></td>
</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="outerBorder_innertable">
<tr class="white_bg">
<td height="30" class="form_text1">
Enter the question.
<tr class="white_bg">
<td height="30" class="form_text1">
Enter the question.
</td>
<td class="form_text1" align="right">&nbsp;
</td>
</tr>
<tr class="form_bg">
<tr class="form_bg">
<td width="542" height="30" colspan="2" >
<?php
require_once(api_get_path(LIBRARY_PATH) . "/fckeditor/fckeditor.php");
@ -193,51 +197,50 @@ if( isset($error_message) )
$oFCKeditor->Value = $rs->caption;
$oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js";
$oFCKeditor->ToolbarSet = "Survey";
$TBL_LANGUAGES = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql="SELECT isocode FROM ".$TBL_LANGUAGES." WHERE english_name='".$_SESSION["_course"]["language"]."'";
$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;
?>
</td>
</tr>
</table>
<br>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="outerBorder_innertable">
<tr>
<tr>
<td class="pagedetails_heading"><a class="form_text_bold"><strong>Answer</strong></a></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="outerBorder_innertable">
<tr class="white_bg">
<tr class="white_bg">
<td height="30"><span class="form_text1">Enter the answers</span>.
</td>
<td>&nbsp;</td>
<td width="192" align="right">&nbsp; </td>
</tr>
</table>
<!--table for adding the multiple answers-->
<!--<a name="tbl">-->
</table>
<!--table for adding the multiple answers-->
<!--<a name="tbl">-->
<table ID="tblFields" width="70%" border="0" cellpadding="0" cellspacing="0" class="outerBorder_innertable">
<?php
<?php
$start=1;$end=$check;$upx=2;$upy=1;$dwnx=0;$dwny=1;$jd=0;$sn=1;
$id="id";
$tempmutlichkboxtext="jkjk";
$tempchkboxpoint="jkjk";
$tempmutlichkboxtext="jkjk";
$tempchkboxpoint="jkjk";
$up="up";
$down="down";
$flag=1;
if(isset($_POST['mutlichkboxtext']))
$end=count($_POST['mutlichkboxtext']);
$end=count($_POST['mutlichkboxtext']);
for($i=$start;$i<=$end;$i++)
{
{
$id="id".$i."_x";
if(isset($_POST[$id]))
{
$jd=$i;
@ -250,17 +253,17 @@ $start=1;$end=$check;$upx=2;$upy=1;$dwnx=0;$dwny=1;$jd=0;$sn=1;
else
$end-=1;
break;
}
}
for($i=$start;$i<=$end;$i++)
{
{
$up="up".$i."_x";
$down="down".$i."_x";
$down="down".$i."_x";
if(isset($_POST[$up])||isset($_POST[$down]))
{
{
$flag=0;
if(isset($_POST[$up]))
{
@ -279,14 +282,14 @@ $start=1;$end=$check;$upx=2;$upy=1;$dwnx=0;$dwny=1;$jd=0;$sn=1;
$_POST['mutlichkboxtext']=$tempmutlichkboxtext;
}
$jd=0;
break;
break;
}
}
}
if($flag==1)
{
if(isset($_POST['addnewrows']))
{
$end=count($_POST['mutlichkboxtext']);
{
$end=count($_POST['mutlichkboxtext']);
if($end<10)
{
$end=$end+$_POST['addnewrows'];
@ -299,11 +302,11 @@ $start=1;$end=$check;$upx=2;$upy=1;$dwnx=0;$dwny=1;$jd=0;$sn=1;
$error_message = get_lang('YouCantAddMoreThanTen')."<br>";
if( isset($error_message) )
{
Display::display_error_message($error_message);
Display::display_error_message($error_message);
}
}
}
}
}
for($i=$start;$i<=$end;$i++)
{
if($i==$jd)
@ -321,30 +324,30 @@ $start=1;$end=$check;$upx=2;$upy=1;$dwnx=0;$dwny=1;$jd=0;$sn=1;
$post_text1=$_POST['mutlichkboxtext'];
$post_text = stripslashes($post_text1[$i-1]);
}
else
else
$post_text=stripslashes($rs->$val);
?>
<tr class="form_bg" id="0">
<td width="16" height="30" align="left" class="form_text">
?>
<tr class="form_bg" id="0">
<td width="16" height="30" align="left" class="form_text">
<?php echo $sn;?>
</td>
</td>
<td class="form_bg"><textarea name="mutlichkboxtext[]" cols="50" rows="3" class="text_field" style="width:100%;"><?php echo $post_text; ?></textarea>
</td>
<td width="10" class="form_text"><img src="../img/blank.gif" width="10" height="8">
</td>
<td width="10" class="form_text"><img src="../img/blank.gif" width="10" height="8">
</td>
</td>
<?php if($i>$start)
{
?>
<td width="30" align="center" class="form_text1">
<input type="image" src="../img/up.gif" width="24" height="24" border="0" onclick="this.form.submit();" name="<?echo "up".$i;?>" style="cursor:hand">
<td width="30" align="center" class="form_text1">
<input type="image" src="../img/up.gif" width="24" height="24" border="0" onclick="this.form.submit();" name="<?echo "up".$i;?>" style="cursor:hand">
</td>
<?php }
else
{
?> <td width="30" align="center" class="form_text1">
?> <td width="30" align="center" class="form_text1">
</td>
<?php }
$sn++;
@ -353,43 +356,43 @@ $start=1;$end=$check;$upx=2;$upy=1;$dwnx=0;$dwny=1;$jd=0;$sn=1;
<?php if($i<$end)
{
?>
<td width="30" align="center" class="form_text">
<input type="image" src="../img/down.gif" width="24" height="24" border="0" onclick="this.form.submit();" name="<?php echo "down".$i;?>" style="cursor:hand">
<td width="30" align="center" class="form_text">
<input type="image" src="../img/down.gif" width="24" height="24" border="0" onclick="this.form.submit();" name="<?php echo "down".$i;?>" style="cursor:hand">
</td>
<?php }
else
{
?> <td width="30" align="center" class="form_text1">
?> <td width="30" align="center" class="form_text1">
</td>
<?php }
?>
<td width="30" align="center" class="form_text">
<input type="image" src="../img/delete.gif" width="24" height="24" border="0" style="cursor:hand" name="<?php echo "id".$i;?>" value="<?php echo $end; ?>" onclick="this.form.submit();">
<td width="30" align="center" class="form_text">
<input type="image" src="../img/delete.gif" width="24" height="24" border="0" style="cursor:hand" name="<?php echo "id".$i;?>" value="<?php echo $end; ?>" onclick="this.form.submit();">
</tr>
<?php }
<?php }
}
?>
</table>
?>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr class="white_bg">
<tr class="white_bg">
<td height="30"><span class="form_text1">Add&nbsp;&nbsp;</span>
<select name="addnewrows" class="text_field_small" style="width:100px" onChange="this.form.submit();">
<select name="addnewrows" class="text_field_small" style="width:100px" onChange="this.form.submit();">
<option value="0" >0</option>
<option value="1" >1</option>
<option value="2" >2</option>
<option value="3" >3</option>
<option value="4" >4</option>
<option value="5" >5</option>
<option value="5" >5</option>
</select>
<a class="form_text1">New Answer</a>
<span class="form_text"><span class="form_text1">
<a class="form_text1">New Answer</a>
<span class="form_text"><span class="form_text1">
</td>
</tr>
</table>
<br>
<br>
<div align="center">
<div align="center">
<input type="HIDDEN" name="end1" value="<?php echo $end; ?>">
@ -397,7 +400,7 @@ $start=1;$end=$check;$upx=2;$upy=1;$dwnx=0;$dwny=1;$jd=0;$sn=1;
{
?> <input type="hidden" name="add_question" value="<?php echo $_POST['add_question'];?>" >
<?php }
$sql = "SELECT * FROM survey WHERE survey_id='$surveyid'";
$sql = "SELECT * FROM $table_survey WHERE survey_id='$surveyid'";
$res=api_sql_query($sql);
$obj=mysql_fetch_object($res);
switch($obj->template)
@ -413,7 +416,7 @@ $start=1;$end=$check;$upx=2;$upy=1;$dwnx=0;$dwny=1;$jd=0;$sn=1;
break;
case "template4":
$temp = 'grey';
break;
break;
case "template5":
$temp = 'blank';
break;
@ -422,10 +425,10 @@ $start=1;$end=$check;$upx=2;$upy=1;$dwnx=0;$dwny=1;$jd=0;$sn=1;
?>
<input type="submit" name="back" value="<?php echo get_lang('Back'); ?>">
<input type="button" value="<?php echo get_lang('Preview');?>" onClick="preview('mcsa','<?php echo $temp; ?>','<?php echo $Multi; ?>')">
<input type="submit" name="update" value="<?php echo get_lang('Update'); ?>">
<input type="submit" name="update" value="<?php echo get_lang('Update'); ?>">
</div>
<!--this partcular field helps in identify the item to be add at the itemadd.php-->
</form>
</div>
<div id=bottomnav align="center"></DIV>

@ -3,14 +3,14 @@
DOKEOS - elearning and course management software
For a full list of contributors, see documentation/credits.html
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
See "documentation/licence.html" more details.
Contact:
Contact:
Dokeos
Rue des Palais 44 Paleizenstraat
B-1030 Brussels - Belgium
@ -19,11 +19,11 @@
/**
* @package dokeos.survey
* @author
* @version $Id: numbered.php 10680 2007-01-11 21:26:23Z pcool $
* @author
* @version $Id: numbered.php 10705 2007-01-12 22:40:01Z pcool $
*/
// name of the language file that needs to be included
// name of the language file that needs to be included
$language_file = 'survey';
// including the global dokeos file
@ -58,6 +58,12 @@ if (!api_is_allowed_to_edit())
exit;
}
// Database table definitions
$table_survey = Database :: get_course_table(TABLE_SURVEY);
$table_group = Database :: get_course_table(TABLE_SURVEY_GROUP);
$table_survey_question = Database :: get_course_table(TABLE_SURVEY_QUESTION);
$table_languages = Database :: get_main_table(TABLE_MAIN_LANGUAGE);
if(isset($_REQUEST['questtype']))
{
$add_question12=$_REQUEST['questtype'];
@ -69,9 +75,9 @@ else
$add_question = $_REQUEST['add_question'];
$groupid = $_REQUEST['groupid'];
$surveyid = $_REQUEST['surveyid'];
$table_survey = Database :: get_course_table(TABLE_SURVEY);
$table_group = Database :: get_course_table(TABLE_SURVEY_GROUP);
$table_survey_question = Database :: get_course_table(TABLE_SURVEY_QUESTION);
$Add = get_lang('AddNewQuestionType');
$Multi = get_lang('Numbered');
$groupid = $_REQUEST['groupid'];
@ -87,40 +93,40 @@ if ($_POST['action'] == 'addquestion')
{
$enter_question=$_POST['enterquestion'];
$answers=$_POST['mutlichkboxtext'];
$rating=$_POST['chkboxpoint'];
$rating=$_POST['chkboxpoint'];
$answerT=$_POST['radiotrue'];
$answerD=$_POST['radiodefault'];
$alignment='';
$open_ans="";
$count=count($_POST['mutlichkboxtext']);
$count=count($_POST['mutlichkboxtext']);
$noans=0;
$nopoint=0;
for($i=0;$i<$count;$i++)
{
{
$answers[$i]=trim($answers[$i]);
if(empty($answers[$i]))
$noans++;
if($rating[$i]<1||$rating[$i]>5)
$nopoint++;
}
$enter_question=trim($enter_question);
if(empty($enter_question))
$error_message = get_lang('PleaseEnterAQuestion')."<br>";
$error_message = get_lang('PleaseEnterAQuestion')."<br>";
if ($noans)
$error_message = $error_message."<br>".get_lang('PleasFillAllAnswer');
//if($nopoint)
//$error_message = $error_message."<br>".get_lang('PleaseFillAllPoints');
//$error_message = $error_message."<br>".get_lang('PleaseFillAllPoints');
//if(empty($_POST['radiotrue']))
// $error_message=$error_message."<br>".get_lang('PleaseSelectOneTrue');
//if(empty($_POST['radiodefault']))
//$error_message=$error_message."<br>".get_lang('PleaseSelectOneDefault');
if(isset($error_message));
//Display::display_error_message($error_message);
//Display::display_error_message($error_message);
else
{
$groupid = $_POST['groupid'];
$groupid = $_POST['groupid'];
$questtype = $_REQUEST['questtype'];
$surveyid = $_REQUEST['surveyid'];
$enter_question = addslashes($enter_question); SurveyManager::create_question($groupid,$surveyid,$questtype,$enter_question,$alignment,$answers,$open_ans,$answerT,$answerD,$rating,$curr_dbname); header("location:select_question_group.php?groupid=$groupid&surveyid=$surveyid");
@ -138,16 +144,16 @@ if ($_POST['action'] == 'addquestion')
{
$enter_question=$_POST['enterquestion'];
$answers=$_POST['mutlichkboxtext'];
$rating=$_POST['chkboxpoint'];
$rating=$_POST['chkboxpoint'];
$answerT=$_POST['radiotrue'];
$answerD=$_POST['radiodefault'];
$alignment='';
$open_ans="";
$count=count($_POST['mutlichkboxtext']);
$count=count($_POST['mutlichkboxtext']);
$noans=0;
$nopoint=0;
for($i=0;$i<$count;$i++)
{
{
$answers[$i]=trim($answers[$i]);
if(empty($answers[$i]))
$noans++;
@ -156,22 +162,22 @@ if ($_POST['action'] == 'addquestion')
}
$enter_question=trim($enter_question);
if(empty($enter_question))
$error_message = get_lang('PleaseEnterAQuestion')."<br>";
$error_message = get_lang('PleaseEnterAQuestion')."<br>";
if ($noans)
$error_message = $error_message."<br>".get_lang('PleasFillAllAnswer');
//if($nopoint)
//$error_message = $error_message."<br>".get_lang('PleaseFillAllPoints');
//$error_message = $error_message."<br>".get_lang('PleaseFillAllPoints');
//if(empty($_POST['radiotrue']))
// $error_message=$error_message."<br>".get_lang('PleaseSelectOneTrue');
//if(empty($_POST['radiodefault']))
//$error_message=$error_message."<br>".get_lang('PleaseSelectOneDefault');
if(isset($error_message));
//Display::display_error_message($error_message);
//Display::display_error_message($error_message);
else
{
$groupid = $_REQUEST['groupid'];
$questtype = $_REQUEST['questtype'];
$surveyid = $_REQUEST['surveyid'];
$surveyid = $_REQUEST['surveyid'];
$enter_question = addslashes($enter_question); SurveyManager::create_question($groupid,$surveyid,$questtype,$enter_question,$alignment,$answers,$open_ans,$answerT,$answerD,$rating,$curr_dbname);
header("location:survey_list.php?n=$n");
exit;
@ -196,7 +202,7 @@ select_question_type($add_question12,$groupid,$surveyid,$cidReq,$curr_dbname);
<?php
if( isset($error_message) )
{
Display::display_error_message($error_message);
Display::display_error_message($error_message);
}
?>
<SCRIPT LANGUAGE="JAVASCRIPT">
@ -216,19 +222,19 @@ function checkLength(form){
<input type="hidden" name="action" value="addquestion" >
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="outerBorder_innertable">
<tr>
<tr>
<td class="pagedetails_heading"><a class="form_text_bold"><strong>Question</strong></a></td>
</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="outerBorder_innertable">
<tr class="white_bg">
<td height="30" class="form_text1">
Enter the question.
<tr class="white_bg">
<td height="30" class="form_text1">
Enter the question.
</td>
<td class="form_text1" align="right">&nbsp;
</td>
</tr>
<tr class="form_bg">
<tr class="form_bg">
<td width="542" height="30" colspan="2" >
<?php
@ -240,64 +246,63 @@ function checkLength(form){
$oFCKeditor->Value = stripslashes($enter_question);
$oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js";
$oFCKeditor->ToolbarSet = "Survey";
$TBL_LANGUAGES = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql="SELECT isocode FROM ".$TBL_LANGUAGES." WHERE english_name='".$_SESSION["_course"]["language"]."'";
$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;
?>
</td>
</tr>
</table>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="outerBorder_innertable">
<tr>
<tr>
<td class="pagedetails_heading"><a class="form_text_bold"><strong>Answer</strong></a></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="outerBorder_innertable">
<tr class="white_bg">
<tr class="white_bg">
<td height="30"><span class="form_text1">Enter the answers</span>.
</td>
<td>&nbsp;</td>
<td width="192" align="right">&nbsp; </td>
</tr>
</table>
<!--table for adding the multiple answers-->
<!--<a name="tbl">-->
<table ID="tblFields" width="70%" border="0" cellpadding="0" cellspacing="0" class="outerBorder_innertable">
<?php
$start=1;$end=5;$upx=2;$upy=1;$dwnx=0;$dwny=1;$jd=0;$sn=1;
$id="id";
$tempmutlichkboxtext="jkjk";
if(isset($_POST['radiodefault']))
$tempradiodefault=$_POST['radiodefault'];
else
$tempradiodefault=1;
$tempchkboxpoint="jkjk";
$up="up";
$down="down";
$flag=1;
if(isset($_POST['mutlichkboxtext']))
$end=count($_POST['mutlichkboxtext']);
for($i=$start;$i<=$end;$i++)
{
{
$id="id".$i."_x";
//echo ",".$id;
if(isset($_POST[$id]))
@ -317,16 +322,16 @@ function checkLength(form){
}
}
for($i=$start;$i<=$end;$i++)
{
$up="up".$i."_x";
$down="down".$i."_x";
if(isset($_POST[$up])||isset($_POST[$down]))
{
$flag=0;
if(isset($_POST[$up]))
{
@ -364,7 +369,7 @@ function checkLength(form){
if(isset($_POST[$down]))
{
$tempmutlichkboxtext=$_POST['mutlichkboxtext'];
if($tempradiodefault==$i)
@ -372,7 +377,7 @@ function checkLength(form){
elseif($tempradiodefault==$i+1)
$tempradiodefault--;
$tempchkboxpoint=$_POST['chkboxpoint'];
$tempm= $tempmutlichkboxtext[$i];
$tempchkboxp=$tempchkboxpoint[$i];
@ -395,18 +400,18 @@ function checkLength(form){
}
//echo ",while checking up/down end=".$end;
$jd=0;
break;
break;
}
}
if($flag==1)
{
if(isset($_POST['addnewrows']))
{
$end=count($_POST['mutlichkboxtext']);
if($end<10)
{
$end=$end+$_POST['addnewrows'];
@ -419,7 +424,7 @@ function checkLength(form){
$error_message = get_lang('YouCantAddMoreThanTen')."<br>";
if( isset($error_message) )
{
Display::display_error_message($error_message);
Display::display_error_message($error_message);
}
}
//echo ",while checking select end=".$end;
@ -427,14 +432,14 @@ function checkLength(form){
$end=$end+$_POST['addnewrows'];*/
}
}
//echo ",after select end=".$end;
for($i=$start;$i<=$end;$i++)
{
if($i==$jd)
/*{
@ -447,8 +452,8 @@ function checkLength(form){
}
else
{
$k=$i-1;
$post_text = $_POST['mutlichkboxtext'];
@ -456,32 +461,32 @@ function checkLength(form){
$post_point=$_POST['chkboxpoint'];
//$post_true=$_POST['radiotrue'];
?>
<tr class="form_bg" id="0" >
<td width="16" height="30" align="left" class="form_text">
?>
<tr class="form_bg" id="0" >
<td width="16" height="30" align="left" class="form_text">
<?php echo $sn;?>
</td>
<td class="form_bg"><textarea name="mutlichkboxtext[]" cols="50" rows="3" class="text_field" style="width:100%;"><?php echo $post_text[$k]; ?></textarea>
</td>
<td width="10" class="form_text"><img src="../img/blank.gif" width="10" height="8">
</td>
<?php if($i>$start)
{
?>
<td width="30" align="center" class="form_text1">
<input type="image" src="../img/up.gif" width="24" height="24" border="0" onclick="this.form.submit();" name="<?php echo "up".$i;?>" style="cursor:hand">
<td width="30" align="center" class="form_text1">
<input type="image" src="../img/up.gif" width="24" height="24" border="0" onclick="this.form.submit();" name="<?php echo "up".$i;?>" style="cursor:hand">
</td>
<?php }
else
{
?> <td width="30" align="center" class="form_text1">
?> <td width="30" align="center" class="form_text1">
</td>
<?php }
$sn++;
@ -490,31 +495,31 @@ function checkLength(form){
<?php if($i<$end)
{
?>
<td width="30" align="center" class="form_text">
<input type="image" src="../img/down.gif" width="24" height="24" border="0" onclick="this.form.submit();" name="<?php echo "down".$i;?>" style="cursor:hand">
<td width="30" align="center" class="form_text">
<input type="image" src="../img/down.gif" width="24" height="24" border="0" onclick="this.form.submit();" name="<?php echo "down".$i;?>" style="cursor:hand">
</td>
<?php }
else
{
?> <td width="30" align="center" class="form_text1">
?> <td width="30" align="center" class="form_text1">
</td>
<?php }
?>
<td width="30" align="center" class="form_text">
<input type="image" src="../img/delete.gif" width="24" height="24" border="0" style="cursor:hand" name="<?php echo "id".$i;?>" value="<?php echo $end; ?>" onclick="this.form.submit();">
</tr>
<?php }
<?php }
}
?>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr class="white_bg">
<tr class="white_bg">
<td height="30"><span class="form_text1">Add&nbsp;&nbsp;</span>
<select name="addnewrows" class="text_field_small" style="width:100px" onChange="this.form.submit();">
<option value="0" >0</option>
@ -540,7 +545,7 @@ function checkLength(form){
echo '<input type="hidden" name="add_question" value="'.$_POST['add_question'].'" />';
}
$sql = "SELECT * FROM survey WHERE survey_id='$surveyid'";
$sql = "SELECT * FROM $table_survey WHERE survey_id='$surveyid'";
$res=api_sql_query($sql);
$obj=mysql_fetch_object($res);
switch($obj->template)
@ -556,7 +561,7 @@ function checkLength(form){
break;
case "template4":
$temp = 'grey';
break;
break;
case "template5":
$temp = 'blank';
break;
@ -565,13 +570,13 @@ function checkLength(form){
<input type="submit" name="back" value="<?php echo get_lang('Back'); ?>">
<input type="submit" name="saveandexit" value="<?php echo get_lang('SaveAndExit'); ?>">
<input type="button" value="<?php echo get_lang('Preview');?>" onClick="preview('numbered','<?php echo $temp; ?>','<?php echo $Multi; ?>')">
<input type="submit" name="next" value="<?php echo get_lang('Next'); ?>">
<input type="submit" name="next" value="<?php echo get_lang('Next'); ?>">
</div>
<!--this partcular field helps in identify the item to be add at the itemadd.php-->
</form>
</div>
<div id=bottomnav align="center"></DIV>
</body>
</html>

@ -3,14 +3,14 @@
DOKEOS - elearning and course management software
For a full list of contributors, see documentation/credits.html
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
See "documentation/licence.html" more details.
Contact:
Contact:
Dokeos
Rue des Palais 44 Paleizenstraat
B-1030 Brussels - Belgium
@ -19,11 +19,11 @@
/**
* @package dokeos.survey
* @author
* @version $Id: numbered_edit.php 10680 2007-01-11 21:26:23Z pcool $
* @author
* @version $Id: numbered_edit.php 10705 2007-01-12 22:40:01Z pcool $
*/
// name of the language file that needs to be included
// name of the language file that needs to be included
$language_file = 'survey';
// including the global dokeos file
@ -38,18 +38,25 @@ require_once (api_get_path(CONFIGURATION_PATH) ."/add_course.conf.php");
require_once (api_get_path(LIBRARY_PATH)."/add_course.lib.inc.php");
require_once (api_get_path(LIBRARY_PATH)."/surveymanager.lib.php");
require_once (api_get_path(LIBRARY_PATH)."/usermanager.lib.php");
// Database table definitions
/** @todo use database constants for the survey tables */
$table_survey_question = Database :: get_course_table(TABLE_SURVEY_QUESTION);
$table_languages = Database :: get_main_table(TABLE_MAIN_LANGUAGE);
$interbreadcrumb[] = array ("url" => "survey_list.php?n=$n", "name" => get_lang('Survey'));
$groupid=$_REQUEST['groupid'];
$surveyid=$_REQUEST['surveyid'];
$qid=$_REQUEST['qid'];
$qtype=$_REQUEST['qtype'];
$table_survey_question = Database :: get_course_table(TABLE_SURVEY_QUESTION);
$Add = get_lang('UpdateQuestionType');
$Multi = get_lang('Numbered');
$tool_name = $Add.$Multi;
$rs=SurveyManager::get_question_data($qid,$curr_dbname);
$sql = "SELECT * FROM questions WHERE qid = '$qid'";
$sql = "SELECT * FROM $table_survey_question WHERE qid = '$qid'";
$res = api_sql_query($sql);
$obj = mysql_fetch_object($res);
for($i=0,$check=0;$i<10;$i++)
@ -70,9 +77,9 @@ if (isset($_POST['update']))
if(isset($_POST['enterquestion']))
$enter_question=$_POST['enterquestion'];
else
$enter_question=$rs->caption;
$enter_question=$rs->caption;
if(isset($_POST['mutlichkboxtext']))
$answers=$_POST['mutlichkboxtext'];
else
@ -87,25 +94,25 @@ if (isset($_POST['update']))
}
}
$open_ans="";
$count=count($_POST['mutlichkboxtext']);
$count=count($_POST['mutlichkboxtext']);
$noans=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')."<br>";
$error_message = get_lang('PleaseEnterAQuestion')."<br>";
if ($noans)
$error_message = $error_message."<br>".get_lang('PleasFillAllAnswer');
if(isset($error_message));
//Display::display_error_message($error_message);
//Display::display_error_message($error_message);
else
{
$questtype=$rs->qtype;
$questtype=$rs->qtype;
$enter_question = addslashes($enter_question);
SurveyManager::update_question($qid,$questtype,$enter_question,$alignment,$answers,$open_ans,$curr_dbname);
header("location:select_question_group.php?groupid=$groupid&surveyid=$surveyid");
@ -125,7 +132,7 @@ Display::display_header($tool_name);
api_display_tool_title($tool_name);
if( isset($error_message) )
{
Display::display_error_message($error_message);
Display::display_error_message($error_message);
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
@ -138,19 +145,19 @@ if( isset($error_message) )
<input type="hidden" name="questtype" value="<?php echo $add_question12; ?>">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="outerBorder_innertable">
<tr>
<tr>
<td class="pagedetails_heading"><a class="form_text_bold"><strong>Question</strong></a></td>
</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="outerBorder_innertable">
<tr class="white_bg">
<td height="30" class="form_text1">
Enter the question.
<tr class="white_bg">
<td height="30" class="form_text1">
Enter the question.
</td>
<td class="form_text1" align="right">&nbsp;
</td>
</tr>
<tr class="form_bg">
<tr class="form_bg">
<td width="542" height="30" colspan="2" >
<?php
@ -162,50 +169,49 @@ if( isset($error_message) )
$oFCKeditor->Value = $rs->caption;
$oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js";
$oFCKeditor->ToolbarSet = "Survey";
$TBL_LANGUAGES = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql="SELECT isocode FROM ".$TBL_LANGUAGES." WHERE english_name='".$_SESSION["_course"]["language"]."'";
$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;
?>
</td>
</tr>
</table>
<br>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="outerBorder_innertable">
<tr>
<tr>
<td class="pagedetails_heading"><a class="form_text_bold"><strong>Answer</strong></a></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="outerBorder_innertable">
<tr class="white_bg">
<tr class="white_bg">
<td height="30"><span class="form_text1">Enter the answers</span>.
</td>
<td>&nbsp;</td>
<td width="192" align="right">&nbsp; </td>
</tr>
</table>
<!--table for adding the multiple answers-->
<!--<a name="tbl">-->
</table>
<!--table for adding the multiple answers-->
<!--<a name="tbl">-->
<table ID="tblFields" width="70%" border="0" cellpadding="0" cellspacing="0" class="outerBorder_innertable">
<?php
<?php
$start=1;$end=$check;$upx=2;$upy=1;$dwnx=0;$dwny=1;$jd=0;$sn=1;
$id="id";
$tempmutlichkboxtext="jkjk";
$tempmutlichkboxtext="jkjk";
$up="up";
$down="down";
$flag=1;
if(isset($_POST['mutlichkboxtext']))
$end=count($_POST['mutlichkboxtext']);
$end=count($_POST['mutlichkboxtext']);
for($i=$start;$i<=$end;$i++)
{
{
$id="id".$i."_x";
if(isset($_POST[$id]))
{
$jd=$i;
@ -218,17 +224,17 @@ $start=1;$end=$check;$upx=2;$upy=1;$dwnx=0;$dwny=1;$jd=0;$sn=1;
else
$end-=1;
break;
}
}
for($i=$start;$i<=$end;$i++)
{
{
$up="up".$i."_x";
$down="down".$i."_x";
$down="down".$i."_x";
if(isset($_POST[$up])||isset($_POST[$down]))
{
{
$flag=0;
if(isset($_POST[$up]))
{
@ -248,14 +254,14 @@ $start=1;$end=$check;$upx=2;$upy=1;$dwnx=0;$dwny=1;$jd=0;$sn=1;
}
//echo ",while checking up/down end=".$end;
$jd=0;
break;
break;
}
}
}
if($flag==1)
{
if(isset($_POST['addnewrows']))
{
$end=count($_POST['mutlichkboxtext']);
{
$end=count($_POST['mutlichkboxtext']);
if($end<10)
{
$end=$end+$_POST['addnewrows'];
@ -268,12 +274,12 @@ $start=1;$end=$check;$upx=2;$upy=1;$dwnx=0;$dwny=1;$jd=0;$sn=1;
$error_message = get_lang('YouCantAddMoreThanTen')."<br>";
if( isset($error_message) )
{
Display::display_error_message($error_message);
Display::display_error_message($error_message);
}
}
}
}
//echo ",after select end=".$end;
}
//echo ",after select end=".$end;
for($i=$start;$i<=$end;$i++)
{
if($i==$jd)
@ -291,25 +297,25 @@ $start=1;$end=$check;$upx=2;$upy=1;$dwnx=0;$dwny=1;$jd=0;$sn=1;
$post_text1=$_POST['mutlichkboxtext'];
$post_text = $post_text1[$i-1];
}
else
else
$post_text=$rs->$val;
?>
<tr class="form_bg" id="0">
<td width="16" height="30" align="left" class="form_text">
?>
<tr class="form_bg" id="0">
<td width="16" height="30" align="left" class="form_text">
<?php echo $sn;?>
</td>
</td>
<td class="form_bg"><textarea name="mutlichkboxtext[]" cols="50" rows="3" class="text_field" style="width:100%;"><?php echo $post_text; ?></textarea>
</td>
<?php if($i>$start)
{
?>
<td width="30" align="center" class="form_text1">
<input type="image" src="../img/up.gif" width="24" height="24" border="0" onclick="this.form.submit();" name="<?php echo "up".$i;?>" style="cursor:hand">
<td width="30" align="center" class="form_text1">
<input type="image" src="../img/up.gif" width="24" height="24" border="0" onclick="this.form.submit();" name="<?php echo "up".$i;?>" style="cursor:hand">
</td>
<?php }
else
{
?> <td width="30" align="center" class="form_text1">
?> <td width="30" align="center" class="form_text1">
</td>
<?php }
$sn++;
@ -318,45 +324,45 @@ $start=1;$end=$check;$upx=2;$upy=1;$dwnx=0;$dwny=1;$jd=0;$sn=1;
<?php if($i<$end)
{
?>
<td width="30" align="center" class="form_text">
<input type="image" src="../img/down.gif" width="24" height="24" border="0" onclick="this.form.submit();" name="<?php echo "down".$i;?>" style="cursor:hand">
<td width="30" align="center" class="form_text">
<input type="image" src="../img/down.gif" width="24" height="24" border="0" onclick="this.form.submit();" name="<?php echo "down".$i;?>" style="cursor:hand">
</td>
<?php }
else
{
?> <td width="30" align="center" class="form_text1">
?> <td width="30" align="center" class="form_text1">
</td>
<?php }
?>
<td width="30" align="center" class="form_text">
<input type="image" src="../img/delete.gif" width="24" height="24" border="0" style="cursor:hand" name="<?php echo "id".$i;?>" value="<?php echo $end;?>" onclick="this.form.submit();">
<td width="30" align="center" class="form_text">
<input type="image" src="../img/delete.gif" width="24" height="24" border="0" style="cursor:hand" name="<?php echo "id".$i;?>" value="<?php echo $end;?>" onclick="this.form.submit();">
</tr>
<?php }
<?php }
}
?>
</table>
?>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr class="white_bg">
<tr class="white_bg">
<td height="30"><span class="form_text1">Add&nbsp;&nbsp;</span>
<select name="addnewrows" class="text_field_small" style="width:100px" onChange="this.form.submit();">
<select name="addnewrows" class="text_field_small" style="width:100px" onChange="this.form.submit();">
<option value="0" >0</option>
<option value="1" >1</option>
<option value="2" >2</option>
<option value="3" >3</option>
<option value="4" >4</option>
<option value="5" >5</option>
<option value="5" >5</option>
</select>
<a class="form_text1">New Answer</a>
<span class="form_text"><span class="form_text1">
<a class="form_text1">New Answer</a>
<span class="form_text"><span class="form_text1">
</td>
</tr>
</table>
<br>
<br>
<div align="center">
<div align="center">
<?php
$sql = "SELECT * FROM survey WHERE survey_id='$surveyid'";
$sql = "SELECT * FROM $table_survey WHERE survey_id='$surveyid'";
$res=api_sql_query($sql);
$obj=mysql_fetch_object($res);
switch($obj->template)
@ -372,7 +378,7 @@ $start=1;$end=$check;$upx=2;$upy=1;$dwnx=0;$dwny=1;$jd=0;$sn=1;
break;
case "template4":
$temp = 'grey';
break;
break;
case "template5":
$temp = 'blank';
break;
@ -382,13 +388,13 @@ $start=1;$end=$check;$upx=2;$upy=1;$dwnx=0;$dwny=1;$jd=0;$sn=1;
<input type="hidden" name="end1" value="<?php echo $end; ?>" />
<input type="submit" name="back" value="<?php echo get_lang('Back'); ?>" />
<input type="button" value="<?php echo get_lang('Preview');?>" onClick="preview('numbered','<?php echo $temp; ?>','<?php echo $Multi; ?>')">
<input type="submit" name="update" value="<?php echo get_lang('Update'); ?>">
<input type="submit" name="update" value="<?php echo get_lang('Update'); ?>">
</div>
<!--this partcular field helps in identify the item to be add at the itemadd.php-->
</form>
</div>
<div id=bottomnav align="center"></DIV>
</body>
</html>

@ -20,7 +20,7 @@
/**
* @package dokeos.survey
* @author
* @version $Id: numbered_view.php 10680 2007-01-11 21:26:23Z pcool $
* @version $Id: numbered_view.php 10705 2007-01-12 22:40:01Z pcool $
*/
// name of the language file that needs to be included
@ -60,7 +60,7 @@ $header3 = get_lang('Type');
$ques_id = $_GET['qid'];
$gname=surveymanager::ques_id_group_name($ques_id);
$ques_type = $_GET['qtype'];
$sql = "SELECT * FROM $db_name.questions where qid='$ques_id'";
$sql = "SELECT * FROM $table_survey_question where qid='$ques_id'";
$res = api_sql_query($sql);
$obj = mysql_fetch_object($res);
?>

@ -3,14 +3,14 @@
DOKEOS - elearning and course management software
For a full list of contributors, see documentation/credits.html
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
See "documentation/licence.html" more details.
Contact:
Contact:
Dokeos
Rue des Palais 44 Paleizenstraat
B-1030 Brussels - Belgium
@ -19,11 +19,11 @@
/**
* @package dokeos.survey
* @author
* @version $Id: open.php 10680 2007-01-11 21:26:23Z pcool $
* @author
* @version $Id: open.php 10705 2007-01-12 22:40:01Z pcool $
*/
// name of the language file that needs to be included
// name of the language file that needs to be included
$language_file = 'survey';
// including the global dokeos file
@ -56,6 +56,14 @@ if (!api_is_allowed_to_edit())
Display :: display_footer();
exit;
}
// Database table definitions
/** @todo use database constants for the survey tables */
$table_survey = Database :: get_course_table(TABLE_SURVEY);
$table_group = Database :: get_course_table(TABLE_SURVEY_GROUP);
$table_survey_question = Database :: get_course_table(TABLE_SURVEY_QUESTION);
$table_languages = Database :: get_main_table(TABLE_MAIN_LANGUAGE);
if(isset($_REQUEST['questtype']))
{
$add_question12=$_REQUEST['questtype'];
@ -66,9 +74,9 @@ else
}
$n=$_REQUEST['n'];
$interbreadcrumb[] = array ("url" => "survey_list.php?n=$n", "name" => get_lang('Survey'));
$table_survey = Database :: get_course_table(TABLE_SURVEY);
$table_group = Database :: get_course_table(TABLE_SURVEY_GROUP);
$table_survey_question = Database :: get_course_table(TABLE_SURVEY_QUESTION);
$Add = get_lang('AddNewQuestionType');
$Multi = get_lang('Open');
$groupid = $_REQUEST['groupid'];
@ -76,7 +84,7 @@ $surveyid = $_REQUEST['surveyid'];
if ($_POST['action'] == 'addquestion')
{
$enter_question=$_POST['enterquestion'];
if(isset($_POST['next']))
{
$questtype = $_REQUEST['questtype'];
@ -84,19 +92,19 @@ if ($_POST['action'] == 'addquestion')
$defaultext=$_POST['defaultext'];
$alignment='';
$open_ans="";
$enter_question=trim($enter_question);
if(empty($enter_question))
$error_message = get_lang('PleaseEnterAQuestion')."<br>";
$error_message = get_lang('PleaseEnterAQuestion')."<br>";
//if(empty($defaultext))
//$error_message = $error_message."<br>".get_lang('PleaseFillDefaultText');
if(isset($error_message));
//Display::display_error_message($error_message);
//Display::display_error_message($error_message);
else
{
$groupid = $_POST['groupid'];
$groupid = $_POST['groupid'];
$surveyid = $_REQUEST['surveyid']; SurveyManager::create_question($groupid,$surveyid,$questtype,$enter_question,$alignment,$answers,$open_ans,$answerT,$answerD,$rating,$curr_dbname); header("location:select_question_group.php?groupid=$groupid&surveyid=$surveyid");
exit;
}
@ -113,19 +121,19 @@ if ($_POST['action'] == 'addquestion')
$questtype = $_REQUEST['questtype'];
$enter_question=$_POST['enterquestion'];
$defaultext=$_POST['defaultext'];
$alignment='';
$open_ans="";
$enter_question=trim($enter_question);
if(empty($enter_question))
$error_message = get_lang('PleaseEnterAQuestion')."<br>";
$error_message = get_lang('PleaseEnterAQuestion')."<br>";
//if(empty($defaultext))
//$error_message = $error_message."<br>".get_lang('PleaseFillDefaultText');
if(isset($error_message));
//Display::display_error_message($error_message);
//Display::display_error_message($error_message);
else
{
$groupid = $_REQUEST['groupid'];
@ -141,7 +149,7 @@ $tool = get_lang('AddAnotherQuestion');
Display::display_header($tool);
if( isset($error_message) )
{
Display::display_error_message($error_message);
Display::display_error_message($error_message);
}
select_question_type($add_question12,$groupid,$surveyid,$cidReq,$curr_dbname);
@ -175,19 +183,19 @@ function checkLength(form){
<input type="hidden" name="curr_dbname" value="<?php echo $curr_dbname; ?>">
<input type="hidden" name="action" value="addquestion" >
<BR>
<TABLE class=outerBorder_innertable cellSpacing=0 cellPadding=0 width="100%"
<TABLE class=outerBorder_innertable cellSpacing=0 cellPadding=0 width="100%"
border=0>
<TBODY>
<TR>
<TD class=pagedetails_heading>&nbsp;</TD>
</TR></TBODY></TABLE>
<TABLE class=outerBorder_innertable cellSpacing=0 cellPadding=0 width="100%"
<TABLE class=outerBorder_innertable cellSpacing=0 cellPadding=0 width="100%"
align=center border=0>
<TBODY>
<TR class=white_bg>
<TD height=30>Enter the question. </TD>
</TR>
<tr class="form_bg">
<tr class="form_bg">
<td width="542" height="30" colspan="2" >
<?php
@ -199,15 +207,14 @@ align=center border=0>
$oFCKeditor->Value = "";
$oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js";
$oFCKeditor->ToolbarSet = "Survey";
$TBL_LANGUAGES = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql="SELECT isocode FROM ".$TBL_LANGUAGES." WHERE english_name='".$_SESSION["_course"]["language"]."'";
$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;
?>
</td>
@ -218,17 +225,17 @@ align=center border=0>
<TR class=white_bg>
<TD class=pagedetails_heading>&nbsp;</TD>
</TR></TBODY></TABLE>
<!-- <TABLE class=outerBorder_innertable cellSpacing=0 cellPadding=0 width="100%"
<!-- <TABLE class=outerBorder_innertable cellSpacing=0 cellPadding=0 width="100%"
border=0>
<TBODY>
<TR>
<TD height=30>Default Text </TD></TR>
<TR>
<TD width=192 height=30><TEXTAREA onkeyup="this.value = this.value.slice(0, 200)" style="WIDTH: 100%" name="defaultext" rows=3 cols=60>
<?php if(isset($_POST['defaultext']))echo $_POST['defaultext'];?></TEXTAREA>
<?php if(isset($_POST['defaultext']))echo $_POST['defaultext'];?></TEXTAREA>
</TD></TR></TBODY></TABLE><BR>-->
<?php
$sql = "SELECT * FROM survey WHERE survey_id='$surveyid'";
$sql = "SELECT * FROM $table_survey WHERE survey_id='$surveyid'";
$res=api_sql_query($sql);
$obj=mysql_fetch_object($res);
switch($obj->template)
@ -244,21 +251,21 @@ border=0>
break;
case "template4":
$temp = 'grey';
break;
break;
case "template5":
$temp = 'blank';
break;
}
?>
<BR>
<DIV align=center>
<DIV align=center>
<input type="submit" name="back" value="<?php echo get_lang('Back');?>">
<input type="submit" name="saveandexit" value="<?php echo get_lang('SaveAndExit'); ?>">
<input type="button" value="<?php echo get_lang('Preview');?>" onClick="preview('this.form','<?php echo $temp; ?>','<?php echo $Multi; ?>')">
<input type="submit" name="next" value="<?php echo get_lang('Next'); ?>">
<input type="submit" name="next" value="<?php echo get_lang('Next'); ?>">
</DIV></FORM></DIV>
<DIV id=bottomnav align=center></DIV>
</BODY></HTML>

@ -3,14 +3,14 @@
DOKEOS - elearning and course management software
For a full list of contributors, see documentation/credits.html
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
See "documentation/licence.html" more details.
Contact:
Contact:
Dokeos
Rue des Palais 44 Paleizenstraat
B-1030 Brussels - Belgium
@ -19,11 +19,11 @@
/**
* @package dokeos.survey
* @author
* @version $Id: open_edit.php 10680 2007-01-11 21:26:23Z pcool $
* @author
* @version $Id: open_edit.php 10705 2007-01-12 22:40:01Z pcool $
*/
// name of the language file that needs to be included
// name of the language file that needs to be included
$language_file = 'survey';
// including the global dokeos file
@ -58,6 +58,13 @@ if (!api_is_allowed_to_edit())
exit;
}
// Database table definitions
/** @todo use database constants for the survey tables */
$table_survey = Database :: get_course_table(TABLE_SURVEY);
$table_group = Database :: get_course_table(TABLE_SURVEY_GROUP);
$table_survey_question = Database :: get_course_table(TABLE_SURVEY_QUESTION);
$table_languages = Database :: get_main_table(TABLE_MAIN_LANGUAGE);
if(isset($_REQUEST['questtype']))
{
$add_question12=$_REQUEST['questtype'];
@ -69,9 +76,9 @@ else
//if(!$add_question12)
//$add_question12=$_REQUEST['questtype'];
$interbreadcrumb[] = array ("url" => "survey_list.php?n=$n", "name" => get_lang('Survey'));
$table_survey = Database :: get_course_table(TABLE_SURVEY);
$table_group = Database :: get_course_table(TABLE_SURVEY_GROUP);
$table_survey_question = Database :: get_course_table(TABLE_SURVEY_QUESTION);
$Add = get_lang('UpdateQuestionType');
$Multi = get_lang('Open');
$tool_name = $Add.$Multi;
@ -87,7 +94,7 @@ $add_question12=$rs->qtype;
if (isset($_POST['update']))
{
$enter_question=$_POST['enterquestion'];
$questtype = $_REQUEST['questtype'];
$enter_question=$_POST['enterquestion'];
$defaultext=$_POST['defaultext'];
@ -95,15 +102,15 @@ if (isset($_POST['update']))
$open_ans="";
$enter_question=trim($enter_question);
if(empty($enter_question))
$error_message = get_lang('PleaseEnterAQuestion')."<br>";
$error_message = get_lang('PleaseEnterAQuestion')."<br>";
//if(empty($defaultext))
//$error_message = $error_message."<br>".get_lang('PleaseFillDefaultText');
if(isset($error_message));
//Display::display_error_message($error_message);
//Display::display_error_message($error_message);
else
{
$groupid = $_POST['groupid'];
$qid = $_POST['qid'];
$groupid = $_POST['groupid'];
$qid = $_POST['qid'];
$questtype=$_POST['questtype'];
$answerD=$defaultext;
$enter_question = addslashes($enter_question);
@ -125,7 +132,7 @@ api_display_tool_title($tool_name);
if( isset($error_message) )
{
Display::display_error_message($error_message);
Display::display_error_message($error_message);
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
@ -139,14 +146,14 @@ if( isset($error_message) )
<input type="hidden" name="qid" value="<?php echo $qid; ?>">
<input type="hidden" name="curr_dbname" value="<?php echo $curr_dbname; ?>">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="outerBorder_innertable">
<tr class="white_bg">
<td height="30" class="form_text1">
Enter the question.
<tr class="white_bg">
<td height="30" class="form_text1">
Enter the question.
</td>
<td class="form_text1" align="right">&nbsp;
</td>
</tr>
<tr class="form_bg">
<tr class="form_bg">
<td width="542" height="30" colspan="2" >
<?php
@ -158,21 +165,20 @@ if( isset($error_message) )
$oFCKeditor->Value = $rs->caption;
$oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js";
$oFCKeditor->ToolbarSet = "Survey";
$TBL_LANGUAGES = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql="SELECT isocode FROM ".$TBL_LANGUAGES." WHERE english_name='".$_SESSION["_course"]["language"]."'";
$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;
?>
</td>
</tr>
</TABLE><BR>
<!-- <TABLE class=outerBorder_innertable cellSpacing=0 cellPadding=0 width="100%"
<!-- <TABLE class=outerBorder_innertable cellSpacing=0 cellPadding=0 width="100%"
border=0>
<TBODY>
<TR>
@ -184,10 +190,10 @@ border=0>
echo $_POST['defaultext'];
else
echo $rs->ad;
?></TEXTAREA>
?></TEXTAREA>
</TD></TR></TBODY></TABLE>--><BR>
<?php
$sql = "SELECT * FROM survey WHERE survey_id='$surveyid'";
$sql = "SELECT * FROM $table_survey WHERE survey_id='$surveyid'";
$res=api_sql_query($sql);
$obj=mysql_fetch_object($res);
switch($obj->template)
@ -203,21 +209,21 @@ border=0>
break;
case "template4":
$temp = 'grey';
break;
break;
case "template5":
$temp = 'blank';
break;
}
?>
<BR>
<DIV align=center>
<DIV align=center>
<input type="submit" name="back" value="<?php echo get_lang('Back');?>">
<input type="button" value="<?php echo get_lang('Preview');?>" onClick="preview('this.form','<?php echo $temp; ?>','<?php echo $Multi; ?>')">
<input type="submit" name="update" value="<?php echo get_lang('Update'); ?>">
<input type="submit" name="update" value="<?php echo get_lang('Update'); ?>">
</DIV></FORM></DIV>
<DIV id=bottomnav align=center></DIV>
</BODY></HTML>

@ -20,7 +20,7 @@
/**
* @package dokeos.survey
* @author
* @version $Id: open_view.php 10680 2007-01-11 21:26:23Z pcool $
* @version $Id: open_view.php 10705 2007-01-12 22:40:01Z pcool $
*/
// name of the language file that needs to be included
@ -60,7 +60,7 @@ $header3 = get_lang('Type');
$ques_id = $_GET['qid'];
$gname=surveymanager::ques_id_group_name($ques_id);
$ques_type = $_GET['qtype'];
$sql = "SELECT * FROM $db_name.questions where qid='$ques_id'";
$sql = "SELECT * FROM $table_survey_question where qid='$ques_id'";
$res = api_sql_query($sql);
$obj = mysql_fetch_object($res);
?>

@ -20,7 +20,7 @@
/**
* @package dokeos.survey
* @author
* @version $Id: question.php 10680 2007-01-11 21:26:23Z pcool $
* @version $Id: question.php 10705 2007-01-12 22:40:01Z pcool $
*/
// name of the language file that needs to be included
@ -63,7 +63,7 @@ $header2 = get_lang('GroupName');
$header2 = $header2." ".$gname;
$header3 = get_lang('Type');
$header3=$header3." ".$ques_type;
$sql = "SELECT * FROM $db_name.questions where qid='$ques_id'";
$sql = "SELECT * FROM $table_survey_question where qid='$ques_id'";
$res = api_sql_query($sql);
$obj = mysql_fetch_object($res);
$ques=$obj->caption;

@ -20,7 +20,7 @@
/**
* @package dokeos.survey
* @author
* @version $Id: question_list.php 10680 2007-01-11 21:26:23Z pcool $
* @version $Id: question_list.php 10705 2007-01-12 22:40:01Z pcool $
*/
/*
@ -132,7 +132,7 @@ function displayTemplate(url){
for($i=0;$i<$endloop;$i++)
{
$gidi=$gid1[$i];
$sql = "SELECT * FROM $db_name.questions WHERE gid='$gidi'";
$sql = "SELECT * FROM $table_survey_question WHERE gid='$gidi'";
/*
$parameters = array ('gidi' => $gidi);

@ -20,7 +20,7 @@
/**
* @package dokeos.survey
* @author
* @version $Id: question_list_new.php 10680 2007-01-11 21:26:23Z pcool $
* @version $Id: question_list_new.php 10705 2007-01-12 22:40:01Z pcool $
*/
@ -55,6 +55,9 @@ if (!api_is_allowed_to_edit())
exit;
}
$table_group = Database :: get_course_table(TABLE_SURVEY_GROUP);
$table_survey_question = Database :: get_course_table(TABLE_SURVEY_QUESTION);
$interbreadcrumb[] = array ("url" => "survey_list.php", "name" => get_lang('Survey'));
$tool_name = get_lang('SelectQuestion');
$Sname = get_lang('SurveyName');
@ -63,9 +66,7 @@ $Author = get_lang('Author');
$surveyid=$_REQUEST['surveyid'];
$groupid=$_REQUEST['groupid'];
$sid = $_REQUEST['sid'];
//$sname =surveymanager::get_surveyname($surveyid,$db_name);
$table_group = Database :: get_course_table(TABLE_SURVEY_GROUP);
$table_survey_question = Database :: get_course_table(TABLE_SURVEY_QUESTION);
$gide=$_POST['course'];
$arraycount=0;
$arraycount=count($_REQUEST['course']);
@ -197,7 +198,7 @@ function displayTemplate(url) {
for($i=0;$i<$endloop;$i++)
{
$gidi=$gid1[$i];
$sql = "SELECT * FROM $db_name.questions WHERE gid='$gidi' AND survey_id = '$sid'";
$sql = "SELECT * FROM $table_survey_question WHERE gid='$gidi' AND survey_id = '$sid'";
$res = api_sql_query($sql,__FILE__,__LINE__);
while ($obj = mysql_fetch_object($res))
{

@ -3,14 +3,14 @@
DOKEOS - elearning and course management software
For a full list of contributors, see documentation/credits.html
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
See "documentation/licence.html" more details.
Contact:
Contact:
Dokeos
Rue des Palais 44 Paleizenstraat
B-1030 Brussels - Belgium
@ -19,8 +19,8 @@
/**
* @package dokeos.survey
* @author
* @version $Id: select_question_group-uploaded.php 10680 2007-01-11 21:26:23Z pcool $
* @author
* @version $Id: select_question_group-uploaded.php 10705 2007-01-12 22:40:01Z pcool $
*/
@ -29,7 +29,7 @@
INIT SECTION
==============================================================================
*/
// name of the language file that needs to be included
// name of the language file that needs to be included
$language_file = 'survey';
// including the global dokeos file
@ -94,16 +94,16 @@ $column = $_REQUEST['column'];
$per_page = $_REQUEST['per_page'];
}
/*
$sql="SELECT * FROM questions WHERE gid='$groupid' AND survey_id = '$surveyid'";
$sql="SELECT * FROM $table_survey_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);
for($i=1;$i<=$number;$i++)
{
{
$up="up";
$down="down";
$down="down";
if(isset($_POST[$up])||isset($_POST[$down]))
{
{
$flag=0;
if(isset($_POST[$up]))
{
@ -116,9 +116,9 @@ for($i=1;$i<=$number;$i++)
if($tempradiotrue==$i)
$tempradiotrue--;
elseif($tempradiotrue==$i-1)
$tempradiotrue++;
$tempradiotrue++;
$tempm= $tempmutlichkboxtext[$i-2];
$tempchkboxp=$tempchkboxpoint[$i-2];
$tempchkboxp=$tempchkboxpoint[$i-2];
$tempmutlichkboxtext[$i-2]=$tempmutlichkboxtext[$i-1];
$tempchkboxpoint[$i-2]=$tempchkboxpoint[$i-1];
$tempmutlichkboxtext[$i-1]=$tempm;
@ -149,19 +149,19 @@ for($i=1;$i<=$number;$i++)
}
//echo ",while checking up/down end=".$end;
$jd=0;
break;
break;
}
}
*/
if ($_POST['action'] == 'selectquestion_group')
{
$surveyid = $_POST['newsurveyid'];
$surveyid = $_POST['newsurveyid'];
$questiongroup = $_POST['question_group'];
if (isset($questiongroup))
{
{
$exiztinggroup = $_POST['exiztinggroup'];
header("Location:existing_surveys_new.php?surveyid=$surveyid");
exit;
exit;
}
}
//from question_added
@ -198,7 +198,7 @@ if(isset($_REQUEST['delete']))
for($i=0;$i<$endloop;$i++)
{
$qid2=$qid1[$i];
$query="DELETE FROM questions WHERE qid='$qid2'";
$query="DELETE FROM $table_survey_question WHERE qid='$qid2'";
api_sql_query($query);
header("Location:select_question_group.php?surveyid=$surveyid");
exit;
@ -209,7 +209,7 @@ if (isset($_POST['finish']))
{
header("Location:survey_list.php");
exit;
}
}
if(isset($action1))
{
@ -224,17 +224,17 @@ if(isset($action1))
$post_sort = $_GET['post_sort'];
if($direction=="up")
{
$sql_update2="UPDATE questions SET sortby='".$sort."' WHERE qid='".$pre_qid."'";
$sql_update2="UPDATE $table_survey_question SET sortby='".$sort."' WHERE qid='".$pre_qid."'";
mysql_query($sql_update2);
$sql_update1="UPDATE questions SET sortby='".$pre_sort."' WHERE qid='".$qid."'";
$sql_update1="UPDATE $table_survey_question SET sortby='".$pre_sort."' WHERE qid='".$qid."'";
mysql_query($sql_update1);
}
else
{
$sql_update2="UPDATE questions SET sortby='".$post_sort."' WHERE qid='".$qid."'";
$sql_update2="UPDATE $table_survey_question SET sortby='".$post_sort."' WHERE qid='".$qid."'";
mysql_query($sql_update2);
$sql_update1="UPDATE questions SET sortby='".$sort."' WHERE qid='".$post_qid."'";
$sql_update1="UPDATE $table_survey_question SET sortby='".$sort."' WHERE qid='".$post_qid."'";
mysql_query($sql_update1);
}
@ -273,7 +273,7 @@ if(isset($messege) && $messege )
<td></td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td>&nbsp;</td>
@ -282,11 +282,9 @@ if(isset($messege) && $messege )
</table>
</form>
<?php
/*$query="SELECT * FROM survey WHERE survey_id='$surveyid'";
$result=api_sql_query($query);*/
$sql="SELECT * FROM survey_group WHERE survey_id='$surveyid'";
$sql="SELECT * FROM survey_group WHERE survey_id='$surveyid'";
$res = api_sql_query($sql,__FILE__,__LINE__);
$num=mysql_num_rows($res);
$num=mysql_num_rows($res);
$parameters['surveyid']=$surveyid;
//$table_header[] = array (' ', false);
@ -294,35 +292,35 @@ $result=api_sql_query($query);*/
$table_header[] = array (get_lang('Questions'), true);
$table_header[] = array (get_lang('ChangeOrder'), true);
$table_header[] = array (get_lang('Group'), true);
$table_header[] = array (get_lang('Type'), true);
$table_header[] = array (get_lang('Type'), true);
$table_header[]=array('',true);
$courses = array ();
if($num){
for($i=0;$i<$num;$i++)
{
$groupid=@mysql_result($res,$i,'group_id');
$gname=@mysql_result($res,$i,'groupname');
$sql="SELECT * FROM questions WHERE gid='$groupid' AND survey_id = '$surveyid' order by `sortby` asc";
$sql="SELECT * FROM $table_survey_question WHERE gid='$groupid' AND survey_id = '$surveyid' order by `sortby` asc";
$res1=api_sql_query($sql,__FILE__,__LINE__);
$num1=mysql_num_rows($res1);
$x=1;
for($k=0;$k<$num1;$k++)
//while ($obj = mysql_fetch_object($res1))
{
{
$qid=mysql_result($res1,$k,'qid');//$obj->qid;
$pre_qid=mysql_result($res1,$k-1,'qid');
$post_qid=mysql_result($res1,$k+1,'qid');
$question=mysql_result($res1,$k,'caption');//$obj->caption;
$sort=mysql_result($res1,$k,'sortby');//$obj->sortby;
$sort=mysql_result($res1,$k,'sortby');//$obj->sortby;
$pre_sort=$k==0?mysql_result($res1,$k,'sortby'):mysql_result($res1,$k-1,'sortby');//$obj->sortby;
$post_sort=$k==$num1?mysql_result($res1,$k,'sortby'):mysql_result($res1,$k+1,'sortby');//$obj->sortby;
$post_sort=$k==$num1?mysql_result($res1,$k,'sortby'):mysql_result($res1,$k+1,'sortby');//$obj->sortby;
$course = array ();
$course[] = $question;
$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.'&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>&nbsp;'.$sort.'&nbsp;&nbsp;'.'<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.'&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.'&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>&nbsp;'.$sort.'&nbsp;&nbsp;'.'<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.'&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($res,$i,'groupname');
$course[] = mysql_result($res1,$k,'qtype');//$obj->qtype;
$course[] = mysql_result($res1,$k,'qtype');//$obj->qtype;
/*$course[]='<a href="question_edit.php?qid='.$obj->qid.'&qtype='.$obj->qtype.'&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[]='.$obj->qid.'&qtype='.$obj->qtype.'&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;
@ -342,7 +340,7 @@ if(!empty($courses))
/** @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');?>">-->
<!--<input type=button value="Back" onClick="history.go(-1)">-->
<input type="submit" name="addanother" value="<?php echo get_lang('AddAnotherQuestion');?>">
@ -357,14 +355,14 @@ else
<input type="submit" name="addanother" value="<?php echo get_lang('AddAnotherQuestion');?>">
<input type="submit" name="addanotherg" value="<?php echo get_lang('AddNewGroup');?>">
<?phps
}
}
?>
</form>
<!-- question_added-->
<?php
/*
==============================================================================
FOOTER
FOOTER
==============================================================================
*/
Display :: display_footer();

@ -3,14 +3,14 @@
DOKEOS - elearning and course management software
For a full list of contributors, see documentation/credits.html
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
See "documentation/licence.html" more details.
Contact:
Contact:
Dokeos
Rue des Palais 44 Paleizenstraat
B-1030 Brussels - Belgium
@ -19,12 +19,12 @@
/**
* @package dokeos.survey
* @author
* @author
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University: cleanup, refactoring and rewriting large parts (if not all) of the code
* @version $Id: select_question_group.php 10680 2007-01-11 21:26:23Z pcool $
* @version $Id: select_question_group.php 10705 2007-01-12 22:40:01Z pcool $
*/
// name of the language file that needs to be included
// name of the language file that needs to be included
$language_file = 'survey';
// including the global dokeos file
@ -58,11 +58,11 @@ if (!api_is_allowed_to_edit())
// Database table definitions
/** @todo use database constants for the survey tables */
$table_survey = Database :: get_course_table(TABLE_SURVEY);
$table_group = Database :: get_course_table(TABLE_SURVEY_GROUP);
$table_survey = Database :: get_course_table(TABLE_SURVEY);
$table_group = Database :: get_course_table(TABLE_SURVEY_GROUP);
$table_survey_question = Database :: get_course_table(TABLE_SURVEY_QUESTION);
$table_course = Database :: get_main_table(TABLE_MAIN_COURSE);
$table_survey_group = Database :: get_course_table(TABLE_SURVEY_GROUP);
$table_course = Database :: get_main_table(TABLE_MAIN_COURSE);
$table_survey_group = Database :: get_course_table(TABLE_SURVEY_GROUP);
// breadcrumbs
$interbreadcrumb[] = array ("url" => "survey_list.php", "name" => get_lang('Survey'));
@ -89,25 +89,25 @@ Display :: display_footer();
/**
* This function retrieves all the survey information
* This function retrieves all the survey information
* This is a DUPLICATE of the one in create_new_survey.php
*
* @param integer $survey_id the id of the survey
* @return array
*
*
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University
* @version januari 2007
*
*
* @todo move this function to surveymanager.inc.lib.php
*/
function get_survey($survey_id)
{
$tbl_survey = Database :: get_course_table(TABLE_SURVEY);
$sql = "SELECT * FROM $tbl_survey WHERE survey_id='".mysql_real_escape_string($survey_id)."'";
$result = api_sql_query($sql, __FILE__, __LINE__);
$return = mysql_fetch_assoc($result);
// we do this (temporarily) to have the array match the quickform elements immediately
// idealiter the fields in the db match the quickform fields
$return['survey_code'] = $return['code'];
@ -164,13 +164,13 @@ else
if ($_POST['action'] == 'selectquestion_group')
{
$surveyid = $_POST['newsurveyid'];
$surveyid = $_POST['newsurveyid'];
$questiongroup = $_POST['question_group'];
if (isset($questiongroup))
{
{
$exiztinggroup = $_POST['exiztinggroup'];
header("Location:existing_surveys_new.php?surveyid=$surveyid");
exit;
header("Location:existing_surveys_new.php?surveyid=$surveyid");
exit;
}
}
@ -221,7 +221,7 @@ if (isset($_POST['finish']))
{
header("Location:survey_list.php");
exit;
}
}
if(isset($action1))
{
@ -283,7 +283,7 @@ if(isset($messege) && $messege )
<td></td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td>&nbsp;</td>
@ -292,16 +292,16 @@ if(isset($messege) && $messege )
</table>
</form>
<?php
$sql="SELECT * FROM $table_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);
$num=mysql_num_rows($res);
$parameters['surveyid']=$surveyid;
//$table_header[] = array (' ', false);
//$table_header[] = array (get_lang('SNo'), true);
$table_header[] = array (get_lang('Questions'), true);
$table_header[] = array (get_lang('ChangeOrder'), true);
$table_header[] = array (get_lang('Type'), true);
$table_header[] = array (get_lang('ChangeOrder'), true);
$table_header[] = array (get_lang('Type'), true);
$table_header[] = array (get_lang('Group'), true);
$table_header[]=array('',true);
$courses = array ();
@ -313,34 +313,34 @@ if(isset($messege) && $messege )
$groupid=@mysql_result($res,$i,'group_id');
$gname=@mysql_result($res,$i,'groupname');
$sql="SELECT * FROM $table_survey_question WHERE gid='$groupid' AND survey_id = '$surveyid' order by `sortby` asc";
$res1=api_sql_query($sql,__FILE__,__LINE__);
$num1=mysql_num_rows($res1);
$x=1;
for($k=0;$k<$num1;$k++)
//while ($obj = mysql_fetch_object($res1))
{
{
$question_number++;
$qid=mysql_result($res1,$k,'qid');//$obj->qid;
$q_type=mysql_result($res1,$k,'qtype');//$obj->qid;
$pre_qid=mysql_result($res1,$k-1,'qid');
$post_qid=mysql_result($res1,$k+1,'qid');
$question=stripslashes(mysql_result($res1,$k,'caption'));//$obj->caption;
$question = eregi_replace('^<p[^>]*>(.*)</p>','\\1', $question);
$question = eregi_replace('(<[^ ]*) (style=."."[^>]*)(>)','\\1\\3', $question);
$question = eregi_replace('(<[^ ]*) (style=""[^>]*)(>)','\\1\\3', $question);
$question = eregi_replace('(<[^ ]*)( style=."[^"]*")([^>]*)(>)','\\1\\2\\4', $question);
$sort=mysql_result($res1,$k,'sortby');//$obj->sortby;
$sort=mysql_result($res1,$k,'sortby');//$obj->sortby;
$pre_sort=$k==0?mysql_result($res1,$k,'sortby'):mysql_result($res1,$k-1,'sortby');//$obj->sortby;
$post_sort=$k==$num1?mysql_result($res1,$k,'sortby'):mysql_result($res1,$k+1,'sortby');//$obj->sortby;
$post_sort=$k==$num1?mysql_result($res1,$k,'sortby'):mysql_result($res1,$k+1,'sortby');//$obj->sortby;
$course = array ();
$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.'&page_nr='.$page_nr.'&per_page='.$per_page.'&column='.$column.'&action1=moveitem&direction=down></a>&nbsp;&nbsp;&nbsp;'.'<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.'&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.'&page_nr='.$page_nr.'&per_page='.$per_page.'&column='.$column.'&action1=moveitem&direction=down></a>&nbsp;&nbsp;&nbsp;'.'<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.'&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.'&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>&nbsp;&nbsp;&nbsp;'.'<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.'&page_nr='.$page_nr.'&per_page='.$per_page.'&column='.$column.'&action1=moveitem&direction=up></a>';
@ -349,11 +349,11 @@ if(isset($messege) && $messege )
}
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.'&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>&nbsp;&nbsp;&nbsp;'.'<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.'&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[] = @mysql_result($res,$i,'groupname');
$course[]='<a href="question_edit.php?qid='.$qid.'&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.'&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++;
}
@ -371,7 +371,7 @@ if(!empty($courses))
/** @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');?>">-->
<!--<input type=button value="Back" onClick="history.go(-1)">-->
<input type="submit" name="addanother" value="<?php echo get_lang('AddAnotherQuestion');?>">
@ -386,7 +386,7 @@ else
<input type="submit" name="addanother" value="<?php echo get_lang('AddAnotherQuestion');?>">
<input type="submit" name="addanotherg" value="<?php echo get_lang('AddNewGroup');?>">
<?php
}
}
?>
</form>
<?php

@ -20,7 +20,7 @@
/**
* @package dokeos.survey
* @author
* @version $Id: survey_blank.php 10680 2007-01-11 21:26:23Z pcool $
* @version $Id: survey_blank.php 10705 2007-01-12 22:40:01Z pcool $
*/
// name of the language file that needs to be included
@ -62,7 +62,7 @@ $attempt[$obj->qid] = $obj->answer;
$surveyid = $_REQUEST['surveyid'];
$rs=mysql_query("select * from $db_name.questions where survey_id='$surveyid'");
$rs=mysql_query("SELECT * FROM $table_survey_question WHERE survey_id='$surveyid'");
$row=mysql_num_rows($rs);
$page=ceil($row/4);
@ -96,7 +96,7 @@ window.print();
<link href="../css/survey_white.css" rel="stylesheet" type="text/css">
<?php
$ques=$lower;
$sql = "SELECT * FROM $db_name.questions where survey_id='$_REQUEST[surveyid]' ORDER BY gid, sortby limit $lower,4";
$sql = "SELECT * FROM $table_survey_question WHERE survey_id='$_REQUEST[surveyid]' ORDER BY gid, sortby limit $lower,4";
$parameters = array ();
$res = api_sql_query($sql,__FILE__,__LINE__);
?>

@ -3,14 +3,14 @@
DOKEOS - elearning and course management software
For a full list of contributors, see documentation/credits.html
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
See "documentation/licence.html" more details.
Contact:
Contact:
Dokeos
Rue des Palais 44 Paleizenstraat
B-1030 Brussels - Belgium
@ -19,15 +19,16 @@
/**
* @package dokeos.survey
* @author
* @version $Id: survey_edit.php 10680 2007-01-11 21:26:23Z pcool $
* @author
* @version $Id: survey_edit.php 10705 2007-01-12 22:40:01Z pcool $
* @todo check if this file is still used. With the rewriting the file is probably no longer in use
*/
/*
==============================================================================
INIT SECTION
==============================================================================
*/
// name of the language file that needs to be included
// name of the language file that needs to be included
$language_file = 'survey';
// including the global dokeos file
@ -62,9 +63,10 @@ $table_course = Database :: get_main_table(TABLE_MAIN_COURSE);
$table_course_survey_rel = Database :: get_main_table(TABLE_MAIN_COURSE_SURVEY);
$table_survey = Database :: get_course_table(TABLE_SURVEY);
$tbl_category = Database :: get_main_table(TABLE_MAIN_CATEGORY);
$table_languages = Database :: get_main_table(TABLE_MAIN_LANGUAGE);
// language variables
$MonthsLong = array(get_lang('JanuaryLong'), get_lang('FebruaryLong'), get_lang('"MarchLong'), get_lang('AprilLong'), get_lang('MayLong'), get_lang('JuneLong'), get_lang('JulyLong'), get_lang('AugustLong'), get_lang('SeptemberLong'), get_lang('OctoberLong'), get_lang('NovemberLong'), get_lang('DecemberLong'));
$MonthsLong = array(get_lang('JanuaryLong'), get_lang('FebruaryLong'), get_lang('"MarchLong'), get_lang('AprilLong'), get_lang('MayLong'), get_lang('JuneLong'), get_lang('JulyLong'), get_lang('AugustLong'), get_lang('SeptemberLong'), get_lang('OctoberLong'), get_lang('NovemberLong'), get_lang('DecemberLong'));
$tool_name = get_lang('ModifySurveyInformation');
@ -85,7 +87,7 @@ if ($_POST['action'] == 'update_survey')
$formSent=1;
$surveycode=$_POST['survey_code'];
$surveytitle = $_POST['survey_title'];
$surveysubtitle = $_POST['survey_subtitle'];
$surveysubtitle = $_POST['survey_subtitle'];
$author = $_POST['author'];
$survey_language = $_POST['survey_language'];
$availablefrom = $_POST['fyear']."-".$_POST['fmonth']."-".$_POST['fday'];
@ -94,8 +96,8 @@ if ($_POST['action'] == 'update_survey')
$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']);
$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']))
@ -105,7 +107,7 @@ if ($_POST['action'] == 'update_survey')
}
if(empty ($surveytitle))
{
$error_message = get_lang('PleaseEnterSurveyTitle');
$error_message = get_lang('PleaseEnterSurveyTitle');
}
elseif ($savailabletill<=$savailablefrom){
$error_message = get_lang('PleaseEnterValidDate');
@ -114,8 +116,8 @@ if ($_POST['action'] == 'update_survey')
$error_message = get_lang('PleaseEnterValidCode');
}
else
{
$curr_dbname=SurveyManager::update_survey($_GET['survey_id'],$surveycode,$surveytitle,$surveysubtitle,$author,$survey_language,$availablefrom,$availabletill,$isshare,$surveytemplate,$surveyintroduction,$surveythanks,$cidReq,$table_course);
{
$curr_dbname=SurveyManager::update_survey($_GET['survey_id'],$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=".$_GET['survey_id']);
@ -126,13 +128,13 @@ if ($_POST['action'] == 'update_survey')
header('location:survey_list.php');
exit;
}
}
}
}
Display::display_header($tool_name);
api_display_tool_title($tool_name);
if( isset($error_message) )
{
Display::display_error_message($error_message);
Display::display_error_message($error_message);
}
?>
<SCRIPT LANGUAGE="JavaScript">
@ -156,7 +158,7 @@ window.open(inf+".htm", 'popup', 'width=600,height=600,toolbar = no, status = no
<?php
/**
* Finding the survey we are editing
* @todo use a function for this because this is probably a very common functionality
* @todo use a function for this because this is probably a very common functionality
*/
$sql = "SELECT * FROM $table_survey WHERE survey_id='".$_GET['survey_id']."'";
$res = api_sql_query($sql);
@ -195,7 +197,7 @@ $lang=$obj->lang;
<td>
<?php
UserManager::get_teacher_list($cidReq,$obj->author);
?>
?>
</td>
</tr>
<tr>
@ -210,7 +212,7 @@ $lang=$obj->lang;
</tr>
<tr id="subtitle">
<td><?php echo get_lang('AvailableFrom'); ?>&nbsp;</td>
<td>
<td>
<select name="fday">
<?php for($i=1;$i<=31;$i++){
if($i<=9)
@ -241,7 +243,7 @@ december -->
?>
</select>
<select name="fyear">
<?php
<?php
for($i=$curr_year;$i<=$curr_year+10;$i++){
if($i == $avail_year_from)
echo "<option value=\"$i\" selected>$i</option>\n";
@ -252,7 +254,7 @@ december -->
</select>
<a title="Calendar" href="javascript:openCalendar('new_calendar_item', 'f')"><img src="../img/calendar_select.gif" border="0" align="absmiddle"/></a></td>
</tr>
<tr id="subtitle">
<td><?php echo get_lang('AvailableTill'); ?>&nbsp;</td>
<td>
@ -286,7 +288,7 @@ december -->
?>
</select>
<select name="end_fyear">
<?php
<?php
for($i=$curr_year;$i<=$curr_year+10;$i++){
if($i == $avail_year_till)
echo "<option value=\"$i\" selected>$i</option>\n";
@ -316,15 +318,14 @@ december -->
$oFCKeditor->Value = $obj->intro;
$oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js";
$oFCKeditor->ToolbarSet = "Survey";
$TBL_LANGUAGES = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql="SELECT isocode FROM ".$TBL_LANGUAGES." WHERE english_name='".$_SESSION["_course"]["language"]."'";
$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;
?>
<br>
@ -343,7 +344,7 @@ december -->
$oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js";
$oFCKeditor->ToolbarSet = "Survey";
$return = $oFCKeditor->CreateHtml();
echo $return;
?>
<br>

@ -20,7 +20,7 @@
/**
* @package dokeos.survey
* @author
* @version $Id: survey_report.php 10680 2007-01-11 21:26:23Z pcool $
* @version $Id: survey_report.php 10705 2007-01-12 22:40:01Z pcool $
*/
/*
@ -254,9 +254,9 @@ switch($screen) {
$params = array_merge($_POST['left'] , $_POST['right']);
$tbl_user_survey = Database::get_main_table(TABLE_MAIN_SURVEY_USER);
$tbl_questions = Database::get_course_table(TABLE_SURVEY_QUESTION);
$tbl_answers = Database::get_course_table(TABLE_SURVEY_REPORT);
$tbl_user_survey = Database::get_main_table(TABLE_MAIN_SURVEY_USER);
$table_survey_question = Database::get_course_table(TABLE_SURVEY_QUESTION);
$tbl_answers = Database::get_course_table(TABLE_SURVEY_REPORT);
//$which_answers = 'WHERE qid';
@ -286,7 +286,7 @@ switch($screen) {
break;
case 'question' :
$questions[]='"'.$param[1].'"';
$sql = 'SELECT caption FROM '.$tbl_questions.' WHERE qid='.$param[1];
$sql = 'SELECT caption FROM '.$table_survey_question.' WHERE qid='.$param[1];
$rs = api_sql_query($sql);
if($row = mysql_fetch_array($rs)){
$row[0] = eregi_replace('^<p[^>]*>(.*)</p>','\\1', $row[0]);
@ -302,7 +302,7 @@ switch($screen) {
break;
case 'answer' :
$answers_required[] = $param;
$sql = 'SELECT caption FROM '.$tbl_questions.' as questions
$sql = 'SELECT caption FROM '.$table_survey_question.' as questions
INNER JOIN '.$tbl_answers.' as answers
ON answers.qid = questions.qid
AND answers.qid='.$param[1];
@ -366,7 +366,7 @@ switch($screen) {
$excel .="\r\n";
$sql = 'SELECT user_survey.id as id_user_survey, '.implode(',',$select).'
FROM '.$tbl_answers.' as answers,'.$tbl_user_survey.' as user_survey,'.$tbl_questions.' as questions
FROM '.$tbl_answers.' as answers,'.$tbl_user_survey.' as user_survey,'.$table_survey_question.' as questions
WHERE answers.qid = questions.qid
AND answers.user_id = user_survey.user_id
AND user_survey.survey_id='.$surveyid.'
@ -412,7 +412,7 @@ switch($screen) {
foreach($answers_to_keep as $answer) {
if(in_array($answer['answer'],array('a1','a2','a3','a4','a5','a6','a7','a8','a9','a10',))){
$sql = 'SELECT '.$answer['answer'].'
FROM '.$db_name.'.questions
FROM '.$table_survey_question.'
WHERE survey_id = '.$surveyid.'
AND questions.qid='.$answer['qid'];

@ -20,7 +20,7 @@
/**
* @package dokeos.survey
* @author
* @version $Id: survey_white.php 10680 2007-01-11 21:26:23Z pcool $
* @version $Id: survey_white.php 10705 2007-01-12 22:40:01Z pcool $
*/
// name of the language file that needs to be included
@ -73,7 +73,7 @@ api_display_tool_title("Survey Name : ".$o_survey->title);
// select the groups
$sql = 'SELECT DISTINCT survey_group.*
FROM '.$db_name.'.survey_group
INNER JOIN '.$db_name.'.questions
INNER JOIN '.$table_survey_question.'
ON survey_group.group_id = questions.gid
AND questions.survey_id = survey_group.survey_id
WHERE survey_group.survey_id='.$surveyid.'
@ -83,7 +83,7 @@ $rsGroups = api_sql_query($sql);
$sql = 'SELECT COUNT(DISTINCT survey_group.group_id)
FROM '.$db_name.'.survey_group
INNER JOIN '.$db_name.'.questions
INNER JOIN '.$table_survey_question.'
ON survey_group.group_id = questions.gid
AND questions.survey_id = survey_group.survey_id
WHERE survey_group.survey_id='.$surveyid;
@ -107,7 +107,7 @@ while($o_group = mysql_fetch_object($rsGroups) ){
}
$sql = 'SELECT *
FROM '.$db_name.'.questions
FROM '.$table_survey_question.'
WHERE survey_id='.$surveyid.'
AND gid='.intval($o_group->group_id).'
ORDER BY sortby

@ -20,7 +20,7 @@
/**
* @package dokeos.survey
* @author
* @version $Id: surveytemp_white.php 10680 2007-01-11 21:26:23Z pcool $
* @version $Id: surveytemp_white.php 10705 2007-01-12 22:40:01Z pcool $
*/
// name of the language file that needs to be included
@ -151,7 +151,7 @@ ob_start();
if(!isset($_POST['printall'])){
$sql = 'SELECT DISTINCT survey_group.*
FROM '.$db_name.'.survey_group
INNER JOIN '.$db_name.'.questions
INNER JOIN '.$table_survey_question.'
ON survey_group.group_id = questions.gid
AND questions.survey_id = survey_group.survey_id
WHERE survey_group.survey_id='.$surveyid.'
@ -161,7 +161,7 @@ else {
$indiceQuestion = 1;
$sql = 'SELECT DISTINCT survey_group.*
FROM '.$db_name.'.survey_group
INNER JOIN '.$db_name.'.questions
INNER JOIN '.$table_survey_question.'
ON survey_group.group_id = questions.gid
AND questions.survey_id = survey_group.survey_id
WHERE survey_group.survey_id='.$surveyid.'
@ -172,7 +172,7 @@ $rsGroups = api_sql_query($sql);
$sql = 'SELECT COUNT(DISTINCT survey_group.group_id)
FROM '.$db_name.'.survey_group
INNER JOIN '.$db_name.'.questions
INNER JOIN '.$table_survey_question.'
ON survey_group.group_id = questions.gid
AND questions.survey_id = survey_group.survey_id
WHERE survey_group.survey_id='.$surveyid;
@ -203,7 +203,7 @@ while($o_group = mysql_fetch_object($rsGroups) ){
}
$sql = 'SELECT *
FROM '.$db_name.'.questions
FROM '.$table_survey_question.'
WHERE survey_id='.$surveyid.'
AND gid='.intval($o_group->group_id).'
ORDER BY sortby

@ -3,14 +3,14 @@
DOKEOS - elearning and course management software
For a full list of contributors, see documentation/credits.html
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
See "documentation/licence.html" more details.
Contact:
Contact:
Dokeos
Rue des Palais 44 Paleizenstraat
B-1030 Brussels - Belgium
@ -19,11 +19,11 @@
/**
* @package dokeos.survey
* @author
* @version $Id: template1.php 10584 2007-01-02 15:09:21Z pcool $
* @author
* @version $Id: template1.php 10705 2007-01-12 22:40:01Z pcool $
*/
// name of the language file that needs to be included
// name of the language file that needs to be included
$language_file='survey';
// including the global dokeos file
@ -40,23 +40,31 @@ require_once (api_get_path(LIBRARY_PATH)."/groupmanager.lib.php");
require_once (api_get_path(LIBRARY_PATH)."/surveymanager.lib.php");
require_once (api_get_path(LIBRARY_PATH)."/usermanager.lib.php");
// Database table definitions
/** @todo use database constants for the survey tables */
$table_survey = Database :: get_course_table(TABLE_SURVEY);
$table_user = Database :: get_main_table(TABLE_MAIN_USER);
$survey_user_info_table = Database :: get_main_table(TABLE_MAIN_SURVEY_USER);
$table_reminder = Database:: get_main_table(TABLE_MAIN_SURVEY_REMINDER);
$surveyid = $_REQUEST['surveyid'];
$uid = $_REQUEST['uid'];
$uid1 = $_REQUEST['uid1'];
$db_name = $_REQUEST['db_name'];
$temp = $_REQUEST['temp'];
$mail = $_REQUEST['mail'];
$survey_user_info_table = Database :: get_main_table(TABLE_MAIN_SURVEY_USER);
$user_table = Database :: get_main_table(TABLE_MAIN_USER);
$sql_sname = "select * from $db_name.survey where survey_id='$surveyid'";
$sql_sname = "SELECT * FROM $db_name.survey where survey_id='$surveyid'";
$res_sname = api_sql_query($sql_sname,__FILE__,__LINE__);
$obj_sname = mysql_fetch_object($res_sname);
$surveyname = $obj_sname->title;
$survey_user_info_table = Database :: get_main_table(TABLE_MAIN_SURVEY_USER);
$sql_check="SELECT 1
$sql_check="SELECT 1
FROM $survey_user_info_table as survey_user_info
INNER JOIN $db_name.survey as survey
ON survey.survey_id = survey_user_info.survey_id
@ -78,7 +86,7 @@ if(mysql_num_rows($res_check)>0)
if(isset($mail))
{
$table_reminder = Database:: get_main_table(TABLE_MAIN_SURVEY_REMINDER);
$sql_update = "UPDATE $table_reminder SET access='1' WHERE db_name='$db_name' AND sid='$surveyid' AND email='$mail'";
api_sql_query($sql_update);
@ -97,17 +105,21 @@ if(isset($_POST['Next']))
$organization = $_REQUEST['organization'];
$age = $_REQUEST['age'];
if($uid!='')
{$registered='Y';}
else{$registered='N';}
$user_table = Database :: get_main_table(TABLE_MAIN_USER);
$survey_user_info_table = Database :: get_main_table(TABLE_MAIN_SURVEY_USER);
{
$registered='Y';
}
else
{
$registered='N';
}
$sql="SELECT * FROM $survey_user_info_table WHERE email = '$mail'";
$result=api_sql_query($sql);
$obj=mysql_fetch_object($result);
$new_mail=$obj->email;
$user_id=$obj->user_id;
if($new_mail!='')
{
{
$uid1=$user_id;
$sql_ins = "update $survey_user_info_table set user_id='$uid1', survey_id='$surveyid', db_name='$db_name', firstname='$firstname', lastname='$lastname', organization='$organization', age='$age' where user_id='$uid1'";
$result=api_sql_query($sql_ins);
@ -126,38 +138,42 @@ if(isset($_POST['Next']))
exit;
}
}
if($uid==''){
$survey_user_info_table = Database :: get_main_table(TABLE_MAIN_SURVEY_USER);
$sql_u="Select * from $survey_user_info_table where user_id='$uid1' or email='$mail'";
if($uid=='')
{
$sql_u="SELECT * FROM $survey_user_info_table WHERE user_id='$uid1' or email='$mail'";
}
else{
$sql_u="Select * from $user_table where user_id='$uid'";
$sql_u="SELECT * FROM $table_user WHERE user_id='$uid'";
}
$res = api_sql_query($sql_u,__FILE__,__LINE__);
$obj=@mysql_fetch_object($res);
$email=$obj->email;
$user_idd=$obj->user_id;
$rs=mysql_query("select * from $db_name.questions");
$rs=mysql_query("SELECT * FROM $table_survey_question");
$row=mysql_num_rows($rs);
$page=ceil($row/4);
if(isset($_GET[num])){
if(isset($_GET[num]))
{
$num=$_GET[num];
if($num>$page){
if($num>$page)
{
header("Location:test.php");
exit;
}
}else{
}
else
{
$num = 1;
}
$lower = $num*4-4;
Display::display_header($tool_name);
?><center><?api_display_tool_title($surveyname);?></center><?
api_display_tool_title($surveyname);
api_display_tool_title($tool_name);
if($error_message)
{
Display::display_error_message($error_message);
Display::display_error_message($error_message);
}
?>
<link href="../css/survey_white.css" rel="stylesheet" type="text/css">
@ -191,7 +207,7 @@ Display::display_error_message($error_message);
<td><input name="lastname" type="text" id="lastname" maxlength="40" value="<?php echo mysql_result($res,0,"lastname");?>"></td>
</tr>
<tr>
<td class="text"><?if($lang=='french')echo 'Email :'; else if($lang=='dutch')echo 'Email :'; else echo 'EMail :' ;?></td>
<td class="text"><?if($lang=='french')echo 'Email :'; else if($lang=='dutch')echo 'Email :'; else echo 'EMail :' ;?></td>
<td class="text"><?php echo $mail;?></td>
</tr>
<tr>
@ -245,7 +261,7 @@ Display::display_error_message($error_message);
<?php echo $names[$i];?>
</option>
<?
}
}
}
else
{
@ -256,7 +272,7 @@ Display::display_error_message($error_message);
<option value='<?php echo $name;?>'>
<?php echo $names[$i];?>
</option><?
}
}
}
?>
</select></td>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

@ -1,552 +0,0 @@
<html>
<head>
<title>chumpsoft.com :: Online Survey and Polling Software in PHP and Perl</title>
<link rel="icon" href="/favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<link rel="stylesheet" type="text/css" href="/includes/default.css">
<script language="JavaScript" src="/includes/default.js"></script>
<meta name="Description" content="Online Survey and Polling Software in PHP and Perl. Create online surveys and polls and collect as many responses as you desire.">
<meta name="Keywords" content="survey software, online survey software, online survey, php survey software, perl survey software, php surveys, perl surveys, web survey, internet survey, online poll, web poll, polling software, survey program, survey tool, poll software, create a survey, web poll, polling program, market research, customer survey, employee survey, web-based survey, questionnaire, online questionnaire, php questionnaire, perl questionnaire">
</head>
<body bgcolor="#FFFFFF" margin=0 marginwidth=0 marginheight=0 topmargin=0 leftmargin=0>
<table cellpadding=0 cellspacing=0 border=0 width=100%>
<tr><td><img src="/images/invdot.gif" width=1 height=30 border=0 alt=""></td></tr>
<tr>
<td align="center" bgcolor="#EEEEEE" background="/images/logobg.gif">
<!--// Logo Starts //-->
<table cellpadding=0 cellspacing=0 border=0 width=620>
<tr>
<td><a href="http://chumpsoft.com/"><img src="/images/logo03.gif" width=300 height=30 border=0 alt=""></a></td>
</tr>
</table>
<!--// Logo Ends //-->
</td>
</tr>
<tr><td><img src="/images/invdot.gif" width=1 height=3 border=0 alt=""></td></tr>
<tr>
<td align="center">
<!--// Menu Starts //-->
<table cellpadding=0 cellspacing=0 border=0>
<tr>
<td>
<table cellpadding=0 cellspacing=0 border=0>
<tr>
<td rowspan=2><a href="http://www.chumpsoft.com/" class="menuon"><img src="/images/menu00b.gif" name="menu00" width=25 height=25 border=0 alt=""></a></td>
<td rowspan=2><img src="/images/invdot.gif" width=5 height=1 alt=""></td>
<td valign="bottom" height=16><nobr>
<a href="http://www.chumpsoft.com/" class="menuon"><b>Home</b></a>
<img src="/images/menuarrow.gif" name="arrow00" width=5 height=9 alt="">
</nobr></td>
<td rowspan=2><img src="/images/invdot.gif" width=15 height=1></td>
</tr>
<tr>
<td height=9>
<table cellpadding=0 cellspacing=0 border=0 width=100%>
<tr>
<td width=26><img src="/images/menuborder.gif" width=26 height=4 alt=""></td>
<td width=100% background="/images/menuborderbg.gif"><img src="/images/invdot.gif" width=1 height=4 alt=""></td>
<td width=10><img src="/images/menuborder2.gif" width=10 heigth=4 alt=""></td>
</tr>
</table>
</td>
</tr>
</table>
</td><td>
<table cellpadding=0 cellspacing=0 border=0>
<tr>
<td rowspan=2><a href="https://www.chumpsoft.com/buy/" class="menu" onmouseover="menuOn(1)" onmouseout="menuOff(1)"><img src="/images/menu01a.gif" name="menu01" width=25 height=25 border=0 alt=""></a></td>
<td rowspan=2><img src="/images/invdot.gif" width=5 height=1 alt=""></td>
<td valign="bottom" height=16><nobr>
<a href="https://www.chumpsoft.com/buy/" class="menu" onmouseover="menuOn(1)" onmouseout="menuOff(1)"><b>Purchase</b></a>
<img src="/images/invdot.gif" name="arrow01" width=5 height=9 alt="">
</nobr></td>
<td rowspan=2><img src="/images/invdot.gif" width=15 height=1></td>
</tr>
<tr>
<td height=9>
<table cellpadding=0 cellspacing=0 border=0 width=100%>
<tr>
<td width=26><img src="/images/menuborder.gif" width=26 height=4 alt=""></td>
<td width=100% background="/images/menuborderbg.gif"><img src="/images/invdot.gif" width=1 height=4 alt=""></td>
<td width=10><img src="/images/menuborder2.gif" width=10 heigth=4 alt=""></td>
</tr>
</table>
</td>
</tr>
</table>
</td><td>
<table cellpadding=0 cellspacing=0 border=0>
<tr>
<td rowspan=2><a href="http://www.chumpsoft.com/members/" class="menu" onmouseover="menuOn(2)" onmouseout="menuOff(2)"><img src="/images/menu02a.gif" name="menu02" width=25 height=25 border=0 alt=""></a></td>
<td rowspan=2><img src="/images/invdot.gif" width=5 height=1 alt=""></td>
<td valign="bottom" height=16><nobr>
<a href="http://www.chumpsoft.com/members/" class="menu" onmouseover="menuOn(2)" onmouseout="menuOff(2)"><b>Login</b></a>
<img src="/images/invdot.gif" name="arrow02" width=5 height=9 alt="">
</nobr></td>
<td rowspan=2><img src="/images/invdot.gif" width=15 height=1></td>
</tr>
<tr>
<td height=9>
<table cellpadding=0 cellspacing=0 border=0 width=100%>
<tr>
<td width=26><img src="/images/menuborder.gif" width=26 height=4 alt=""></td>
<td width=100% background="/images/menuborderbg.gif"><img src="/images/invdot.gif" width=1 height=4 alt=""></td>
<td width=10><img src="/images/menuborder2.gif" width=10 heigth=4 alt=""></td>
</tr>
</table>
</td>
</tr>
</table>
</td><td>
<table cellpadding=0 cellspacing=0 border=0>
<tr>
<td rowspan=2><a href="http://www.chumpsoft.com/about/" class="menu" onmouseover="menuOn(3)" onmouseout="menuOff(3)"><img src="/images/menu03a.gif" name="menu03" width=25 height=25 border=0 alt=""></a></td>
<td rowspan=2><img src="/images/invdot.gif" width=5 height=1 alt=""></td>
<td valign="bottom" height=16><nobr>
<a href="http://www.chumpsoft.com/about/" class="menu" onmouseover="menuOn(3)" onmouseout="menuOff(3)"><b>About Us</b></a>
<img src="/images/invdot.gif" name="arrow03" width=5 height=9 alt="">
</nobr></td>
<td rowspan=2><img src="/images/invdot.gif" width=15 height=1></td>
</tr>
<tr>
<td height=9>
<table cellpadding=0 cellspacing=0 border=0 width=100%>
<tr>
<td width=26><img src="/images/menuborder.gif" width=26 height=4 alt=""></td>
<td width=100% background="/images/menuborderbg.gif"><img src="/images/invdot.gif" width=1 height=4 alt=""></td>
<td width=10><img src="/images/menuborder2.gif" width=10 heigth=4 alt=""></td>
</tr>
</table>
</td>
</tr>
</table>
</td><td>
<table cellpadding=0 cellspacing=0 border=0>
<tr>
<td rowspan=2><a href="http://www.chumpsoft.com/contact/" class="menu" onmouseover="menuOn(4)" onmouseout="menuOff(4)"><img src="/images/menu04a.gif" name="menu04" width=25 height=25 border=0 alt=""></a></td>
<td rowspan=2><img src="/images/invdot.gif" width=5 height=1 alt=""></td>
<td valign="bottom" height=16><nobr>
<a href="http://www.chumpsoft.com/contact/" class="menu" onmouseover="menuOn(4)" onmouseout="menuOff(4)"><b>Contact Us</b></a>
<img src="/images/invdot.gif" name="arrow04" width=5 height=9 alt="">
</nobr></td>
<td rowspan=2><img src="/images/invdot.gif" width=15 height=1></td>
</tr>
<tr>
<td height=9>
<table cellpadding=0 cellspacing=0 border=0 width=100%>
<tr>
<td width=26><img src="/images/menuborder.gif" width=26 height=4 alt=""></td>
<td width=100% background="/images/menuborderbg.gif"><img src="/images/invdot.gif" width=1 height=4 alt=""></td>
<td width=10><img src="/images/menuborder2.gif" width=10 heigth=4 alt=""></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!--// Menu Ends //-->
</td>
</tr>
<tr><td><img src="/images/invdot.gif" width=1 height=3 border=0 alt=""></td></tr>
<tr>
<td align="center">
<!--// Banner Starts //-->
<table cellpadding=0 cellspacing=0 border=0 width=100%>
<tr>
<td align="right" width=50% background="/images/bannerbg00a.gif"><table cellpadding=0 cellspacing=0 border=0>
<tr><td background="/images/banner00a00.gif">
<script language=JavaScript1.1>
<!--//
var MM_contentVersion = 5;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if (plugin) {
var words = navigator.plugins["Shockwave Flash"].description.split(" ");
for (var i = 0; i < words.length; ++i)
{
if (isNaN(parseInt(words[i])))
continue;
var MM_PluginVersion = words[i];
}
var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.appVersion.indexOf("Win") != -1)) {
document.writeln('<scr'+'ipt language=VBScript\>'); //FS hide this from IE4.5 Mac by splitting the tag
document.writeln('on error resume next');
document.writeln('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))');
document.writeln('</scr' + 'ipt\>');
}
if ( MM_FlashCanPlay ) {
//document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" id="banner" width="310" height="90" align="">');
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" id="banner" width="310" height="90" align="">');
document.write('<param name=movie value="/flash/banner01.swf"><param name=quality value=high><param name="wmode" value="transparent">');
document.write('<embed src="/flash/banner01.swf" quality=high wmode="transparent" swLiveConnect=FALSE width="310" height="90" name="banner" align="" type="application/x-shockwave-flash" pluginspace="http://www.macromedia.com/go/getflashplayer"></embed>');
document.write('</object>');
} else{
document.write('<img src="/images/banner00a00.gif" width=310 height=90 alt="Chumpsoft Monster Banner" border=0>');
}
//-->
</script><noscript><img src="/images/banner00a00.gif" width=310 height=90 border=0 alt="Chumpsoft Monster Banner"></noscript>
</td></tr>
</table></td>
<td width=50% background="/images/bannerbg00b.gif"><nobr>
<table cellpadding=0 cellspacing=0 border=0 width=310>
<tr>
<td background="/images/bannerbg00b.gif"><img src="/images/banner00b.gif" width=95 height=90 border=0 alt=""></td>
<td>
<table cellpadding=0 cellspacing=0 border=0 width=215>
<tr>
<td><img src="/images/banner00c.gif" width=59 height=50 border=0 alt=""></td>
<td><img src="/images/invdot.gif" width=10 height=1 alt=""></td>
<td valign="middle">
<table cellpadding=1 cellspacing=0 border=0>
<tr><td><img src="/images/headingproducts00.gif" width=61 height=13 alt=""></td></tr>
<form name="prodform">
<tr>
<td><select name="products" class="products" onchange="changeProduct()">
<option>Select a Product
<option value="http://www.chumpsoft.com/products/phpq/">phpQ 2.2<option value="http://www.chumpsoft.com/products/perlq/">perlQ 2.2<option value="http://www.chumpsoft.com/products/phpqjr/">phpQ Jr. 1.0
</select></td>
</tr>
</form>
</table>
</td>
<td rowspan=2><img src="/images/invdot.gif" width=1 height=90 alt=""></td>
</tr>
<tr><td colspan=3 height=40><img src="/images/bannertitlewhatsnew.gif" width=168 height=12 border=0 alt="What's New"></td></tr>
</table>
</td>
</tr>
</table>
</nobr></td>
</tr>
</table>
<!--// Banner Ends //-->
</td>
</tr>
<tr>
<td>
<table cellpadding=0 cellspacing=0 border=0 width=100%>
<tr>
<td align="center">
<table cellpadding=0 cellspacing=0 border=0 width=620>
<tr>
<td valign="top" width=365>
<!--// Column One Starts //-->
<table cellpadding=0 cellspacing=0 border=0 width=100%>
<tr>
<td>
<!--// chumpsoft Description Starts //-->
<table cellpadding=3 cellspacing=0 border=0>
<tr>
<td valign="top"><img src="/images/arrow.gif" width=7 height=10 alt=""></td>
<td valign="top">
<b class="chump">chump</b><b class="soft">soft</b> products combine pleasing, easy to use front ends with powerful database connected applications.
</td>
</tr>
</table>
<!--// chumpsoft Description Ends //-->
</td>
</tr>
<tr><td height=1 bgcolor="#DDDDDD"><img src="/images/invdot.gif" width=100 height=1 alt=""></td></tr>
<tr>
<td valign="top">
<!--// phpQ Info Starts //-->
<table cellpadding=3 cellspacing=0 border=0>
<tr>
<td>
<table cellpadding=0 cellspacing=0 border=0 height=60>
<tr>
<td align="right" height=25><img src="/images/headingavailable.gif" width=117 height=11 alt="Available Now!"></td>
<td height=25><img src="/images/invdot.gif" width=115 height=25 alt=""></td>
<td rowspan=3 height=60 bgcolor="#EEEEEE"><a href="/products/phpq/"><img src="/images/monsterphpq00.gif" width=70 height=60 border=0 alt="phpQ Monster"></a></td>
</tr>
<tr>
<td rowspan=2 height=35 bgcolor="#EEEEEE"><a href="/products/phpq/"><img src="/images/headingphpq00.gif" width=165 height=35 border=0 alt="phpQuestionnaire"></a></td>
<td height=16 bgcolor="#EEEEEE"><a href="/products/phpq/"><img src="/images/headingphpq01.gif" width=115 height=16 border=0 alt="Survey Builder"></a></td>
</tr>
<tr>
<td align="center" height=19><a href="/products/phpq/"><img src="/images/headingversion22.gif" width=67 height=15 border=0 alt="Version 2.0"></a></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<!--// phpQ Description Starts //-->
A comprehensive online survey software tool that lets you easily create web-based surveys that are customized to your site. Online reporting and result exporting are included.
<!--// phpQ Description Ends //-->
</td>
</tr>
<tr>
<td align="center">
<!--// phpQ Menu Starts //-->
<table cellpadding=1 cellspacing=0 border=0>
<tr>
<td><img src="/images/arrowon.gif" width=7 height=7 alt="&gt;"></td>
<td><a href="/buy/index.php?buyp=phpq"><img src="/images/buttonbuynowon.gif" width=69 height=15 border=0 alt="Buy Now"></a></td>
<td><img src="/images/invdot.gif" width=15 height=1 alt=""></td>
<td><img src="/images/arrowon.gif" width=7 height=7 alt="&gt;"></td>
<td><a href="/products/phpq/demo/admin/"><img src="/images/buttondemoon.gif" width=44 height=12 border=0 alt="Demo"></a></td>
<td><img src="/images/invdot.gif" width=15 height=1 alt=""></td>
<td><img src="/images/arrowon.gif" width=7 height=7 alt="&gt;"></td>
<td><a href="/products/phpq/docs/"><img src="/images/buttondocson.gif" width=41 height=12 border=0 alt="Docs"></a></td>
<td><img src="/images/invdot.gif" width=15 height=1 alt=""></td>
<td><img src="/images/arrowon.gif" width=7 height=7 alt="&gt;"></td>
<td><a href="/products/phpq/features/"><img src="/images/buttonfeatureson.gif" width=80 height=12 border=0 alt="Features"></a></td>
</tr>
</table>
<!--// phpQ Menu Ends //-->
</td>
</tr>
</table>
<!--// phpQ Info Ends //-->
</td>
</tr>
<tr><td height=1 bgcolor="#DDDDDD"><img src="/images/invdot.gif" width=100 height=1 alt=""></td></tr>
<tr>
<td valign="top">
<!--// perlQ Info Starts //-->
<table cellpadding=3 cellspacing=0 border=0>
<tr>
<td>
<table cellpadding=0 cellspacing=0 border=0 height=60>
<tr>
<td align="right" height=25><img src="/images/headingavailable.gif" width=117 height=11 alt="Available Now!"></td>
<td height=25><img src="/images/invdot.gif" width=115 height=25 alt=""></td>
<td rowspan=3 height=60 bgcolor="#EEEEEE"><a href="/products/perlq/"><img src="/images/monsterperlq00.gif" width=70 height=60 border=0 alt="perlQ Monster"></a></td>
</tr>
<tr>
<td rowspan=2 height=35 bgcolor="#EEEEEE"><a href="/products/perlq/"><img src="/images/headingperlq00.gif" width=165 height=35 border=0 alt="perlQuestionnaire"></a></td>
<td height=16 bgcolor="#EEEEEE"><a href="/products/perlq/"><img src="/images/headingperlq01.gif" width=115 height=16 border=0 alt="Survey Builder"></a></td>
</tr>
<tr>
<td align="center" height=19><a href="/products/perlq/"><img src="/images/headingversion22.gif" width=67 height=15 border=0 alt="Version 2.0"></a></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<!--// perlQ Description Starts //-->
perlQ is the older brother of phpQ. Containing the identical functionality and performance of phpQ, the Perl version of this program is now completed and available for purchase!
<!--// perlQ Description Ends //-->
</td>
</tr>
<tr>
<td align="center">
<!--// perlQ Menu Starts //-->
<table cellpadding=1 cellspacing=0 border=0>
<tr>
<td><img src="/images/arrowon.gif" width=7 height=7 alt="&gt;"></td>
<td><a href="/buy/index.php?buyp=perlq"><img src="/images/buttonbuynowon.gif" width=69 height=15 border=0 alt="Buy Now"></a></td>
<td><img src="/images/invdot.gif" width=15 height=1 alt=""></td>
<td><img src="/images/arrowon.gif" width=7 height=7 alt="&gt;"></td>
<td><a href="/products/perlq/demo/admin/"><img src="/images/buttondemoon.gif" width=44 height=12 border=0 alt="Demo"></a></td>
<td><img src="/images/invdot.gif" width=15 height=1 alt=""></td>
<td><img src="/images/arrowon.gif" width=7 height=7 alt="&gt;"></td>
<td><a href="/products/perlq/docs/"><img src="/images/buttondocson.gif" width=41 height=12 border=0 alt="Docs"></a></td>
<td><img src="/images/invdot.gif" width=15 height=1 alt=""></td>
<td><img src="/images/arrowon.gif" width=7 height=7 alt="&gt;"></td>
<td><a href="/products/perlq/features/"><img src="/images/buttonfeatureson.gif" width=80 height=12 border=0 alt="Features"></a></td>
</tr>
</table>
<!--// perlQ Menu Ends //-->
</td>
</tr>
</table>
<!--// perlQ Info Ends //-->
</td>
</tr>
<tr><td height=1 bgcolor="#DDDDDD"><img src="/images/invdot.gif" width=100 height=1 alt=""></td></tr>
<tr>
<td valign="top">
<!--// phpQ JR Info Starts //-->
<table cellpadding=3 cellspacing=0 border=0>
<tr>
<td>
<table cellpadding=0 cellspacing=0 border=0 height=60>
<tr>
<td align="right" height=25><img src="/images/headingavailable.gif" width=110 height=11 alt="Coming Soon!"></td>
<td height=25><img src="/images/invdot.gif" width=115 height=25 alt=""></td>
<td rowspan=3 height=60 bgcolor="#EEEEEE"><a href="/products/phpqjr/"><img src="/images/monsterphpqjr00.gif" width=70 height=60 border=0 alt="phpQ JR. Monster"></a></td>
</tr>
<tr>
<td rowspan=2 height=35 bgcolor="#EEEEEE"><a href="/products/phpqjr/"><img src="/images/headingphpqjr00.gif" width=165 height=35 border=0 alt="phpQuestionnaire Junior"></a></td>
<td height=16 bgcolor="#EEEEEE"><a href="/products/phpqjr/"><img src="/images/headingphpqjr01.gif" width=115 height=16 border=0 alt="Poll Builder"></a></td>
</tr>
<tr>
<td align="center" height=19><a href="/products/phpqjr/"><img src="/images/headingversion10.gif" width=67 height=15 border=0 alt="Version 1.0"></a></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<!--// phpQ JR Description Starts //-->
The younger cousin of phpQ, this full-featured polling software is now available. Short web site polls, rather than multi-page surveys, is the focus of this script.
<!--// phpQ JR Description Ends //-->
</td>
</tr>
<tr>
<td align="center">
<!--// phpQ JR Menu Starts //-->
<table cellpadding=1 cellspacing=0 border=0>
<tr>
<td><img src="/images/arrowon.gif" width=7 height=7 alt="&gt;"></td>
<td><a href="/buy/index.php?buyp=phpqjr"><img src="/images/buttonbuynowon.gif" width=69 height=15 border=0 alt="Buy Now"></a></td>
<td><img src="/images/invdot.gif" width=15 height=1 alt=""></td>
<td><img src="/images/arrowon.gif" width=7 height=7 alt="&gt;"></td>
<td><a href="/products/phpqjr/demo/admin/index.php"><img src="/images/buttondemoon.gif" width=44 height=12 border=0 alt="Demo"></a></td>
<td><img src="/images/invdot.gif" width=15 height=1 alt=""></td>
<td><img src="/images/arrowon.gif" width=7 height=7 alt="&gt;"></td>
<td><a href="/products/phpqjr/docs/index.php"><img src="/images/buttondocson.gif" width=41 height=12 border=0 alt="Docs"></a></td>
<td><img src="/images/invdot.gif" width=15 height=1 alt=""></td>
<td><img src="/images/arrowon.gif" width=7 height=7 alt="&gt;"></td>
<td><a href="/products/phpqjr/features/index.php"><img src="/images/buttonfeatureson.gif" width=80 height=12 border=0 alt="Features"></a></td>
</tr>
</table>
<!--// phpQ JR Menu Ends //-->
</td>
</tr>
</table>
<!--// phpQ JR Info Ends //-->
</td>
</tr>
</table>
<!--// Column One Ends //-->
</td>
<td width=1 bgcolor="#DDDDDD"><img src="/images/invdot.gif" width=1 height=200 alt=""></td>
<td valign="top" width=254>
<!--// Column Two Starts //-->
<table cellpadding=0 cellspacing=0 border=0 width=100%>
<tr>
<td>
<!--// What's New Starts //-->
<table cellpadding=3 cellspacing=0 border=0>
<tr>
<td>
<table cellpadding=1 cellspacing=0 border=0>
<tr>
<td valign="top"><img src="/images/arrow.gif" width=7 height=10 alt="&gt;"></td>
<td><nobr><font color="#446699"><b>March 29, 2005</b></font></nobr></td>
</tr>
<tr>
<td></td>
<td>
Version 2.2 of <a href="/products/phpq/"><b class="red">phpQ</b></a> and <a href="/products/perlq/"><b class="red">perlQ</b></a> has been released! Included in this release is an HTML Content question type, optional email notifications to administrators upon survey completion and the ability to show a visitor their full response at the end of the survey.
</td>
</tr>
<tr><td colspan=2><img src="/images/invdot.gif" width=1 height=3 alt=""></td></tr>
<tr>
<td valign="top"><img src="/images/arrow.gif" width=7 height=10 alt="&gt;"></td>
<td><nobr><font color="#446699"><b>September 1, 2004</b></font></nobr></td>
</tr>
<tr>
<td></td>
<td>
We released an affiliate program for those who wish to advertise our products on their own websites or to friends and potential customers. We are also in heavy development of a service-based survey solution due out sometime in late 2005.
</td>
</tr>
<tr><td colspan=2><img src="/images/invdot.gif" width=1 height=3 alt=""></td></tr>
</table>
</td>
</tr>
</table>
<!--// What's New Ends //-->
</td>
</tr>
<tr><td height=1 bgcolor="#DDDDDD"><img src="/images/invdot.gif" width=100 height=1 alt=""></td></tr>
<tr>
<td>
<!--// Referral Partnership Starts //-->
<table cellpadding="3" cellspacing="0" border="0">
<tr>
<td>
<table cellpadding="2" cellspacing="0" border="0">
<tr>
<td><a href="/referral/index.php"><img src="/images/headingreferralprogram.gif" width="143" height="20" border="0" alt="Referral Program" /></a></td>
<td rowspan="3"><a href="/referral/index.php"><img src="/images/monsterpartnership3.jpg" width="100" height="100" border="0" /></a></td>
</tr>
<tr>
<td valign="top">
Become a <b class="chump">chump</b><b class="soft">soft</b> affiliate and start making money now!
For each <b class="chump">chump</b><b class="soft">soft</b> referred sale you will get
<b class="red">15 percent</b>.
</td>
</tr>
<tr><td align="right"><a href="/referral/index.php"><img src="/images/buttonsignup.gif" width="79" height="20" border="0" alt="Sign Up" /></a></td></tr>
</table>
</td>
</tr>
</table>
<!--// Referral Partnership Ends //-->
</td>
</tr>
<tr><td height=1 bgcolor="#DDDDDD"><img src="/images/invdot.gif" width=100 height=1 alt=""></td></tr>
<tr>
<td>
<!--// Mailing List Starts //-->
<table cellpadding=3 cellspacing=0 border=0>
<tr>
<td>
<table cellpadding=1 cellspacing=0 border=0>
<tr><td colspan=3><img src="/images/headingmailinglist.gif" width=245 height=16 border=0 alt="Mailing List"></td></tr>
<form name="mlistform" method="POST">
<tr>
<td><img src="/images/invdot.gif" width=7 height=1 alt=""></td>
<td colspan=2>To receive information regarding updates or new product releases, please enter your email address below.</td>
</tr>
<tr>
<td></td>
<td colspan=2></td>
</tr>
<tr>
<td><img src="/images/arrow.gif" width=7 height=10 alt="&gt;"></td>
<td><input type="text" name="mlistemail" onclick="clearMListForm()" class="mailinglist" value="enter email address"></td>
<td><input type="image" src="/images/buttonjoinlist.gif" name="mlistsubmit" width=93 height=20 border=0 alt="Join List"></td>
</tr>
</form>
</table>
</td>
</tr>
</table>
<!--// Mailing List Ends //-->
</td>
</tr>
</table>
<!--// Column Two Ends //-->
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center">
<!--// Copyright Starts //-->
<table cellpadding=0 cellspacing=0 border=0 width=100%>
<tr>
<td width=50% background="/images/footerbg00.gif"><img src="/images/invdot.gif" width=1 height=16 alt=""></td>
<td width=50% background="/images/footerbg01.gif">
<table cellpadding=0 cellspacing=0 border=0>
<tr>
<td background="/images/footerbg00.gif"><img src="/images/invdot.gif" width=180 height=16 alt=""></td>
<td><img src="/images/footerfold.gif" width=16 height=16 alt=""></td>
<td><nobr><b class="inc">&copy; 2003 - 2005 <span class="chump">chump</span><span class="soft">soft</span>, inc.</b></nobr></td>
</tr>
</table>
</td>
</tr>
</table>
<!--// Copyright Ends //-->
</td>
</tr>
</table>
</body>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 B

@ -1,16 +1,16 @@
<?php
<?php
/*
DOKEOS - elearning and course management software
For a full list of contributors, see documentation/credits.html
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
See "documentation/licence.html" more details.
Contact:
Contact:
Dokeos
Rue des Palais 44 Paleizenstraat
B-1030 Brussels - Belgium
@ -19,11 +19,11 @@
/**
* @package dokeos.survey
* @author
* @version $Id: yesno.php 10680 2007-01-11 21:26:23Z pcool $
* @author
* @version $Id: yesno.php 10705 2007-01-12 22:40:01Z pcool $
*/
// name of the language file that needs to be included
// name of the language file that needs to be included
$language_file = 'survey';
// including the global dokeos file
@ -57,6 +57,12 @@ if (!api_is_allowed_to_edit())
exit;
}
// Database table definitions
/** @todo use database constants for the survey tables */
$table_survey_question = Database :: get_course_table(TABLE_SURVEY_QUESTION);
$table_languages = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$add_question = $_REQUEST['add_question'];
$groupid = $_REQUEST['groupid'];
$surveyid = $_REQUEST['surveyid'];
@ -74,7 +80,6 @@ else
$interbreadcrumb[] = array ("url" => "survey_list.php?n=$n", "name" => get_lang('Survey'));
$table_survey_question = Database :: get_course_table(TABLE_SURVEY_QUESTION);
$Add = get_lang('AddNewQuestionType');
$Multi = get_lang('YesNo');
$groupid = $_REQUEST['groupid'];
@ -86,16 +91,16 @@ if ($_POST['action'] == 'addquestion')
{
$enter_question=$_POST['enterquestion'];
$answers=$_POST['mutlichkboxtext'];
$rating=$_POST['chkboxpoint'];
$rating=$_POST['chkboxpoint'];
$answerT=$_POST['radiotrue'];
$answerD=$_POST['radiodefault'];
$alignment='';
$open_ans="";
$count=count($_POST['mutlichkboxtext']);
$count=count($_POST['mutlichkboxtext']);
$noans=0;
$nopoint=0;
for($i=0;$i<$count;$i++)
{
{
$answers[$i]=trim($answers[$i]);
if(empty($answers[$i]))
$noans++;
@ -103,17 +108,17 @@ if ($_POST['action'] == 'addquestion')
$number=1;
}
$enter_question=trim($enter_question);
if(empty($enter_question))
$error_message = get_lang('PleaseEnterAQuestion')."<br>";
if(empty($enter_question))
$error_message = get_lang('PleaseEnterAQuestion')."<br>";
if ($noans)
$error_message = $error_message."<br>".get_lang('PleasFillAllAnswer');
if(isset($error_message))
{
//Display::display_error_message($error_message);
//Display::display_error_message($error_message);
}
else
{
$groupid = $_POST['groupid'];
$groupid = $_POST['groupid'];
$questtype = $_REQUEST['questtype'];
$enter_question = addslashes($enter_question); SurveyManager::create_question($groupid,$surveyid,$questtype,$enter_question,$alignment,$answers,$open_ans,$answerT,$answerD,$rating,$curr_dbname);
header("location:select_question_group.php?groupid=$groupid&surveyid=$surveyid");
@ -131,16 +136,16 @@ if ($_POST['action'] == 'addquestion')
{
$enter_question=$_POST['enterquestion'];
$answers=$_POST['mutlichkboxtext'];
$rating=$_POST['chkboxpoint'];
$rating=$_POST['chkboxpoint'];
$answerT=$_POST['radiotrue'];
$answerD=$_POST['radiodefault'];
$alignment='';
$open_ans="";
$count=count($_POST['mutlichkboxtext']);
$count=count($_POST['mutlichkboxtext']);
$noans=0;
$nopoint=0;
for($i=0;$i<$count;$i++)
{
{
$answers[$i]=trim($answers[$i]);
if(empty($answers[$i]))
$noans++;
@ -148,20 +153,20 @@ if ($_POST['action'] == 'addquestion')
$nopoint++;
}
$enter_question=trim($enter_question);
if(empty($enter_question))
$error_message = get_lang('PleaseEnterAQuestion')."<br>";
if(empty($enter_question))
$error_message = get_lang('PleaseEnterAQuestion')."<br>";
if ($noans)
$error_message = $error_message."<br>".get_lang('PleasFillAllAnswer');
if(isset($error_message))
{
//Display::display_error_message($error_message);
//Display::display_error_message($error_message);
}
else
{
$groupid = $_REQUEST['groupid'];
$surveyid = $_REQUEST['surveyid'];
$questtype = $_REQUEST['questtype'];
$questtype = $_REQUEST['questtype'];
$enter_question = addslashes($enter_question); SurveyManager::create_question($groupid,$surveyid,$questtype,$enter_question,$alignment,$answers,$open_ans,$answerT,$answerD,$rating,$curr_dbname);
header("location:survey_list.php?n=$n");
exit;
@ -188,7 +193,7 @@ select_question_type($add_question12,$groupid,$surveyid,$cidReq,$curr_dbname);
<?php
if( isset($error_message) )
{
Display::display_error_message($error_message);
Display::display_error_message($error_message);
}
?>
<SCRIPT LANGUAGE="JAVASCRIPT">
@ -206,19 +211,19 @@ function checkLength(form){
<input type="hidden" name="questtype" value="<?php echo $add_question12; ?>">
<input type="hidden" name="action" value="addquestion" >
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="outerBorder_innertable">
<tr>
<tr>
<td class="pagedetails_heading"><a class="form_text_bold"><strong>Question</strong></a></td>
</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="outerBorder_innertable">
<tr class="white_bg">
<td height="30" class="form_text1">
Enter the question.
<tr class="white_bg">
<td height="30" class="form_text1">
Enter the question.
</td>
<td class="form_text1" align="right">&nbsp;
</td>
</tr>
<tr class="form_bg">
<tr class="form_bg">
<td width="542" height="30" colspan="2" >
<?php
@ -230,45 +235,44 @@ function checkLength(form){
$oFCKeditor->Value = $enterquestion;
$oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js";
$oFCKeditor->ToolbarSet = "Survey";
$TBL_LANGUAGES = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql="SELECT isocode FROM ".$TBL_LANGUAGES." WHERE english_name='".$_SESSION["_course"]["language"]."'";
$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;
?>
</td>
</tr>
</table>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="outerBorder_innertable">
<tr>
<tr>
<td class="pagedetails_heading"><a class="form_text_bold"><strong>Answer</strong></a></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="outerBorder_innertable">
<tr class="white_bg">
<tr class="white_bg">
<td height="30"><span class="form_text1">Enter the answers</span>.
</td>
<td>&nbsp;</td>
<td width="192" align="right">&nbsp; </td>
</tr>
</table>
</table>
<table ID="tblFields" width="70%" border="0" cellpadding="0" cellspacing="0" class="outerBorder_innertable">
<?php
<?php
$start=1;$end=2;$upx=2;$upy=1;$dwnx=0;$dwny=1;$jd=0;$sn=1;
$id="id";
$tempmutlichkboxtext="jkjk";
$tempmutlichkboxtext="jkjk";
if(isset($_POST['radiodefault']))
$tempradiodefault=$_POST['radiodefault'];
else
$tempradiodefault=1;
$tempchkboxpoint="jkjk";
$tempchkboxpoint="jkjk";
if(isset($_POST['radiotrue']))
$tempradiotrue=$_POST['radiotrue'];
else
@ -277,9 +281,9 @@ function checkLength(form){
$down="down";
$flag=1;
if(isset($_POST['mutlichkboxtext']))
$end=count($_POST['mutlichkboxtext']);
$end=count($_POST['mutlichkboxtext']);
for($i=$start;$i<=$end;$i++)
{
{
$id="id".$i."_x";
//echo ",".$id;
if(isset($_POST[$id]))
@ -296,14 +300,14 @@ function checkLength(form){
break;
//echo ",while checking id,end=".$end;
}
}
}
for($i=$start;$i<=$end;$i++)
{
$up="up".$i."_x";
$down="down".$i."_x";
$down="down".$i."_x";
if(isset($_POST[$up])||isset($_POST[$down]))
{
{
$flag=0;
if(isset($_POST[$up]))
{
@ -316,7 +320,7 @@ function checkLength(form){
if($tempradiotrue==$i)
$tempradiotrue--;
elseif($tempradiotrue==$i-1)
$tempradiotrue++;
$tempradiotrue++;
$tempm= $tempmutlichkboxtext[$i-2];
$tempchkboxp=$tempchkboxpoint[$i-2];
$tempmutlichkboxtext[$i-2]=$tempmutlichkboxtext[$i-1];
@ -349,14 +353,14 @@ function checkLength(form){
}
//echo ",while checking up/down end=".$end;
$jd=0;
break;
break;
}
}
}
if($flag==1)
{
if(isset($_POST['addnewrows']))
{
$end=count($_POST['mutlichkboxtext']);
{
$end=count($_POST['mutlichkboxtext']);
if($end<10)
{
$end=$end+$_POST['addnewrows'];
@ -369,8 +373,8 @@ function checkLength(form){
/*else
$end=$end+$_POST['addnewrows'];*/
}
}
//echo ",after select end=".$end;
}
//echo ",after select end=".$end;
for($i=$start;$i<=$end;$i++)
{
if($i==$jd)
@ -388,28 +392,28 @@ function checkLength(form){
$post_text = $_POST['mutlichkboxtext'];
//$post_check=$_POST['radiodefault'];
$post_point=$_POST['chkboxpoint'];
//$post_true=$_POST['radiotrue'];
?>
<tr class="form_bg" id="0">
<td width="16" height="30" align="left" class="form_text">
//$post_true=$_POST['radiotrue'];
?>
<tr class="form_bg" id="0">
<td width="16" height="30" align="left" class="form_text">
<?php echo $sn;?>
</td>
<td class="form_bg"><textarea name="mutlichkboxtext[]" cols="50" rows="3" class="text_field" style="width:100%;"><?php echo $post_text[$k]; ?></textarea>
</td>
</td>
<td class="form_bg"><textarea name="mutlichkboxtext[]" cols="50" rows="3" class="text_field" style="width:100%;"><?php echo $post_text[$k]; ?></textarea>
</td>
<td width="10" class="form_text"><img src="../img/blank.gif" width="10" height="8">
</td>
<td width="10" class="form_text"><img src="../img/blank.gif" width="10" height="8">
</td>
</td>
<? if($i>$start)
{
?>
<td width="30" align="center" class="form_text1">
<input type="image" src="../img/up.gif" width="24" height="24" border="0" onclick="this.form.submit();" name="<?echo "up".$i;?>" style="cursor:hand">
<td width="30" align="center" class="form_text1">
<input type="image" src="../img/up.gif" width="24" height="24" border="0" onclick="this.form.submit();" name="<?echo "up".$i;?>" style="cursor:hand">
</td>
<? }
else
{
?> <td width="30" align="center" class="form_text1">
?> <td width="30" align="center" class="form_text1">
</td>
<? }
$sn++;
@ -418,27 +422,27 @@ function checkLength(form){
<? if($i<$end)
{
?>
<td width="30" align="center" class="form_text">
<input type="image" src="../img/down.gif" width="24" height="24" border="0" onclick="this.form.submit();" name="<?echo "down".$i;?>" style="cursor:hand">
<td width="30" align="center" class="form_text">
<input type="image" src="../img/down.gif" width="24" height="24" border="0" onclick="this.form.submit();" name="<?echo "down".$i;?>" style="cursor:hand">
</td>
<? }
else
{
?> <td width="30" align="center" class="form_text1">
?> <td width="30" align="center" class="form_text1">
</td>
<? }
?>
<td width="30" align="center" class="form_text">
<td width="30" align="center" class="form_text">
</tr>
<? }
}
?>
<? }
}
?>
</table>
<br>
<br>
<div align="center">
<input type="HIDDEN" name="end1" value="<?php echo $end; ?>">
<?
<?
if(isset($_POST['add_question']))
{
?> <input type="hidden" name="add_question" value="<?php echo $_POST['add_question'];?>" >
@ -460,7 +464,7 @@ function checkLength(form){
break;
case "template4":
$temp = 'grey';
break;
break;
case "template5":
$temp = 'blank';
break;
@ -469,11 +473,11 @@ function checkLength(form){
<input type="submit" name="back" value="<?php echo get_lang('Back');?>">
<input type="submit" name="saveandexit" value="<?php echo get_lang('SaveAndExit');?>">
<input type="button" value="<?php echo get_lang('Preview');?>" onClick="preview('yesno','<?php echo $temp;?>','<?php echo $Multi; ?>')">
<input type="submit" name="next" value="<?php echo get_lang('Next');?>">
<input type="submit" name="next" value="<?php echo get_lang('Next');?>">
</div>
<!--this partcular field helps in identify the item to be add at the itemadd.php-->
<!--this partcular field helps in identify the item to be add at the itemadd.php-->
</form>
</div>
</div>
<div id=bottomnav align="center"></DIV>
</body>
</html>
@ -483,7 +487,7 @@ function preview(form,temp,qtype)
var ques = editor.getHTML();
//alert(ques);
var id_str = "";
for(i=0;i<eval("document."+form+"['mutlichkboxtext[]'].length");i++)
{
var box = (eval("document."+form+"['mutlichkboxtext[]']["+i+"]"));

@ -1,16 +1,16 @@
<?php
<?php
/*
DOKEOS - elearning and course management software
For a full list of contributors, see documentation/credits.html
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
See "documentation/licence.html" more details.
Contact:
Contact:
Dokeos
Rue des Palais 44 Paleizenstraat
B-1030 Brussels - Belgium
@ -19,11 +19,11 @@
/**
* @package dokeos.survey
* @author
* @version $Id: yesno_edit.php 10680 2007-01-11 21:26:23Z pcool $
* @author
* @version $Id: yesno_edit.php 10705 2007-01-12 22:40:01Z pcool $
*/
// name of the language file that needs to be included
// name of the language file that needs to be included
$language_file = 'survey';
// including the global dokeos file
@ -57,6 +57,12 @@ if (!api_is_allowed_to_edit())
exit;
}
// Database table definitions
/** @todo use database constants for the survey tables */
$table_survey = Database :: get_course_table(TABLE_SURVEY);
$table_survey_question = Database :: get_course_table(TABLE_SURVEY_QUESTION);
$table_languages = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$n=$_REQUEST['n'];
$interbreadcrumb[] = array ("url" => "survey_list.php?n=$n", "name" => get_lang('Survey'));
@ -65,7 +71,7 @@ $groupid=$_REQUEST['groupid'];
$surveyid=$_REQUEST['surveyid'];
$qid=$_REQUEST['qid'];
$qtype=$_REQUEST['qtype'];
$table_survey_question = Database :: get_course_table(TABLE_SURVEY_QUESTION);
$Add = get_lang('UpdateQuestionType');
$Multi = get_lang('YesNo');
$tool_name = $Add.$Multi;
@ -100,31 +106,31 @@ $add_question12=$rs->qtype;
}
}
$open_ans="";
$count=count($_POST['mutlichkboxtext']);
$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')."<br>";
if(empty($enter_question))
$error_message = get_lang('PleaseEnterAQuestion')."<br>";
if ($noans)
$error_message = $error_message."<br>".get_lang('PleasFillAllAnswer');
if(isset($error_message))
{
//Display::display_error_message($error_message);
//Display::display_error_message($error_message);
}
else
{
//$groupid = $_POST['groupid'];
//if(isset($_REQUEST['questtype']))
//$questtype = $_REQUEST['questtype'];
//$groupid = $_POST['groupid'];
//if(isset($_REQUEST['questtype']))
//$questtype = $_REQUEST['questtype'];
//else
$questtype=$rs->qtype;
$questtype=$rs->qtype;
$enter_question = addslashes($enter_question);
SurveyManager::update_question($qid,$questtype,$enter_question,$alignment,$answers,$open_ans,$curr_dbname);
header("location:select_question_group.php?groupid=$groupid&surveyid=$surveyid");
@ -154,7 +160,7 @@ Display::display_header($tool_name);
api_display_tool_title($tool_name);
if( isset($error_message) )
{
Display::display_error_message($error_message);
Display::display_error_message($error_message);
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
@ -167,18 +173,18 @@ if( isset($error_message) )
<input type="hidden" name="questtype" value="<?php echo $add_question12; ?>">
<input type="hidden" name="action" value="addquestion" >
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="outerBorder_innertable">
<tr>
<tr>
<td class="pagedetails_heading"><a class="form_text_bold"><strong>Question</strong></a></td>
</tr>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="outerBorder_innertable">
<tr class="white_bg">
<td height="30" class="form_text1">
Enter the question.
<tr class="white_bg">
<td height="30" class="form_text1">
Enter the question.
</td>
<td class="form_text1" align="right">&nbsp;
</td>
<tr class="form_bg">
<tr class="form_bg">
<td width="542" height="30" colspan="2" >
<?php
require_once(api_get_path(LIBRARY_PATH) . "/fckeditor/fckeditor.php");
@ -189,15 +195,15 @@ if( isset($error_message) )
$oFCKeditor->Value = $rs->caption;
$oFCKeditor->Config['CustomConfigurationsPath'] = api_get_path(REL_PATH)."main/inc/lib/fckeditor/myconfig.js";
$oFCKeditor->ToolbarSet = "Survey";
$TBL_LANGUAGES = Database::get_main_table(TABLE_MAIN_LANGUAGE);
$sql="SELECT isocode FROM ".$TBL_LANGUAGES." WHERE english_name='".$_SESSION["_course"]["language"]."'";
$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;
?>
</td>
@ -211,36 +217,36 @@ if( isset($error_message) )
</tr>
</table>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="outerBorder_innertable">
<tr>
<tr>
<td class="pagedetails_heading"><a class="form_text_bold"><strong>Answer</strong></a></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="outerBorder_innertable">
<tr class="white_bg">
<tr class="white_bg">
<td height="30"><span class="form_text1">Enter the answers</span>.
</td>
<td>&nbsp;</td>
<td width="192" align="right">&nbsp; </td>
</tr>
</table>
</table>
<table ID="tblFields" width="70%" border="0" cellpadding="0" cellspacing="0" class="outerBorder_innertable">
<?php
<?php
$start=1;$end=2;$upx=2;$upy=1;$dwnx=0;$dwny=1;$jd=0;$sn=1;
$id="id";
$tempmutlichkboxtext="jkjk";
$tempchkboxpoint="jkjk";
$tempmutlichkboxtext="jkjk";
$tempchkboxpoint="jkjk";
$up="up";
$down="down";
$flag=1;
if(isset($_POST['mutlichkboxtext']))
$end=count($_POST['mutlichkboxtext']);
for($i=$start;$i<=$end;$i++)
{
{
$id="id".$i."_x";
if(isset($_POST[$id]))
{
$jd=$i;
@ -253,21 +259,21 @@ if( isset($error_message) )
else
$end-=1;
break;
}
}
for($i=$start;$i<=$end;$i++)
{
$up="up".$i."_x";
$down="down".$i."_x";
$down="down".$i."_x";
$ans="a".$i;
$score="r".$i;
if(isset($_POST[$up])||isset($_POST[$down]))
{
{
$flag=0;
if(isset($_POST[$up]))
{
@ -326,15 +332,15 @@ if( isset($error_message) )
}
//echo ",while checking up/down end=".$end;
$jd=0;
break;
break;
}
}
if($flag==1)
{
if(isset($_POST['addnewrows']))
{
$end=count($_POST['mutlichkboxtext']);
{
$end=count($_POST['mutlichkboxtext']);
if($end<10)
{
$end=$end+$_POST['addnewrows'];
@ -343,10 +349,10 @@ if( isset($error_message) )
}
else
$end=10;
}
}
}
for($i=$start;$i<=$end;$i++)
{
if($i==$jd)
@ -356,7 +362,7 @@ if( isset($error_message) )
else
{
$k=$i-1;
$val="a".$i;
$sco="r".$i;
@ -365,9 +371,9 @@ if( isset($error_message) )
$post_text1=$_POST['mutlichkboxtext'];
$post_text = $post_text1[$i-1];
}
else
else
$post_text=$rs->$val;
if(isset($_POST['chkboxpoint']))
{
$post_point1=$_POST['chkboxpoint'];
@ -375,30 +381,30 @@ if( isset($error_message) )
}
else
$post_point=$rs->$sco;
?>
<tr class="form_bg" id="0">
<td width="16" height="30" align="left" class="form_text">
?>
<tr class="form_bg" id="0">
<td width="16" height="30" align="left" class="form_text">
<?php echo $sn;?>
</td>
</td>
<td class="form_bg"><textarea name="mutlichkboxtext[]" cols="50" rows="3" class="text_field" style="width:100%;"><?php echo $post_text; ?></textarea>
</td>
</td>
<td width="10" class="form_text"><img src="../img/blank.gif" width="10" height="8">
</td>
<td width="10" class="form_text"><img src="../img/blank.gif" width="10" height="8">
</td>
<td width="30" align="center" class="form_text">&nbsp;
</td>
<td width="30" align="center" class="form_text">&nbsp;
</td>
<? if($i>$start)
{
?>
<td width="30" align="center" class="form_text1">
<input type="image" src="../img/up.gif" width="24" height="24" border="0" onclick="this.form.submit();" name="<?echo "up".$i;?>" style="cursor:hand">
<td width="30" align="center" class="form_text1">
<input type="image" src="../img/up.gif" width="24" height="24" border="0" onclick="this.form.submit();" name="<?echo "up".$i;?>" style="cursor:hand">
</td>
<? }
else
{
?> <td width="30" align="center" class="form_text1">
?> <td width="30" align="center" class="form_text1">
</td>
<? }
$sn++;
@ -407,27 +413,27 @@ if( isset($error_message) )
<? if($i<$end)
{
?>
<td width="30" align="center" class="form_text">
<input type="image" src="../img/down.gif" width="24" height="24" border="0" onclick="this.form.submit();" name="<?echo "down".$i;?>" style="cursor:hand">
<td width="30" align="center" class="form_text">
<input type="image" src="../img/down.gif" width="24" height="24" border="0" onclick="this.form.submit();" name="<?echo "down".$i;?>" style="cursor:hand">
</td>
<? }
else
{
?> <td width="30" align="center" class="form_text1">
?> <td width="30" align="center" class="form_text1">
</td>
<? }
?>
<td width="30" align="center" class="form_text">
<td width="30" align="center" class="form_text">
</tr>
<? }
}
?>
<? }
}
?>
</table>
<br>
<br>
<div align="center">
<input type="HIDDEN" name="end1" value="<?php echo $end; ?>">
<?
<?
if(isset($_POST['add_question']))
{
?> <input type="hidden" name="add_question" value="<?php echo $_POST['add_question'];?>" >
@ -448,7 +454,7 @@ if( isset($error_message) )
break;
case "template4":
$temp = 'grey';
break;
break;
case "template5":
$temp = 'blank';
break;
@ -462,9 +468,9 @@ if( isset($error_message) )
<!--<input type="submit" name="next" value="<?php echo get_lang('Next');?>"> -->
</div>
<!--this partcular field helps in identify the item to be add at the itemadd.php-->
<!--this partcular field helps in identify the item to be add at the itemadd.php-->
</form>
</div>
</div>
<div id=bottomnav align="center"></DIV>
</body>
</html>
@ -473,7 +479,7 @@ function preview(form,temp,qtype)
{
var ques = editor.getHTML();
var id_str = "";
for(i=0;i<eval("document."+form+"['mutlichkboxtext[]'].length");i++)
{
var box = (eval("document."+form+"['mutlichkboxtext[]']["+i+"]"));

Loading…
Cancel
Save