Exercise (remove use of 0000-00-00 00:00:00)

ofaj
jmontoyaa 10 years ago
parent 6203e48640
commit e2c1d77d61
  1. 1
      app/Migrations/Schema/V111/Version111.php
  2. 2
      main/admin/user_move_stats.php
  3. 2
      main/exercice/exercise_submit.php
  4. 5
      main/inc/lib/notebook.lib.php

@ -71,7 +71,6 @@ class Version111 extends AbstractMigrationChamilo
$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('UPDATE TABLE c_quiz SET start_time = "" 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"');

@ -374,7 +374,7 @@ if (isset($_REQUEST['load_ajax'])) {
qualification = '".$parent_data['qualification'] ."',
parent_id = '',
qualificator_id = '',
date_of_qualification = '0000-00-00 00:00:00',
date_of_qualification = '',
session_id = ".$new_session_id;
$rest_insert = Database::query($sql_add_publication);
if ($debug) echo ($sql_add_publication);

@ -734,7 +734,7 @@ if ($limit_time_exists) {
$permission_to_start = true;
}
if ($_SERVER['REQUEST_METHOD'] != 'POST') {
if ($objExercise->end_time != '0000-00-00 00:00:00') {
if (!empty($objExercise->end_time)) {
$exercise_timeover = (($time_now - $exercise_end_time) > 0) ? true : false;
} else {
$exercise_timeover = false;

@ -243,8 +243,7 @@ class NotebookManager
}
// Database table definition
$t_notebook = Database :: get_course_table(TABLE_NOTEBOOK);
$order_by = "";
$t_notebook = Database :: get_course_table(TABLE_NOTEBOOK);
if ($_SESSION['notebook_view'] == 'creation_date' || $_SESSION['notebook_view'] == 'update_date') {
$order_by = " ORDER BY " . $_SESSION['notebook_view'] . " $sort_direction ";
} else {
@ -255,7 +254,7 @@ class NotebookManager
$session_id = api_get_session_id();
$condition_session = api_get_session_condition($session_id);
$cond_extra = ($_SESSION['notebook_view'] == 'update_date') ? " AND update_date <> '0000-00-00 00:00:00'" : " ";
$cond_extra = ($_SESSION['notebook_view'] == 'update_date') ? " AND update_date <> ''" : " ";
$course_id = api_get_course_int_id();
$sql = "SELECT * FROM $t_notebook

Loading…
Cancel
Save