[svn r10583] use correct not allowed code

skala
Patrick Cool 19 years ago
parent 27c68b8dcc
commit c8d81dc38a
  1. 13
      main/survey/addanother.php
  2. 13
      main/survey/attach_existingsurvey.php
  3. 13
      main/survey/attach_question.php
  4. 13
      main/survey/attach_survey.php
  5. 13
      main/survey/blank.php
  6. 13
      main/survey/bluebreeze.php
  7. 13
      main/survey/complete_report.php
  8. 19
      main/survey/create_from_existing_survey.php
  9. 18
      main/survey/create_new_group.php
  10. 19
      main/survey/create_new_survey.php
  11. 21
      main/survey/existing_surveys_new.php
  12. 18
      main/survey/group_edit.php
  13. 21
      main/survey/group_list.php
  14. 22
      main/survey/mcma.php
  15. 20
      main/survey/mcma_edit.php
  16. 20
      main/survey/mcma_view.php
  17. 21
      main/survey/mcsa.php
  18. 20
      main/survey/mcsa_edit.php
  19. 20
      main/survey/mcsa_view.php
  20. 20
      main/survey/numbered.php
  21. 21
      main/survey/numbered_view.php
  22. 20
      main/survey/open.php
  23. 20
      main/survey/open_edit.php
  24. 21
      main/survey/open_view.php
  25. 21
      main/survey/preview_yesno.php
  26. 21
      main/survey/question.php
  27. 22
      main/survey/question_edit.php
  28. 18
      main/survey/question_list.php
  29. 18
      main/survey/question_list_new.php
  30. 21
      main/survey/select_question_group-uploaded.php
  31. 21
      main/survey/select_question_group.php
  32. 19
      main/survey/survey.php
  33. 17
      main/survey/survey_all_courses.php
  34. 20
      main/survey/survey_edit.php
  35. 14
      main/survey/survey_list.php

@ -23,7 +23,7 @@
==============================================================================
* @package dokeos.survey
* @author
* @version $Id: addanother.php 10578 2006-12-31 17:01:58Z pcool $
* @version $Id: addanother.php 10583 2007-01-02 14:47:19Z pcool $
==============================================================================
*/
@ -50,11 +50,22 @@ require_once (api_get_path(LIBRARY_PATH)."/surveymanager.lib.php");
require_once (api_get_path(LIBRARY_PATH)."/usermanager.lib.php");
/** @todo replace this with the correct code */
/*
$status = surveymanager::get_status();
api_protect_course_script();
if($status==5)
{
api_protect_admin_script();
}
*/
/** @todo this has to be moved to a more appropriate place (after the display_header of the code)*/
if (!api_is_allowed_to_edit())
{
Display :: display_header();
Display :: display_error_message(get_lang('NotAllowedHere'));
Display :: display_footer();
exit;
}
// Database table definitions
/** @todo use database constants for the survey tables */

@ -20,7 +20,7 @@
/**
* @package dokeos.survey
* @author
* @version $Id: attach_existingsurvey.php 10567 2006-12-28 23:10:27Z pcool $
* @version $Id: attach_existingsurvey.php 10583 2007-01-02 14:47:19Z pcool $
*/
/*
@ -46,11 +46,22 @@ require_once (api_get_path(LIBRARY_PATH)."/surveymanager.lib.php");
require_once (api_get_path(LIBRARY_PATH)."/usermanager.lib.php");
/** @todo replace this with the correct code */
/*
$status = surveymanager::get_status();
api_protect_course_script();
if($status==5)
{
api_protect_admin_script();
}
*/
/** @todo this has to be moved to a more appropriate place (after the display_header of the code)*/
if (!api_is_allowed_to_edit())
{
Display :: display_header();
Display :: display_error_message(get_lang('NotAllowedHere'));
Display :: display_footer();
exit;
}
// Database table definitions
/** @todo use database constants for the survey tables */

@ -20,7 +20,7 @@
/**
* @package dokeos.survey
* @author
* @version $Id: attach_question.php 10567 2006-12-28 23:10:27Z pcool $
* @version $Id: attach_question.php 10583 2007-01-02 14:47:19Z pcool $
*/
/*
@ -46,11 +46,22 @@ require_once (api_get_path(LIBRARY_PATH)."/surveymanager.lib.php");
require_once (api_get_path(LIBRARY_PATH)."/usermanager.lib.php");
/** @todo replace this with the correct code */
/*
$status = surveymanager::get_status();
api_protect_course_script();
if($status==5)
{
api_protect_admin_script();
}
*/
/** @todo this has to be moved to a more appropriate place (after the display_header of the code)*/
if (!api_is_allowed_to_edit())
{
Display :: display_header();
Display :: display_error_message(get_lang('NotAllowedHere'));
Display :: display_footer();
exit;
}
// Database table definitions
/** @todo use database constants for the survey tables */

@ -20,7 +20,7 @@
/**
* @package dokeos.survey
* @author
* @version $Id: attach_survey.php 10567 2006-12-28 23:10:27Z pcool $
* @version $Id: attach_survey.php 10583 2007-01-02 14:47:19Z pcool $
*/
/*
@ -46,11 +46,22 @@ require_once (api_get_path(LIBRARY_PATH)."/surveymanager.lib.php");
require_once (api_get_path(LIBRARY_PATH)."/usermanager.lib.php");
/** @todo replace this with the correct code */
/*
$status = surveymanager::get_status();
api_protect_course_script();
if($status==5)
{
api_protect_admin_script();
}
*/
/** @todo this has to be moved to a more appropriate place (after the display_header of the code)*/
if (!api_is_allowed_to_edit())
{
Display :: display_header();
Display :: display_error_message(get_lang('NotAllowedHere'));
Display :: display_footer();
exit;
}
// Database table definitions
/** @todo use database constants for the survey tables */

@ -20,7 +20,7 @@
/**
* @package dokeos.survey
* @author
* @version $Id: blank.php 10571 2006-12-29 15:35:13Z pcool $
* @version $Id: blank.php 10583 2007-01-02 14:47:19Z pcool $
*/
// name of the language file that needs to be included
@ -36,11 +36,22 @@ require_once (api_get_path(LIBRARY_PATH)."/surveymanager.lib.php");
require_once (api_get_path(LIBRARY_PATH)."/course.lib.php");
/** @todo replace this with the correct code */
/*
$status = surveymanager::get_status();
api_protect_course_script();
if($status==5)
{
api_protect_admin_script();
}
*/
/** @todo this has to be moved to a more appropriate place (after the display_header of the code)*/
if (!api_is_allowed_to_edit())
{
Display :: display_header();
Display :: display_error_message(get_lang('NotAllowedHere'));
Display :: display_footer();
exit;
}
// $_GET and $_POST
/** @todo replace $_REQUEST with $_GET or $_POST */

@ -20,7 +20,7 @@
/**
* @package dokeos.survey
* @author
* @version $Id: bluebreeze.php 10571 2006-12-29 15:35:13Z pcool $
* @version $Id: bluebreeze.php 10583 2007-01-02 14:47:19Z pcool $
*/
// name of the language file that needs to be included
@ -36,11 +36,22 @@ require_once (api_get_path(LIBRARY_PATH)."/surveymanager.lib.php");
require_once (api_get_path(LIBRARY_PATH)."/course.lib.php");
/** @todo replace this with the correct code */
/*
$status = surveymanager::get_status();
api_protect_course_script();
if($status==5)
{
api_protect_admin_script();
}
*/
/** @todo this has to be moved to a more appropriate place (after the display_header of the code)*/
if (!api_is_allowed_to_edit())
{
Display :: display_header();
Display :: display_error_message(get_lang('NotAllowedHere'));
Display :: display_footer();
exit;
}
// $_GET and $_POST
/** @todo replace $_REQUEST with $_GET or $_POST */

@ -20,7 +20,7 @@
/**
* @package dokeos.survey
* @author
* @version $Id: complete_report.php 10578 2006-12-31 17:01:58Z pcool $
* @version $Id: complete_report.php 10583 2007-01-02 14:47:19Z pcool $
*/
// name of the language file that needs to be included
@ -41,11 +41,22 @@ require_once (api_get_path(LIBRARY_PATH)."/add_course.lib.inc.php");
require_once (api_get_path(LIBRARY_PATH)."/surveymanager.lib.php");
/** @todo replace this with the correct code */
/*
$status = surveymanager::get_status();
api_protect_course_script();
if($status==5)
{
api_protect_admin_script();
}
*/
/** @todo this has to be moved to a more appropriate place (after the display_header of the code)*/
if (!api_is_allowed_to_edit())
{
Display :: display_header();
Display :: display_error_message(get_lang('NotAllowedHere'));
Display :: display_footer();
exit;
}
// Database table definitions
/** @todo use database constants for the survey tables */

@ -20,7 +20,7 @@
/**
* @package dokeos.survey
* @author
* @version $Id: create_from_existing_survey.php 10559 2006-12-27 10:52:50Z pcool $
* @version $Id: create_from_existing_survey.php 10583 2007-01-02 14:47:19Z pcool $
*/
/*
@ -33,12 +33,25 @@ $language_file = 'survey';
require ('../inc/global.inc.php');
require_once (api_get_path(LIBRARY_PATH)."/surveymanager.lib.php");
/** @todo replace this with the correct code */
/*
$status = surveymanager::get_status();
api_protect_course_script();
if($status==5)
{
api_protect_admin_script();
api_protect_admin_script();
}
//api_protect_admin_script();
*/
/** @todo this has to be moved to a more appropriate place (after the display_header of the code)*/
if (!api_is_allowed_to_edit())
{
Display :: display_header();
Display :: display_error_message(get_lang('NotAllowedHere'));
Display :: display_footer();
exit;
}
require_once (api_get_path(LIBRARY_PATH)."/course.lib.php");
$cidReq = $_REQUEST['cidReq'];
$db_name = $_REQUEST['db_name'];

@ -20,7 +20,7 @@
/**
* @package dokeos.survey
* @author
* @version $Id: create_new_group.php 10559 2006-12-27 10:52:50Z pcool $
* @version $Id: create_new_group.php 10583 2007-01-02 14:47:19Z pcool $
*/
/*
@ -37,11 +37,25 @@ 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");
require_once (api_get_path(LIBRARY_PATH)."/surveymanager.lib.php");
/** @todo replace this with the correct code */
/*
$status = surveymanager::get_status();
api_protect_course_script();
if($status==5)
{
api_protect_admin_script();
api_protect_admin_script();
}
*/
/** @todo this has to be moved to a more appropriate place (after the display_header of the code)*/
if (!api_is_allowed_to_edit())
{
Display :: display_header();
Display :: display_error_message(get_lang('NotAllowedHere'));
Display :: display_footer();
exit;
}
require_once (api_get_path(LIBRARY_PATH)."/usermanager.lib.php");
$cidReq=$_GET['cidReq'];
$curr_dbname = $_REQUEST['curr_dbname'];

@ -20,7 +20,7 @@
/**
* @package dokeos.survey
* @author
* @version $Id: create_new_survey.php 10559 2006-12-27 10:52:50Z pcool $
* @version $Id: create_new_survey.php 10583 2007-01-02 14:47:19Z pcool $
*/
/*
@ -58,15 +58,22 @@ $table_course = Database :: get_main_table(TABLE_MAIN_COURSE);
$table_course_survey_rel = Database :: get_main_table(TABLE_MAIN_COURSE_SURVEY);
/** @todo replace this with the correct code */
/*
-----------------------------------------------------------
some permissions stuff (???)
-----------------------------------------------------------
*/
$status = surveymanager::get_status();
api_protect_course_script();
if($status==5)
{
api_protect_admin_script();
api_protect_admin_script();
}
*/
/** @todo this has to be moved to a more appropriate place (after the display_header of the code)*/
if (!api_is_allowed_to_edit())
{
Display :: display_header();
Display :: display_error_message(get_lang('NotAllowedHere'));
Display :: display_footer();
exit;
}
/*

@ -20,7 +20,7 @@
/**
* @package dokeos.survey
* @author
* @version $Id: existing_surveys_new.php 10549 2006-12-24 16:08:47Z pcool $
* @version $Id: existing_surveys_new.php 10583 2007-01-02 14:47:19Z pcool $
*/
/*
@ -33,13 +33,26 @@ $language_file = 'survey';
require ('../inc/global.inc.php');
require_once (api_get_path(LIBRARY_PATH)."/surveymanager.lib.php");
require_once (api_get_path(LIBRARY_PATH)."/course.lib.php");
/** @todo replace this with the correct code */
/*
$status = surveymanager::get_status();
api_protect_course_script();
if($status==5)
{
api_protect_admin_script();
api_protect_admin_script();
}
//api_protect_admin_script();
require_once (api_get_path(LIBRARY_PATH)."/course.lib.php");
*/
/** @todo this has to be moved to a more appropriate place (after the display_header of the code)*/
if (!api_is_allowed_to_edit())
{
Display :: display_header();
Display :: display_error_message(get_lang('NotAllowedHere'));
Display :: display_footer();
exit;
}
$cidReq = $_REQUEST['cidReq'];
$curr_dbname = $_REQUEST['curr_dbname'];
$table_survey = Database :: get_course_table('survey');

@ -20,7 +20,7 @@
/**
* @package dokeos.survey
* @author
* @version $Id: group_edit.php 10549 2006-12-24 16:08:47Z pcool $
* @version $Id: group_edit.php 10583 2007-01-02 14:47:19Z pcool $
*/
/*
@ -37,11 +37,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");
/** @todo replace this with the correct code */
/*
$status = surveymanager::get_status();
api_protect_course_script();
if($status==5)
{
api_protect_admin_script();
api_protect_admin_script();
}
*/
/** @todo this has to be moved to a more appropriate place (after the display_header of the code)*/
if (!api_is_allowed_to_edit())
{
Display :: display_header();
Display :: display_error_message(get_lang('NotAllowedHere'));
Display :: display_footer();
exit;
}
$cidReq=$_GET['cidReq'];
$curr_dbname = $_REQUEST['curr_dbname'];
$table_group = Database :: get_course_table('survey_group');

@ -20,7 +20,7 @@
/**
* @package dokeos.survey
* @author
* @version $Id: group_list.php 10559 2006-12-27 10:52:50Z pcool $
* @version $Id: group_list.php 10583 2007-01-02 14:47:19Z pcool $
*/
/*
@ -34,13 +34,26 @@ $language_file = 'survey';
//$newsurveyid=11;
require ('../inc/global.inc.php');
require_once (api_get_path(LIBRARY_PATH)."/surveymanager.lib.php");
require_once (api_get_path(LIBRARY_PATH)."/course.lib.php");
/** @todo replace this with the correct code */
/*
$status = surveymanager::get_status();
api_protect_course_script();
if($status==5)
{
api_protect_admin_script();
api_protect_admin_script();
}
//api_protect_admin_script();
require_once (api_get_path(LIBRARY_PATH)."/course.lib.php");
*/
/** @todo this has to be moved to a more appropriate place (after the display_header of the code)*/
if (!api_is_allowed_to_edit())
{
Display :: display_header();
Display :: display_error_message(get_lang('NotAllowedHere'));
Display :: display_footer();
exit;
}
$cidReq = $_REQUEST['cidReq'];
$curr_dbname = $_REQUEST['curr_dbname'];
$table_survey = Database :: get_course_table('survey');

@ -20,7 +20,7 @@
/**
* @package dokeos.survey
* @author
* @version $Id: mcma.php 10559 2006-12-27 10:52:50Z pcool $
* @version $Id: mcma.php 10583 2007-01-02 14:47:19Z pcool $
*/
// name of the language file that needs to be included
@ -37,12 +37,28 @@ 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");
require_once (api_get_path(LIBRARY_PATH)."/surveymanager.lib.php");
require_once (api_get_path(LIBRARY_PATH)."/usermanager.lib.php");
/** @todo replace this with the correct code */
/*
$status = surveymanager::get_status();
api_protect_course_script();
if($status==5)
{
api_protect_admin_script();
api_protect_admin_script();
}
require_once (api_get_path(LIBRARY_PATH)."/usermanager.lib.php");
*/
/** @todo this has to be moved to a more appropriate place (after the display_header of the code)*/
if (!api_is_allowed_to_edit())
{
Display :: display_header();
Display :: display_error_message(get_lang('NotAllowedHere'));
Display :: display_footer();
exit;
}
$cidReq=$_GET['cidReq'];
$curr_dbname = $_REQUEST['curr_dbname'];
$add_question = $_REQUEST['add_question'];

@ -20,7 +20,7 @@
/**
* @package dokeos.survey
* @author
* @version $Id: mcma_edit.php 10559 2006-12-27 10:52:50Z pcool $
* @version $Id: mcma_edit.php 10583 2007-01-02 14:47:19Z pcool $
*/
// name of the language file that needs to be included
@ -33,12 +33,26 @@ 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");
require_once (api_get_path(LIBRARY_PATH)."/surveymanager.lib.php");
require_once (api_get_path(LIBRARY_PATH)."/usermanager.lib.php");
/** @todo replace this with the correct code */
/*
$status = surveymanager::get_status();
api_protect_course_script();
if($status==5)
{
api_protect_admin_script();
api_protect_admin_script();
}
require_once (api_get_path(LIBRARY_PATH)."/usermanager.lib.php");
*/
/** @todo this has to be moved to a more appropriate place (after the display_header of the code)*/
if (!api_is_allowed_to_edit())
{
Display :: display_header();
Display :: display_error_message(get_lang('NotAllowedHere'));
Display :: display_footer();
exit;
}
$n=$_REQUEST['n'];
$interbreadcrumb[] = array ("url" => "survey_list.php?cidReq=$cidReq&n=$n", "name" => get_lang('Survey'));
$cidReq = $_REQUEST['cidReq'];

@ -20,7 +20,7 @@
/**
* @package dokeos.survey
* @author
* @version $Id: mcma_view.php 10223 2006-11-27 14:45:59Z pcool $
* @version $Id: mcma_view.php 10583 2007-01-02 14:47:19Z pcool $
*/
// name of the language file that needs to be included
@ -28,13 +28,27 @@ $language_file = 'survey';
require ('../inc/global.inc.php');
require_once (api_get_path(LIBRARY_PATH)."/surveymanager.lib.php");
require_once (api_get_path(LIBRARY_PATH)."/course.lib.php");
/** @todo replace this with the correct code */
/*
$status = surveymanager::get_status();
api_protect_course_script();
if($status==5)
{
api_protect_admin_script();
api_protect_admin_script();
}
*/
/** @todo this has to be moved to a more appropriate place (after the display_header of the code)*/
if (!api_is_allowed_to_edit())
{
Display :: display_header();
Display :: display_error_message(get_lang('NotAllowedHere'));
Display :: display_footer();
exit;
}
$cidReq = $_REQUEST['cidReq'];
require_once (api_get_path(LIBRARY_PATH)."/course.lib.php");
$surveyid=$_REQUEST['surveyid'];
$groupid=$_REQUEST['groupid'];
$ques_type = $_GET['qtype'];

@ -20,7 +20,7 @@
/**
* @package dokeos.survey
* @author
* @version $Id: mcsa.php 10559 2006-12-27 10:52:50Z pcool $
* @version $Id: mcsa.php 10583 2007-01-02 14:47:19Z pcool $
*/
// name of the language file that needs to be included
@ -37,13 +37,26 @@ 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");
require_once (api_get_path(LIBRARY_PATH)."/surveymanager.lib.php");
require_once (api_get_path(LIBRARY_PATH)."/usermanager.lib.php");
/** @todo replace this with the correct code */
/*
$status = surveymanager::get_status();
api_protect_course_script();
if($status==5)
{
api_protect_admin_script();
api_protect_admin_script();
}
require_once (api_get_path(LIBRARY_PATH)."/usermanager.lib.php");
//$tool_name = get_lang('QuestionType');
*/
/** @todo this has to be moved to a more appropriate place (after the display_header of the code)*/
if (!api_is_allowed_to_edit())
{
Display :: display_header();
Display :: display_error_message(get_lang('NotAllowedHere'));
Display :: display_footer();
exit;
}
$cidReq=$_GET['cidReq'];
$curr_dbname = $_REQUEST['curr_dbname'];
$add_question = $_REQUEST['add_question'];

@ -20,7 +20,7 @@
/**
* @package dokeos.survey
* @author
* @version $Id: mcsa_edit.php 10559 2006-12-27 10:52:50Z pcool $
* @version $Id: mcsa_edit.php 10583 2007-01-02 14:47:19Z pcool $
*/
// name of the language file that needs to be included
@ -34,12 +34,26 @@ 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");
require_once (api_get_path(LIBRARY_PATH)."/surveymanager.lib.php");
require_once (api_get_path(LIBRARY_PATH)."/usermanager.lib.php");
/** @todo replace this with the correct code */
/*
$status = surveymanager::get_status();
api_protect_course_script();
if($status==5)
{
api_protect_admin_script();
api_protect_admin_script();
}
require_once (api_get_path(LIBRARY_PATH)."/usermanager.lib.php");
*/
/** @todo this has to be moved to a more appropriate place (after the display_header of the code)*/
if (!api_is_allowed_to_edit())
{
Display :: display_header();
Display :: display_error_message(get_lang('NotAllowedHere'));
Display :: display_footer();
exit;
}
$n=$_REQUEST['n'];
$interbreadcrumb[] = array ("url" => "survey_list.php?cidReq=$cidReq&n=$n", "name" => get_lang('Survey'));
$cidReq = $_REQUEST['cidReq'];

@ -20,7 +20,7 @@
/**
* @package dokeos.survey
* @author
* @version $Id: mcsa_view.php 10223 2006-11-27 14:45:59Z pcool $
* @version $Id: mcsa_view.php 10583 2007-01-02 14:47:19Z pcool $
*/
// name of the language file that needs to be included
@ -28,13 +28,27 @@ $language_file = 'survey';
require ('../inc/global.inc.php');
require_once (api_get_path(LIBRARY_PATH)."/surveymanager.lib.php");
require_once (api_get_path(LIBRARY_PATH)."/course.lib.php");
/** @todo replace this with the correct code */
/*
$status = surveymanager::get_status();
api_protect_course_script();
if($status==5)
{
api_protect_admin_script();
api_protect_admin_script();
}
*/
/** @todo this has to be moved to a more appropriate place (after the display_header of the code)*/
if (!api_is_allowed_to_edit())
{
Display :: display_header();
Display :: display_error_message(get_lang('NotAllowedHere'));
Display :: display_footer();
exit;
}
$cidReq = $_REQUEST['cidReq'];
require_once (api_get_path(LIBRARY_PATH)."/course.lib.php");
$table_category = Database :: get_main_table(TABLE_MAIN_CATEGORY);
$table_survey = Database :: get_course_table('survey');
$table_group = Database :: get_course_table('survey_group');

@ -20,7 +20,7 @@
/**
* @package dokeos.survey
* @author
* @version $Id: numbered.php 10559 2006-12-27 10:52:50Z pcool $
* @version $Id: numbered.php 10583 2007-01-02 14:47:19Z pcool $
*/
// name of the language file that needs to be included
@ -37,12 +37,26 @@ 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");
require_once (api_get_path(LIBRARY_PATH)."/surveymanager.lib.php");
require_once (api_get_path(LIBRARY_PATH)."/usermanager.lib.php");
/** @todo replace this with the correct code */
/*
$status = surveymanager::get_status();
api_protect_course_script();
if($status==5)
{
api_protect_admin_script();
api_protect_admin_script();
}
require_once (api_get_path(LIBRARY_PATH)."/usermanager.lib.php");
*/
/** @todo this has to be moved to a more appropriate place (after the display_header of the code)*/
if (!api_is_allowed_to_edit())
{
Display :: display_header();
Display :: display_error_message(get_lang('NotAllowedHere'));
Display :: display_footer();
exit;
}
$cidReq=$_GET['cidReq'];
$curr_dbname = $_REQUEST['curr_dbname'];
$add_question = $_REQUEST['add_question'];

@ -20,7 +20,7 @@
/**
* @package dokeos.survey
* @author
* @version $Id: numbered_view.php 10223 2006-11-27 14:45:59Z pcool $
* @version $Id: numbered_view.php 10583 2007-01-02 14:47:19Z pcool $
*/
// name of the language file that needs to be included
@ -28,13 +28,28 @@ $language_file = 'survey';
require ('../inc/global.inc.php');
require_once (api_get_path(LIBRARY_PATH)."/surveymanager.lib.php");
require_once (api_get_path(LIBRARY_PATH)."/course.lib.php");
/** @todo replace this with the correct code */
/*
$status = surveymanager::get_status();
api_protect_course_script();
if($status==5)
{
api_protect_admin_script();
api_protect_admin_script();
}
*/
/** @todo this has to be moved to a more appropriate place (after the display_header of the code)*/
if (!api_is_allowed_to_edit())
{
Display :: display_header();
Display :: display_error_message(get_lang('NotAllowedHere'));
Display :: display_footer();
exit;
}
$cidReq = $_REQUEST['cidReq'];
require_once (api_get_path(LIBRARY_PATH)."/course.lib.php");
$table_category = Database :: get_main_table(TABLE_MAIN_CATEGORY);
$table_survey = Database :: get_course_table('survey');
$table_group = Database :: get_course_table('survey_group');

@ -20,7 +20,7 @@
/**
* @package dokeos.survey
* @author
* @version $Id: open.php 10559 2006-12-27 10:52:50Z pcool $
* @version $Id: open.php 10583 2007-01-02 14:47:19Z pcool $
*/
// name of the language file that needs to be included
@ -38,12 +38,26 @@ 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");
require_once (api_get_path(LIBRARY_PATH)."/surveymanager.lib.php");
require_once (api_get_path(LIBRARY_PATH)."/usermanager.lib.php");
/** @todo replace this with the correct code */
/*
$status = surveymanager::get_status();
api_protect_course_script();
if($status==5)
{
api_protect_admin_script();
api_protect_admin_script();
}
require_once (api_get_path(LIBRARY_PATH)."/usermanager.lib.php");
*/
/** @todo this has to be moved to a more appropriate place (after the display_header of the code)*/
if (!api_is_allowed_to_edit())
{
Display :: display_header();
Display :: display_error_message(get_lang('NotAllowedHere'));
Display :: display_footer();
exit;
}
$interbreadcrumb[] = array ("url" => "survey_list.php?cidReq=$cidReq&n=$n", "name" => get_lang('Survey'));
$cidReq=$_GET['cidReq'];
$curr_dbname = $_REQUEST['curr_dbname'];

@ -20,7 +20,7 @@
/**
* @package dokeos.survey
* @author
* @version $Id: open_edit.php 10559 2006-12-27 10:52:50Z pcool $
* @version $Id: open_edit.php 10583 2007-01-02 14:47:19Z pcool $
*/
// name of the language file that needs to be included
@ -39,12 +39,26 @@ 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");
require_once (api_get_path(LIBRARY_PATH)."/surveymanager.lib.php");
require_once (api_get_path(LIBRARY_PATH)."/usermanager.lib.php");
/** @todo replace this with the correct code */
/*
$status = surveymanager::get_status();
api_protect_course_script();
if($status==5)
{
api_protect_admin_script();
api_protect_admin_script();
}
require_once (api_get_path(LIBRARY_PATH)."/usermanager.lib.php");
*/
/** @todo this has to be moved to a more appropriate place (after the display_header of the code)*/
if (!api_is_allowed_to_edit())
{
Display :: display_header();
Display :: display_error_message(get_lang('NotAllowedHere'));
Display :: display_footer();
exit;
}
$interbreadcrumb[] = array ("url" => "survey_list.php?cidReq=$cidReq&n=$n", "name" => get_lang('Survey'));
$cidReq=$_GET['cidReq'];
$curr_dbname = $_REQUEST['curr_dbname'];

@ -20,7 +20,7 @@
/**
* @package dokeos.survey
* @author
* @version $Id: open_view.php 10223 2006-11-27 14:45:59Z pcool $
* @version $Id: open_view.php 10583 2007-01-02 14:47:19Z pcool $
*/
// name of the language file that needs to be included
@ -28,13 +28,28 @@ $language_file = 'survey';
require ('../inc/global.inc.php');
require_once (api_get_path(LIBRARY_PATH)."/surveymanager.lib.php");
require_once (api_get_path(LIBRARY_PATH)."/course.lib.php");
/** @todo replace this with the correct code */
/*
$status = surveymanager::get_status();
api_protect_course_script();
if($status==5)
{
api_protect_admin_script();
api_protect_admin_script();
}
*/
/** @todo this has to be moved to a more appropriate place (after the display_header of the code)*/
if (!api_is_allowed_to_edit())
{
Display :: display_header();
Display :: display_error_message(get_lang('NotAllowedHere'));
Display :: display_footer();
exit;
}
$cidReq = $_REQUEST['cidReq'];
require_once (api_get_path(LIBRARY_PATH)."/course.lib.php");
$table_category = Database :: get_main_table(TABLE_MAIN_CATEGORY);
$table_survey = Database :: get_course_table('survey');
$table_group = Database :: get_course_table('survey_group');

@ -20,7 +20,7 @@
/**
* @package dokeos.survey
* @author
* @version $Id: preview_yesno.php 10549 2006-12-24 16:08:47Z pcool $
* @version $Id: preview_yesno.php 10583 2007-01-02 14:47:19Z pcool $
*/
/*
@ -37,17 +37,32 @@ 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");
require_once (api_get_path(LIBRARY_PATH)."/surveymanager.lib.php");
/** @todo replace this with the correct code */
/*
$status = surveymanager::get_status();
api_protect_course_script();
if($status==5)
{
api_protect_admin_script();
}
*/
/** @todo this has to be moved to a more appropriate place (after the display_header of the code)*/
if (!api_is_allowed_to_edit())
{
Display :: display_header();
Display :: display_error_message(get_lang('NotAllowedHere'));
Display :: display_footer();
exit;
}
// Database table definitions
$table_category = Database :: get_main_table(TABLE_MAIN_CATEGORY);
$table_survey = Database :: get_main_table(TABLE_MAIN_SURVEY);
$table_group = Database :: get_main_table(TABLE_MAIN_GROUP);
$table_survey = Database :: get_main_table(TABLE_MAIN_SURVEY);
$table_group = Database :: get_main_table(TABLE_MAIN_GROUP);
$table_question = Database :: get_main_table(TABLE_MAIN_SURVEYQUESTION);
$tool_name = get_lang('ViewQuestions');
$header1 = get_lang('SurveyName');
$header2 = get_lang('GroupName');

@ -20,7 +20,7 @@
/**
* @package dokeos.survey
* @author
* @version $Id: question.php 10223 2006-11-27 14:45:59Z pcool $
* @version $Id: question.php 10583 2007-01-02 14:47:19Z pcool $
*/
// name of the language file that needs to be included
@ -28,13 +28,28 @@ $language_file = 'survey';
require ('../inc/global.inc.php');
require_once (api_get_path(LIBRARY_PATH)."/surveymanager.lib.php");
require_once (api_get_path(LIBRARY_PATH)."/course.lib.php");
/** @todo replace this with the correct code */
/*
$status = surveymanager::get_status();
api_protect_course_script();
if($status==5)
{
api_protect_admin_script();
api_protect_admin_script();
}
*/
/** @todo this has to be moved to a more appropriate place (after the display_header of the code)*/
if (!api_is_allowed_to_edit())
{
Display :: display_header();
Display :: display_error_message(get_lang('NotAllowedHere'));
Display :: display_footer();
exit;
}
$cidReq = $_REQUEST['cidReq'];
require_once (api_get_path(LIBRARY_PATH)."/course.lib.php");
$surveyid=$_REQUEST['surveyid'];
$groupid=$_REQUEST['groupid'];
$ques_type = $_GET['qtype'];

@ -20,7 +20,7 @@
/**
* @package dokeos.survey
* @author
* @version $Id: question_edit.php 10223 2006-11-27 14:45:59Z pcool $
* @version $Id: question_edit.php 10583 2007-01-02 14:47:19Z pcool $
*/
/*
@ -33,19 +33,33 @@ $language_file = 'survey';
require ('../inc/global.inc.php');
require_once (api_get_path(LIBRARY_PATH)."/surveymanager.lib.php");
require_once (api_get_path(LIBRARY_PATH)."/course.lib.php");
/** @todo replace this with the correct code */
/*
$status = surveymanager::get_status();
api_protect_course_script();
if($status==5)
{
api_protect_admin_script();
api_protect_admin_script();
}
*/
/** @todo this has to be moved to a more appropriate place (after the display_header of the code)*/
if (!api_is_allowed_to_edit())
{
Display :: display_header();
Display :: display_error_message(get_lang('NotAllowedHere'));
Display :: display_footer();
exit;
}
//api_protect_admin_script();
$cidReq = $_REQUEST['cidReq'];
$curr_dbname = $_REQUEST['curr_dbname'];
$groupid=$_REQUEST['groupid'];
$surveyid=$_REQUEST['surveyid'];
$qid=$_REQUEST['qid'];
$qtype=$_REQUEST['qtype'];
require_once (api_get_path(LIBRARY_PATH)."/course.lib.php");
$table_survey = Database :: get_course_table('survey');
$table_group = Database :: get_course_table('survey_group');
$table_question = Database :: get_course_table('questions');

@ -20,7 +20,7 @@
/**
* @package dokeos.survey
* @author
* @version $Id: question_list.php 10559 2006-12-27 10:52:50Z pcool $
* @version $Id: question_list.php 10583 2007-01-02 14:47:19Z pcool $
*/
/*
@ -35,11 +35,25 @@ require ('../inc/global.inc.php');
//api_protect_admin_script();
require_once (api_get_path(LIBRARY_PATH)."/course.lib.php");
require_once (api_get_path(LIBRARY_PATH)."/surveymanager.lib.php");
/** @todo replace this with the correct code */
/*
$status = surveymanager::get_status();
api_protect_course_script();
if($status==5)
{
api_protect_admin_script();
api_protect_admin_script();
}
*/
/** @todo this has to be moved to a more appropriate place (after the display_header of the code)*/
if (!api_is_allowed_to_edit())
{
Display :: display_header();
Display :: display_error_message(get_lang('NotAllowedHere'));
Display :: display_footer();
exit;
}
$interbreadcrumb[] = array ("url" => "survey_list.php", "name" => get_lang('Survey'));
$cidReq = $_REQUEST['cidReq'];
$db_name = $_REQUEST['db_name'];

@ -20,7 +20,7 @@
/**
* @package dokeos.survey
* @author
* @version $Id: question_list_new.php 10559 2006-12-27 10:52:50Z pcool $
* @version $Id: question_list_new.php 10583 2007-01-02 14:47:19Z pcool $
*/
@ -36,11 +36,25 @@ require ('../inc/global.inc.php');
//api_protect_admin_script();
require_once (api_get_path(LIBRARY_PATH)."/course.lib.php");
require_once (api_get_path(LIBRARY_PATH)."/surveymanager.lib.php");
/** @todo replace this with the correct code */
/*
$status = surveymanager::get_status();
api_protect_course_script();
if($status==5)
{
api_protect_admin_script();
api_protect_admin_script();
}
*/
/** @todo this has to be moved to a more appropriate place (after the display_header of the code)*/
if (!api_is_allowed_to_edit())
{
Display :: display_header();
Display :: display_error_message(get_lang('NotAllowedHere'));
Display :: display_footer();
exit;
}
$interbreadcrumb[] = array ("url" => "survey_list.php", "name" => get_lang('Survey'));
$cidReq = $_REQUEST['cidReq'];
$db_name = $_REQUEST['db_name'];

@ -20,7 +20,7 @@
/**
* @package dokeos.survey
* @author
* @version $Id: select_question_group-uploaded.php 10559 2006-12-27 10:52:50Z pcool $
* @version $Id: select_question_group-uploaded.php 10583 2007-01-02 14:47:19Z pcool $
*/
@ -38,16 +38,25 @@ 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");
require_once (api_get_path(LIBRARY_PATH)."/surveymanager.lib.php");
/** @todo replace this with the correct code */
/*
$status = surveymanager::get_status();
api_protect_course_script();
if($status==5)
{
api_protect_admin_script();
api_protect_admin_script();
}
/*
echo "<pre>";
print_r($_SESSION);
echo "</pre>";
*/
/** @todo this has to be moved to a more appropriate place (after the display_header of the code)*/
if (!api_is_allowed_to_edit())
{
Display :: display_header();
Display :: display_error_message(get_lang('NotAllowedHere'));
Display :: display_footer();
exit;
}
$table_survey = Database :: get_course_table('survey');
$table_group = Database :: get_course_table('survey_group');
$table_question = Database :: get_course_table('questions');

@ -20,7 +20,7 @@
/**
* @package dokeos.survey
* @author
* @version $Id: select_question_group.php 10559 2006-12-27 10:52:50Z pcool $
* @version $Id: select_question_group.php 10583 2007-01-02 14:47:19Z pcool $
*/
@ -38,16 +38,25 @@ 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");
require_once (api_get_path(LIBRARY_PATH)."/surveymanager.lib.php");
/** @todo replace this with the correct code */
/*
$status = surveymanager::get_status();
api_protect_course_script();
if($status==5)
{
api_protect_admin_script();
api_protect_admin_script();
}
/*
echo "<pre>";
print_r($_SESSION);
echo "</pre>";
*/
/** @todo this has to be moved to a more appropriate place (after the display_header of the code)*/
if (!api_is_allowed_to_edit())
{
Display :: display_header();
Display :: display_error_message(get_lang('NotAllowedHere'));
Display :: display_footer();
exit;
}
$table_survey = Database :: get_course_table('survey');
$table_group = Database :: get_course_table('survey_group');
$table_question = Database :: get_course_table('questions');

@ -20,7 +20,7 @@
/**
* @package dokeos.survey
* @author
* @version $Id: survey.php 10559 2006-12-27 10:52:50Z pcool $
* @version $Id: survey.php 10583 2007-01-02 14:47:19Z pcool $
*/
@ -52,17 +52,24 @@ $cidReq = $_GET['cidReq'];
*/
$table_survey = Database :: get_course_table('survey');
/** @todo replace this with the correct code */
/*
-----------------------------------------------------------
some permissions stuff (?)
-----------------------------------------------------------
*/
$status = surveymanager::get_status();
api_protect_course_script();
if($status==5)
{
api_protect_admin_script();
api_protect_admin_script();
}
*/
/** @todo this has to be moved to a more appropriate place (after the display_header of the code)*/
if (!api_is_allowed_to_edit())
{
Display :: display_header();
Display :: display_error_message(get_lang('NotAllowedHere'));
Display :: display_footer();
exit;
}
/*
-----------------------------------------------------------

@ -20,7 +20,7 @@
/**
* @package dokeos.survey
* @author
* @version $Id: survey_all_courses.php 10549 2006-12-24 16:08:47Z pcool $
* @version $Id: survey_all_courses.php 10583 2007-01-02 14:47:19Z pcool $
*/
/*
@ -54,11 +54,24 @@ $table_course_survey_rel = Database :: get_main_table(TABLE_MAIN_COURSE_SURVEY)
some permissions stuff (?)
-----------------------------------------------------------
*/
/** @todo replace this with the correct code */
/*
$status = surveymanager::get_status();
api_protect_course_script();
if($status==5)
{
api_protect_admin_script();
api_protect_admin_script();
}
*/
/** @todo this has to be moved to a more appropriate place (after the display_header of the code)*/
if (!api_is_allowed_to_edit())
{
Display :: display_header();
Display :: display_error_message(get_lang('NotAllowedHere'));
Display :: display_footer();
exit;
}
$cidReq = $_REQUEST['cidReq'];

@ -20,7 +20,7 @@
/**
* @package dokeos.survey
* @author
* @version $Id: survey_edit.php 10550 2006-12-24 16:17:25Z pcool $
* @version $Id: survey_edit.php 10583 2007-01-02 14:47:19Z pcool $
*/
/*
==============================================================================
@ -34,12 +34,26 @@ include ('../inc/global.inc.php');
//api_protect_admin_script();
include (api_get_path(LIBRARY_PATH).'/fileManage.lib.php');
require_once (api_get_path(LIBRARY_PATH)."/surveymanager.lib.php");
require_once (api_get_path(LIBRARY_PATH)."/usermanager.lib.php");
/** @todo replace this with the correct code */
/*
$status = surveymanager::get_status();
api_protect_course_script();
if($status==5)
{
api_protect_admin_script();
api_protect_admin_script();
}
require_once (api_get_path(LIBRARY_PATH)."/usermanager.lib.php");
*/
/** @todo this has to be moved to a more appropriate place (after the display_header of the code)*/
if (!api_is_allowed_to_edit())
{
Display :: display_header();
Display :: display_error_message(get_lang('NotAllowedHere'));
Display :: display_footer();
exit;
}
// the variables for the days and the months
// Defining the months of the year to allow translation of the months
$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'));

@ -20,7 +20,7 @@
/**
* @package dokeos.survey
* @author
* @version $Id: survey_list.php 10582 2006-12-31 17:27:50Z pcool $
* @version $Id: survey_list.php 10583 2007-01-02 14:47:19Z pcool $
*/
/*
@ -39,17 +39,27 @@ require_once (api_get_path(LIBRARY_PATH)."/surveymanager.lib.php");
require_once (api_get_path(LIBRARY_PATH)."/course.lib.php");
/** @todo replace this with the correct code */
/*
$status = surveymanager::get_status();
api_protect_course_script();
if($status==5)
{
api_protect_admin_script();
}
*/
/** @todo this has to be moved to a more appropriate place (after the display_header of the code)*/
if (!api_is_allowed_to_edit())
{
Display :: display_header();
Display :: display_error_message(get_lang('NotAllowedHere'));
Display :: display_footer();
exit;
}
// Database table definitions
/** @todo use database constants for the survey tables */
$table_survey = Database :: get_course_table('survey');
$table_group = Database :: get_course_table('survey_group');
$table_group = Database :: get_course_table('survey_group');
$table_question = Database :: get_course_table('questions');
$table_course = Database :: get_main_table(TABLE_MAIN_COURSE);

Loading…
Cancel
Save