chamilo/chamilo-lms

View on GitHub
public/main/survey/survey_list.php

Summary

Maintainability
A
0 mins
Test Coverage

The parameter $survey_id is not named in camelCase.
Open

function modify_filter($survey_id, $url_params, $row)
{
    return SurveyUtil::modify_filter($survey_id, $url_params, $row);
}
Severity: Minor
Found in public/main/survey/survey_list.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 $survey_id is not named in camelCase.
Open

function modify_filter_drh($survey_id)
{
    return SurveyUtil::modify_filter($survey_id, true);
}
Severity: Minor
Found in public/main/survey/survey_list.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 $survey_id is not named in camelCase.
Open

function modify_filter_for_coach($survey_id)
{
    return SurveyUtil::modify_filter_for_coach($survey_id);
}
Severity: Minor
Found in public/main/survey/survey_list.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 $number_of_items is not named in camelCase.
Open

function get_survey_data($from, $number_of_items, $column, $direction)
{
    return SurveyUtil::get_survey_data($from, $number_of_items, $column, $direction);
}
Severity: Minor
Found in public/main/survey/survey_list.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 $number_of_items is not named in camelCase.
Open

function get_survey_data_drh($from, $number_of_items, $column, $direction)
{
    return SurveyUtil::get_survey_data($from, $number_of_items, $column, $direction, true);
}
Severity: Minor
Found in public/main/survey/survey_list.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 $url_params is not named in camelCase.
Open

function modify_filter($survey_id, $url_params, $row)
{
    return SurveyUtil::modify_filter($survey_id, $url_params, $row);
}
Severity: Minor
Found in public/main/survey/survey_list.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 $number_of_items is not named in camelCase.
Open

function get_survey_data_for_coach($from, $number_of_items, $column, $direction)
{
    return SurveyUtil::get_survey_data_for_coach($from, $number_of_items, $column, $direction);
}
Severity: Minor
Found in public/main/survey/survey_list.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 "this_section" is not in valid camel caps format
Open

$this_section = SECTION_COURSES;

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

            $course_id = api_get_course_int_id();

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

$current_course_tool = TOOL_SURVEY;

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

    $tool_name = get_lang('Search a survey');

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

                        WHERE c_id = $course_id AND survey_id = $surveyId ";

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

                    LEFT JOIN $table_survey_question_option survey_question_option

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

$extend_rights_for_coachs = api_get_setting('extend_rights_for_coach_on_survey');

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

            $table_survey_question = Database::get_course_table(TABLE_SURVEY_QUESTION);

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

            $table_survey_question_option = Database::get_course_table(TABLE_SURVEY_QUESTION_OPTION);

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

            $table_survey_answer = Database::get_course_table(TABLE_SURVEY_ANSWER);

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

                $sql = "SELECT * FROM $table_survey_answer

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

                    $all_answers[$answers_of_user['user']][$answers_of_user['question_id']][] = $answers_of_user;

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

                    $all_answers[$answers_of_user['user']][$answers_of_user['question_id']][] = $answers_of_user;

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

if (api_is_session_general_coach() && 'false' === $extend_rights_for_coachs) {

Missing function doc comment
Open

function get_survey_data_drh($from, $number_of_items, $column, $direction)

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

function modify_filter($survey_id, $url_params, $row)

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

    return SurveyUtil::modify_filter($survey_id, $url_params, $row);

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

function modify_filter_for_coach($survey_id)

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

function get_survey_data_drh($from, $number_of_items, $column, $direction)

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

                    $userAnswers[$answers_of_user['user']][$surveyId][$answers_of_user['question_id']][] = $answers_of_user['option_id'];

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

                                    $finalAnswer = $all_answers[$userIdItem][$question['question_id']][0]['option_id'];

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

    return SurveyUtil::get_survey_data($from, $number_of_items, $column, $direction);

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

function modify_filter($survey_id, $url_params, $row)

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

function anonymous_filter($anonymous)

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

                $all_answers = [];

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

                    $userAnswers[$answers_of_user['user']][$surveyId][$answers_of_user['question_id']][] = $answers_of_user['option_id'];

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

            $options['where'] = [' usergroup.course_id = ? ' => $course_id];

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

Display::display_header($tool_name, 'Survey');

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

function modify_filter_drh($survey_id)

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

$tool_name = get_lang('Survey list');

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

                                if (isset($all_answers[$userIdItem][$question['question_id']])) {

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

function modify_filter($survey_id, $url_params, $row)

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

function modify_filter_for_coach($survey_id)

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

    return SurveyUtil::get_survey_data($from, $number_of_items, $column, $direction, true);

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

                            c_id = $course_id AND

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

function get_survey_data($from, $number_of_items, $column, $direction)

Missing function doc comment
Open

function get_survey_data_for_coach($from, $number_of_items, $column, $direction)

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

function get_survey_data_for_coach($from, $number_of_items, $column, $direction)

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

    return SurveyUtil::get_survey_data_for_coach($from, $number_of_items, $column, $direction);

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

                    FROM $table_survey_question survey_question

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

function get_number_of_surveys_for_coach()

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

    return SurveyUtil::modify_filter($survey_id, $url_params, $row);

Missing function doc comment
Open

function get_number_of_surveys_for_coach()

You must use "/**" style comments for a function comment
Open

function get_number_of_surveys()

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

function get_survey_data_for_coach($from, $number_of_items, $column, $direction)

Missing function doc comment
Open

function modify_filter_for_coach($survey_id)

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

                    $userAnswers[$answers_of_user['user']][$surveyId][$answers_of_user['question_id']][] = $answers_of_user['option_id'];

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

                    $all_answers[$answers_of_user['user']][$answers_of_user['question_id']][] = $answers_of_user;

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

if (!api_is_session_general_coach() || 'true' === $extend_rights_for_coachs) {

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

function get_number_of_surveys()

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

    return SurveyUtil::modify_filter($survey_id, true);

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

                while ($answers_of_user = Database::fetch_assoc($result)) {

Missing function doc comment
Open

function anonymous_filter($anonymous)

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

                    $all_answers[$answers_of_user['user']][$answers_of_user['question_id']][] = $answers_of_user;

Missing function doc comment
Open

function modify_filter($survey_id, $url_params, $row)

Missing function doc comment
Open

function get_survey_data($from, $number_of_items, $column, $direction)

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

function modify_filter_drh($survey_id)

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

function get_survey_data($from, $number_of_items, $column, $direction)

Missing function doc comment
Open

function modify_filter_drh($survey_id)

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

    return SurveyUtil::modify_filter_for_coach($survey_id);

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

function get_survey_data_drh($from, $number_of_items, $column, $direction)

The variable $url_params is not named in camelCase.
Open

function modify_filter($survey_id, $url_params, $row)
{
    return SurveyUtil::modify_filter($survey_id, $url_params, $row);
}
Severity: Minor
Found in public/main/survey/survey_list.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 $survey_id is not named in camelCase.
Open

function modify_filter($survey_id, $url_params, $row)
{
    return SurveyUtil::modify_filter($survey_id, $url_params, $row);
}
Severity: Minor
Found in public/main/survey/survey_list.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 $survey_id is not named in camelCase.
Open

function modify_filter_for_coach($survey_id)
{
    return SurveyUtil::modify_filter_for_coach($survey_id);
}
Severity: Minor
Found in public/main/survey/survey_list.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 $number_of_items is not named in camelCase.
Open

function get_survey_data_for_coach($from, $number_of_items, $column, $direction)
{
    return SurveyUtil::get_survey_data_for_coach($from, $number_of_items, $column, $direction);
}
Severity: Minor
Found in public/main/survey/survey_list.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 $survey_id is not named in camelCase.
Open

function modify_filter_drh($survey_id)
{
    return SurveyUtil::modify_filter($survey_id, true);
}
Severity: Minor
Found in public/main/survey/survey_list.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 $number_of_items is not named in camelCase.
Open

function get_survey_data($from, $number_of_items, $column, $direction)
{
    return SurveyUtil::get_survey_data($from, $number_of_items, $column, $direction);
}
Severity: Minor
Found in public/main/survey/survey_list.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 $number_of_items is not named in camelCase.
Open

function get_survey_data_drh($from, $number_of_items, $column, $direction)
{
    return SurveyUtil::get_survey_data($from, $number_of_items, $column, $direction, true);
}
Severity: Minor
Found in public/main/survey/survey_list.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