diff --git a/main/social/search.php b/main/social/search.php index 55feb30a81..7b3c50d73f 100755 --- a/main/social/search.php +++ b/main/social/search.php @@ -16,8 +16,8 @@ if (api_get_setting('allow_social_tool') != 'true') { api_not_allowed(); } -$this_section = SECTION_SOCIAL; -$tool_name = get_lang('Search'); +$this_section = SECTION_SOCIAL; +$tool_name = get_lang('Search'); $interbreadcrumb[] = array('url' => 'profile.php', 'name' => get_lang('SocialNetwork')); $query = isset($_GET['q']) ? Security::remove_XSS($_GET['q']): null; diff --git a/main/tracking/course_access_details.php b/main/tracking/course_access_details.php index fac9a21c6f..04d73030d4 100755 --- a/main/tracking/course_access_details.php +++ b/main/tracking/course_access_details.php @@ -10,9 +10,6 @@ */ // TODO: Is this file deprecated? -/* - INIT SECTION -*/ $reqdate = $_REQUEST['reqdate']; $period = $_REQUEST['period']; $displayType = $_REQUEST['displayType']; @@ -20,7 +17,10 @@ require_once '../inc/global.inc.php'; $courseId = api_get_course_int_id(); -$interbreadcrumb[]= array ("url"=>"courseLog.php", "name"=> get_lang('ToolName')); +$interbreadcrumb[] = array( + "url" => "courseLog.php", + "name" => get_lang('ToolName'), +); $nameTools = get_lang('TrafficDetails'); @@ -38,7 +38,7 @@ td {border-bottom: thin dashed gray;} "; //@todo use Database library $TABLETRACK_ACCESS = Database::get_main_table(TABLE_STATISTIC_TRACK_E_ACCESS); -Display::display_header($nameTools,"Tracking"); +Display::display_header($nameTools, "Tracking"); // the variables for the days and the months // Defining the shorts for the days @@ -56,14 +56,12 @@ $is_allowedToTrack = $is_courseAdmin;
";
- switch($period)
- {
+ if ($is_allowedToTrack) {
+ if (!isset($reqdate) || $reqdate < 0 || $reqdate > 2149372861)
+ $reqdate = time();
+ //** dislayed period
+ echo "";
+ switch($period) {
case "year" :
echo date(" Y", $reqdate);
break;
@@ -80,32 +78,30 @@ $is_allowedToTrack = $is_courseAdmin;
echo " | | ";
//** menu
echo "
- "; + | "; echo " ".get_lang('PeriodToDisplay')." : [".get_lang('PeriodYear')."] [".get_lang('PeriodMonth')."] [".get_lang('PeriodDay')."] || ".get_lang('DetailView')." : "; - switch($period) - { + + switch($period) { case "year" : - //-- if period is "year" display can be by month, day or hour - echo " [".get_lang('PeriodMonth')."]"; + //-- if period is "year" display can be by month, day or hour + echo " [".get_lang('PeriodMonth')."]"; case "month" : - //-- if period is "month" display can be by day or hour - echo " [".get_lang('PeriodDay')."]"; + //-- if period is "month" display can be by day or hour + echo " [".get_lang('PeriodDay')."]"; case "day" : - //-- if period is "day" display can only be by hour - echo " [".get_lang('PeriodHour')."]"; - break; + //-- if period is "day" display can only be by hour + echo " [".get_lang('PeriodHour')."]"; + break; } echo " || "; - switch($period) - { + switch ($period) { case "year" : // previous and next date must be evaluated // 30 days should be a good approximation @@ -136,12 +132,9 @@ $is_allowedToTrack = $is_courseAdmin; "; break; } - echo " - | -