[svn r17533] fix nb days after and before for the global session coach (FOREM SVN#16911)

skala
Yannick Warnier 16 years ago
parent 6ac0fe7dab
commit faf713ec09
  1. 7
      main/inc/lib/usermanager.lib.php

@ -1,4 +1,4 @@
<?php // $Id: usermanager.lib.php 17362 2008-12-17 23:21:17Z cfasanando $
<?php // $Id: usermanager.lib.php 17533 2009-01-04 20:37:33Z yannoo $
/*
==============================================================================
Dokeos - elearning and course management software
@ -1446,7 +1446,10 @@ class UserManager
$sessions_sql = "SELECT DISTINCT id, name, date_start, date_end
FROM $tbl_session as session
WHERE session.id_coach = $user_id
AND (date_start <= CURDATE() AND date_end >= CURDATE() OR date_start='0000-00-00')
AND
( CURDATE() >= DATE_SUB(date_start, INTERVAL nb_days_access_before_beginning DAY) AND
CURDATE() <= ADDDATE(date_end, INTERVAL nb_days_access_after_end DAY) OR
date_start='0000-00-00')
ORDER BY date_start, date_end, name";
$result = api_sql_query($sessions_sql,__FILE__,__LINE__);

Loading…
Cancel
Save