Minor - format code

pull/2573/head
Julio 8 years ago
parent 62e5c00197
commit 0fff42900b
  1. 10
      main/lp/learnpathItem.class.php

@ -112,7 +112,7 @@ class learnpathItem
if (empty($course_id)) { if (empty($course_id)) {
$course_id = api_get_course_int_id(); $course_id = api_get_course_int_id();
} else { } else {
$course_id = intval($course_id); $course_id = (int) $course_id;
} }
$sql = "SELECT * FROM $items_table $sql = "SELECT * FROM $items_table
WHERE iid = $id"; WHERE iid = $id";
@ -365,7 +365,7 @@ class learnpathItem
} }
$res = 1; $res = 1;
if (!empty($this->attempt_id)) { if (!empty($this->attempt_id)) {
$res = intval($this->attempt_id); $res = (int) $this->attempt_id;
} }
if (self::DEBUG > 0) { if (self::DEBUG > 0) {
error_log( error_log(
@ -3587,7 +3587,7 @@ class learnpathItem
} }
$lp_table = Database::get_course_table(TABLE_LP_MAIN); $lp_table = Database::get_course_table(TABLE_LP_MAIN);
$lp_id = intval($this->lp_id); $lp_id = (int) $this->lp_id;
$sql = "SELECT * FROM $lp_table WHERE iid = $lp_id"; $sql = "SELECT * FROM $lp_table WHERE iid = $lp_id";
$res = Database::query($sql); $res = Database::query($sql);
$accumulateScormTime = 'false'; $accumulateScormTime = 'false';
@ -4501,7 +4501,7 @@ class learnpathItem
*/ */
public function getForumThread($lpCourseId, $lpSessionId = 0) public function getForumThread($lpCourseId, $lpSessionId = 0)
{ {
$lpSessionId = intval($lpSessionId); $lpSessionId = (int) $lpSessionId;
$forumThreadTable = Database::get_course_table(TABLE_FORUM_THREAD); $forumThreadTable = Database::get_course_table(TABLE_FORUM_THREAD);
$itemProperty = Database::get_course_table(TABLE_ITEM_PROPERTY); $itemProperty = Database::get_course_table(TABLE_ITEM_PROPERTY);
@ -4565,7 +4565,7 @@ class learnpathItem
$threadRepo = $em->getRepository('ChamiloCourseBundle:CForumThread'); $threadRepo = $em->getRepository('ChamiloCourseBundle:CForumThread');
$forumThread = $threadRepo->findOneBy([ $forumThread = $threadRepo->findOneBy([
'threadTitle' => "{$this->title} - {$this->db_id}", 'threadTitle' => "{$this->title} - {$this->db_id}",
'forumId' => intval($currentForumId), 'forumId' => (int) $currentForumId,
]); ]);
if (!$forumThread) { if (!$forumThread) {

Loading…
Cancel
Save