chamilo/chamilo-lms

View on GitHub
public/main/admin/user_move_stats.php

Summary

Maintainability
A
0 mins
Test Coverage

The method compare_data uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

                } else {
                    echo "<br /><h3>".get_lang('Id')." #$id</h3>";
                    //process data
                    foreach ($item as $key => $value) {
                        echo "$key =  $value <br />";
Severity: Minor
Found in public/main/admin/user_move_stats.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

The method compare_data uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            echo get_lang('No results found');
        }
Severity: Minor
Found in public/main/admin/user_move_stats.php by phpmd

ElseExpression

Since: 1.4.0

An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

Example

class Foo
{
    public function bar($flag)
    {
        if ($flag) {
            // one branch
        } else {
            // another branch
        }
    }
}

Source https://phpmd.org/rules/cleancode.html#elseexpression

The parameter $user_id is not named in camelCase.
Open

function get_courses_list_by_user_id_based_in_exercises($user_id)
{
    $TABLETRACK_EXERCICES = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES);
    $user_id = intval($user_id);
    $sql = "SELECT DISTINCT exe_user_id, c_id, session_id
Severity: Minor
Found in public/main/admin/user_move_stats.php by phpmd

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

The parameter $result_message is not named in camelCase.
Open

function compare_data($result_message)
{
    foreach ($result_message as $table => $data) {
        $title = $table;
        if ('TRACK_E_EXERCISES' == $table) {
Severity: Minor
Found in public/main/admin/user_move_stats.php by phpmd

CamelCaseParameterName

Since: 0.2

It is considered best practice to use the camelCase notation to name parameters.

Example

class ClassName {
    public function doSomething($user_name) {
    }
}

Source

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

            $update_database = true;

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

                $course_id = $course_info['real_id'];

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

                $TBL_DROPBOX_FILE = Database::get_course_table(TABLE_DROPBOX_FILE);

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

                if (!$update_database) {

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

                                    $result_message_compare['TRACK_E_EXERCISES'][$exe_id] = $data;

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

                $sql = "SELECT * FROM $TBL_TRACK_E_COURSE_ACCESS

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

    foreach ($result_message as $table => $data) {

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

                            $sql = "UPDATE $TABLETRACK_EXERCICES SET session_id = '$new_session_id' WHERE exe_id = $exe_id";

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

            $session = api_get_session_entity($new_session_id);

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

            if ($origin_session_id == $new_session_id) {

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

            if ($course_founded) {

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

                $TBL_ITEM_PROPERTY = Database::get_course_table(TABLE_ITEM_PROPERTY);

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

                            $sql = "UPDATE $TABLETRACK_EXERCICES SET session_id = '$new_session_id' WHERE exe_id = $exe_id";

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

                                    $result_message_compare['TRACK_E_EXERCISES_IN_LP'][$exe_id] = $data;

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

                    $lp_list = new LearnpathList($user_id, $course_info, $new_session_id);

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

                    if ($update_database) {

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

                            $base_work_dir = $course_dir.'/work';

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

                            $search_this = "folder_moved_from_session_id_$origin_session_id";

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

                                    $result_message[$TBL_STUDENT_PUBLICATION.' - new folder created called: '.$created_dir]++;

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

                            $sql = "SELECT * FROM $TBL_STUDENT_PUBLICATION_ASSIGNMENT WHERE publication_id = $parent_id AND c_id = $course_id";

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

            $origin_course_code = $combination_result['course_code'];

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

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

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

            $result_message_compare = [];

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

                        [$user_id],

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

                $course = api_get_course_entity($course_id);

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

                $TBL_TRACK_E_COURSE_ACCESS = Database::get_main_table(TABLE_STATISTIC_TRACK_E_COURSE_ACCESS);

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

                                c_id = $course_id AND

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

                                exe_user_id = $user_id

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

                                    $result_message_compare['TRACK_E_EXERCISES'][$exe_id] = $data;

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

                                $user_id,

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

                    $flat_list = $lp_list->get_flat_list();

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

                $sql = "SELECT ref FROM $TBL_ITEM_PROPERTY

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

                            $course_dir = $sys_course_path.$course_info['path'];

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

                            $sub_res = Database::query($sql);

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

                            $num_rows = Database::num_rows($sub_res);

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

                                $created_dir = $new_result['url'];

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

                                    $sql_update = "UPDATE ".$TBL_STUDENT_PUBLICATION." SET ".

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

                                        echo $sql_update;

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

                                    $rest_update = Database::query($sql_update);

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

                                    $result_message[$TBL_STUDENT_PUBLICATION_ASSIGNMENT]++;

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

                                    ->setCId($course_id)

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

                                $full_file_name = $course_dir.'/'.$doc_url;

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

                            $sql = "UPDATE $TABLETRACK_EXERCICES SET session_id = '$new_session_id' WHERE exe_id = $exe_id";

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

                            $result_message[$TABLETRACK_EXERCICES]++;

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

                        foreach ($list as $exe_id => $data) {

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

                                $sql = "UPDATE $TABLETRACK_EXERCICES

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

                                        SET session_id = '$new_session_id'

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

                                        WHERE exe_id = $exe_id";

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

                $lp_list = new LearnpathList($user_id, $course_info, $new_session_id);

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

                $flat_list = $lp_list->get_flat_list();

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

                                $user_id,

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

                            var_dump($res_update);

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

                                                $parent_data['description']."folder_moved_from_session_id_$origin_session_id"

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

                                                $parent_data['description']."folder_moved_from_session_id_$origin_session_id"

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

                                       publication_id       = '".$new_parent_id."'";

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

            foreach ($new_course_list as $course_item) {

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

                        WHERE c_id = $course_id AND exe_user_id = $user_id  $sessionCondition";

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

                    $sessionCondition = api_get_session_condition($new_session_id);

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

                    $sql = "SELECT * FROM $TABLETRACK_EXERCICES

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

                        WHERE user_id = $user_id AND session_id = $origin_session_id AND c_id = $course_id ";

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

                if (!$update_database) {

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

                        $sql = "UPDATE $TBL_AGENDA SET session_id = $new_session_id WHERE c_id = $course_id AND id = $id ";

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

                        $res_update = Database::query($sql);

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

                    $sql = "SELECT * FROM $TBL_STUDENT_PUBLICATION WHERE id = $id AND session_id = $origin_session_id AND c_id = $course_id";

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

                                    WHERE id = $parent_id AND c_id = $course_id";

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

                            $sys_course_path = api_get_path(SYS_COURSE_PATH);

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

                                    WHERE description like '%$search_this%' AND url LIKE '%$search_this2%' AND session_id = $new_session_id AND c_id = $course_id

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

            foreach ($new_course_list as $course_item) {

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

                                    $dir_name = substr($parent_data['url'], 1);

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

            $result_message = [];

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

                                    $result_message[$TBL_STUDENT_PUBLICATION_ASSIGNMENT]++;

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

                        $new_session_id,

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

                $TBL_TRACK_E_LAST_ACCESS = Database::get_main_table(TABLE_STATISTIC_TRACK_E_LASTACCESS);

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

                                $result_message['TRACK_E_EXERCISES'][$exe_id] = $data;

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

                        WHERE user_id = $user_id AND session_id = $origin_session_id AND c_id = $course_id ";

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

                $flat_list = $lp_list->get_flat_list();

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

                                    SET session_id = $new_session_id

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

                            $result_message['LP_VIEW'][$data['lp_id']] = [

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

                    $lp_list = new LearnpathList($user_id, $course_info, $new_session_id);

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

                                $origin_course_code,

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

                    $sql = "SELECT * FROM $TBL_STUDENT_PUBLICATION WHERE id = $id AND session_id = $origin_session_id AND c_id = $course_id";

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

                                    $assignment_data = Database::fetch_assoc($rest_select);

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

        $combination_result = $combinations[$_REQUEST['unique_id']];

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

                $course_info = api_get_course_info($origin_course_code);

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

                $TBL_NOTEBOOK = Database::get_course_table(TABLE_NOTEBOOK);

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

                                $result_message['TRACK_E_EXERCISES'][$exe_id] = $data;

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

                                    $result_message_compare['TRACK_E_EXERCISES_IN_LP'][$exe_id] = $data;

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

                        AND access_user_id = $user_id ";

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

                            $sql = "UPDATE $TBL_TRACK_E_LAST_ACCESS

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

                    $lp_list = new LearnpathList($user_id, $course_info, $new_session_id);

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

                                    $created_dir = '/'.$created_dir;

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

                                    $created_dir = '/'.$created_dir;

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

                                    $result_message[$TBL_STUDENT_PUBLICATION.' - new folder created called: '.$created_dir]++;

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

                            if (Database::num_rows($rest_select) > 0) {

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

                                    $sql_add_publication = "INSERT INTO ".$TBL_STUDENT_PUBLICATION_ASSIGNMENT." SET

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

        if (empty($combination_result)) {

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

            if ($origin_session_id == $new_session_id) {

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

            $course_founded = false;

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

                $result = SessionManager::get_users_by_session($new_session_id);

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

                $TABLETRACK_EXERCICES = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES);

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

                $TBL_LP_VIEW = Database::get_course_table(TABLE_LP_VIEW);

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

                            $result_message[$TBL_TRACK_E_LAST_ACCESS]++;

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

                        $result_message['agenda']++;

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

                        WHERE tool = 'work' AND insert_user_id = $user_id AND c_id = $course_id";

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

                    if (Database::num_rows($sub_res) > 0) {

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

                                $new_parent_id = $new_result['id'];

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

                                if ($update_database) {

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

                                    $dir_name = substr($parent_data['url'], 1);

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

                                            ->setCId($course_id)

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

                                            ->setTitle($parent_data['title'])

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

                            $new_url = str_replace($parent_data['url'], $created_dir, $doc_url);

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

            $origin_session_id = (int) $combination_result['session_id'];

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

                if ($origin_course_code == $course_item['code']) {

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

                        WHERE c_id = $course_id AND exe_user_id = $user_id  $sessionCondition";

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

                $lp_list = new LearnpathList($user_id, $course_info, $new_session_id);

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

                        if ($update_database) {

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

                    $sub_res = Database::query($sql);

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

                            $search_this2 = $parent_data['url'];

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

                                       expires_on          = '".$assignment_data['expires_on']."',

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

                                       enable_qualification = '".$assignment_data['enable_qualification']."',

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

                                    $sql_update = "UPDATE ".$TBL_STUDENT_PUBLICATION." SET ".

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

                                       WHERE id   = ".$new_parent_id;

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

                            $new_url = str_replace($parent_data['url'], $created_dir, $doc_url);

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

function compare_data($result_message)

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

                $sql = "SELECT * FROM $TABLETRACK_EXERCICES

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

                    foreach ($list as $exe_id => $data) {

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

                            $sql = "UPDATE $TBL_TRACK_E_COURSE_ACCESS

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

                    $sql = "SELECT * FROM $TBL_LP_VIEW WHERE user_id = $user_id AND session_id = $new_session_id AND c_id = $course_id";

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

                                $user_id,

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

                                $origin_course_code,

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

                $sql = "SELECT ref FROM $TBL_ITEM_PROPERTY

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

                        $data = Database::fetch_assoc($sub_res);

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

                            $num_rows = Database::num_rows($sub_res);

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

                                    $created_dir = create_unexisting_work_directory($base_work_dir, $dir_name);

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

                            $rest_select = Database::query($sql);

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

                                       ends_on              = '".$assignment_data['ends_on']."',

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

                                       add_to_calendar      = '".$assignment_data['add_to_calendar']."',

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

                                        echo $sql_add_publication;

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

                                        var_dump($sql_update);

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

                                api_item_property_update($course_info, 'work', $id, 'DocumentAdded', $user_id);

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

            $origin_course_code = $combination_result['course_code'];

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

            $new_course_list = SessionManager::get_course_list_by_session_id($new_session_id);

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

                $course_id = $course_info['real_id'];

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

                $TBL_TRACK_ATTEMPT = Database::get_main_table(TABLE_STATISTIC_TRACK_E_ATTEMPT);

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

                $TBL_AGENDA = Database::get_course_table(TABLE_AGENDA);

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

                            $result_message[$TABLETRACK_EXERCICES]++;

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

                                $result_message[$TABLETRACK_EXERCICES]++;

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

                        WHERE c_id  = $course_id AND session_id = $origin_session_id  AND user_id = $user_id ";

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

                        WHERE c_id  = $course_id AND session_id = $origin_session_id  AND user_id = $user_id ";

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

                            $result_message[$TBL_TRACK_E_COURSE_ACCESS]++;

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

                $sql = "SELECT access_id FROM $TBL_TRACK_E_LAST_ACCESS

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

                        AND session_id = $origin_session_id

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

                            $result_message[$TBL_TRACK_E_LAST_ACCESS]++;

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

                            $sql = "UPDATE $TBL_LP_VIEW

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

                                    WHERE c_id = $course_id AND id = $id ";

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

                            $result_message[$TBL_LP_VIEW]++;

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

                    $sql = "SELECT * FROM $TBL_LP_VIEW WHERE user_id = $user_id AND session_id = $new_session_id AND c_id = $course_id";

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

                    $lp_list = new LearnpathList($user_id, $course_info, $new_session_id);

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

                        WHERE tool = 'calendar_event' AND insert_user_id = $user_id AND c_id = $course_id ";

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

                        WHERE tool = 'calendar_event' AND insert_user_id = $user_id AND c_id = $course_id ";

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

                        $parent_id = $data['parent_id'];

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

                            $sql = "SELECT * FROM $TBL_STUDENT_PUBLICATION

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

                                $select_res,

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

                            $search_this2 = $parent_data['url'];

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

                                    WHERE description like '%$search_this%' AND url LIKE '%$search_this2%' AND session_id = $new_session_id AND c_id = $course_id

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

                            if ($num_rows > 0) {

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

                                $created_dir = $new_result['url'];

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

                            $sql = "SELECT * FROM $TBL_STUDENT_PUBLICATION_ASSIGNMENT WHERE publication_id = $parent_id AND c_id = $course_id";

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

                            $sql = "SELECT * FROM $TBL_STUDENT_PUBLICATION_ASSIGNMENT WHERE publication_id = $parent_id AND c_id = $course_id";

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

                                if ($update_database) {

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

                                    ->setParentId($new_parent_id)

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

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

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

                    $course_founded = true;

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

                $course_info = api_get_course_info($origin_course_code);

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

                                $result_message['TRACK_E_EXERCISES_IN_LP'][$exe_id] = $data;

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

                            $result_message[$TBL_LP_VIEW]++;

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

                                $new_session_id

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

                    $sql = "SELECT * FROM $TBL_STUDENT_PUBLICATION WHERE id = $id AND session_id = $origin_session_id AND c_id = $course_id";

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

                            $course_dir = $sys_course_path.$course_info['path'];

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

                                    WHERE description like '%$search_this%' AND url LIKE '%$search_this2%' AND session_id = $new_session_id AND c_id = $course_id

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

                                $new_parent_id = $new_result['id'];

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

                                            ->setQualification($parent_data['qualification'])

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

                                    $assignment_data = Database::fetch_assoc($rest_select);

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

                                    $rest_select = Database::query($sql_add_publication);

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

                                    $rest_update = Database::query($sql_update);

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

                if ($origin_course_code == $course_item['code']) {

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

                $TBL_STUDENT_PUBLICATION = Database::get_course_table(TABLE_STUDENT_PUBLICATION);

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

                $TBL_DROPBOX_POST = Database::get_course_table(TABLE_DROPBOX_POST);

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

                $sessionCondition = api_get_session_condition($origin_session_id);

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

                        if ($update_database) {

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

                                $result_message['TRACK_E_EXERCISES_IN_LP'][$exe_id] = $data;

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

                            if ($update_database) {

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

                        $sql = "UPDATE $TBL_AGENDA SET session_id = $new_session_id WHERE c_id = $course_id AND id = $id ";

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

$nro_pages = round($count / $default) + 1;

Consider putting global function "compare_data" in a static class
Open

function compare_data($result_message)

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

                $update_database = false;

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

                if (empty($result) || !in_array($user_id, array_keys($result))) {

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

                $TBL_STUDENT_PUBLICATION_ASSIGNMENT = Database::get_course_table(TABLE_STUDENT_PUBLICATION_ASSIGNMENT);

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

                                $result_message[$TABLETRACK_EXERCICES]++;

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

                                    SET session_id = $new_session_id

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

                        WHERE c_id = $course_id

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

                        if ($update_database) {

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

                                    SET session_id = $new_session_id

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

                $lp_list = new LearnpathList($user_id, $course_info, $new_session_id);

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

                            $result_message_compare['LP_VIEW'][$data['lp_id']] = [

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

                            $select_res = Database::query($sql);

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

                                $new_result = Database::fetch_assoc($sub_res);

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

                                    api_item_property_update($course_info, 'work', $id, 'DirectoryCreated', api_get_user_id());

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

                                    $result_message[$TBL_STUDENT_PUBLICATION.' - new folder created called: '.$created_dir]++;

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

                            $doc_url = $data['url'];

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

                            $new_url = str_replace($parent_data['url'], $created_dir, $doc_url);

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

                            if ($update_database) {

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

                                api_item_property_update($course_info, 'work', $id, 'DocumentAdded', $user_id);

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

                                        api_item_property_update($course_info, 'work', $data['id'], 'DocumentDeleted', api_get_user_id());

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

$this_section = SECTION_PLATFORM_ADMIN;

Missing function doc comment
Open

function compare_data($result_message)

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

            $origin_session_id = (int) $combination_result['session_id'];

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

            $new_course_list = SessionManager::get_course_list_by_session_id($new_session_id);

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

                        WHERE c_id  = $course_id AND session_id = $origin_session_id  AND user_id = $user_id ";

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

                        if ($update_database) {

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

                            $result_message[$TBL_TRACK_E_COURSE_ACCESS]++;

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

                $lp_list = new LearnpathList($user_id, $course_info, $new_session_id);

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

                    $flat_list = $lp_list->get_flat_list();

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

                                var_dump($parent_data);

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

                            $base_work_dir = $course_dir.'/work';

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

                            $sql = "SELECT * FROM $TBL_STUDENT_PUBLICATION

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

                                    $sql_add_publication = "INSERT INTO ".$TBL_STUDENT_PUBLICATION_ASSIGNMENT." SET

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

                            $new_url = str_replace($parent_data['url'], $created_dir, $doc_url);

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

                                    ->setUrl($new_url)

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

                                $result_message[$TBL_STUDENT_PUBLICATION]++;

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

                                $result_message[$TBL_STUDENT_PUBLICATION]++;

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

                    if ($update_database) {

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

                $sql = "SELECT * FROM $TBL_LP_VIEW

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

                        WHERE user_id = $user_id AND session_id = $origin_session_id AND c_id = $course_id ";

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

                    $sql = "SELECT * FROM $TBL_LP_VIEW WHERE user_id = $user_id AND session_id = $new_session_id AND c_id = $course_id";

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

                                $new_session_id

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

                        WHERE tool = 'work' AND insert_user_id = $user_id AND c_id = $course_id";

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

                            $parent_data = Database::fetch_array(

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

                                    $created_dir = create_unexisting_work_directory($base_work_dir, $dir_name);

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

                                            ->setUrl($created_dir)

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

                                    $new_parent_id = $id;

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

                                    $rest_select = Database::query($sql_add_publication);

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

                        $sql = "UPDATE $TBL_DROPBOX_FILE SET session_id = $new_session_id WHERE c_id = $course_id AND id = $id";

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

                        $sql = "UPDATE $TBL_DROPBOX_FILE SET session_id = $new_session_id WHERE c_id = $course_id AND id = $id";

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

                $key = $courseInfo['code'].'_'.$my_course['session_id'];

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

        $course_list = $course_list_registered;

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

                    $session_id = $course['id_session'];

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

                echo '<div id ="reponse_'.$unique_id.'"></div>';

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

                                $full_file_name = $course_dir.'/'.$doc_url;

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

                        $sql = "UPDATE $TBL_DROPBOX_FILE SET session_id = $new_session_id WHERE c_id = $course_id AND id = $id";

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

                    if (0 == $new_session_id) {

Missing function doc comment
Open

function get_courses_list_by_user_id_based_in_exercises($user_id)

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

                $my_course['real_id'] = $my_course['c_id'];

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

        echo "<h3>$name #$user_id </h3>  ";

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

                    $session_id = 0;

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

                        $sql = "UPDATE $TBL_DROPBOX_POST SET session_id = $new_session_id WHERE file_id = $id";

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

                        foreach ($result_message as $table => $times) {

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

    $user_id = intval($user_id);

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

    return $course_list;

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

                        WHERE user_id = $user_id AND session_id = $origin_session_id AND course = '$origin_course_code' AND c_id = $course_id";

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

                        WHERE user_id = $user_id AND session_id = $origin_session_id AND course = '$origin_course_code' AND c_id = $course_id";

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

                if ($update_database) {

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

function get_courses_list_by_user_id_based_in_exercises($user_id)

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

        foreach ($course_list_registered as $course_reg) {

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

                $my_course['real_id'] = $my_course['c_id'];

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

                $course_code = $course['code'];

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

                $combinations[$unique_id] = ['course_code' => $course_code, 'session_id' => $session_id];

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

$user_list = UserManager::get_user_list([], [], $begin, $default);

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

        $user_id = $user['user_id'];

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

                    $course_list_registered[] = $my_course;

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

                $combinations[$unique_id] = ['course_code' => $course_code, 'session_id' => $session_id];

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

if (!empty($user_list)) {

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

        $course_list_registered = CourseManager::get_courses_list_by_user_id(

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

        $new_course_list = [];

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

        $course_list = get_courses_list_by_user_id_based_in_exercises($user_id);

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

        if (is_array($course_list) && !empty($course_list)) {

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

            foreach ($course_list as $my_course) {

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

                $courseInfo = api_get_course_info_by_id($my_course['c_id']);

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

        if (!empty($course_list)) {

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

            foreach ($course_list as $course) {

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

                                    $result = copy($full_file_name, $new_file);

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

                                        $result_delete = Database::query($sql);

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

                        WHERE uploader_id = $user_id AND session_id = $origin_session_id AND c_id = $course_id";

Consider putting global function "get_courses_list_by_user_id_based_in_exercises" in a static class
Open

function get_courses_list_by_user_id_based_in_exercises($user_id)

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

            WHERE exe_user_id = $user_id

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

    $my_session_list[$session_data['id']] = $session_data['name'];

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

            $course_reg['code'] = $courseInfo['code'];

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

                $combinations[$unique_id] = ['course_code' => $course_code, 'session_id' => $session_id];

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

                                $new_file = $course_dir.'/'.$new_url;

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

                    if (0 == $origin_session_id) {

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

                $course_reg['session_id'] = 0;

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

            $courseInfo = api_get_course_info_by_id($course_reg['real_id']);

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

            $new_course_list[] = $course_reg['code'].'_'.$course_reg['session_id'];

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

                                $new_file = $course_dir.'/'.$new_url;

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

                                        unlink($full_file_name);

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

                $sql = "SELECT id FROM $TBL_DROPBOX_FILE

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

                        $sql = "UPDATE $TBL_DROPBOX_POST SET session_id = $new_session_id WHERE file_id = $id";

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

                        $result_message[$TBL_DROPBOX_FILE]++;

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

                        echo '<h4>'.get_lang('Destination session').' #'.$new_session_id.'</h4>';

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

        foreach ($course_list_registered as $course_reg) {

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

        foreach ($course_list_registered as &$course) {

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

            foreach ($course_list as $course) {

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

                echo '<select id="'.$unique_id.'" name="'.$unique_id.'" class="form-control">';

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

                                        $sql = "DELETE FROM $TBL_STUDENT_PUBLICATION WHERE id= ".$data['id'];

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

                        WHERE uploader_id = $user_id AND session_id = $origin_session_id AND c_id = $course_id";

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

                        WHERE user_id = $user_id AND session_id = $origin_session_id AND course = '$origin_course_code' AND c_id = $course_id";

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

                    compare_data($result_message);

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

    $user_id = intval($user_id);

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

    $course_list = [];

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

            $new_course_list[] = $course_reg['code'].'_'.$course_reg['session_id'];

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

        $course_list = get_courses_list_by_user_id_based_in_exercises($user_id);

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

                $unique_id = uniqid();

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

                                $user_id,

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

                    $sql = "SELECT * FROM $TBL_LP_VIEW WHERE user_id = $user_id AND session_id = $new_session_id AND c_id = $course_id";

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

                        $sql = "UPDATE $TBL_AGENDA SET session_id = $new_session_id WHERE c_id = $course_id AND id = $id ";

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

                                    WHERE id = $parent_id AND c_id = $course_id";

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

                            $course_dir = $sys_course_path.$course_info['path'];

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

                            $search_this = "folder_moved_from_session_id_$origin_session_id";

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

                                    WHERE description like '%$search_this%' AND url LIKE '%$search_this2%' AND session_id = $new_session_id AND c_id = $course_id

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

                                $new_result = Database::fetch_assoc($sub_res);

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

                                    $created_dir = create_unexisting_work_directory($base_work_dir, $dir_name);

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

                                        c_id = '$course_id',

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

                                $full_file_name = $course_dir.'/'.$doc_url;

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

                                $new_file = $course_dir.'/'.$new_url;

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

                    if ($update_database) {

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

                        $sql = "UPDATE $TBL_NOTEBOOK

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

foreach ($session_list as $session_data) {

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

foreach ($session_list as $session_data) {

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

    $my_session_list[$session_data['id']] = $session_data['name'];

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

    $my_session_list[$session_data['id']] = $session_data['name'];

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

    $options .= '<option value="'.$session_data['id'].'">'.$session_data['name'].'</option>';

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

                if (!in_array($key, $new_course_list)) {

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

                    $my_course['not_registered'] = 1;

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

                    $course_list_registered[] = $my_course;

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

                echo '<button type="submit" class="btn btn--success" onclick="view_stat(\''.$unique_id.'\', \''.$user_id.'\');"> '.get_lang('Compare stats').'</button>';

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

                echo '<button type="submit" class="btn btn--success" onclick="moveto(\''.$unique_id.'\', \''.$user_id.'\');"> '.get_lang('Move').'</button>';

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

                                WHERE c_id = $course_id AND notebook_id = $id";

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

                    if (is_array($result_message)) {

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

        $course_list = $course_list_registered;

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

                echo '<button type="submit" class="btn btn--success" onclick="moveto(\''.$unique_id.'\', \''.$user_id.'\');"> '.get_lang('Move').'</button>';

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

                                if (file_exists($full_file_name)) {

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

                        $result_message[$TBL_DROPBOX_FILE]++;

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

                        echo '<h4>'.get_lang('Original session').' #'.$origin_session_id.'</h4>';

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

        $course_list[] = $row;

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

    $options .= '<option value="'.$session_data['id'].'">'.$session_data['name'].'</option>';

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

            if (empty($course_reg['session_id'])) {

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

            $new_course_list[] = $course_reg['code'].'_'.$course_reg['session_id'];

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

        echo '<th style="text-align:left;" colspan="'.count($course_list).'">';

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

                                    $result = copy($full_file_name, $new_file);

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

                        WHERE user_id = $user_id AND session_id = $origin_session_id AND course = '$origin_course_code' AND c_id = $course_id";

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

                                SET session_id = $new_session_id

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

$session_list = SessionManager::get_sessions_list([], ['name']);

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

    foreach ($user_list as $user) {

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

            $user_id,

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

        if (is_array($course_list) && !empty($course_list)) {

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

                        WHERE uploader_id = $user_id AND session_id = $origin_session_id AND c_id = $course_id";

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

                    compare_data($result_message_compare);

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

if ($page < $nro_pages) {

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

                echo '<select id="'.$unique_id.'" name="'.$unique_id.'" class="form-control">';

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

                $sql = "SELECT notebook_id FROM $TBL_NOTEBOOK

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

    $TABLETRACK_EXERCICES = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES);

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

            FROM $TABLETRACK_EXERCICES

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

            foreach ($course_list as $my_course) {

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

                    echo '<b>'.get_lang('Session name').'</b> '.$my_session_list[$course['id_session']].'<br />';

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

                echo '<button type="submit" class="btn btn--success" onclick="view_stat(\''.$unique_id.'\', \''.$user_id.'\');"> '.get_lang('Compare stats').'</button>';

The variable $TABLETRACK_EXERCICES is not named in camelCase.
Open

function get_courses_list_by_user_id_based_in_exercises($user_id)
{
    $TABLETRACK_EXERCICES = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES);
    $user_id = intval($user_id);
    $sql = "SELECT DISTINCT exe_user_id, c_id, session_id
Severity: Minor
Found in public/main/admin/user_move_stats.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $result_message is not named in camelCase.
Open

function compare_data($result_message)
{
    foreach ($result_message as $table => $data) {
        $title = $table;
        if ('TRACK_E_EXERCISES' == $table) {
Severity: Minor
Found in public/main/admin/user_move_stats.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $user_id is not named in camelCase.
Open

function get_courses_list_by_user_id_based_in_exercises($user_id)
{
    $TABLETRACK_EXERCICES = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES);
    $user_id = intval($user_id);
    $sql = "SELECT DISTINCT exe_user_id, c_id, session_id
Severity: Minor
Found in public/main/admin/user_move_stats.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $course_list is not named in camelCase.
Open

function get_courses_list_by_user_id_based_in_exercises($user_id)
{
    $TABLETRACK_EXERCICES = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES);
    $user_id = intval($user_id);
    $sql = "SELECT DISTINCT exe_user_id, c_id, session_id
Severity: Minor
Found in public/main/admin/user_move_stats.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $course_list is not named in camelCase.
Open

function get_courses_list_by_user_id_based_in_exercises($user_id)
{
    $TABLETRACK_EXERCICES = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES);
    $user_id = intval($user_id);
    $sql = "SELECT DISTINCT exe_user_id, c_id, session_id
Severity: Minor
Found in public/main/admin/user_move_stats.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $user_id is not named in camelCase.
Open

function get_courses_list_by_user_id_based_in_exercises($user_id)
{
    $TABLETRACK_EXERCICES = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES);
    $user_id = intval($user_id);
    $sql = "SELECT DISTINCT exe_user_id, c_id, session_id
Severity: Minor
Found in public/main/admin/user_move_stats.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $TABLETRACK_EXERCICES is not named in camelCase.
Open

function get_courses_list_by_user_id_based_in_exercises($user_id)
{
    $TABLETRACK_EXERCICES = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES);
    $user_id = intval($user_id);
    $sql = "SELECT DISTINCT exe_user_id, c_id, session_id
Severity: Minor
Found in public/main/admin/user_move_stats.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $user_id is not named in camelCase.
Open

function get_courses_list_by_user_id_based_in_exercises($user_id)
{
    $TABLETRACK_EXERCICES = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES);
    $user_id = intval($user_id);
    $sql = "SELECT DISTINCT exe_user_id, c_id, session_id
Severity: Minor
Found in public/main/admin/user_move_stats.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

The variable $course_list is not named in camelCase.
Open

function get_courses_list_by_user_id_based_in_exercises($user_id)
{
    $TABLETRACK_EXERCICES = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES);
    $user_id = intval($user_id);
    $sql = "SELECT DISTINCT exe_user_id, c_id, session_id
Severity: Minor
Found in public/main/admin/user_move_stats.php by phpmd

CamelCaseVariableName

Since: 0.2

It is considered best practice to use the camelCase notation to name variables.

Example

class ClassName {
    public function doSomething() {
        $data_module = new DataModule();
    }
}

Source

There are no issues that match your filters.

Category
Status