Bug #3646 and Issue #306 - The agenda tool: Fixing person name order to be dependable on the internationalization settings. Setting the date-picker to work with the system's encoding. Common changes: Replacing repetitive code for building localized arrays with week days and months with API-function calls. Some other minor changes.

skala
Ivan Tcholakov 16 years ago
parent ed64d52dac
commit a6a6cea3a6
  1. 6
      main/admin/calendar.lib.php
  2. 6
      main/admin/calendar.php
  3. 6
      main/admin/calendar_ical_export.php
  4. 6
      main/admin/calendar_view.php
  5. 8
      main/blog/blog.php
  6. 6
      main/blog/calendar.php
  7. 28
      main/calendar/agenda.inc.php
  8. 6
      main/calendar/agenda.php
  9. 36
      main/calendar/calendar.php
  10. 6
      main/calendar/ical_export.php
  11. 6
      main/calendar/myagenda.php
  12. 2
      main/calendar/tbl_change.js
  13. 20
      main/inc/lib/formvalidator/Element/calendar_popup.php
  14. 6
      main/reservation/rcalendar.php
  15. 6
      main/tracking/course_access_details.php
  16. 8
      main/tracking/logins_details.php
  17. 8
      main/tracking/toolaccess_details.php
  18. 1
      main/tracking/userLog.php
  19. 1
      main/tracking/userlogCSV.php

@ -15,11 +15,11 @@
*/
// the variables for the days and the months
// Defining the shorts for the days
$DaysShort = array (get_lang("SundayShort"), get_lang("MondayShort"), get_lang("TuesdayShort"), get_lang("WednesdayShort"), get_lang("ThursdayShort"), get_lang("FridayShort"), get_lang("SaturdayShort"));
$DaysShort = api_get_week_days_short();
// Defining the days of the week to allow translation of the days
$DaysLong = array (get_lang("SundayLong"), get_lang("MondayLong"), get_lang("TuesdayLong"), get_lang("WednesdayLong"), get_lang("ThursdayLong"), get_lang("FridayLong"), get_lang("SaturdayLong"));
$DaysLong = api_get_week_days_long();
// 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"));
$MonthsLong = api_get_months_long();
/*
==============================================================================

@ -159,11 +159,11 @@ else
// Variable definitions
$dateNow = format_locale_date($dateTimeFormatLong);
// Defining the shorts for the days. We use camelcase because these are arrays of language variables
$DaysShort = array (get_lang("SundayShort"), get_lang("MondayShort"), get_lang("TuesdayShort"), get_lang("WednesdayShort"), get_lang("ThursdayShort"), get_lang("FridayShort"), get_lang("SaturdayShort"));
$DaysShort = api_get_week_days_short();
// Defining the days of the week to allow translation of the days. We use camelcase because these are arrays of language variables
$DaysLong = array (get_lang("SundayLong"), get_lang("MondayLong"), get_lang("TuesdayLong"), get_lang("WednesdayLong"), get_lang("ThursdayLong"), get_lang("FridayLong"), get_lang("SaturdayLong"));
$DaysLong = api_get_week_days_long();
// Defining the months of the year to allow translation of the months. We use camelcase because these are arrays of 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 = api_get_months_long();
// Database table definitions
$TABLEAGENDA = Database::get_main_table(TABLE_MAIN_SYSTEM_CALENDAR);

@ -32,11 +32,11 @@ $nameTools = get_lang('MyAgenda');
// the variables for the days and the months
// Defining the shorts for the days
$DaysShort = array (get_lang("SundayShort"), get_lang("MondayShort"), get_lang("TuesdayShort"), get_lang("WednesdayShort"), get_lang("ThursdayShort"), get_lang("FridayShort"), get_lang("SaturdayShort"));
$DaysShort = api_get_week_days_short();
// Defining the days of the week to allow translation of the days
$DaysLong = array (get_lang("SundayLong"), get_lang("MondayLong"), get_lang("TuesdayLong"), get_lang("WednesdayLong"), get_lang("ThursdayLong"), get_lang("FridayLong"), get_lang("SaturdayLong"));
$DaysLong = api_get_week_days_long();
// 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"));
$MonthsLong = api_get_months_long();
if(!empty($_GET['id']) && $_GET['id']==strval(intval($_GET['id'])))
{

@ -36,11 +36,11 @@ if(isset($_GET['id_session']))
// the variables for the days and the months
// Defining the shorts for the days
$DaysShort = array(get_lang("SundayShort"), get_lang("MondayShort"), get_lang("TuesdayShort"), get_lang("WednesdayShort"), get_lang("ThursdayShort"), get_lang("FridayShort"), get_lang("SaturdayShort"));
$DaysShort = api_get_week_days_short();
// Defining the days of the week to allow translation of the days
$DaysLong = array(get_lang("SundayLong"), get_lang("MondayLong"), get_lang("TuesdayLong"), get_lang("WednesdayLong"), get_lang("ThursdayLong"), get_lang("FridayLong"), get_lang("SaturdayLong"));
$DaysLong = api_get_week_days_long();
// 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"));
$MonthsLong = api_get_months_long();
?>
<html>

@ -1,5 +1,5 @@
<?php //$Id: announcements.php 16702 2008-11-10 13:02:30Z elixir_inter $
/*
/*
==============================================================================
Dokeos - elearning and course management software
@ -64,9 +64,9 @@ require_once ($lib_path.'/fckeditor/fckeditor.php');
$blog_table_attachment = Database::get_course_table(TABLE_BLOGS_ATTACHMENT);
$nameTools = get_lang('Blogs');
$DaysShort = array (get_lang('SundayShort'), get_lang('MondayShort'), get_lang('TuesdayShort'), get_lang('WednesdayShort'), get_lang('ThursdayShort'), get_lang('FridayShort'), get_lang('SaturdayShort'));
$DaysLong = array (get_lang('SundayLong'), get_lang('MondayLong'), get_lang('TuesdayLong'), get_lang('WednesdayLong'), get_lang('ThursdayLong'), get_lang('FridayLong'), get_lang('SaturdayLong'));
$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'));
$DaysShort = api_get_week_days_short();
$DaysLong = api_get_week_days_long();
$MonthsLong = api_get_months_long();
$current_page = $_GET['action'];

@ -7,11 +7,11 @@ include('../inc/global.inc.php');
// the variables for the days and the months
// Defining the shorts for the days
$DaysShort = array(get_lang("SundayShort"), get_lang("MondayShort"), get_lang("TuesdayShort"), get_lang("WednesdayShort"), get_lang("ThursdayShort"), get_lang("FridayShort"), get_lang("SaturdayShort"));
$DaysShort = api_get_week_days_short();
// Defining the days of the week to allow translation of the days
$DaysLong = array(get_lang("SundayLong"), get_lang("MondayLong"), get_lang("TuesdayLong"), get_lang("WednesdayLong"), get_lang("ThursdayLong"), get_lang("FridayLong"), get_lang("SaturdayLong"));
$DaysLong = api_get_week_days_long();
// 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"));
$MonthsLong = api_get_months_long();
?>
<html>

@ -23,11 +23,11 @@
*/
// the variables for the days and the months
// Defining the shorts for the days
$DaysShort = array (get_lang("SundayShort"), get_lang("MondayShort"), get_lang("TuesdayShort"), get_lang("WednesdayShort"), get_lang("ThursdayShort"), get_lang("FridayShort"), get_lang("SaturdayShort"));
$DaysShort = api_get_week_days_short();
// Defining the days of the week to allow translation of the days
$DaysLong = array (get_lang("SundayLong"), get_lang("MondayLong"), get_lang("TuesdayLong"), get_lang("WednesdayLong"), get_lang("ThursdayLong"), get_lang("FridayLong"), get_lang("SaturdayLong"));
$DaysLong = api_get_week_days_long();
// 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"));
$MonthsLong = api_get_months_long();
/*
==============================================================================
@ -865,7 +865,7 @@ function construct_not_selected_select_form($group_list=null, $user_list=null,$t
if (!is_array($to_already_selected) || !in_array("USER:".$this_user['uid'],$to_already_selected)) // $to_already_selected is the array containing the users (and groups) that are already selected
{
echo "\t\t<option value=\"USER:",$this_user['uid'],"\">",
"",$this_user['lastName']," ",$this_user['firstName'],
"",api_get_person_name($this_user['firstName'], $this_user['lastName']),
"</option>\n";
}
}
@ -910,8 +910,8 @@ function construct_selected_select_form($group_list=null, $user_list=null,$to_al
}
else
{
$select_options_user[] = "\t\t<option value=\"".$groupuser."\">".$ref_array_users[$id]['lastName']." ".$ref_array_users[$id]['firstName']."</option>";
//echo "\t\t<option value=\"".$groupuser."\">".$ref_array_users[$id]['lastName']." ".$ref_array_users[$id]['firstName']."</option>";
$select_options_user[] = "\t\t<option value=\"".$groupuser."\">".api_get_person_name($ref_array_users[$id]['firstName'], $ref_array_users[$id]['lastName'])."</option>";
//echo "\t\t<option value=\"".$groupuser."\">".api_get_person_name($ref_array_users[$id]['firstName'], $ref_array_users[$id]['lastName'])."</option>";
}
}
$select_options_group[] = "<option value=\"\">--------------------------------------------</option>";
@ -1273,7 +1273,7 @@ function show_group_filter_form()
{
$group_list=get_course_groups();
echo "<select name=\"select\" onchange=\"MM_jumpMenu('parent',this,0)\">";
echo "<select name=\"select\" onchange=\"javascript: MM_jumpMenu('parent',this,0)\">";
echo "<option value=\"agenda.php?group=none\">show all groups</option>";
foreach($group_list as $this_group)
{
@ -1295,14 +1295,14 @@ function show_user_filter_form()
{
$user_list=get_course_users();
echo "<select name=\"select\" onchange=\"MM_jumpMenu('parent',this,0)\">";
echo "<select name=\"select\" onchange=\"javascript: MM_jumpMenu('parent',this,0)\">";
echo "<option value=\"agenda.php?user=none\">show all users</option>";
foreach($user_list as $this_user)
{
// echo "<option value=\"agenda.php?isStudentView=true&amp;user=".$this_user['uid']."\">".$this_user['lastName']." ".$this_user['firstName']."</option>";
// echo "<option value=\"agenda.php?isStudentView=true&amp;user=".$this_user['uid']."\">".api_get_person_name($this_user['firstName'], $this_user['lastName'])."</option>";
echo "<option value=\"agenda.php?user=".$this_user['uid']."\" ";
echo ($this_user['uid']==$_SESSION['user'])? " selected":"" ;
echo ">".$this_user['lastName']." ".$this_user['firstName']."</option>";
echo ">".api_get_person_name($this_user['firstName'], $this_user['lastName'])."</option>";
}
echo "</select>";
}
@ -1315,7 +1315,7 @@ function show_user_filter_form()
*/
function show_user_group_filter_form()
{
echo "\n<select name=\"select\" onchange=\"MM_jumpMenu('parent',this,0)\">";
echo "\n<select name=\"select\" onchange=\"javascript: MM_jumpMenu('parent',this,0)\">";
// Groups
$option = "\n\t<optgroup label=\"".get_lang("Groups")."\">";
@ -1357,7 +1357,7 @@ function show_user_group_filter_form()
foreach($user_list as $this_user) {
echo "\n\t\t<option value=\"agenda.php?user=".$this_user['uid']."\" ";
echo ($this_user['uid']==$_SESSION['user'])? " selected":"" ;
echo ">".$this_user['lastName']." ".$this_user['firstName']."</option>";
echo ">".api_get_person_name($this_user['firstName'], $this_user['lastName'])."</option>";
}
echo "\n\t</optgroup>";
echo "</select>";
@ -2434,7 +2434,7 @@ function display_one_agenda_item($agenda_id)
//echo '<a class="ical_export" href="'.$mylink.'&amp;class=confidential" title="'.get_lang('ExportiCalConfidential').'">'.Display::return_icon($export_icon_high, get_lang('ExportiCalConfidential')).'</a> ';
//echo '<a class="ical_export" href="'.$mylink.'&amp;class=private" title="'.get_lang('ExportiCalPrivate').'">'.Display::return_icon($export_icon_low, get_lang('ExportiCalPrivate')).'</a> ';
//echo '<a class="ical_export" href="'.$mylink.'&amp;class=public" title="'.get_lang('ExportiCalPublic').'">'.Display::return_icon($export_icon, get_lang('ExportiCalPublic')).'</a> ';
echo '<a href="#" onclick="javascript:win_print=window.open(\'print.php?id='.$myrow['id'].'\',\'popup\',\'left=100,top=100,width=700,height=500,scrollbars=1,resizable=0\'); win_print.focus(); return false;">'.Display::return_icon('print.gif', get_lang('Print')).'</a>&nbsp;';
echo '<a href="javascript: void(0);" onclick="javascript:win_print=window.open(\'print.php?id='.$myrow['id'].'\',\'popup\',\'left=100,top=100,width=700,height=500,scrollbars=1,resizable=0\'); win_print.focus(); return false;">'.Display::return_icon('print.gif', get_lang('Print')).'</a>&nbsp;';
echo "</td></tr>";
if($repeat) {
echo '<tr>';
@ -2614,7 +2614,7 @@ function show_add_form($id = '')
{
echo ' <div class="row">
<div class="label">
<a href="#" onclick="if(document.getElementById(\'recipient_list\').style.display==\'none\') document.getElementById(\'recipient_list\').style.display=\'block\'; else document.getElementById(\'recipient_list\').style.display=\'none\';">'.Display::return_icon('group.gif', get_lang('SentTo'), array ('align' => 'absmiddle')).' '.get_lang('SentTo').'</a>
<a href="javascript: void(0);" onclick="if(document.getElementById(\'recipient_list\').style.display==\'none\') document.getElementById(\'recipient_list\').style.display=\'block\'; else document.getElementById(\'recipient_list\').style.display=\'none\';">'.Display::return_icon('group.gif', get_lang('SentTo'), array ('align' => 'absmiddle')).' '.get_lang('SentTo').'</a>
</div>
<div class="formw">';
if ((isset($_GET['id']) && $to=='everyone') || !isset($_GET['id']))

@ -201,11 +201,11 @@ event_access_tool(TOOL_CALENDAR_EVENT);
// Variable definitions
$dateNow = format_locale_date($dateTimeFormatLong);
// Defining the shorts for the days. We use camelcase because these are arrays of language variables
$DaysShort = array (get_lang("SundayShort"), get_lang("MondayShort"), get_lang("TuesdayShort"), get_lang("WednesdayShort"), get_lang("ThursdayShort"), get_lang("FridayShort"), get_lang("SaturdayShort"));
$DaysShort = api_get_week_days_short();
// Defining the days of the week to allow translation of the days. We use camelcase because these are arrays of language variables
$DaysLong = array (get_lang("SundayLong"), get_lang("MondayLong"), get_lang("TuesdayLong"), get_lang("WednesdayLong"), get_lang("ThursdayLong"), get_lang("FridayLong"), get_lang("SaturdayLong"));
$DaysLong = api_get_week_days_long();
// Defining the months of the year to allow translation of the months. We use camelcase because these are arrays of 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 = api_get_months_long();
// Database table definitions
$TABLEAGENDA = Database::get_course_table(TABLE_AGENDA);

@ -22,10 +22,8 @@
==============================================================================
*/
// name of the language file that needs to be included
$language_file = 'agenda';
// including the claroline global
require_once '../inc/global.inc.php';
require_once dirname(__FILE__).'/../inc/global.inc.php';
//session
if(isset($_GET['id_session']))
@ -33,17 +31,27 @@ if(isset($_GET['id_session']))
// the variables for the days and the months
// Defining the shorts for the days
$DaysShort = array(get_lang("SundayShort"), get_lang("MondayShort"), get_lang("TuesdayShort"), get_lang("WednesdayShort"), get_lang("ThursdayShort"), get_lang("FridayShort"), get_lang("SaturdayShort"));
$DaysShort = api_get_week_days_short();
// Defining the days of the week to allow translation of the days
$DaysLong = array(get_lang("SundayLong"), get_lang("MondayLong"), get_lang("TuesdayLong"), get_lang("WednesdayLong"), get_lang("ThursdayLong"), get_lang("FridayLong"), get_lang("SaturdayLong"));
$DaysLong = api_get_week_days_long();
// 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"));
$MonthsLong = api_get_months_long();
@ $iso_lang = Database :: get_language_isocode($language_interface);
if (empty ($iso_lang) )
{
//if there was no valid iso-code, use the english one
$iso_lang = 'en';
}
?>
<html>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $iso_lang; ?>" lang="<?php echo $iso_lang; ?>">
<head>
<title>Calendar</title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $charset; ?>">
<style type="text/css">
/*<![CDATA[*/
@import "<?php echo api_get_path(WEB_CODE_PATH); ?>css/<?php echo api_get_setting('stylesheets'); ?>/default.css";
.data_table th
{
@ -77,8 +85,8 @@ table.calendar td
background-color: #ffff00;
}
</style>
<script language="JavaScript" type="text/javascript">
<!--
<script type="text/javascript">
/* <![CDATA[ */
/* added 2004-06-10 by Michael Keck
* we need this for Backwards-Compatibility and resolving problems
* with non DOM browsers, which may have problems with css 2 (like NC 4)
@ -107,11 +115,11 @@ table.calendar td
}
} // end if... else if...
} // end if
//-->
/* ]]> */
</script>
<script type="text/javascript" src="tbl_change.js"></script>
<script type="text/javascript">
<!--
/* <![CDATA[ */
var month_names = new Array(
<?php
foreach($MonthsLong as $index => $month)
@ -128,10 +136,10 @@ foreach($DaysShort as $index => $day)
}
?>
"");
//-->
/* ]]> */
</script>
</head>
<body onLoad="initCalendar();">
<body onLoad="javascript: initCalendar();">
<div id="calendar_data"></div>
<div id="clock_data"></div>
</body>

@ -29,11 +29,11 @@ $tbl_personal_agenda = Database :: get_user_personal_table(TABLE_PERSONAL_AGENDA
// the variables for the days and the months
// Defining the shorts for the days
$DaysShort = array (get_lang("SundayShort"), get_lang("MondayShort"), get_lang("TuesdayShort"), get_lang("WednesdayShort"), get_lang("ThursdayShort"), get_lang("FridayShort"), get_lang("SaturdayShort"));
$DaysShort = api_get_week_days_short();
// Defining the days of the week to allow translation of the days
$DaysLong = array (get_lang("SundayLong"), get_lang("MondayLong"), get_lang("TuesdayLong"), get_lang("WednesdayLong"), get_lang("ThursdayLong"), get_lang("FridayLong"), get_lang("SaturdayLong"));
$DaysLong = api_get_week_days_long();
// 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"));
$MonthsLong = api_get_months_long();
if(!empty($_GET['id']) && $_GET['id']==strval(intval($_GET['id'])))
{

@ -103,11 +103,11 @@ $tbl_personal_agenda = Database :: get_user_personal_table(TABLE_PERSONAL_AGENDA
// the variables for the days and the months
// Defining the shorts for the days
$DaysShort = array (get_lang("SundayShort"), get_lang("MondayShort"), get_lang("TuesdayShort"), get_lang("WednesdayShort"), get_lang("ThursdayShort"), get_lang("FridayShort"), get_lang("SaturdayShort"));
$DaysShort = api_get_week_days_short();
// Defining the days of the week to allow translation of the days
$DaysLong = array (get_lang("SundayLong"), get_lang("MondayLong"), get_lang("TuesdayLong"), get_lang("WednesdayLong"), get_lang("ThursdayLong"), get_lang("FridayLong"), get_lang("SaturdayLong"));
$DaysLong = api_get_week_days_long();
// 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"));
$MonthsLong = api_get_months_long();
/*==============================================================================
TREATING THE URL PARAMETERS

@ -13,7 +13,7 @@ var clock_set = 0;
* @param string field name
*/
function openCalendar(form, field) {
window.open("./calendar.php", "calendar", "width=260,height=220,status=yes");
window.open("./calendar.php", "calendar", "width=260,height=250,status=yes");
day = eval("document." + form + "." + field + "day.options["+ "document." + form + "." + field + "day.selectedIndex].value");
month = eval("document." + form + "." + field + "month.options["+ "document." + form + "." + field + "month.selectedIndex].value");
month = month-1;

@ -21,19 +21,21 @@
Mail: info@dokeos.com
==============================================================================
*/
// including the relevant language file
// name of the language file that needs to be included
$language_file = 'agenda';
// including the claroline global
require ('../../../global.inc.php');
require_once dirname(__FILE__).'/../../../global.inc.php';
//session
if(isset($_GET['id_session']))
$_SESSION['id_session'] = Security::remove_XSS($_GET['id_session']);
// the variables for the days and the months
// Defining the shorts for the days
$DaysShort = array(get_lang("SundayShort"), get_lang("MondayShort"), get_lang("TuesdayShort"), get_lang("WednesdayShort"), get_lang("ThursdayShort"), get_lang("FridayShort"), get_lang("SaturdayShort"));
$DaysShort = api_get_week_days_short();
// Defining the days of the week to allow translation of the days
$DaysLong = array(get_lang("SundayLong"), get_lang("MondayLong"), get_lang("TuesdayLong"), get_lang("WednesdayLong"), get_lang("ThursdayLong"), get_lang("FridayLong"), get_lang("SaturdayLong"));
$DaysLong = api_get_week_days_long();
// 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"));
$MonthsLong = api_get_months_long();
@ $iso_lang = Database :: get_language_isocode($language_interface);
if (empty ($iso_lang) )
{
@ -48,9 +50,9 @@ if (empty ($iso_lang) )
<head>
<title>Calendar</title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $charset; ?>">
<link rel="stylesheet" type="text/css" href="<?php echo api_get_path(WEB_CODE_PATH); ?>/css/default.css"/>
<style type="text/css">
/*<![CDATA[*/
@import "<?php echo api_get_path(WEB_CODE_PATH); ?>css/<?php echo api_get_setting('stylesheets'); ?>/default.css";
table.calendar
{
width: 100%;
@ -157,7 +159,7 @@ foreach($DaysShort as $index => $day)
/* ]]> */
</script>
</head>
<body onload="initCalendar();">
<body onLoad="javascript: initCalendar();">
<div id="calendar_data"></div>
<div id="clock_data"></div>
</body>

@ -26,9 +26,9 @@
The rCalendar
--------------
*/
$DaysShort = array (get_lang("SundayShort"), get_lang("MondayShort"), get_lang("TuesdayShort"), get_lang("WednesdayShort"), get_lang("ThursdayShort"), get_lang("FridayShort"), get_lang("SaturdayShort"));
$DaysLong = array (get_lang("SundayLong"), get_lang("MondayLong"), get_lang("TuesdayLong"), get_lang("WednesdayLong"), get_lang("ThursdayLong"), get_lang("FridayLong"), get_lang("SaturdayLong"));
$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"));
$DaysShort = api_get_week_days_short();
$DaysLong = api_get_week_days_long();
$MonthsLong = api_get_months_long();
class rCalendar {
function rCalendar() {

@ -67,11 +67,11 @@ include(api_get_path(LIBRARY_PATH)."statsUtils.lib.inc.php");
// the variables for the days and the months
// Defining the shorts for the days
$DaysShort = array (get_lang("SundayShort"), get_lang("MondayShort"), get_lang("TuesdayShort"), get_lang("WednesdayShort"), get_lang("ThursdayShort"), get_lang("FridayShort"), get_lang("SaturdayShort"));
$DaysShort = api_get_week_days_short();
// Defining the days of the week to allow translation of the days
$DaysLong = array (get_lang("SundayLong"), get_lang("MondayLong"), get_lang("TuesdayLong"), get_lang("WednesdayLong"), get_lang("ThursdayLong"), get_lang("FridayLong"), get_lang("SaturdayLong"));
$DaysLong = api_get_week_days_long();
// 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"));
$MonthsLong = api_get_months_long();
$is_allowedToTrack = $is_courseAdmin;

@ -78,13 +78,13 @@ include(api_get_path(LIBRARY_PATH)."statsUtils.lib.inc.php");
// the variables for the days and the months
// Defining the shorts for the days
$DaysShort = array (get_lang("SundayShort"), get_lang("MondayShort"), get_lang("TuesdayShort"), get_lang("WednesdayShort"), get_lang("ThursdayShort"), get_lang("FridayShort"), get_lang("SaturdayShort"));
$DaysShort = api_get_week_days_short();
// Defining the days of the week to allow translation of the days
$DaysLong = array (get_lang("SundayLong"), get_lang("MondayLong"), get_lang("TuesdayLong"), get_lang("WednesdayLong"), get_lang("ThursdayLong"), get_lang("FridayLong"), get_lang("SaturdayLong"));
$DaysLong = api_get_week_days_long();
// 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"));
$MonthsLong = api_get_months_long();
// Defining the months of the year to allow translation of the months
$MonthsShort = array (get_lang("JanuaryShort"), get_lang("FebruaryShort"), get_lang("MarchShort"), get_lang("AprilShort"), get_lang("MayShort"), get_lang("JuneShort"), get_lang("JulyShort"), get_lang("AugustShort"), get_lang("SeptemberShort"), get_lang("OctoberShort"), get_lang("NovemberShort"), get_lang("DecemberShort"));
$MonthsShort = api_get_months_short();
$is_allowedToTrack = $is_groupTutor; // allowed to track only user of one group
$is_allowedToTrackEverybodyInCourse = $is_courseAdmin; // allowed to track all student in course

@ -77,13 +77,13 @@ include(api_get_path(LIBRARY_PATH)."statsUtils.lib.inc.php");
// the variables for the days and the months
// Defining the shorts for the days
$DaysShort = array (get_lang("SundayShort"), get_lang("MondayShort"), get_lang("TuesdayShort"), get_lang("WednesdayShort"), get_lang("ThursdayShort"), get_lang("FridayShort"), get_lang("SaturdayShort"));
$DaysShort = api_get_week_days_short();
// Defining the days of the week to allow translation of the days
$DaysLong = array (get_lang("SundayLong"), get_lang("MondayLong"), get_lang("TuesdayLong"), get_lang("WednesdayLong"), get_lang("ThursdayLong"), get_lang("FridayLong"), get_lang("SaturdayLong"));
$DaysLong = api_get_week_days_long();
// 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"));
$MonthsLong = api_get_months_long();
// Defining the months of the year to allow translation of the months
$MonthsShort = array (get_lang("JanuaryShort"), get_lang("FebruaryShort"), get_lang("MarchShort"), get_lang("AprilShort"), get_lang("MayShort"), get_lang("JuneShort"), get_lang("JulyShort"), get_lang("AugustShort"), get_lang("SeptemberShort"), get_lang("OctoberShort"), get_lang("NovemberShort"), get_lang("DecemberShort"));
$MonthsShort = api_get_months_short();
$tool=$_REQUEST['tool'];
$period=$_REQUEST['period'];

@ -159,6 +159,7 @@ $documentPath=api_get_path(SYS_COURSE_PATH).$_course['path'].'/document';
// the variables for the days and the months
// Defining the shorts for the days
// TODO: The function myEnc() should be eliminated. The following arrays should be constructed using the correspondent API-functions in the internationalization library.
$DaysShort = array (myEnc(get_lang("SundayShort")), myEnc(get_lang("MondayShort")), myEnc(get_lang("TuesdayShort")), myEnc(get_lang("WednesdayShort")), myEnc(get_lang("ThursdayShort")), myEnc(get_lang("FridayShort")), myEnc(get_lang("SaturdayShort")));
// Defining the days of the week to allow translation of the days
$DaysLong = array (myEnc(get_lang("SundayLong")), myEnc(get_lang("MondayLong")), myEnc(get_lang("TuesdayLong")), myEnc(get_lang("WednesdayLong")), myEnc(get_lang("ThursdayLong")), myEnc(get_lang("FridayLong")), myEnc(get_lang("SaturdayLong")));

@ -150,6 +150,7 @@ $documentPath=api_get_path(SYS_COURSE_PATH).$_course['path'].'/document';
// the variables for the days and the months
// Defining the shorts for the days
// TODO: The function myEnc() should be eliminated. The following arrays should be constructed using the correspondent API-functions in the internationalization library.
$DaysShort = array (myEnc(get_lang("SundayShort")), myEnc(get_lang("MondayShort")), myEnc(get_lang("TuesdayShort")), myEnc(get_lang("WednesdayShort")), myEnc(get_lang("ThursdayShort")), myEnc(get_lang("FridayShort")), myEnc(get_lang("SaturdayShort")));
// Defining the days of the week to allow translation of the days
$DaysLong = array (myEnc(get_lang("SundayLong")), myEnc(get_lang("MondayLong")), myEnc(get_lang("TuesdayLong")), myEnc(get_lang("WednesdayLong")), myEnc(get_lang("ThursdayLong")), myEnc(get_lang("FridayLong")), myEnc(get_lang("SaturdayLong")));

Loading…
Cancel
Save