WIP: Fix mysql 5.7 dates with "0000-00-00 00:00:00" values see #8200

ofaj
jmontoyaa 10 years ago
parent c92cb639d8
commit f2e496009e
  1. 56
      app/Migrations/Schema/V111/Version111.php
  2. 2
      main/admin/ldap_synchro.php
  3. 2
      main/auth/external_login/functions.inc.php
  4. 2
      main/auth/external_login/ldap.inc.php
  5. 2
      main/auth/ldap/authldap.php
  6. 6
      main/coursecopy/classes/CourseRestorer.class.php
  7. 4
      main/coursecopy/classes/DummyCourseCreator.class.php
  8. 4
      main/glossary/index.php
  9. 10
      main/inc/ajax/course_home.ajax.php
  10. 30
      main/inc/lib/agenda.lib.php
  11. 9
      main/inc/lib/exercise.lib.php
  12. 4
      main/inc/lib/internationalization.lib.php
  13. 10
      main/inc/lib/message.lib.php
  14. 10
      main/inc/lib/statistics.lib.php
  15. 2
      main/inc/lib/thematic.lib.php
  16. 2
      main/inc/lib/tracking.lib.php
  17. 18
      main/newscorm/learnpath.class.php
  18. 16
      main/newscorm/learnpathList.class.php
  19. 8
      main/newscorm/lp_edit.php
  20. 10
      main/newscorm/lp_list.php
  21. 2
      main/session/index.php
  22. 52
      main/wiki/wiki.inc.php
  23. 12
      src/Chamilo/CoreBundle/Entity/AccessUrl.php
  24. 2
      src/Chamilo/CoreBundle/Entity/ExtraFieldOptions.php
  25. 2
      src/Chamilo/CoreBundle/Entity/Message.php
  26. 4
      src/Chamilo/CoreBundle/Entity/SysCalendar.php
  27. 2
      src/Chamilo/CoreBundle/Entity/TrackEAttempt.php
  28. 20
      src/Chamilo/CoreBundle/Entity/TrackEAttemptRecording.php
  29. 1
      src/Chamilo/CoreBundle/Entity/TrackECourseAccess.php
  30. 2
      src/Chamilo/CoreBundle/Entity/TrackEDefault.php
  31. 20
      src/Chamilo/CoreBundle/Entity/TrackEDownloads.php
  32. 4
      src/Chamilo/CourseBundle/Entity/CCalendarEvent.php
  33. 4
      src/Chamilo/CourseBundle/Entity/CWiki.php
  34. 4
      src/Chamilo/CourseBundle/Entity/CWikiConf.php

@ -65,21 +65,71 @@ class Version111 extends AbstractMigrationChamilo
$this->addSql('ALTER TABLE notification CHANGE content content TEXT'); $this->addSql('ALTER TABLE notification CHANGE content content TEXT');
// Needed to update 0000-00-00 00:00:00 values
$this->addSql('SET sql_mode = ""');
$this->addSql('UPDATE c_lp SET publicated_on = NULL WHERE publicated_on = "0000-00-00 00:00:00"');
$this->addSql('UPDATE c_lp SET expired_on = NULL WHERE expired_on = "0000-00-00 00:00:00"');
$this->addSql('ALTER TABLE c_lp CHANGE publicated_on publicated_on DATETIME'); $this->addSql('ALTER TABLE c_lp CHANGE publicated_on publicated_on DATETIME');
$this->addSql('ALTER TABLE c_lp CHANGE expired_on expired_on DATETIME'); $this->addSql('ALTER TABLE c_lp CHANGE expired_on expired_on DATETIME');
$this->addSql('UPDATE TABLE c_quiz SET start_time = "" WHERE start_time = "0000-00-00 00:00:00"'); $this->addSql('UPDATE c_quiz SET start_time = NULL WHERE start_time = "0000-00-00 00:00:00"');
$this->addSql('UPDATE TABLE c_quiz SET end_time = "" WHERE end_time = "0000-00-00 00:00:00"'); $this->addSql('UPDATE c_quiz SET end_time = NULL WHERE end_time = "0000-00-00 00:00:00"');
$this->addSql('ALTER TABLE c_quiz CHANGE start_time start_time DATETIME'); $this->addSql('ALTER TABLE c_quiz CHANGE start_time start_time DATETIME');
$this->addSql('ALTER TABLE c_quiz CHANGE end_time end_time DATETIME'); $this->addSql('ALTER TABLE c_quiz CHANGE end_time end_time DATETIME');
$this->addSql('UPDATE c_calendar_event SET start_date = NULL WHERE start_date = "0000-00-00 00:00:00"');
$this->addSql('UPDATE c_calendar_event SET end_date = NULL WHERE end_date = "0000-00-00 00:00:00"');
$this->addSql('ALTER TABLE c_calendar_event CHANGE start_date start_date DATETIME');
$this->addSql('ALTER TABLE c_calendar_event CHANGE end_date end_date DATETIME');
$this->addSql('UPDATE personal_agenda SET date = NULL WHERE date = "0000-00-00 00:00:00"');
$this->addSql('UPDATE personal_agenda SET enddate = NULL WHERE enddate = "0000-00-00 00:00:00"');
$this->addSql('ALTER TABLE personal_agenda CHANGE date date DATETIME');
$this->addSql('ALTER TABLE personal_agenda CHANGE enddate enddate DATETIME');
$this->addSql('UPDATE c_forum_forum SET start_time = NULL WHERE start_time = "0000-00-00 00:00:00"');
$this->addSql('UPDATE c_forum_forum SET end_time = NULL WHERE end_time = "0000-00-00 00:00:00"');
$this->addSql('ALTER TABLE c_forum_forum CHANGE start_time start_time DATETIME'); $this->addSql('ALTER TABLE c_forum_forum CHANGE start_time start_time DATETIME');
$this->addSql('ALTER TABLE c_forum_forum CHANGE end_time end_time DATETIME'); $this->addSql('ALTER TABLE c_forum_forum CHANGE end_time end_time DATETIME');
$this->addSql('ALTER TABLE track_e_exercises CHANGE expired_time_control expired_time_control DATETIME'); $this->addSql('UPDATE sys_calendar SET start_date = NULL WHERE start_date = "0000-00-00 00:00:00"');
$this->addSql('UPDATE sys_calendar SET end_date = NULL WHERE end_date = "0000-00-00 00:00:00"');
$this->addSql('ALTER TABLE sys_calendar CHANGE start_date start_date DATETIME');
$this->addSql('ALTER TABLE sys_calendar CHANGE end_date end_date DATETIME');
$this->addSql('UPDATE message SET update_date = NULL WHERE update_date = "0000-00-00 00:00:00"');
$this->addSql('ALTER TABLE message CHANGE update_date update_date DATETIME');
$this->addSql('UPDATE c_wiki_conf SET startdate_assig = NULL WHERE startdate_assig = "0000-00-00 00:00:00"');
$this->addSql('UPDATE c_wiki_conf SET enddate_assig = NULL WHERE enddate_assig = "0000-00-00 00:00:00"');
$this->addSql('ALTER TABLE c_wiki_conf CHANGE startdate_assig startdate_assig DATETIME');
$this->addSql('ALTER TABLE c_wiki_conf CHANGE enddate_assig enddate_assig DATETIME');
$this->addSql('UPDATE c_wiki SET time_edit = NULL WHERE time_edit = "0000-00-00 00:00:00"');
$this->addSql('ALTER TABLE c_wiki CHANGE time_edit time_edit DATETIME');
$this->addSql('UPDATE c_wiki SET dtime = NULL WHERE dtime = "0000-00-00 00:00:00"');
$this->addSql('ALTER TABLE c_wiki CHANGE dtime dtime DATETIME');
$this->addSql('UPDATE access_url SET tms = NULL WHERE tms = "0000-00-00 00:00:00"');
$this->addSql('ALTER TABLE access_url CHANGE tms tms DATETIME');
$this->addSql('UPDATE track_e_attempt SET tms = NULL WHERE tms = "0000-00-00 00:00:00"');
$this->addSql('ALTER TABLE track_e_attempt CHANGE tms tms DATETIME');
$this->addSql('UPDATE track_e_default SET default_date = NULL WHERE default_date = "0000-00-00 00:00:00"');
$this->addSql('ALTER TABLE track_e_default CHANGE default_date default_date DATETIME');
$this->addSql('ALTER TABLE track_e_exercises CHANGE expired_time_control expired_time_control DATETIME');
} }
/** /**

@ -99,7 +99,7 @@ foreach($Sessions as $session){
$official_code=$etape."-".$annee; $official_code=$etape."-".$annee;
$auth_source="ldap"; $auth_source="ldap";
// Pas de date d'expiration d'etudiant (a recuperer par rapport au shadow expire LDAP) // Pas de date d'expiration d'etudiant (a recuperer par rapport au shadow expire LDAP)
$expiration_date='0000-00-00 00:00:00'; $expiration_date='';
$active=1; $active=1;
// Ajout de l'utilisateur // Ajout de l'utilisateur
if (UserManager::is_username_available($username)) { if (UserManager::is_username_available($username)) {

@ -110,7 +110,7 @@ function external_add_user($u) {
if (!isset($u['auth_source'])) if (!isset($u['auth_source']))
$u['auth_source'] = PLATFORM_AUTH_SOURCE; $u['auth_source'] = PLATFORM_AUTH_SOURCE;
if (!isset($u['expiration_date'])) if (!isset($u['expiration_date']))
$u['expiration_date'] = '0000-00-00 00:00:00'; $u['expiration_date'] = '';
if (!isset($u['active'])) if (!isset($u['active']))
$u['active'] = 1; $u['active'] = 1;
if (!isset($u['hr_dept_id'])) if (!isset($u['hr_dept_id']))

@ -311,7 +311,7 @@ function extldap_add_user_by_array($data, $update_if_exists = true)
$auth_source = 'ldap'; $auth_source = 'ldap';
// No expiration date for students (recover from LDAP's shadow expiry) // No expiration date for students (recover from LDAP's shadow expiry)
$expiration_date = '0000-00-00 00:00:00'; $expiration_date = '';
$active = 1; $active = 1;
if (empty($status)) { if (empty($status)) {
$status = 5; $status = 5;

@ -515,7 +515,7 @@ function ldap_add_user_by_array($data, $update_if_exists = true) {
$official_code=$etape."-".$annee; $official_code=$etape."-".$annee;
$auth_source='ldap'; $auth_source='ldap';
// No expiration date for students (recover from LDAP's shadow expiry) // No expiration date for students (recover from LDAP's shadow expiry)
$expiration_date='0000-00-00 00:00:00'; $expiration_date='';
$active=1; $active=1;
if(empty($status)){$status = 5;} if(empty($status)){$status = 5;}
if(empty($phone)){$phone = '';} if(empty($phone)){$phone = '';}

@ -1166,7 +1166,7 @@ class CourseRestorer
$params['forum_id'] = $forum_id; $params['forum_id'] = $forum_id;
$params['thread_poster_id'] = $this->first_teacher_id; $params['thread_poster_id'] = $this->first_teacher_id;
$params['thread_date'] = api_get_utc_datetime(); $params['thread_date'] = api_get_utc_datetime();
$params['thread_close_date'] = '0000-00-00 00:00:00'; $params['thread_close_date'] = null;
$params['thread_last_post'] = 0; $params['thread_last_post'] = 0;
$params['thread_replies'] = 0; $params['thread_replies'] = 0;
$params['thread_views'] = 0; $params['thread_views'] = 0;
@ -3179,8 +3179,8 @@ class CourseRestorer
} }
//$obj->params['qualification'] = empty($row['enable_qualification']) ? true : false; //$obj->params['qualification'] = empty($row['enable_qualification']) ? true : false;
$obj->params['enableExpiryDate'] = $row['expires_on'] == '0000-00-00 00:00:00' ? false : true; $obj->params['enableExpiryDate'] = empty($row['expires_on']) ? false : true;
$obj->params['enableEndDate'] = $row['ends_on'] == '0000-00-00 00:00:00' ? false : true; $obj->params['enableEndDate'] = empty($row['ends_on']) ? false : true;
$obj->params['expires_on'] = $row['expires_on']; $obj->params['expires_on'] = $row['expires_on'];
$obj->params['ends_on'] = $row['ends_on']; $obj->params['ends_on'] = $row['ends_on'];
$obj->params['enable_qualification'] = $row['enable_qualification']; $obj->params['enable_qualification'] = $row['enable_qualification'];

@ -41,8 +41,8 @@ class DummyCourseCreator
$this->default_property['to_group_id'] = '0'; $this->default_property['to_group_id'] = '0';
$this->default_property['to_user_id'] = null; $this->default_property['to_user_id'] = null;
$this->default_property['visibility'] = '1'; $this->default_property['visibility'] = '1';
$this->default_property['start_visible'] = '0000-00-00 00:00:00'; $this->default_property['start_visible'] = null;
$this->default_property['end_visible'] = '0000-00-00 00:00:00'; $this->default_property['end_visible'] = null;
$course = api_get_course_info($course_code); $course = api_get_course_info($course_code);
$this->course = new Course(); $this->course = new Course();

@ -156,13 +156,13 @@ if (api_is_allowed_to_edit(null, true)) {
$glossary_data = GlossaryManager::get_glossary_information($_GET['glossary_id']); $glossary_data = GlossaryManager::get_glossary_information($_GET['glossary_id']);
// Date treatment for timezones // Date treatment for timezones
if (!empty($glossary_data['insert_date']) && $glossary_data['insert_date'] != '0000-00-00 00:00:00:') { if (!empty($glossary_data['insert_date'])) {
$glossary_data['insert_date'] = api_get_local_time($glossary_data['insert_date']); $glossary_data['insert_date'] = api_get_local_time($glossary_data['insert_date']);
} else { } else {
$glossary_data['insert_date'] = ''; $glossary_data['insert_date'] = '';
} }
if (!empty($glossary_data['update_date']) && $glossary_data['update_date'] != '0000-00-00 00:00:00:') { if (!empty($glossary_data['update_date'])) {
$glossary_data['update_date'] = api_get_local_time($glossary_data['update_date']); $glossary_data['update_date'] = api_get_local_time($glossary_data['update_date']);
} else { } else {
$glossary_data['update_date'] = ''; $glossary_data['update_date'] = '';

@ -159,14 +159,14 @@ switch ($action) {
false false
); );
if ($lp_item['modified_on'] == '0000-00-00 00:00:00' || empty($lp_item['modified_on'])) { if (empty($lp_item['modified_on'])) {
$lp_date = api_get_local_time($lp_item['created_on']); $lp_date = api_get_local_time($lp_item['created_on']);
$image = 'new.gif'; $image = 'new.gif';
$label = get_lang('LearnpathAdded'); $label = get_lang('LearnpathAdded');
} else { } else {
$lp_date = api_get_local_time($lp_item['modified_on']); $lp_date = api_get_local_time($lp_item['modified_on']);
$image = 'moderator_star.png'; $image = 'moderator_star.png';
$label = get_lang('LearnpathUpdated'); $label = get_lang('LearnpathUpdated');
} }
$icons = ''; $icons = '';

@ -1281,12 +1281,12 @@ class Agenda
$event['sent_to'] = get_lang('Me'); $event['sent_to'] = get_lang('Me');
$event['type'] = 'personal'; $event['type'] = 'personal';
if (!empty($row['date']) && $row['date'] != '0000-00-00 00:00:00') { if (!empty($row['date'])) {
$event['start'] = $this->formatEventDate($row['date']); $event['start'] = $this->formatEventDate($row['date']);
$event['start_date_localtime'] = api_get_local_time($row['date']); $event['start_date_localtime'] = api_get_local_time($row['date']);
} }
if (!empty($row['enddate']) && $row['enddate'] != '0000-00-00 00:00:00') { if (!empty($row['enddate'])) {
$event['end'] = $this->formatEventDate($row['enddate']); $event['end'] = $this->formatEventDate($row['enddate']);
$event['end_date_localtime'] = api_get_local_time($row['enddate']); $event['end_date_localtime'] = api_get_local_time($row['enddate']);
} }
@ -1667,11 +1667,11 @@ class Agenda
} }
} }
if (!empty($row['start_date']) && $row['start_date'] != '0000-00-00 00:00:00') { if (!empty($row['start_date'])) {
$event['start'] = $this->formatEventDate($row['start_date']); $event['start'] = $this->formatEventDate($row['start_date']);
$event['start_date_localtime'] = api_get_local_time($row['start_date']); $event['start_date_localtime'] = api_get_local_time($row['start_date']);
} }
if (!empty($row['end_date']) && $row['end_date'] != '0000-00-00 00:00:00') { if (!empty($row['end_date'])) {
$event['end'] = $this->formatEventDate($row['end_date']); $event['end'] = $this->formatEventDate($row['end_date']);
$event['end_date_localtime'] = api_get_local_time($row['end_date']); $event['end_date_localtime'] = api_get_local_time($row['end_date']);
} }
@ -1779,11 +1779,11 @@ class Agenda
$event['editable'] = true; $event['editable'] = true;
} }
if (!empty($row['start_date']) && $row['start_date'] != '0000-00-00 00:00:00') { if (!empty($row['start_date'])) {
$event['start'] = $this->formatEventDate($row['start_date']); $event['start'] = $this->formatEventDate($row['start_date']);
$event['start_date_localtime'] = api_get_local_time($row['start_date']); $event['start_date_localtime'] = api_get_local_time($row['start_date']);
} }
if (!empty($row['end_date']) && $row['end_date'] != '0000-00-00 00:00:00') { if (!empty($row['end_date'])) {
$event['end'] = $this->formatEventDate($row['end_date']); $event['end'] = $this->formatEventDate($row['end_date']);
$event['end_date_localtime'] = api_get_local_time($row['end_date']); $event['end_date_localtime'] = api_get_local_time($row['end_date']);
} }
@ -2900,12 +2900,12 @@ class Agenda
while ($item = Database::fetch_array($result, 'ASSOC')) { while ($item = Database::fetch_array($result, 'ASSOC')) {
$agendaday = -1; $agendaday = -1;
if ($item['start_date'] != '0000-00-00 00:00:00') { if (!empty($item['start_date'])) {
$item['start_date'] = api_get_local_time($item['start_date']); $item['start_date'] = api_get_local_time($item['start_date']);
$item['start_date_tms'] = api_strtotime($item['start_date']); $item['start_date_tms'] = api_strtotime($item['start_date']);
$agendaday = date("j", $item['start_date_tms']); $agendaday = date("j", $item['start_date_tms']);
} }
if ($item['end_date'] != '0000-00-00 00:00:00') { if (!empty($item['end_date'])) {
$item['end_date'] = api_get_local_time($item['end_date']); $item['end_date'] = api_get_local_time($item['end_date']);
} }
@ -2993,11 +2993,11 @@ class Agenda
while ($item = Database::fetch_array($result)) { while ($item = Database::fetch_array($result)) {
if ($item['start_date'] != '0000-00-00 00:00:00') { if (!empty($item['start_date'])) {
$item['start_date'] = api_get_local_time($item['start_date']); $item['start_date'] = api_get_local_time($item['start_date']);
$item['start_date_tms'] = api_strtotime($item['start_date']); $item['start_date_tms'] = api_strtotime($item['start_date']);
} }
if ($item['end_date'] != '0000-00-00 00:00:00') { if (!empty($item['end_date'])) {
$item['end_date'] = api_get_local_time($item['end_date']); $item['end_date'] = api_get_local_time($item['end_date']);
} }
@ -3027,11 +3027,11 @@ class Agenda
TIME_NO_SEC_FORMAT TIME_NO_SEC_FORMAT
); );
$end_time = ''; $end_time = '';
if ($item['end_date'] != '0000-00-00 00:00:00') { if (!empty($item['end_date'])) {
$end_time = ' - '.api_format_date( $end_time = ' - '.api_format_date(
$item['end_date'], $item['end_date'],
DATE_TIME_FORMAT_LONG DATE_TIME_FORMAT_LONG
); );
} }
// if the student has specified a course we a add a link to that course // if the student has specified a course we a add a link to that course
@ -3250,7 +3250,7 @@ class Agenda
$start_time = api_format_date($value['start_date'], TIME_NO_SEC_FORMAT); $start_time = api_format_date($value['start_date'], TIME_NO_SEC_FORMAT);
$end_time = ''; $end_time = '';
if (!empty($value['end_date']) && $value['end_date'] != '0000-00-00 00:00:00') { if (!empty($value['end_date'])) {
$end_time = '-&nbsp;<i>'.api_format_date($value['end_date'], DATE_TIME_FORMAT_LONG).'</i>'; $end_time = '-&nbsp;<i>'.api_format_date($value['end_date'], DATE_TIME_FORMAT_LONG).'</i>';
} }
$complete_time = '<i>'.api_format_date($value['start_date'], DATE_TIME_FORMAT_LONG).'</i>&nbsp;'.$end_time; $complete_time = '<i>'.api_format_date($value['start_date'], DATE_TIME_FORMAT_LONG).'</i>&nbsp;'.$end_time;

@ -2265,13 +2265,13 @@ HOTSPOT;
if ($check_publication_dates) { if ($check_publication_dates) {
//start and end are set //start and end are set
$time_conditions = " AND ((start_time <> '0000-00-00 00:00:00' AND start_time < '$now' AND end_time <> '0000-00-00 00:00:00' AND end_time > '$now' ) OR "; $time_conditions = " AND ((start_time <> '' AND start_time < '$now' AND end_time <> '' AND end_time > '$now' ) OR ";
// only start is set // only start is set
$time_conditions .= " (start_time <> '0000-00-00 00:00:00' AND start_time < '$now' AND end_time = '0000-00-00 00:00:00') OR "; $time_conditions .= " (start_time <> '' AND start_time < '$now' AND end_time is NULL) OR ";
// only end is set // only end is set
$time_conditions .= " (start_time = '0000-00-00 00:00:00' AND end_time <> '0000-00-00 00:00:00' AND end_time > '$now') OR "; $time_conditions .= " (start_time IS NULL AND end_time <> '' AND end_time > '$now') OR ";
// nothing is set // nothing is set
$time_conditions .= " (start_time = '0000-00-00 00:00:00' AND end_time = '0000-00-00 00:00:00')) "; $time_conditions .= " (start_time IS NULL AND end_time IS NULL)) ";
} }
$needle_where = !empty($search) ? " AND title LIKE '?' " : ''; $needle_where = !empty($search) ? " AND title LIKE '?' " : '';
@ -2807,7 +2807,6 @@ HOTSPOT;
foreach ($exercises as $exercise_item) { foreach ($exercises as $exercise_item) {
if (isset($exercise_item['end_time']) && if (isset($exercise_item['end_time']) &&
!empty($exercise_item['end_time']) && !empty($exercise_item['end_time']) &&
$exercise_item['end_time'] != '0000-00-00 00:00:00' &&
api_strtotime($exercise_item['end_time'], 'UTC') < $now api_strtotime($exercise_item['end_time'], 'UTC') < $now
) { ) {
$result[] = $exercise_item; $result[] = $exercise_item;

@ -660,6 +660,10 @@ function api_format_date($time, $format = null, $language = null)
function date_to_str_ago($date, $timeZone = 'UTC') function date_to_str_ago($date, $timeZone = 'UTC')
{ {
if ($date == '0000-00-00 00:00:00') {
return '';
}
$timeAgo = new TimeAgo($timeZone, api_get_language_isocode()); $timeAgo = new TimeAgo($timeZone, api_get_language_isocode());
return $timeAgo->inWords($date); return $timeAgo->inWords($date);

@ -362,7 +362,7 @@ class MessageManager
// Load user settings. // Load user settings.
$notification = new Notification(); $notification = new Notification();
$sender_info = api_get_user_info($user_sender_id); $sender_info = api_get_user_info($user_sender_id);
// add file attachment additional attributes // add file attachment additional attributes
foreach ($file_attachments as $index => $file_attach) { foreach ($file_attachments as $index => $file_attach) {
$file_attachments[$index]['path'] = $file_attach['tmp_name']; $file_attachments[$index]['path'] = $file_attach['tmp_name'];
@ -1190,9 +1190,7 @@ class MessageManager
$date = ''; $date = '';
if ($topic['send_date'] != $topic['update_date']) { if ($topic['send_date'] != $topic['update_date']) {
if (!empty($topic['update_date']) && if (!empty($topic['update_date'])) {
$topic['update_date'] != '0000-00-00 00:00:00'
) {
$date .= '<div class="message-group-date" > $date .= '<div class="message-group-date" >
<i>'.get_lang('LastUpdate').' '.date_to_str_ago($topic['update_date']).'</i></div>'; <i>'.get_lang('LastUpdate').' '.date_to_str_ago($topic['update_date']).'</i></div>';
} }
@ -1344,7 +1342,7 @@ class MessageManager
$date = ''; $date = '';
if ($main_message['send_date'] != $main_message['update_date']) { if ($main_message['send_date'] != $main_message['update_date']) {
if (!empty($main_message['update_date']) && $main_message['update_date'] != '0000-00-00 00:00:00') { if (!empty($main_message['update_date'])) {
$date = '<div class="message-group-date"> '.get_lang('LastUpdate').' '.date_to_str_ago($main_message['update_date']).'</div>'; $date = '<div class="message-group-date"> '.get_lang('LastUpdate').' '.date_to_str_ago($main_message['update_date']).'</div>';
} }
} else { } else {
@ -1388,7 +1386,7 @@ class MessageManager
$date = ''; $date = '';
if ($topic['send_date'] != $topic['update_date']) { if ($topic['send_date'] != $topic['update_date']) {
if (!empty($topic['update_date']) && $topic['update_date'] != '0000-00-00 00:00:00') { if (!empty($topic['update_date'])) {
$date = '<div class="message-group-date"> '.get_lang('LastUpdate').' '.date_to_str_ago($topic['update_date']).'</div>'; $date = '<div class="message-group-date"> '.get_lang('LastUpdate').' '.date_to_str_ago($topic['update_date']).'</div>';
} }
} else { } else {

@ -293,7 +293,7 @@ class Statistics
} }
} }
if (!empty($row['default_date']) && $row['default_date'] != '0000-00-00 00:00:00') { if (!empty($row['default_date'])) {
$row['default_date'] = api_get_local_time($row['default_date']); $row['default_date'] = api_get_local_time($row['default_date']);
} else { } else {
$row['default_date'] = '-'; $row['default_date'] = '-';
@ -530,7 +530,7 @@ class Statistics
Statistics::printStats(get_lang('Logins'), $totalLogin, false); Statistics::printStats(get_lang('Logins'), $totalLogin, false);
} }
} }
/** /**
* get the number of recent logins * get the number of recent logins
* @param bool $distinct Whether to only give distinct users stats, or *all* logins * @param bool $distinct Whether to only give distinct users stats, or *all* logins
@ -555,15 +555,15 @@ class Statistics
$field = 'DISTINCT(login_user_id)'; $field = 'DISTINCT(login_user_id)';
} }
$sql = "SELECT count($field) AS number, date(login_date) as login_date FROM $table $table_url WHERE DATE_ADD(login_date, INTERVAL 15 DAY) >= '$now' $where_url GROUP BY date(login_date)"; $sql = "SELECT count($field) AS number, date(login_date) as login_date FROM $table $table_url WHERE DATE_ADD(login_date, INTERVAL 15 DAY) >= '$now' $where_url GROUP BY date(login_date)";
$res = Database::query($sql); $res = Database::query($sql);
while($row = Database::fetch_array($res,'ASSOC')){ while($row = Database::fetch_array($res,'ASSOC')){
$totalLogin[$row['login_date']] = $row['number']; $totalLogin[$row['login_date']] = $row['number'];
} }
return $totalLogin; return $totalLogin;
} }
/** /**
* Show some stats about the accesses to the different course tools * Show some stats about the accesses to the different course tools
*/ */

@ -1410,7 +1410,7 @@ class Thematic
$thematic_id = 0, $thematic_id = 0,
$attendance_id = 0, $attendance_id = 0,
$content = '', $content = '',
$start_date = '0000-00-00 00:00:00', $start_date = null,
$duration = 0 $duration = 0
) { ) {
$this->thematic_advance_id = $id; $this->thematic_advance_id = $id;

@ -1605,7 +1605,7 @@ class Tracking
$rs = Database::query($sql); $rs = Database::query($sql);
if (Database::num_rows($rs) > 0) { if (Database::num_rows($rs) > 0) {
if ($last_login_date = Database::result($rs, 0, 0)) { if ($last_login_date = Database::result($rs, 0, 0)) {
if (empty($last_login_date) || $last_login_date == '0000-00-00 00:00:00') { if (empty($last_login_date)) {
return false; return false;
} }
//see #5736 //see #5736

@ -149,11 +149,11 @@ class learnpath
$this->ref = $row['ref']; $this->ref = $row['ref'];
$this->categoryId = $row['category_id']; $this->categoryId = $row['category_id'];
if ($row['publicated_on'] != '0000-00-00 00:00:00') { if (!empty($row['publicated_on'])) {
$this->publicated_on = $row['publicated_on']; $this->publicated_on = $row['publicated_on'];
} }
if ($row['expired_on'] != '0000-00-00 00:00:00') { if (!empty($row['expired_on'])) {
$this->expired_on = $row['expired_on']; $this->expired_on = $row['expired_on'];
} }
if ($this->type == 2) { if ($this->type == 2) {
@ -774,7 +774,7 @@ class learnpath
$res_name = Database::query($check_name); $res_name = Database::query($check_name);
if ($publicated_on == '0000-00-00 00:00:00' || empty($publicated_on)) { if (empty($publicated_on)) {
//by default the publication date is the same that the creation date //by default the publication date is the same that the creation date
//The behaviour above was changed due BT#2800 //The behaviour above was changed due BT#2800
global $_custom; global $_custom;
@ -787,7 +787,7 @@ class learnpath
$publicated_on = Database::escape_string(api_get_utc_datetime($publicated_on)); $publicated_on = Database::escape_string(api_get_utc_datetime($publicated_on));
} }
if ($expired_on == '0000-00-00 00:00:00' || empty($expired_on)) { if (empty($expired_on)) {
$expired_on = null; $expired_on = null;
} else { } else {
$expired_on = Database::escape_string(api_get_utc_datetime($expired_on)); $expired_on = Database::escape_string(api_get_utc_datetime($expired_on));
@ -2350,9 +2350,7 @@ class learnpath
// Also check the time availability of the LP // Also check the time availability of the LP
if ($is_visible) { if ($is_visible) {
// Adding visibility restrictions // Adding visibility restrictions
if (!empty($row['publicated_on']) && if (!empty($row['publicated_on'])) {
$row['publicated_on'] != '0000-00-00 00:00:00'
) {
if ($now < api_strtotime($row['publicated_on'], 'UTC')) { if ($now < api_strtotime($row['publicated_on'], 'UTC')) {
//api_not_allowed(); //api_not_allowed();
$is_visible = false; $is_visible = false;
@ -2364,13 +2362,13 @@ class learnpath
if (isset($_custom['lps_hidden_when_no_start_date']) && if (isset($_custom['lps_hidden_when_no_start_date']) &&
$_custom['lps_hidden_when_no_start_date'] $_custom['lps_hidden_when_no_start_date']
) { ) {
if (empty($row['publicated_on']) || $row['publicated_on'] == '0000-00-00 00:00:00') { if (empty($row['publicated_on'])) {
//api_not_allowed(); //api_not_allowed();
$is_visible = false; $is_visible = false;
} }
} }
if (!empty($row['expired_on']) && $row['expired_on'] != '0000-00-00 00:00:00') { if (!empty($row['expired_on'])) {
if ($now > api_strtotime($row['expired_on'], 'UTC')) { if ($now > api_strtotime($row['expired_on'], 'UTC')) {
//api_not_allowed(); //api_not_allowed();
$is_visible = false; $is_visible = false;
@ -5543,7 +5541,7 @@ class learnpath
if ($update_audio == 'true' && count($this->arrMenu) != 0) { if ($update_audio == 'true' && count($this->arrMenu) != 0) {
$return .= '</form>'; $return .= '</form>';
} }
return $return; return $return;
} }

@ -78,10 +78,10 @@ class LearnpathList
if ($check_publication_dates) { if ($check_publication_dates) {
$time_conditions = " AND ( $time_conditions = " AND (
(publicated_on <> '0000-00-00 00:00:00' AND publicated_on < '$now' AND expired_on <> '0000-00-00 00:00:00' AND expired_on > '$now' ) OR (publicated_on <> '' AND publicated_on < '$now' AND expired_on <> '' AND expired_on > '$now') OR
(publicated_on <> '0000-00-00 00:00:00' AND publicated_on < '$now' AND expired_on = '0000-00-00 00:00:00') OR (publicated_on <> '' AND publicated_on < '$now' AND expired_on IS NULL) OR
(publicated_on = '0000-00-00 00:00:00' AND expired_on <> '0000-00-00 00:00:00' AND expired_on > '$now') OR (publicated_on IS NULL AND expired_on <> '' AND expired_on > '$now') OR
(publicated_on = '0000-00-00 00:00:00' AND expired_on = '0000-00-00 00:00:00' )) (publicated_on IS NULL AND expired_on IS NULL ))
"; ";
} }
@ -137,25 +137,25 @@ class LearnpathList
$session_id $session_id
); );
if (!empty($row['created_on']) && $row['created_on'] != '0000-00-00 00:00:00') { if (!empty($row['created_on'])) {
$row['created_on'] = $row['created_on']; $row['created_on'] = $row['created_on'];
} else { } else {
$row['created_on'] = ''; $row['created_on'] = '';
} }
if (!empty($row['modified_on']) && $row['modified_on'] != '0000-00-00 00:00:00') { if (!empty($row['modified_on'])) {
$row['modified_on'] = $row['modified_on']; $row['modified_on'] = $row['modified_on'];
} else { } else {
$row['modified_on'] = ''; $row['modified_on'] = '';
} }
if (!empty($row['publicated_on']) && $row['publicated_on'] != '0000-00-00 00:00:00') { if (!empty($row['publicated_on'])) {
$row['publicated_on'] = $row['publicated_on']; $row['publicated_on'] = $row['publicated_on'];
} else { } else {
$row['publicated_on'] = ''; $row['publicated_on'] = '';
} }
if (!empty($row['expired_on']) && $row['expired_on'] != '0000-00-00 00:00:00') { if (!empty($row['expired_on'])) {
$row['expired_on'] = $row['expired_on']; $row['expired_on'] = $row['expired_on'];
} else { } else {
$row['expired_on'] = ''; $row['expired_on'] = '';

@ -158,7 +158,7 @@ $form->addElement('html', '<div class="help-block">'.get_lang('LpPrerequisiteDes
//Start date //Start date
$form->addElement('checkbox', 'activate_start_date_check', null,get_lang('EnableStartTime'), array('onclick' => 'activate_start_date()')); $form->addElement('checkbox', 'activate_start_date_check', null,get_lang('EnableStartTime'), array('onclick' => 'activate_start_date()'));
$display_date = 'none'; $display_date = 'none';
if ($publicated_on!='0000-00-00 00:00:00' && !empty($publicated_on)) { if (!empty($publicated_on)) {
$display_date = 'block'; $display_date = 'block';
$defaults['activate_start_date_check'] = 1; $defaults['activate_start_date_check'] = 1;
} }
@ -170,7 +170,7 @@ $form->addElement('html','</div>');
//End date //End date
$form->addElement('checkbox', 'activate_end_date_check', null, get_lang('EnableEndTime'), array('onclick' => 'activate_end_date()')); $form->addElement('checkbox', 'activate_end_date_check', null, get_lang('EnableEndTime'), array('onclick' => 'activate_end_date()'));
$display_date = 'none'; $display_date = 'none';
if ($expired_on!='0000-00-00 00:00:00' && !empty($expired_on)) { if (!empty($expired_on)) {
$display_date = 'block'; $display_date = 'block';
$defaults['activate_end_date_check'] = 1; $defaults['activate_end_date_check'] = 1;
} }
@ -209,8 +209,8 @@ if ($enableLpExtraFields) {
} }
$defaults['publicated_on'] = ($publicated_on!='0000-00-00 00:00:00' && !empty($publicated_on))? api_get_local_time($publicated_on) : date('Y-m-d 12:00:00'); $defaults['publicated_on'] = (!empty($publicated_on))? api_get_local_time($publicated_on) : date('Y-m-d 12:00:00');
$defaults['expired_on'] = ($expired_on !='0000-00-00 00:00:00' && !empty($expired_on) )? api_get_local_time($expired_on): date('Y-m-d 12:00:00',time()+84600); $defaults['expired_on'] = (!empty($expired_on) )? api_get_local_time($expired_on): date('Y-m-d 12:00:00',time()+84600);
//$defaults['max_attempts'] = $_SESSION['oLP']->get_max_attempts(); //$defaults['max_attempts'] = $_SESSION['oLP']->get_max_attempts();
$defaults['subscribe_users'] = $_SESSION['oLP']->getSubscribeUsers(); $defaults['subscribe_users'] = $_SESSION['oLP']->getSubscribeUsers();
$form->setDefaults($defaults); $form->setDefaults($defaults);

@ -201,22 +201,20 @@ foreach ($categories as $item) {
$time_limits = false; $time_limits = false;
//This is an old LP (from a migration 1.8.7) so we do nothing //This is an old LP (from a migration 1.8.7) so we do nothing
if ((empty($details['created_on']) || $details['created_on'] == '0000-00-00 00:00:00') && if ((empty($details['created_on'])) &&
(empty($details['modified_on']) || $details['modified_on'] == '0000-00-00 00:00:00') (empty($details['modified_on']))
) { ) {
$time_limits = false; $time_limits = false;
} }
//Checking if expired_on is ON //Checking if expired_on is ON
if ($details['expired_on'] != '' && $details['expired_on'] != '0000-00-00 00:00:00') { if ($details['expired_on'] != '') {
$time_limits = true; $time_limits = true;
} }
if ($time_limits) { if ($time_limits) {
// Check if start time // Check if start time
if (!empty($details['publicated_on']) && $details['publicated_on'] != '0000-00-00 00:00:00' && if (!empty($details['publicated_on']) && !empty($details['expired_on'])) {
!empty($details['expired_on']) && $details['expired_on'] != '0000-00-00 00:00:00'
) {
$start_time = api_strtotime( $start_time = api_strtotime(
$details['publicated_on'], $details['publicated_on'],
'UTC' 'UTC'

@ -303,9 +303,9 @@ foreach ($final_array as $session_data) {
if (!empty($best_score_data)) { if (!empty($best_score_data)) {
$best_score = ExerciseLib::show_score($best_score_data['exe_result'], $best_score_data['exe_weighting']); $best_score = ExerciseLib::show_score($best_score_data['exe_result'], $best_score_data['exe_weighting']);
} }
// Exercise results // Exercise results
$counter = 1; $counter = 1;
foreach ($exercise_data as $exercise_item) { foreach ($exercise_data as $exercise_item) {
$result_list = $exercise_item['results']; $result_list = $exercise_item['results'];
$exercise_info = $exercise_item['exercise_data']; $exercise_info = $exercise_item['exercise_data'];

@ -316,13 +316,13 @@ class Wiki
if (isset($values['initstartdate']) && $values['initstartdate'] == 1) { if (isset($values['initstartdate']) && $values['initstartdate'] == 1) {
$_clean['startdate_assig'] = $values['startdate_assig']; $_clean['startdate_assig'] = $values['startdate_assig'];
} else { } else {
$_clean['startdate_assig'] = '0000-00-00 00:00:00'; $_clean['startdate_assig'] = null;
} }
if (isset($values['initenddate']) && $values['initenddate']==1) { if (isset($values['initenddate']) && $values['initenddate']==1) {
$_clean['enddate_assig'] = $values['enddate_assig']; $_clean['enddate_assig'] = $values['enddate_assig'];
} else { } else {
$_clean['enddate_assig'] = '0000-00-00 00:00:00'; $_clean['enddate_assig'] = null;
} }
if (isset($values['delayedsubmit'])) { if (isset($values['delayedsubmit'])) {
@ -622,13 +622,13 @@ class Wiki
if (isset($values['initstartdate']) && $values['initstartdate'] == 1) { if (isset($values['initstartdate']) && $values['initstartdate'] == 1) {
$_clean['startdate_assig'] = $values['startdate_assig']; $_clean['startdate_assig'] = $values['startdate_assig'];
} else { } else {
$_clean['startdate_assig'] = '0000-00-00 00:00:00'; $_clean['startdate_assig'] = null;
} }
if (isset($values['initenddate']) && $values['initenddate'] == 1) { if (isset($values['initenddate']) && $values['initenddate'] == 1) {
$_clean['enddate_assig'] = $values['enddate_assig']; $_clean['enddate_assig'] = $values['enddate_assig'];
} else { } else {
$_clean['enddate_assig'] = '0000-00-00 00:00:00'; $_clean['enddate_assig'] = null;
} }
$_clean['delayedsubmit'] = isset($values['delayedsubmit']) ? $values['delayedsubmit'] : ''; $_clean['delayedsubmit'] = isset($values['delayedsubmit']) ? $values['delayedsubmit'] : '';
@ -768,7 +768,7 @@ class Wiki
$style = "display:block"; $style = "display:block";
$row['initstartdate'] = 1; $row['initstartdate'] = 1;
if ($row['startdate_assig'] == '0000-00-00 00:00:00') { if (empty($row['startdate_assig'])) {
$style = "display:none"; $style = "display:none";
$row['initstartdate'] = null; $row['initstartdate'] = null;
} }
@ -780,7 +780,7 @@ class Wiki
$style = "display:block"; $style = "display:block";
$row['initenddate'] = 1; $row['initenddate'] = 1;
if ($row['enddate_assig'] == '0000-00-00 00:00:00') { if (empty($row['enddate_assig'])) {
$style = "display:none"; $style = "display:none";
$row['initenddate'] = null; $row['initenddate'] = null;
} }
@ -2655,7 +2655,7 @@ class Wiki
$sql = 'UPDATE '.$tbl_wiki.' SET $sql = 'UPDATE '.$tbl_wiki.' SET
is_editing = "0", is_editing = "0",
time_edit="0000-00-00 00:00:00" time_edit = NULL
WHERE WHERE
c_id = '.$course_id.' AND c_id = '.$course_id.' AND
is_editing="'.$isEditing.'" '. is_editing="'.$isEditing.'" '.
@ -3006,24 +3006,26 @@ class Wiki
//Creation date of the oldest wiki page and version //Creation date of the oldest wiki page and version
$first_wiki_date='0000-00-00 00:00:00'; $first_wiki_date = null;
$sql = 'SELECT * FROM '.$tbl_wiki.' $sql = 'SELECT * FROM '.$tbl_wiki.'
WHERE c_id = '.$course_id.' AND '.$groupfilter.$condition_session.' WHERE c_id = '.$course_id.' AND '.$groupfilter.$condition_session.'
ORDER BY dtime ASC LIMIT 1'; ORDER BY dtime ASC
$allpages=Database::query($sql); LIMIT 1';
while ($row=Database::fetch_array($allpages)) { $allpages = Database::query($sql);
$first_wiki_date=$row['dtime']; while ($row = Database::fetch_array($allpages)) {
$first_wiki_date = $row['dtime'];
} }
// Date of publication of the latest wiki version. // Date of publication of the latest wiki version.
$last_wiki_date='0000-00-00 00:00:00'; $last_wiki_date = null;
$sql = 'SELECT * FROM '.$tbl_wiki.' $sql = 'SELECT * FROM '.$tbl_wiki.'
WHERE c_id = '.$course_id.' AND '.$groupfilter.$condition_session.' WHERE c_id = '.$course_id.' AND '.$groupfilter.$condition_session.'
ORDER BY dtime DESC LIMIT 1'; ORDER BY dtime DESC
$allpages=Database::query($sql); LIMIT 1';
$allpages = Database::query($sql);
while ($row=Database::fetch_array($allpages)) { while ($row=Database::fetch_array($allpages)) {
$last_wiki_date=$row['dtime']; $last_wiki_date = $row['dtime'];
} }
// Average score of all wiki pages. (If a page has not scored zero rated) // Average score of all wiki pages. (If a page has not scored zero rated)
@ -4903,11 +4905,9 @@ class Wiki
} else { } else {
// Check tasks // Check tasks
if (!empty($row['startdate_assig']) && if (!empty($row['startdate_assig']) && time() < api_strtotime($row['startdate_assig'])
$row['startdate_assig']!='0000-00-00 00:00:00' &&
time()<strtotime($row['startdate_assig'])
) { ) {
$message = get_lang('TheTaskDoesNotBeginUntil').': '.api_get_local_time($row['startdate_assig'], null, date_default_timezone_get()); $message = get_lang('TheTaskDoesNotBeginUntil').': '.api_get_local_time($row['startdate_assig']);
Display::addFlash( Display::addFlash(
Display::return_message( Display::return_message(
@ -4922,12 +4922,10 @@ class Wiki
} }
if (!empty($row['enddate_assig']) && if (!empty($row['enddate_assig']) &&
$row['enddate_assig']!='0000-00-00 00:00:00' &&
time() > strtotime($row['enddate_assig']) && time() > strtotime($row['enddate_assig']) &&
$row['enddate_assig']!='0000-00-00 00:00:00' &&
$row['delayedsubmit']==0 $row['delayedsubmit']==0
) { ) {
$message = get_lang('TheDeadlineHasBeenCompleted').': '.api_get_local_time($row['enddate_assig'], null, date_default_timezone_get()); $message = get_lang('TheDeadlineHasBeenCompleted').': '.api_get_local_time($row['enddate_assig']);
Display::addFlash( Display::addFlash(
Display::return_message( Display::return_message(
$message, $message,
@ -4967,16 +4965,16 @@ class Wiki
if (!empty($row['task'])) { if (!empty($row['task'])) {
//previous change 0 by text //previous change 0 by text
if ($row['startdate_assig']=='0000-00-00 00:00:00') { if (!empty($row['startdate_assig'])) {
$message_task_startdate =get_lang('No'); $message_task_startdate =get_lang('No');
} else { } else {
$message_task_startdate = api_get_local_time($row['startdate_assig'], null, date_default_timezone_get()); $message_task_startdate = api_get_local_time($row['startdate_assig']);
} }
if ($row['enddate_assig']=='0000-00-00 00:00:00') { if (!empty($row['enddate_assig'])) {
$message_task_enddate = get_lang('No'); $message_task_enddate = get_lang('No');
} else { } else {
$message_task_enddate = api_get_local_time($row['enddate_assig'], null, date_default_timezone_get()); $message_task_enddate = api_get_local_time($row['enddate_assig']);
} }
if ($row['delayedsubmit']==0) { if ($row['delayedsubmit']==0) {

@ -25,42 +25,42 @@ class AccessUrl
/** /**
* @var string * @var string
* *
* @ORM\Column(name="url", type="string", length=255, precision=0, scale=0, nullable=false, unique=false) * @ORM\Column(name="url", type="string", length=255, nullable=false, unique=false)
*/ */
private $url; private $url;
/** /**
* @var string * @var string
* *
* @ORM\Column(name="description", type="text", precision=0, scale=0, nullable=true, unique=false) * @ORM\Column(name="description", type="text", unique=false)
*/ */
private $description; private $description;
/** /**
* @var integer * @var integer
* *
* @ORM\Column(name="active", type="integer", precision=0, scale=0, nullable=false, unique=false) * @ORM\Column(name="active", type="integer", nullable=false, unique=false)
*/ */
private $active; private $active;
/** /**
* @var integer * @var integer
* *
* @ORM\Column(name="created_by", type="integer", precision=0, scale=0, nullable=false, unique=false) * @ORM\Column(name="created_by", type="integer", nullable=false, unique=false)
*/ */
private $createdBy; private $createdBy;
/** /**
* @var \DateTime * @var \DateTime
* *
* @ORM\Column(name="tms", type="datetime", precision=0, scale=0, nullable=false, unique=false) * @ORM\Column(name="tms", type="datetime", nullable=true)
*/ */
private $tms; private $tms;
/** /**
* @var boolean * @var boolean
* *
* @ORM\Column(name="url_type", type="boolean", precision=0, scale=0, nullable=true, unique=false) * @ORM\Column(name="url_type", type="boolean", nullable=true)
*/ */
private $urlType; private $urlType;

@ -16,7 +16,6 @@ use Gedmo\Mapping\Annotation as Gedmo;
*/ */
class ExtraFieldOptions class ExtraFieldOptions
{ {
/** /**
* @var integer * @var integer
* *
@ -194,5 +193,4 @@ class ExtraFieldOptions
return $this; return $this;
} }
} }

@ -71,7 +71,7 @@ class Message
/** /**
* @var \DateTime * @var \DateTime
* *
* @ORM\Column(name="update_date", type="datetime", nullable=false) * @ORM\Column(name="update_date", type="datetime", nullable=true)
*/ */
private $updateDate; private $updateDate;

@ -29,14 +29,14 @@ class SysCalendar
/** /**
* @var \DateTime * @var \DateTime
* *
* @ORM\Column(name="start_date", type="datetime", nullable=false) * @ORM\Column(name="start_date", type="datetime", nullable=true)
*/ */
private $startDate; private $startDate;
/** /**
* @var \DateTime * @var \DateTime
* *
* @ORM\Column(name="end_date", type="datetime", nullable=false) * @ORM\Column(name="end_date", type="datetime", nullable=true)
*/ */
private $endDate; private $endDate;

@ -87,7 +87,7 @@ class TrackEAttempt
/** /**
* @var \DateTime * @var \DateTime
* *
* @ORM\Column(name="tms", type="datetime", nullable=false) * @ORM\Column(name="tms", type="datetime", nullable=true)
*/ */
private $tms; private $tms;

@ -12,6 +12,15 @@ use Doctrine\ORM\Mapping as ORM;
*/ */
class TrackEAttemptRecording class TrackEAttemptRecording
{ {
/**
* @var integer
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue
*/
private $id;
/** /**
* @var integer * @var integer
* *
@ -61,17 +70,6 @@ class TrackEAttemptRecording
*/ */
private $sessionId; private $sessionId;
/**
* @var integer
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
/** /**
* Set exeId * Set exeId
* *

@ -79,7 +79,6 @@ class TrackECourseAccess
private $courseAccessId; private $courseAccessId;
/** /**
* Set cId * Set cId
* *

@ -46,7 +46,7 @@ class TrackEDefault
/** /**
* @var \DateTime * @var \DateTime
* *
* @ORM\Column(name="default_date", type="datetime", nullable=false) * @ORM\Column(name="default_date", type="datetime", nullable=true)
*/ */
private $defaultDate; private $defaultDate;

@ -12,6 +12,15 @@ use Doctrine\ORM\Mapping as ORM;
*/ */
class TrackEDownloads class TrackEDownloads
{ {
/**
* @var integer
*
* @ORM\Column(name="down_id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue
*/
private $downId;
/** /**
* @var integer * @var integer
* *
@ -47,17 +56,6 @@ class TrackEDownloads
*/ */
private $downSessionId; private $downSessionId;
/**
* @var integer
*
* @ORM\Column(name="down_id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $downId;
/** /**
* Set downUserId * Set downUserId
* *

@ -59,14 +59,14 @@ class CCalendarEvent
/** /**
* @var \DateTime * @var \DateTime
* *
* @ORM\Column(name="start_date", type="datetime", nullable=false) * @ORM\Column(name="start_date", type="datetime", nullable=true)
*/ */
private $startDate; private $startDate;
/** /**
* @var \DateTime * @var \DateTime
* *
* @ORM\Column(name="end_date", type="datetime", nullable=false) * @ORM\Column(name="end_date", type="datetime", nullable=true)
*/ */
private $endDate; private $endDate;

@ -90,7 +90,7 @@ class CWiki
/** /**
* @var \DateTime * @var \DateTime
* *
* @ORM\Column(name="dtime", type="datetime", nullable=false) * @ORM\Column(name="dtime", type="datetime", nullable=true)
*/ */
private $dtime; private $dtime;
@ -181,7 +181,7 @@ class CWiki
/** /**
* @var \DateTime * @var \DateTime
* *
* @ORM\Column(name="time_edit", type="datetime", nullable=false) * @ORM\Column(name="time_edit", type="datetime", nullable=true)
*/ */
private $timeEdit; private $timeEdit;

@ -117,14 +117,14 @@ class CWikiConf
/** /**
* @var \DateTime * @var \DateTime
* *
* @ORM\Column(name="startdate_assig", type="datetime", nullable=false) * @ORM\Column(name="startdate_assig", type="datetime", nullable=true)
*/ */
private $startdateAssig; private $startdateAssig;
/** /**
* @var \DateTime * @var \DateTime
* *
* @ORM\Column(name="enddate_assig", type="datetime", nullable=false) * @ORM\Column(name="enddate_assig", type="datetime", nullable=true)
*/ */
private $enddateAssig; private $enddateAssig;

Loading…
Cancel
Save