Minor - style review

skala
Yannick Warnier 16 years ago
parent 87de42e390
commit bb5e6d6beb
  1. 40
      main/newscorm/lp_controller.php

@ -10,7 +10,7 @@
/**
* Initialisations
*/
$debug = 0;
$debug = 1;
if($debug>0) error_log('New LP -+- Entered lp_controller.php -+-',0);
// name of the language file that needs to be included
if (isset($_GET['action']))
@ -836,25 +836,25 @@ switch($action)
require 'lp_message.php';
break;
case 'return_to_course_homepage':
if(!$lp_found){ error_log('New LP - No learnpath given for stats',0); require 'lp_list.php'; }
else{
$_SESSION['oLP']->save_current();
$_SESSION['oLP']->save_last();
//declare variables to be used in lp_stats.php
$lp_id = $_SESSION['oLP']->get_id();
$list = $_SESSION['oLP']->get_flat_ordered_items_list($lp_id);
$user_id = api_get_user_id();
$stats_charset = $_SESSION['oLP']->encoding;
//header('location: ../course_home/course_home.php?'.api_get_cidreq()); // This is not the preferable way to go to the homepage.
header('location: '.api_get_path(WEB_COURSE_PATH).api_get_course_path().'/index.php');
}
break;
case 'search':
/* Include the search script, it's smart enough to know when we are
* searching or not
*/
require 'lp_list_search.php';
break;
if(!$lp_found){ error_log('New LP - No learnpath given for stats',0); require 'lp_list.php'; }
else{
$_SESSION['oLP']->save_current();
$_SESSION['oLP']->save_last();
//declare variables to be used in lp_stats.php
$lp_id = $_SESSION['oLP']->get_id();
$list = $_SESSION['oLP']->get_flat_ordered_items_list($lp_id);
$user_id = api_get_user_id();
$stats_charset = $_SESSION['oLP']->encoding;
//header('location: ../course_home/course_home.php?'.api_get_cidreq()); // This is not the preferable way to go to the homepage.
header('location: '.api_get_path(WEB_COURSE_PATH).api_get_course_path().'/index.php');
}
break;
case 'search':
/* Include the search script, it's smart enough to know when we are
* searching or not
*/
require 'lp_list_search.php';
break;
default:
if($debug>0) error_log('New LP - default action triggered',0);
//$_SESSION['refresh'] = 1;

Loading…
Cancel
Save