chamilo/chamilo-lms

View on GitHub
public/main/inc/ajax/course_home.ajax.php

Summary

Maintainability
A
0 mins
Test Coverage

Variable "lp_id" is not in valid camel caps format
Open

                $lp = new learnpath(api_get_lp_entity($lp_id), $courseInfo, $userId);

Variable "lp_item" is not in valid camel caps format
Open

                    $lp_date = api_get_local_time($lp_item['modified_on']);

Variable "lp_item" is not in valid camel caps format
Open

                if (!empty($lp_item['published_on'])) {

Variable "session_id" is not in valid camel caps format
Open

        $course_list = SessionManager::get_course_list_by_session_id($session_id);

Variable "course_url" is not in valid camel caps format
Open

            $course_url = api_get_path(WEB_COURSE_PATH).$item['directory'].'/?id_session='.$session_id;

Variable "lp_item" is not in valid camel caps format
Open

            foreach ($flat_list as $lp_id => $lp_item) {

Variable "lp_date" is not in valid camel caps format
Open

                    $lp_date = api_get_local_time($lp_item['created_on']);

Variable "lp_item" is not in valid camel caps format
Open

                if (!empty($lp_item['expired_on'])) {

Variable "new_session_list" is not in valid camel caps format
Open

            foreach ($new_session_list as $item) {

Variable "flat_list" is not in valid camel caps format
Open

            $flat_list = $list->get_flat_list();

Variable "lp_id" is not in valid camel caps format
Open

                $temp[$count]['id'] = $lp_id;

Variable "lp_date" is not in valid camel caps format
Open

                if (strtotime($last_date) < strtotime($lp_date)) {

Variable "lp_item" is not in valid camel caps format
Open

                    if ($now > api_strtotime($lp_item['expired_on'], 'UTC')) {

Variable "lp_url" is not in valid camel caps format
Open

                    Display::url($icons.' '.$lp_item['lp_name'], $lp_url, ['target' => SESSION_LINK_TARGET]),

Variable "total_pages" is not in valid camel caps format
Open

        if ($page > $total_pages) {

Variable "course_id" is not in valid camel caps format
Open

        $course_id = (int) $_REQUEST['course_id'];

Variable "my_session_list" is not in valid camel caps format
Open

            $my_session_list = [];

Variable "progress_db" is not in valid camel caps format
Open

                if (100 == $lp->progress_db) {

Variable "lp_id" is not in valid camel caps format
Open

                $lp_url = api_get_path(WEB_CODE_PATH).'lp/lp_controller.php?cidReq='.$item['code'].'&id_session='.$session_id.'&lp_id='.$lp_id.'&action=view';

Variable "lp_item" is not in valid camel caps format
Open

                    $lp_date = api_get_local_time($lp_item['created_on']);

Variable "lp_date" is not in valid camel caps format
Open

                    $icons = Display::getMdiIcon($image, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Since your latest visit').': '.$label.' - '.$lp_date);

Variable "lp_item" is not in valid camel caps format
Open

                $temp[$count]['date'] = $lp_item['published_on'];

Variable "course_info" is not in valid camel caps format
Open

        $course_info = api_get_course_info($_GET['code']);

Variable "course_id" is not in valid camel caps format
Open

        $course_id = (int) $_REQUEST['course_id'];

Variable "lp_date" is not in valid camel caps format
Open

                    $lp_date = api_get_local_time($lp_item['modified_on']);

Variable "lp_item" is not in valid camel caps format
Open

                if (!empty($lp_item['published_on'])) {

Variable "flat_list" is not in valid camel caps format
Open

            foreach ($flat_list as $lp_id => $lp_item) {

Variable "lp_item" is not in valid camel caps format
Open

                $temp[$count]['lp'] = $lp_item['lp_name'];

Variable "session_id" is not in valid camel caps format
Open

            if (!in_array($session_id, $my_session_list)) {

Variable "session_id" is not in valid camel caps format
Open

        $session_id = (int) $_REQUEST['session_id'];

Variable "my_session_list" is not in valid camel caps format
Open

                    $my_session_list[] = $item['session_id'];

Variable "course_list" is not in valid camel caps format
Open

        $course_list = SessionManager::get_course_list_by_session_id($session_id);

Variable "session_id" is not in valid camel caps format
Open

        $course_list = SessionManager::get_course_list_by_session_id($session_id);

Variable "session_id" is not in valid camel caps format
Open

                    $session_id,

Variable "session_id" is not in valid camel caps format
Open

            if (!in_array($session_id, $my_session_list)) {

Variable "course_list" is not in valid camel caps format
Open

        foreach ($course_list as $item) {

Variable "my_session_list" is not in valid camel caps format
Open

            $my_session_list = [];

Variable "course_info" is not in valid camel caps format
Open

                    WHERE c_id = ".$course_info['real_id']." AND session_id = 0

Variable "my_session_list" is not in valid camel caps format
Open

            if (!in_array($session_id, $my_session_list)) {

Variable "flat_list" is not in valid camel caps format
Open

            $lps[$item['code']] = $flat_list;

Variable "last_date" is not in valid camel caps format
Open

                if (strtotime($last_date) < strtotime($lp_date)) {

Variable "total_pages" is not in valid camel caps format
Open

        $response->total = $total_pages;

Variable "course_list" is not in valid camel caps format
Open

        $course_list = SessionManager::get_course_list_by_session_id($session_id);

Variable "course_info" is not in valid camel caps format
Open

        if (!empty($course_info)) {

Variable "new_session_list" is not in valid camel caps format
Open

            $new_session_list = UserManager::get_personal_session_course_list(api_get_user_id());

Variable "course_url" is not in valid camel caps format
Open

            $item['title'] = Display::url($item['title'], $course_url, ['target' => SESSION_LINK_TARGET]);

Variable "lp_url" is not in valid camel caps format
Open

                $lp_url = api_get_path(WEB_CODE_PATH).'lp/lp_controller.php?cidReq='.$item['code'].'&id_session='.$session_id.'&lp_id='.$lp_id.'&action=view';

Variable "last_date" is not in valid camel caps format
Open

                $last_date = Tracking::get_last_connection_date_on_the_course(

Variable "session_id" is not in valid camel caps format
Open

        $session_id = (int) $_REQUEST['session_id'];

Variable "course_info" is not in valid camel caps format
Open

                COURSE_VISIBILITY_REGISTERED == $course_info['visibility']

Variable "lp_item" is not in valid camel caps format
Open

                    $date = substr($lp_item['published_on'], 0, 10);

Variable "new_session_list" is not in valid camel caps format
Open

            $new_session_list = UserManager::get_personal_session_course_list(api_get_user_id());

Variable "my_session_list" is not in valid camel caps format
Open

                    $my_session_list[] = $item['session_id'];

Variable "new_session_list" is not in valid camel caps format
Open

            foreach ($new_session_list as $item) {

Variable "lp_item" is not in valid camel caps format
Open

                    if ($now < api_strtotime($lp_item['published_on'], 'UTC')) {

Variable "session_id" is not in valid camel caps format
Open

            $list = new LearnpathList($userId, $courseInfo, $session_id);

Variable "total_pages" is not in valid camel caps format
Open

        $total_pages = 0;

Variable "lp_id" is not in valid camel caps format
Open

            foreach ($flat_list as $lp_id => $lp_item) {

Variable "lp_item" is not in valid camel caps format
Open

                    Display::url($icons.' '.$lp_item['lp_name'], $lp_url, ['target' => SESSION_LINK_TARGET]),

Variable "session_id" is not in valid camel caps format
Open

            $course_url = api_get_path(WEB_COURSE_PATH).$item['directory'].'/?id_session='.$session_id;

Variable "total_pages" is not in valid camel caps format
Open

            $response->page = $total_pages;

Variable "my_session_list" is not in valid camel caps format
Open

            if (!in_array($session_id, $my_session_list)) {

Variable "session_id" is not in valid camel caps format
Open

                $lp_url = api_get_path(WEB_CODE_PATH).'lp/lp_controller.php?cidReq='.$item['code'].'&id_session='.$session_id.'&lp_id='.$lp_id.'&action=view';

Variable "lp_item" is not in valid camel caps format
Open

                if (empty($lp_item['modified_on'])) {

Variable "total_pages" is not in valid camel caps format
Open

            $total_pages = ceil($count / $limit);

Variable "course_id" is not in valid camel caps format
Open

            if (isset($course_id) && !empty($course_id)) {

Variable "lp_id" is not in valid camel caps format
Open

                $temp[$count]['id'] = $lp_id;

Variable "week_data" is not in valid camel caps format
Open

                    $week_data = '';

Variable "lp_item" is not in valid camel caps format
Open

                    $lp_date = api_get_local_time($lp_item['created_on']);

Variable "total_pages" is not in valid camel caps format
Open

        $response->total = $total_pages;

Variable "course_id" is not in valid camel caps format
Open

            if (isset($course_id) && !empty($course_id)) {

Variable "session_id" is not in valid camel caps format
Open

                $session_id

Variable "course_list" is not in valid camel caps format
Open

        foreach ($course_list as $item) {

Variable "lp_id" is not in valid camel caps format
Open

            foreach ($flat_list as $lp_id => $lp_item) {

Variable "total_pages" is not in valid camel caps format
Open

        if ($page > $total_pages) {

Variable "new_session_list" is not in valid camel caps format
Open

            foreach ($new_session_list as $item) {

Variable "course_id" is not in valid camel caps format
Open

            if (isset($course_id) && !empty($course_id)) {

Variable "flat_list" is not in valid camel caps format
Open

            foreach ($flat_list as $lp_id => $lp_item) {

Variable "last_date" is not in valid camel caps format
Open

                if (strtotime($last_date) < strtotime($lp_date)) {

Variable "lp_url" is not in valid camel caps format
Open

                    Display::url($icons.' '.$lp_item['lp_name'], $lp_url, ['target' => SESSION_LINK_TARGET]),

Variable "total_pages" is not in valid camel caps format
Open

            $response->page = $total_pages;

Variable "session_id" is not in valid camel caps format
Open

                $lp_url = api_get_path(WEB_CODE_PATH).'lp/lp_controller.php?cidReq='.$item['code'].'&id_session='.$session_id.'&lp_id='.$lp_id.'&action=view';

Variable "last_date" is not in valid camel caps format
Open

                $last_date = Tracking::get_last_connection_date_on_the_course(

Variable "lp_item" is not in valid camel caps format
Open

                    $date = substr($lp_item['published_on'], 0, 10);

Variable "lp_item" is not in valid camel caps format
Open

                if (!empty($lp_item['published_on'])) {

Variable "course_id" is not in valid camel caps format
Open

        $course_id = (int) $_REQUEST['course_id'];

Variable "lp_item" is not in valid camel caps format
Open

                    $lp_date = api_get_local_time($lp_item['created_on']);

Variable "lp_date" is not in valid camel caps format
Open

                    $lp_date = api_get_local_time($lp_item['modified_on']);

Variable "my_session_list" is not in valid camel caps format
Open

            if (!in_array($session_id, $my_session_list)) {

Variable "lp_item" is not in valid camel caps format
Open

                    if ($now < api_strtotime($lp_item['published_on'], 'UTC')) {

Variable "total_pages" is not in valid camel caps format
Open

            $total_pages = ceil($count / $limit);

Variable "flat_list" is not in valid camel caps format
Open

            $lps[$item['code']] = $flat_list;

Variable "session_id" is not in valid camel caps format
Open

        $course_list = SessionManager::get_course_list_by_session_id($session_id);

Variable "lp_id" is not in valid camel caps format
Open

                $temp[$count]['id'] = $lp_id;

Variable "lp_item" is not in valid camel caps format
Open

                if (!empty($lp_item['published_on'])) {

Variable "lp_item" is not in valid camel caps format
Open

                if (!empty($lp_item['expired_on'])) {

Variable "lp_item" is not in valid camel caps format
Open

                    Display::url($icons.' '.$lp_item['lp_name'], $lp_url, ['target' => SESSION_LINK_TARGET]),

Variable "session_id" is not in valid camel caps format
Open

                api_get_path(WEB_COURSE_PATH).$item['directory'].'/?id_session='.$session_id,

Variable "total_pages" is not in valid camel caps format
Open

            $response->page = $total_pages;

Variable "lp_date" is not in valid camel caps format
Open

                if (strtotime($last_date) < strtotime($lp_date)) {

Variable "lp_url" is not in valid camel caps format
Open

                    Display::url($icons.' '.$lp_item['lp_name'], $lp_url, ['target' => SESSION_LINK_TARGET]),

Variable "course_id" is not in valid camel caps format
Open

                if ($course_id != $item['id']) {

Variable "lp_url" is not in valid camel caps format
Open

                $lp_url = api_get_path(WEB_CODE_PATH).'lp/lp_controller.php?cidReq='.$item['code'].'&id_session='.$session_id.'&lp_id='.$lp_id.'&action=view';

Variable "last_date" is not in valid camel caps format
Open

                $last_date = Tracking::get_last_connection_date_on_the_course(

Variable "session_id" is not in valid camel caps format
Open

                $session_id,

Variable "flat_list" is not in valid camel caps format
Open

            $flat_list = $list->get_flat_list();

Variable "lp_item" is not in valid camel caps format
Open

                    $week_data = date('Y', api_strtotime($lp_item['published_on'], 'UTC')).' - '.get_week_from_day($lp_item['published_on']);

Variable "lp_item" is not in valid camel caps format
Open

                    Display::url($icons.' '.$lp_item['lp_name'], $lp_url, ['target' => SESSION_LINK_TARGET]),

Variable "session_id" is not in valid camel caps format
Open

                api_get_path(WEB_COURSE_PATH).$item['directory'].'/?id_session='.$session_id,

Variable "session_id" is not in valid camel caps format
Open

                $lp_url = api_get_path(WEB_CODE_PATH).'lp/lp_controller.php?cidReq='.$item['code'].'&id_session='.$session_id.'&lp_id='.$lp_id.'&action=view';

Variable "session_id" is not in valid camel caps format
Open

                    $session_id,

Variable "lp_item" is not in valid camel caps format
Open

                if (empty($lp_item['modified_on'])) {

Variable "lp_date" is not in valid camel caps format
Open

                    $icons = Display::getMdiIcon($image, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Since your latest visit').': '.$label.' - '.$lp_date);

Variable "lp_item" is not in valid camel caps format
Open

                    $date = substr($lp_item['published_on'], 0, 10);

Variable "flat_list" is not in valid camel caps format
Open

            foreach ($flat_list as $lp_id => $lp_item) {

Variable "lp_url" is not in valid camel caps format
Open

                $lp_url = api_get_path(WEB_CODE_PATH).'lp/lp_controller.php?cidReq='.$item['code'].'&id_session='.$session_id.'&lp_id='.$lp_id.'&action=view';

Variable "last_date" is not in valid camel caps format
Open

                if (strtotime($last_date) < strtotime($lp_date)) {

Variable "lp_item" is not in valid camel caps format
Open

                if (!empty($lp_item['published_on'])) {

Variable "lp_item" is not in valid camel caps format
Open

                    if ($now < api_strtotime($lp_item['published_on'], 'UTC')) {

Variable "session_id" is not in valid camel caps format
Open

            if (!in_array($session_id, $my_session_list)) {

Variable "lp_id" is not in valid camel caps format
Open

                $lp_url = api_get_path(WEB_CODE_PATH).'lp/lp_controller.php?cidReq='.$item['code'].'&id_session='.$session_id.'&lp_id='.$lp_id.'&action=view';

Variable "lp_item" is not in valid camel caps format
Open

                $temp[$count]['date'] = $lp_item['published_on'];

Variable "lp_item" is not in valid camel caps format
Open

                    if ($now > api_strtotime($lp_item['expired_on'], 'UTC')) {

Variable "total_pages" is not in valid camel caps format
Open

        $response->total = $total_pages;

Variable "my_session_list" is not in valid camel caps format
Open

                    $my_session_list[] = $item['session_id'];

Variable "lp_item" is not in valid camel caps format
Open

                $temp[$count]['lp'] = $lp_item['lp_name'];

Variable "lp_item" is not in valid camel caps format
Open

            foreach ($flat_list as $lp_id => $lp_item) {

Variable "lp_date" is not in valid camel caps format
Open

                    $lp_date = api_get_local_time($lp_item['modified_on']);

Variable "lp_date" is not in valid camel caps format
Open

                if (strtotime($last_date) < strtotime($lp_date)) {

Variable "lp_id" is not in valid camel caps format
Open

                $lp_url = api_get_path(WEB_CODE_PATH).'lp/lp_controller.php?cidReq='.$item['code'].'&id_session='.$session_id.'&lp_id='.$lp_id.'&action=view';

Variable "lp_date" is not in valid camel caps format
Open

                    $lp_date = api_get_local_time($lp_item['created_on']);

Variable "lp_date" is not in valid camel caps format
Open

                    $icons = Display::getMdiIcon($image, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Since your latest visit').': '.$label.' - '.$lp_date);

Variable "flat_list" is not in valid camel caps format
Open

            $flat_list = $list->get_flat_list();

Variable "lp_item" is not in valid camel caps format
Open

                    if ($now > api_strtotime($lp_item['expired_on'], 'UTC')) {

Variable "total_pages" is not in valid camel caps format
Open

        $total_pages = 0;

Variable "total_pages" is not in valid camel caps format
Open

        if ($page > $total_pages) {

Variable "lp_item" is not in valid camel caps format
Open

                if (!empty($lp_item['expired_on'])) {

Variable "total_pages" is not in valid camel caps format
Open

        $total_pages = 0;

Variable "my_session_list" is not in valid camel caps format
Open

            $my_session_list = [];

Variable "lp_item" is not in valid camel caps format
Open

                    $lp_date = api_get_local_time($lp_item['modified_on']);

Variable "lp_item" is not in valid camel caps format
Open

            foreach ($flat_list as $lp_id => $lp_item) {

Variable "session_id" is not in valid camel caps format
Open

                    $session_id,

Variable "lp_item" is not in valid camel caps format
Open

                    $lp_date = api_get_local_time($lp_item['modified_on']);

Variable "lp_item" is not in valid camel caps format
Open

                    $week_data = date('Y', api_strtotime($lp_item['published_on'], 'UTC')).' - '.get_week_from_day($lp_item['published_on']);

Variable "week_data" is not in valid camel caps format
Open

                    $week_data,

Variable "session_id" is not in valid camel caps format
Open

        $session_id = (int) $_REQUEST['session_id'];

Variable "course_list" is not in valid camel caps format
Open

        foreach ($course_list as $item) {

Variable "flat_list" is not in valid camel caps format
Open

            $lps[$item['code']] = $flat_list;

Variable "lp_id" is not in valid camel caps format
Open

            foreach ($flat_list as $lp_id => $lp_item) {

Variable "course_id" is not in valid camel caps format
Open

                if ($course_id != $item['id']) {

Variable "lp_item" is not in valid camel caps format
Open

                if (empty($lp_item['modified_on'])) {

Variable "week_data" is not in valid camel caps format
Open

                    $week_data = date('Y', api_strtotime($lp_item['published_on'], 'UTC')).' - '.get_week_from_day($lp_item['published_on']);

Variable "total_pages" is not in valid camel caps format
Open

            $total_pages = ceil($count / $limit);

Variable "new_session_list" is not in valid camel caps format
Open

            $new_session_list = UserManager::get_personal_session_course_list(api_get_user_id());

Variable "course_list" is not in valid camel caps format
Open

        $course_list = SessionManager::get_course_list_by_session_id($session_id);

Variable "course_id" is not in valid camel caps format
Open

            if (isset($course_id) && !empty($course_id)) {

Variable "lp_date" is not in valid camel caps format
Open

                    $lp_date = api_get_local_time($lp_item['created_on']);

Variable "lp_item" is not in valid camel caps format
Open

                if (!empty($lp_item['published_on'])) {

Variable "lp_item" is not in valid camel caps format
Open

                $temp[$count]['lp'] = $lp_item['lp_name'];

There are no issues that match your filters.

Category
Status