Timezone management (see CT#599)

skala
Guillaume Viguier 16 years ago
parent e958de842e
commit fcc5a3766f
  1. 9
      main/admin/calendar.lib.php
  2. 4
      main/admin/statistics/statistics.lib.php
  3. 4
      main/admin/system_announcements.php
  4. 1
      main/calendar/agenda.inc.php
  5. 4
      main/calendar/myagenda.inc.php
  6. 5
      main/inc/lib/attendance.lib.php
  7. 1
      main/inc/lib/main_api.lib.php
  8. 8
      main/inc/lib/notebook.lib.php
  9. 31
      main/inc/lib/tracking.lib.php
  10. 43
      main/wiki/index.php
  11. 6
      main/work/work.lib.php

@ -738,6 +738,7 @@ function display_agenda_items()
while($myrow=Database::fetch_array($result))
{
$is_repeated = !empty($myrow['parent_event_id']);
$myrow["start_date"] = api_get_local_time($myrow["start_date"], null, null, date_default_timezone_get());
echo '<table class="data_table">',"\n";
/*--------------------------------------------------
display: the month bar
@ -822,6 +823,7 @@ function display_agenda_items()
echo "\t\t<td>";
if ($myrow["end_date"]<>"0000-00-00 00:00:00")
{
$myrow["end_date"] = api_get_local_time($myrow["end_date"], null, null, date_default_timezone_get());
echo get_lang("EndTimeWindow").": ";
echo api_ucfirst(format_locale_date($dateFormatLong,strtotime($myrow["end_date"])))."&nbsp;&nbsp;&nbsp;";
echo ucfirst(strftime($timeNoSecFormat,strtotime($myrow["end_date"])))."";
@ -1009,6 +1011,7 @@ function display_one_agenda_item($agenda_id)
echo "\t<tr>\n";
// highlight: if a date in the small calendar is clicked we highlight the relevant items
$myrow["start_date"] = api_get_local_time($myrow["start_date"], null, null, date_default_timezone_get());
$db_date=(int)date("d",strtotime($myrow["start_date"])).date("n",strtotime($myrow["start_date"])).date("Y",strtotime($myrow["start_date"]));
if ($_GET["day"].$_GET["month"].$_GET["year"] <>$db_date)
{
@ -1065,6 +1068,7 @@ function display_one_agenda_item($agenda_id)
echo ucfirst(strftime($timeNoSecFormat,strtotime($myrow["start_date"])))."";
echo "</td>\n";
echo "\t\t<td>".get_lang("EndTime").": ";
$myrow["end_date"] = api_get_local_time($myrow["end_date"], null, null, date_default_timezone_get());
echo api_ucfirst(format_locale_date($dateFormatLong,strtotime($myrow["end_date"])))."&nbsp;&nbsp;&nbsp;";
echo ucfirst(strftime($timeNoSecFormat,strtotime($myrow["end_date"])))."";
echo "</td>\n";
@ -1674,6 +1678,7 @@ function get_agendaitems($month, $year)
$result = Database::query($sqlquery);
while ($item = Database::fetch_array($result))
{
$item['start_date'] = api_get_local_time($item['start_date'], null, null, date_default_timezone_get());
$agendaday = date('j',strtotime($item['start_date']));
$time= date('H:i',strtotime($item['start_date']));
$URL = $portal_url.'main/admin/agenda.php?day='.$agendaday."&amp;month=".$month."&amp;year=".$year; // RH //Patrick Cool: to highlight the relevant agenda item
@ -1996,6 +2001,7 @@ function get_day_agendaitems($courses_dbs, $month, $year, $day)
{
// in the display_daycalendar function we use $i (ranging from 0 to 47) for each halfhour
// we want to know for each agenda item for this day to wich halfhour it must be assigned
$item['start_date'] = api_get_local_time($item['start_date'], null, null, date_default_timezone_get());
list ($datepart, $timepart) = split(" ", $item['start_date']);
list ($year, $month, $day) = explode("-", $datepart);
list ($hours, $minutes, $seconds) = explode(":", $timepart);
@ -2105,6 +2111,7 @@ function get_week_agendaitems($courses_dbs, $month, $year, $week = '')
while ($item = Database::fetch_array($result))
{
$item['start_date'] = api_get_local_time($item['start_date'], null, null, date_default_timezone_get());
$agendaday = date("j",strtotime($item['start_date']));
$time= date("H:i",strtotime($item['start_date']));
@ -2191,7 +2198,7 @@ function get_repeated_events_day_view($course_info,$start=0,$end=0,$params)
while($row = Database::fetch_array($res))
{
$orig_start = $row['orig_start'];
$orig_end = $row['orig_end'];
$orig_end = $row['orig_start'];
$repeat_type = $row['cal_type'];
switch($repeat_type)
{

@ -116,7 +116,7 @@ class Statistics
$res = Database::query($sql);
$activities = array ();
while ($row = Database::fetch_row($res)) {
$row[4] = api_format_date(DATE_TIME_FORMAT_LONG, strtotime($row[4]));
$row[4] = api_get_local_time($row[4], DATE_TIME_FORMAT_LONG, null, date_default_timezone_get());
$activities[] = $row;
}
return $activities;
@ -419,7 +419,7 @@ class Statistics
{
$course = array ();
$course[]= '<a href="'.api_get_path(WEB_PATH).'courses/'.$obj->access_cours_code.'">'.$obj->access_cours_code.' <a>';
$course[] = $obj->access_date;
$course[] = api_get_local_time($obj->access_date, null, null, date_default_timezone_get());
$courses[] = $course;
}
$parameters['action'] = 'courselastvisit';

@ -284,8 +284,8 @@ if ($show_announcement_list)
$row = array ();
$row[] = $announcement->id;
$row[] = Display::return_icon(($announcement->visible ? 'accept.png' : 'exclamation.png'), ($announcement->visible ? get_lang('AnnouncementAvailable') : get_lang('AnnouncementNotAvailable')));
$row[] = $announcement->date_start;
$row[] = $announcement->date_end;
$row[] = api_get_local_time($announcement->date_start, null, null, date_default_timezone_get());
$row[] = api_get_local_time($announcement->date_end, null, null, date_default_timezone_get());
$row[] = "<a href=\"?id=".$announcement->id."&amp;person=".VISIBLE_TEACHER."&amp;action=". ($announcement->visible_teacher ? 'make_invisible' : 'make_visible')."\">".Display::return_icon(($announcement->visible_teacher ? 'visible.gif' : 'invisible.gif'), get_lang('show_hide'))."</a>";
$row[] = "<a href=\"?id=".$announcement->id."&amp;person=".VISIBLE_STUDENT."&amp;action=". ($announcement->visible_student ? 'make_invisible' : 'make_visible')."\">".Display::return_icon(($announcement->visible_student ? 'visible.gif' : 'invisible.gif'), get_lang('show_hide'))."</a>";
$row[] = "<a href=\"?id=".$announcement->id."&amp;person=".VISIBLE_GUEST."&amp;action=". ($announcement->visible_guest ? 'make_invisible' : 'make_visible')."\">".Display::return_icon(($announcement->visible_guest ? 'visible.gif' : 'invisible.gif'), get_lang('show_hide'))."</a>";

@ -3477,6 +3477,7 @@ function get_day_agendaitems($courses_dbs, $month, $year, $day)
{
// in the display_daycalendar function we use $i (ranging from 0 to 47) for each halfhour
// we want to know for each agenda item for this day to wich halfhour it must be assigned
$item['start_date'] = api_get_local_time($item['start_date'], null, null, date_default_timezone_get());
list ($datepart, $timepart) = split(" ", $item['start_date']);
list ($year, $month, $day) = explode("-", $datepart);
list ($hours, $minutes, $seconds) = explode(":", $timepart);

@ -117,8 +117,8 @@ function get_myagendaitems($courses_dbs, $month, $year)
$agendaday = date("j",strtotime($item['start_date']));
if(!isset($items[$agendaday])){$items[$agendaday]=array();}
$time= date("H:i",strtotime($item['start_date']));
$end_time= date("H:i",strtotime($item['end_date']));
$time = api_get_local_time($item['start_date'], "H:i", null, date_default_timezone_get());
$end_time = api_get_local_time($item['end_date'], "H:i", null, date_default_timezone_get());
$URL = api_get_path(WEB_PATH)."main/calendar/agenda.php?cidReq=".urlencode($array_course_info["code"])."&amp;day=$agendaday&amp;month=$month&amp;year=$year#$agendaday"; // RH //Patrick Cool: to highlight the relevant agenda item
if ($setting_agenda_link == 'coursecode') {
$title=$array_course_info['title'];

@ -600,7 +600,8 @@ class Attendance
$res = Database::query($sql);
if (Database::num_rows($res) > 0) {
while ($row = Database::fetch_array($res)) {
$row['date_time'] = api_format_date($dateTimeFormatLong, strtotime($row['date_time']));
$row['date_time'] = api_get_local_time($row['date_time'], $dateTimeFormatLong, null, date_default_timezone_get());
//$row['date_time'] = api_format_date($dateTimeFormatLong, strtotime($row['date_time']));
$data[$user_id][] = $row;
}
}
@ -660,6 +661,7 @@ class Attendance
$data = array();
if (Database::num_rows($rs) > 0) {
while ($row = Database::fetch_array($rs)) {
$row['date_time'] = api_get_local_time($row['date_time'], null, null, date_default_timezone_get());
$data = $row;
}
}
@ -680,6 +682,7 @@ class Attendance
$data = array();
if (Database::num_rows($rs) > 0) {
while ($row = Database::fetch_array($rs)) {
$row['date_time'] = api_get_local_time($row['date_time'], null, null, date_default_timezone_get());
$row['date'] = api_format_date($dateFormatShort, strtotime($row['date_time']));
$row['time'] = api_format_date($timeNoSecFormat, strtotime($row['date_time']));
$data[] = $row;

@ -4518,6 +4518,7 @@ function api_get_local_time($time, $format=null, $to_timezone=null, $from_timezo
$use_users_timezone = api_get_setting('use_users_timezone', 'timezones');
if ($use_users_timezone == 'true') {
// Get the timezone based on user preference, if it exists
require_once api_get_path(LIBRARY_PATH).'usermanager.lib.php';
$timezone_user = UserManager::get_extra_user_data_by_field($_user['user_id'],'timezone');
if ($timezone_user['timezone'] != null) {
$to_timezone = $timezone_user['timezone'];

@ -197,10 +197,12 @@ class NotebookManager
while ($row = Database::fetch_array($result)) {
//validacion when belongs to a session
$session_img = api_get_session_image($row['session_id'], $_user['status']);
$creation_date = api_get_local_time($row['creation_date'], null, null, date_default_timezone_get());
$update_date = api_get_local_time($row['update_date'], null, null, date_default_timezone_get());
echo '<div class="sectiontitle">';
echo '<span style="float: right;"> ('.get_lang('CreationDate').': '.date_to_str_ago($row['creation_date']).'&nbsp;&nbsp;<span class="dropbox_date">'.$row['creation_date'].'</span>';
echo '<span style="float: right;"> ('.get_lang('CreationDate').': '.date_to_str_ago($creation_date).'&nbsp;&nbsp;<span class="dropbox_date">'.$creation_date.'</span>';
if ($row['update_date'] <> $row['creation_date']) {
echo ', '.get_lang('UpdateDate').': '.date_to_str_ago($row['update_date']).'&nbsp;&nbsp;<span class="dropbox_date">'.$row['update_date'].'</span>';
echo ', '.get_lang('UpdateDate').': '.date_to_str_ago($update_date).'&nbsp;&nbsp;<span class="dropbox_date">'.$update_date.'</span>';
}
echo ')</span>';
echo $row['title'] . $session_img;
@ -214,4 +216,4 @@ class NotebookManager
//return $return;
}
}
?>
?>

@ -103,7 +103,8 @@ class Tracking {
if(Database::num_rows($rs)>0)
{
if ($first_login_date = Database::result($rs, 0, 0)) {
return format_locale_date(get_lang('DateFormatLongWithoutDay'), strtotime($first_login_date));
$first_login_date_local = api_get_local_time($first_login_date, null, null, date_default_timezone_get());
return format_locale_date(get_lang('DateFormatLongWithoutDay'), strtotime($first_login_date_local));
}
}
return false;
@ -120,6 +121,7 @@ class Tracking {
{
if ($last_login_date = Database::result($rs, 0, 0))
{
$last_login_date = api_get_local_time($last_login_date, null, null, date_default_timezone_get());
if ($return_timestamp)
{
return strtotime($last_login_date);
@ -163,6 +165,7 @@ class Tracking {
if(Database::num_rows($rs)>0)
{
if ($first_login_date = Database::result($rs, 0, 0)) {
$first_login_date = api_get_local_time($first_login_date, null, null, date_default_timezone_get());
return format_locale_date(get_lang('DateFormatLongWithoutDay'), strtotime($first_login_date));
}
}
@ -180,6 +183,7 @@ class Tracking {
if(Database::num_rows($rs)>0)
{
if ($last_login_date = Database::result($rs, 0, 0)) {
$last_login_date = api_get_local_time($last_login_date, null, null, date_default_timezone_get());
$timestamp = strtotime($last_login_date);
$currentTimestamp = mktime();
//If the last connection is > than 7 days, the text is red
@ -1048,7 +1052,7 @@ class Tracking {
$rs = Database::query($sql);
$row = Database::fetch_array($rs);
$last_connection = $row['access_date'];
$last_connection = api_get_local_time($row['access_date'], null, null, date_default_timezone_get());
if (!empty($last_connection)) {
$date_format_long = format_locale_date(get_lang('DateFormatLongWithoutDay'), strtotime($last_connection));
$time = explode(' ',$last_connection);
@ -1343,7 +1347,7 @@ class TrackingCourseLog {
$row[1] = get_lang($row[1]);
$row[5] = api_ucfirst(format_locale_date($dateTimeFormatLong, strtotime($row['col5'])));
$row[5] = api_ucfirst(api_get_local_time($row['col5'], $dateTimeFormatLong, null, date_default_timezone_get()));
$row[4] = '';
if ($table_name['table_name'] == 'document') {
@ -1724,7 +1728,7 @@ class TrackingUserLog {
*/
function display_exercise_tracking_info($view, $user_id, $course_id)
{
global $TABLECOURSE_EXERCICES, $TABLETRACK_EXERCICES;
global $TABLECOURSE_EXERCICES, $TABLETRACK_EXERCICES, $dateTimeFormatLong;
if(substr($view,1,1) == '1')
{
$new_view = substr_replace($view,'0',1,1);
@ -1770,7 +1774,7 @@ class TrackingUserLog {
if (is_array($results)) {
for($i = 0; $i < sizeof($results); $i++) {
$display_date = format_locale_date(get_lang('dateTimeFormatLong'), $results[$i][3]);
$display_date = api_get_local_time($results[$i][3], $dateTimeFormatLong, null, date_default_timezone_get());
echo "<tr>\n";
echo "<td class='content'>".$results[$i][0]."</td>\n";
echo "<td class='content'>".$display_date."</td>\n";
@ -1788,7 +1792,7 @@ class TrackingUserLog {
$title = GetQuizName($hpresults[$i][0],'');
if ($title == '')
$title = basename($hpresults[$i][0]);
$display_date = format_locale_date(get_lang('dateTimeFormatLong'), $hpresults[$i][3]);
$display_date = api_get_local_time($hpresults[$i][3], $dateTimeFormatLong, null, date_default_timezone_get());
?>
<tr>
<td class="content"><?php echo $title; ?></td>
@ -1856,7 +1860,8 @@ class TrackingUserLog {
if (is_array($results)) {
for($j = 0 ; $j < count($results) ; $j++) {
$pathToFile = api_get_path(WEB_COURSE_PATH).$_course['path']."/".$results[$j][3];
$timestamp = strtotime($results[$j][0]);
$upload_date = api_get_local_time($results[$j][0], null, null, date_default_timezone_get());
$timestamp = strtotime($upload_date);
$beautifulDate = format_locale_date($dateTimeFormatLong,$timestamp);
echo "<tr>";
echo "<td class='content'>"
@ -2055,7 +2060,7 @@ class TrackingUserLogCSV {
*/
function display_exercise_tracking_info($view, $user_id, $course_id)
{
global $TABLECOURSE_EXERCICES, $TABLETRACK_EXERCICES, $TABLETRACK_HOTPOTATOES;
global $TABLECOURSE_EXERCICES, $TABLETRACK_EXERCICES, $TABLETRACK_HOTPOTATOES, $dateTimeFormatLong;
if(substr($view,1,1) == '1')
{
$new_view = substr_replace($view,'0',1,1);
@ -2087,7 +2092,7 @@ class TrackingUserLogCSV {
{
for($i = 0; $i < sizeof($results); $i++)
{
$display_date = format_locale_date(get_lang('dateTimeFormatLong'), $results[$i][3]);
$display_date = api_get_local_time($results[$i][3], $dateTimeFormatLong, null, date_default_timezone_get());
$line .= $results[$i][0].";".$display_date.";".$results[$i][1]." / ".$results[$i][2]."\n";
}
}
@ -2105,8 +2110,9 @@ class TrackingUserLogCSV {
if ($title == '')
$title = basename($hpresults[$i][0]);
$display_date = api_get_local_time($hpresults[$i][3], $dateTimeFormatLong, null, date_default_timezone_get());
$display_date = format_locale_date(get_lang('dateTimeFormatLong'), $hpresults[$i][3]);
$line .= $title.';'.$display_date.';'.$hpresults[$i][1].'/'.$hpresults[$i][2]."\n";
}
}
@ -2155,7 +2161,8 @@ class TrackingUserLogCSV {
for($j = 0 ; $j < count($results) ; $j++)
{
$pathToFile = api_get_path(WEB_COURSE_PATH).$_course['path']."/".$results[$j][3];
$timestamp = strtotime($results[$j][0]);
$upload_date = api_get_local_time($results[$j][0], null, null, date_default_timezone_get());
$timestamp = strtotime($upload_date);
$beautifulDate = format_locale_date($dateTimeFormatLong,$timestamp);
$line .= $results[$j][1].";".$results[$j][2].";".$beautifulDate."\n";
}
@ -2252,4 +2259,4 @@ class TrackingUserLogCSV {
return array($title_line, $line);
}
}
?>
?>

@ -1362,7 +1362,7 @@ if ($_GET['action']=='edit')
//check tasks
if (!empty($row['startdate_assig']) && $row['startdate_assig']!='0000-00-00 00:00:00' && time()<strtotime($row['startdate_assig']))
{
$message=get_lang('TheTaskDoesNotBeginUntil').': '.$row['startdate_assig'];
$message=get_lang('TheTaskDoesNotBeginUntil').': '.api_get_local_time($row['startdate_assig'], null, null, date_default_timezone_get());
Display::display_warning_message($message);
if(!api_is_allowed_to_edit(false,true))
{
@ -1373,7 +1373,7 @@ if ($_GET['action']=='edit')
//
if (!empty($row['enddate_assig']) && $row['enddate_assig']!='0000-00-00 00:00:00' && time()>strtotime($row['enddate_assig']) && $row['enddate_assig']!='0000-00-00 00:00:00' && $row['delayedsubmit']==0)
{
$message=get_lang('TheDeadlineHasBeenCompleted').': '.$row['enddate_assig'];
$message=get_lang('TheDeadlineHasBeenCompleted').': '.api_get_local_time($row['enddate_assig'], null, null, date_default_timezone_get());
Display::display_warning_message($message);
if(!api_is_allowed_to_edit(false,true))
{
@ -1414,7 +1414,7 @@ if ($_GET['action']=='edit')
}
else
{
$message_task_startdate=$row['startdate_assig'];
$message_task_startdate=api_get_local_time($row['startdate_assig'], null, null, date_default_timezone_get());
}
if ($row['enddate_assig']=='0000-00-00 00:00:00')
@ -1423,7 +1423,7 @@ if ($_GET['action']=='edit')
}
else
{
$message_task_endate=$row['enddate_assig'];
$message_task_endate=api_get_local_time($row['enddate_assig'], null, null, date_default_timezone_get());
}
if ($row['delayedsubmit']==0)
@ -1767,13 +1767,6 @@ if ($_GET['action']=='history' or Security::remove_XSS($_POST['HistoryDifference
{
$userinfo=Database::get_user_info_from_id($row['user_id']);
$year = substr($row['dtime'], 0, 4);
$month = substr($row['dtime'], 5, 2);
$day = substr($row['dtime'], 8, 2);
$hours=substr($row['dtime'], 11,2);
$minutes=substr($row['dtime'], 14,2);
$seconds=substr($row['dtime'], 17,2);
echo '<li style="margin-bottom: 5px;">';
($counter==0) ? $oldstyle='style="visibility: hidden;"':$oldstyle='';
($counter==0) ? $newchecked=' checked':$newchecked='';
@ -1784,7 +1777,7 @@ if ($_GET['action']=='history' or Security::remove_XSS($_POST['HistoryDifference
echo '<a href="'.api_get_self().'?action=showpage&amp;title='.$page.'&amp;view='.$row['id'].'">';
echo '<a href="'.api_get_self().'?cidReq='.$_course[id].'&action=showpage&amp;title='.$page.'&amp;view='.$row['id'].'&group_id='.$group_id.'">';
echo $year.'-'.$month.'-'.$day.' '.$hours.":".$minutes.":".$seconds;
echo api_get_local_time($row['dtime'], null, null, date_default_timezone_get());
echo '</a>';
echo ' ('.get_lang('Version').' '.$row['version'].')';
echo ' '.get_lang('By').' ';
@ -1957,14 +1950,6 @@ if ($_GET['action']=='recentchanges')
//get author
$userinfo=Database::get_user_info_from_id($obj->user_id);
//get time
$year = substr($obj->dtime, 0, 4);
$month = substr($obj->dtime, 5, 2);
$day = substr($obj->dtime, 8, 2);
$hours = substr($obj->dtime, 11,2);
$minutes = substr($obj->dtime, 14,2);
$seconds = substr($obj->dtime, 17,2);
//get type assignment icon
if($obj->assignment==1)
{
@ -1991,7 +1976,7 @@ if ($_GET['action']=='recentchanges')
$row = array ();
$row[] = $year.'-'.$month.'-'.$day.' '.$hours.':'.$minutes.":".$seconds;
$row[] = api_get_local_time($obj->dtime, null, null, date_default_timezone_get());
$row[] = $ShowAssignment.$icon_task;
$row[] = '<a href="'.api_get_self().'?cidReq='.$_course[id].'&action=showpage&title='.urlencode($obj->reflink).'&amp;view='.$obj->id.'&group_id='.Security::remove_XSS($_GET['group_id']).'">'.$obj->title.'</a>';
$row[] = $obj->version>1 ? get_lang('EditedBy') : get_lang('AddedBy');
@ -2047,14 +2032,6 @@ if ($_GET['action']=='allpages')
//get author
$userinfo=Database::get_user_info_from_id($obj->user_id);
//get time
$year = substr($obj->dtime, 0, 4);
$month = substr($obj->dtime, 5, 2);
$day = substr($obj->dtime, 8, 2);
$hours = substr($obj->dtime, 11,2);
$minutes = substr($obj->dtime, 14,2);
$seconds = substr($obj->dtime, 17,2);
//get type assignment icon
if($obj->assignment==1)
{
@ -2083,7 +2060,7 @@ if ($_GET['action']=='allpages')
$row[] =$ShowAssignment.$icon_task;
$row[] = '<a href="'.api_get_self().'?cidReq='.$_course[id].'&action=showpage&title='.urlencode(Security::remove_XSS($obj->reflink)).'&group_id='.Security::remove_XSS($_GET['group_id']).'">'.Security::remove_XSS($obj->title).'</a>';
$row[] = $obj->user_id <>0 ? '<a href="../user/userInfo.php?uInfo='.$userinfo['user_id'].'">'.api_get_person_name($userinfo['firstname'], $userinfo['lastname']).'</a>' : get_lang('Anonymous').' ('.$obj->user_ip.')';
$row[] = $year.'-'.$month.'-'.$day.' '.$hours.":".$minutes.":".$seconds;
$row[] = api_get_local_time($obj->dtime, null, null, date_default_timezone_get());
if(api_is_allowed_to_edit(false,true)|| api_is_platform_admin())
{
@ -2125,7 +2102,7 @@ if ($_GET['action']=='discuss')
$sql='SELECT * FROM '.$tbl_wiki.'WHERE reflink="'.html_entity_decode(Database::escape_string(stripslashes(urldecode($page)))).'" AND '.$groupfilter.$condition_session.' ORDER BY id DESC';
$result=Database::query($sql);
$row=Database::fetch_array($result);
$lastversiondate=$row['dtime'];
$lastversiondate=api_get_local_time($row['dtime'], null, null, date_default_timezone_get());
$lastuserinfo=Database::get_user_info_from_id($row['user_id']);
//select page to discuss
@ -2408,7 +2385,7 @@ if ($_GET['action']=='discuss')
echo '<p><table>';
echo '<tr>';
echo '<td rowspan="2">'.$author_photo.'</td>';
echo '<td style=" color:#999999"><a href="../user/userInfo.php?uInfo='.$userinfo['user_id'].'">'.api_get_person_name($userinfo['firstname'], $userinfo['lastname']).'</a> ('.$author_status.') '.$row['dtime'].' - '.get_lang('Rating').': '.$row['p_score'].' '.$imagerating.' </td>';
echo '<td style=" color:#999999"><a href="../user/userInfo.php?uInfo='.$userinfo['user_id'].'">'.api_get_person_name($userinfo['firstname'], $userinfo['lastname']).'</a> ('.$author_status.') '.api_get_local_time($row['dtime'], null, null, date_default_timezone_get()).' - '.get_lang('Rating').': '.$row['p_score'].' '.$imagerating.' </td>';
echo '</tr>';
echo '<tr>';
echo '<td>'.$row['comment'].'</td>';
@ -2452,4 +2429,4 @@ FOOTER
*/
//$_SESSION['_gid'];
Display::display_footer();
?>
?>

@ -718,6 +718,7 @@ function display_student_publications_list($work_dir,$sub_course_dir,$currentCou
}
if ($direc_date!='' && $direc_date!='0000-00-00 00:00:00') {
$direc_date = api_get_local_time($direc_date, null, null, date_default_timezone_get());
$my_direc_date = api_ucfirst(format_locale_date($dateFormatShort,strtotime($direc_date))).'&nbsp;&nbsp;&nbsp;&nbsp;';
$my_direc_date .= ucfirst(strftime($timeNoSecFormat,strtotime($direc_date)));
$row[]= date_to_str_ago($direc_date).'<br /><span class="dropbox_date">'.$my_direc_date.'</span>'.'<!--uts='.strtotime($direc_date).'-->';
@ -779,8 +780,9 @@ function display_student_publications_list($work_dir,$sub_course_dir,$currentCou
$row[]= build_document_icon_tag('file',$work->url);
$row[]= '<a href="download.php?file='.$url.'"'.$class.'><img src="../img/filesave.gif" style="float:right;" alt="'.get_lang('Save').'" title="'.get_lang('Save').'" />'.$work->title.'</a><br />'.$work->description;
$row[]= display_user_link_work($row2['insert_user_id'],$work->author).$qualification_string;// $work->author;
$sent_date = api_ucfirst(format_locale_date($dateFormatShort,strtotime($work->sent_date))).'&nbsp;&nbsp;&nbsp;&nbsp;';
$sent_date .= ucfirst(strftime($timeNoSecFormat,strtotime($work->sent_date)));
$work_sent_date = api_get_local_time($work->sent_date, null, null, date_default_timezone_get());
$sent_date = api_ucfirst(format_locale_date($dateFormatShort,strtotime($work_sent_date))).'&nbsp;&nbsp;&nbsp;&nbsp;';
$sent_date .= ucfirst(strftime($timeNoSecFormat,strtotime($work_sent_date)));
$row[]= date_to_str_ago($work->sent_date).$add_string.'<br><span class="dropbox_date">'.$sent_date.'</span>'.'<!--uts='.strtotime($work->sent_date).'-->';
if( $is_allowed_to_edit) {

Loading…
Cancel
Save