Minor - format code

pull/3159/head
Julio Montoya 6 years ago
parent ed7b80c7ba
commit 2d04816639
  1. 8
      main/auth/courses.php
  2. 4
      main/inc/lib/CoursesAndSessionsCatalog.class.php
  3. 10
      main/inc/lib/chat.lib.php
  4. 2
      main/inc/lib/course.lib.php
  5. 8
      main/mySpace/access_details_session.php

@ -81,7 +81,6 @@ if (!empty($settings)) {
}
}
switch ($action) {
case 'unsubscribe':
// We are unsubscribing from a course (=Unsubscribe from course).
@ -187,7 +186,7 @@ switch ($action) {
if ($level > 0) {
$separate = str_repeat('--', $level);
}
$select->addOption($separate.' '.$categoryName.' ('.$countCourse.')',$categoryCodeItem);
$select->addOption($separate.' '.$categoryName.' ('.$countCourse.')', $categoryCodeItem);
}
$defaults['category_code'] = $categoryCode;
@ -279,8 +278,8 @@ switch ($action) {
$pageLength = isset($_GET['pageLength']) ? (int) $_GET['pageLength'] : CoursesAndSessionsCatalog::PAGE_LENGTH;
$pageTotal = (int) ceil($countCoursesInCategory / $pageLength);
$url = CoursesAndSessionsCatalog::getCatalogUrl(1, $pageLength, 'ALL', 'search_course', $fields);
$urlNoCategory = CoursesAndSessionsCatalog::getCatalogUrl(1, $pageLength, '', 'search_course', $fields);
$url = CoursesAndSessionsCatalog::getCatalogUrl(1, $pageLength, 'ALL', 'search_course', $fields);
$urlNoCategory = CoursesAndSessionsCatalog::getCatalogUrl(1, $pageLength, '', 'search_course', $fields);
$urlNoCategory = str_replace('&category_code=ALL', '', $urlNoCategory);
$form->setAttribute('action', $url);
@ -410,7 +409,6 @@ switch ($action) {
$courseUrl = api_get_path(WEB_COURSE_PATH);
$hideRating = api_get_configuration_value('hide_course_rating');
if (!empty($courses)) {
foreach ($courses as &$course) {
$courseId = $course['real_id'];

@ -411,9 +411,9 @@ class CoursesAndSessionsCatalog
* The search is done on the code, title and tutor field of the course table.
*
* @param string $categoryCode
* @param string $keyword The string that the user submitted
* @param string $keyword The string that the user submitted
* @param array $limit
* @param bool $justVisible search only on visible courses in the catalogue
* @param bool $justVisible search only on visible courses in the catalogue
* @param array $conditions
*
* @return array an array containing a list of all the courses matching the the search term

@ -7,8 +7,6 @@ use ChamiloSession as Session;
* Class Chat.
*
* @todo ChamiloSession instead of $_SESSION
*
* @package chamilo.library.chat
*/
class Chat extends Model
{
@ -238,16 +236,16 @@ class Chat extends Model
}
$sql = "SELECT * FROM ".$this->table."
WHERE
WHERE
(
to_user = $toUserId AND
to_user = $toUserId AND
from_user = $fromUserId
)
OR
(
from_user = $toUserId AND
from_user = $toUserId AND
to_user = $fromUserId
)
)
$orderBy
LIMIT $start, $end
";

@ -6543,7 +6543,7 @@ class CourseManager
/**
* Display the description button of a course in the course catalog.
*
* @param array $course
* @param array $course
* @param string $url
*
* @return string HTML string

@ -273,7 +273,8 @@ function getReport($userId, $from, $to, $addTime = false)
if (empty($courseData)) {
continue;
}
$courseSessionTable .= '<div class="data-title">'.Display::page_subheader3($iconCourse.$data['name'][$courseId]).'</div>';
$courseSessionTable .= '<div class="data-title">'.
Display::page_subheader3($iconCourse.$data['name'][$courseId]).'</div>';
$table = new HTML_Table(['class' => 'data_table']);
$headers = [
get_lang('StartDate'),
@ -302,8 +303,8 @@ function getReport($userId, $from, $to, $addTime = false)
$courseSessionTable .= $table->toHtml();
}
}
$totalCourseSessionTable = '';
$totalCourseSessionTable = '';
if ($courseSessionTableData) {
$table = new HTML_Table(['class' => 'data_table']);
$headers = [
@ -487,7 +488,8 @@ if ($formByDay->validate()) {
$totalCourseSessionTable = $result['third'];
$total = $result['total'];
$iconCalendar = Display::return_icon('calendar.png', null, [], ICON_SIZE_SMALL);
$tableList .= '<div class="date-calendar">'.Display::page_subheader2($iconCalendar.get_lang('Date').': '.$dateToCheck).'</div>';
$tableList .= '<div class="date-calendar">'.
Display::page_subheader2($iconCalendar.get_lang('Date').': '.$dateToCheck).'</div>';
$tableList .= $table->toHtml();
if (!$reduced && !empty($total)) {
$diff = get_lang('NotInCourse').' '.api_format_time($data['diff'] - $total, 'js');

Loading…
Cancel
Save