Minor - format code.

1.10.x
Julio Montoya 10 years ago
parent fa1203ae6b
commit 35313bc560
  1. 7
      main/exercice/exercise.class.php
  2. 8
      main/exercice/exercise_report.php
  3. 2
      main/inc/lib/api.lib.php

@ -1608,6 +1608,7 @@ class Exercise
// if we want to delete attempts before date $cleanResultBeforeDate
// $cleanResultBeforeDate must be a valid UTC-0 date yyyy-mm-dd
if (!empty($cleanResultBeforeDate)) {
$cleanResultBeforeDate = Database::escape_string($cleanResultBeforeDate);
if (api_is_valid_date($cleanResultBeforeDate)) {
@ -1633,7 +1634,8 @@ class Exercise
$i = 0;
if (is_array($exe_list) && count($exe_list) > 0) {
foreach ($exe_list as $item) {
$sql = "DELETE FROM $table_track_e_attempt WHERE exe_id = '".$item['exe_id']."'";
$sql = "DELETE FROM $table_track_e_attempt
WHERE exe_id = '".$item['exe_id']."'";
Database::query($sql);
$i++;
}
@ -1901,6 +1903,9 @@ class Exercise
/**
* So the time control will work
*
* @param string $time_left
* @return string
*/
public function show_time_control_js($time_left)
{

@ -1,5 +1,6 @@
<?php
/* For licensing terms, see /license.txt */
/**
* Exercise list: This script shows the list of exercises for administrators and students.
* @package chamilo.exercise
@ -9,7 +10,7 @@
* @todo fix excel export
*
*/
// including the global library
require_once '../inc/global.inc.php';
// Setting the tabs
@ -318,7 +319,10 @@ if (($is_allowedToEdit || $is_tutor || api_is_coach()) && isset($_GET['delete_be
if ($check) {
$objExerciseTmp = new Exercise();
if ($objExerciseTmp->read($exercise_id)) {
$count = $objExerciseTmp->clean_results(true, $_GET['delete_before_date'].' 23:59:59');
$count = $objExerciseTmp->clean_results(
true,
$_GET['delete_before_date'].' 23:59:59'
);
Display::display_confirmation_message(sprintf(get_lang('XResultsCleaned'), $count));
}
}

@ -1847,7 +1847,7 @@ function api_format_course_array($course_data)
$_course['department_name'] = $course_data['department_name'];
$_course['department_url'] = $course_data['department_url'];
//Course password
// Course password
$_course['registration_code'] = !empty($course_data['registration_code']) ? sha1($course_data['registration_code']) : null;
$_course['disk_quota'] = $course_data['disk_quota'];
$_course['course_public_url'] = api_get_path(WEB_COURSE_PATH).$course_data['directory'].'/index.php';

Loading…
Cancel
Save