Minor - format code, remove double "header"

pull/2874/head
Julio Montoya 7 years ago
parent 107e907760
commit c867021d8d
  1. 9
      main/badge/assertion.php
  2. 2
      main/badge/class.php
  3. 2
      main/forum/viewthread.php
  4. 1
      main/work/work.lib.php

@ -8,14 +8,13 @@
* *
* @package chamilo.badge * @package chamilo.badge
*/ */
header('Content-Type: application/json');
require_once __DIR__.'/../inc/global.inc.php'; require_once __DIR__.'/../inc/global.inc.php';
$userId = isset($_GET['user']) ? intval($_GET['user']) : 0; $userId = isset($_GET['user']) ? (int) $_GET['user'] : 0;
$skillId = isset($_GET['skill']) ? intval($_GET['skill']) : 0; $skillId = isset($_GET['skill']) ? (int) $_GET['skill'] : 0;
$courseId = isset($_GET['course']) ? intval($_GET['course']) : 0; $courseId = isset($_GET['course']) ? (int) $_GET['course'] : 0;
$sessionId = isset($_GET['session']) ? intval($_GET['session']) : 0; $sessionId = isset($_GET['session']) ? (int) $_GET['session'] : 0;
if ($userId === 0 || $skillId === 0) { if ($userId === 0 || $skillId === 0) {
exit; exit;

@ -10,7 +10,7 @@
*/ */
require_once __DIR__.'/../inc/global.inc.php'; require_once __DIR__.'/../inc/global.inc.php';
$skillId = isset($_GET['id']) ? intval($_GET['id']) : 0; $skillId = isset($_GET['id']) ? (int) $_GET['id'] : 0;
$objSkill = new Skill(); $objSkill = new Skill();
$skill = $objSkill->get($skillId); $skill = $objSkill->get($skillId);

@ -687,7 +687,7 @@ if (!api_is_allowed_to_edit(false, true) &&
if (!api_is_allowed_to_edit(false, true) && if (!api_is_allowed_to_edit(false, true) &&
( (
( $current_forum_category && $current_forum_category['locked'] != 0) || ($current_forum_category && $current_forum_category['locked'] != 0) ||
$current_forum['locked'] != 0 || $current_thread['locked'] != 0 $current_forum['locked'] != 0 || $current_thread['locked'] != 0
) )
) { ) {

@ -4009,6 +4009,7 @@ function processWorkForm(
$courseId, $courseId,
$sessionId $sessionId
); );
if (count($userWorks) == 1) { if (count($userWorks) == 1) {
// The student only uploaded one doc so far, so add the // The student only uploaded one doc so far, so add the
// considered work time to his course connection time // considered work time to his course connection time

Loading…
Cancel
Save