[svn r9968] some minor cleanup

skala
Patrick Cool 19 years ago
parent 5d16ec11e1
commit 7edb8d0030
  1. 3
      main/survey/create_new_survey.php
  2. 2
      main/survey/survey.php
  3. 61
      main/survey/survey_all_courses.php

@ -96,7 +96,8 @@ $todate=date('j');
Breadcrumbs Breadcrumbs
----------------------------------------------------------- -----------------------------------------------------------
*/ */
$interbreadcrumbs[] = array ("url" => "survey_list.php", "name" => get_lang('Survey')); $interbreadcrumb[] = array ("url" => "survey_list.php", "name" => get_lang('Survey'));
$interbreadcrumb[] = array ("url" => "survey.php", "name" => get_lang('CreateSurvey'));
/* /*
----------------------------------------------------------- -----------------------------------------------------------

@ -59,7 +59,7 @@ $table_survey = Database :: get_course_table('survey');
/* /*
----------------------------------------------------------- -----------------------------------------------------------
some permissions stuff some permissions stuff (?)
----------------------------------------------------------- -----------------------------------------------------------
*/ */
$status = surveymanager::get_status(); $status = surveymanager::get_status();

@ -33,28 +33,60 @@
============================================================================== ==============================================================================
*/ */
$langFile = 'survey'; $langFile = 'survey';
/*
require ('../inc/global.inc.php'); -----------------------------------------------------------
Including necessary files
-----------------------------------------------------------
*/
require_once ('../inc/global.inc.php');
require_once (api_get_path(LIBRARY_PATH)."/surveymanager.lib.php"); require_once (api_get_path(LIBRARY_PATH)."/surveymanager.lib.php");
require_once (api_get_path(LIBRARY_PATH)."/course.lib.php");
/*
-----------------------------------------------------------
Table definitions
-----------------------------------------------------------
*/
$table_survey = Database :: get_course_table('survey');
$table_group = Database :: get_course_table('survey_group');
$table_question = Database :: get_course_table('questions');
$table_course_survey_rel = Database :: get_main_table(MAIN_COURSE_SURVEY_TABLE);
/*
-----------------------------------------------------------
some permissions stuff (?)
-----------------------------------------------------------
*/
$status = surveymanager::get_status(); $status = surveymanager::get_status();
if($status==5) 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");
$cidReq = $_REQUEST['cidReq']; $cidReq = $_REQUEST['cidReq'];
$table_survey = Database :: get_course_table('survey');
$table_group = Database :: get_course_table('survey_group');
$table_question = Database :: get_course_table('questions'); /*
$table_course_survey_rel = Database :: get_main_table(MAIN_COURSE_SURVEY_TABLE); -----------------------------------------------------------
//$interbredcrump[] = array ("url" => "index.php", "name" => get_lang('AdministrationTools')); Breadcrumbs
//$interbredcrump[] = array ("url" => "survey.php", "name" => get_lang('a_survey')); -----------------------------------------------------------
$interbredcrump[] = array ("url" => "survey_list.php", "name" => get_lang('Survey')); */
$n='e'; $interbreadcrumb[] = array ("url" => "survey_list.php", "name" => get_lang('Survey'));
$interbreadcrumb[] = array ("url" => "survey.php", "name" => get_lang('CreateSurvey'));
/*
-----------------------------------------------------------
some variables
-----------------------------------------------------------
*/
$tool_name = get_lang('CreateFromExistingSurveys'); $tool_name = get_lang('CreateFromExistingSurveys');
$tool_name1 = get_lang('SurveysOfAllCourses'); $tool_name1 = get_lang('SurveysOfAllCourses');
$surveyid=$_GET['surveyid']; $surveyid=$_GET['surveyid'];
/*
-----------------------------------------------------------
Header
-----------------------------------------------------------
*/
Display :: display_header($tool_name); Display :: display_header($tool_name);
api_display_tool_title($tool_name1); api_display_tool_title($tool_name1);
?> ?>
@ -155,6 +187,11 @@ function displayTemplate(url) {
<input type="submit" name="back1" value="<?php echo get_lang('Back'); ?>"> <input type="submit" name="back1" value="<?php echo get_lang('Back'); ?>">
</form> </form>
<? <?
/*
-----------------------------------------------------------
Footer
-----------------------------------------------------------
*/
Display :: display_footer(); Display :: display_footer();
?> ?>

Loading…
Cancel
Save