chamilo/chamilo-lms

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

Summary

Maintainability
A
0 mins
Test Coverage

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

$current_course_tool = TOOL_SURVEY;

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

        $survey_data = SurveyManager::get_survey($survey_id);

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

    $tool_name .= '...';

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

                             WHERE c_id = '.$course_id.' AND id = \''.Database::escape_string($_POST['group_id']).'\'');

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

if (!empty($survey_data['survey_version'])) {

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

            api_get_path(WEB_CODE_PATH).'survey/reporting.php?'.api_get_cidreq().'&survey_id='.$survey_id

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

        $urlQuestion.'&type=score&survey_id='.$survey_id

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_user" is not in valid camel caps format
Open

$table_user = Database::get_main_table(TABLE_MAIN_USER);

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

$is_survey_type_1 = 1 == $survey_data['survey_type'];

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

            Database::query('INSERT INTO '.$table_survey_question_group.' (c_id, title,description,survey_id) values ('.$course_id.', \''.Database::escape_string($_POST['name']).'\',\''.Database::escape_string($_POST['description']).'\',\''.$survey_id.'\') ');

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

$my_question_id_survey = isset($_GET['question_id']) ? (int) $_GET['question_id'] : null;

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

if (3 != $survey_data['survey_type']) {

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

        $urlQuestion.'&type=comment&survey_id='.$survey_id

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

            $urlQuestion.'&type=pagebreak&survey_id='.$survey_id

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

            survey_question.survey_id = $survey_id

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

    echo '<td>'.$tool_name.'</td>';

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

    echo '<b>'.get_lang('Version').': '.$survey_data['survey_version'].'</b>';

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

if (3 != $survey_data['survey_type']) {

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

        $tool_name = get_lang('UniqueSelect');

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 "is_survey_type_1" is not in valid camel caps format
Open

$is_survey_type_1 = 1 == $survey_data['survey_type'];

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

$survey_actions .= SurveyUtil::getAdditionalTeacherActions($survey_id, ICON_SIZE_MEDIUM);

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

echo Display::toolbarAction('survey', [$survey_actions]);

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

        $urlQuestion.'&type=percentage&survey_id='.$survey_id

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

        $tool_name = get_lang('Multiple choice, multiple answers');

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

    if (3 != $survey_data['survey_type']) {

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

        if ($question_counter < $question_counter_max) {

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

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

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

    if (-1 != $course_code) {

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

if ($is_survey_type_1 && ('addgroup' === $action || 'deletegroup' === $action)) {

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

                WHERE c_id = '.$course_id.' AND id = '.intval($_GET['gid']).' AND survey_id = '.$survey_id;

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

$my_survey_id_survey = (int) $_GET['survey_id'];

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

$survey_actions .= '<a href="'.api_get_path(WEB_CODE_PATH).'survey/survey_invite.php?'.api_get_cidreq().'&survey_id='.$survey_id.'">'.

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

            $urlQuestion.'&type=selectivedisplay&survey_id='.$survey_id

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

        LEFT JOIN $table_survey_question_option survey_question_option

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

                api_get_cidreq().'&action=moveup&survey_id='.$survey_id.'&question_id='.$questionId.'">'.

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

    $course_code = api_get_course_id();

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

$tool_name = strip_tags($survey_data['title'], '<span>');

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

            Database::query('UPDATE '.$table_survey_question_group.' SET description = \''.Database::escape_string($_POST['description']).'\'

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

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

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

        if ($question_counter < $question_counter_max) {

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

$tool_name = strip_tags($survey_data['title'], '<span>');

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

if (api_strlen(strip_tags($survey_data['title'])) > 40) {

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

            Database::query('INSERT INTO '.$table_survey_question_group.' (c_id, title,description,survey_id) values ('.$course_id.', \''.Database::escape_string($_POST['name']).'\',\''.Database::escape_string($_POST['description']).'\',\''.$survey_id.'\') ');

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

                $my_survey_id_survey

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

        ).'&action=edit&survey_id='.$survey_id.'">'.

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

if (0 == $survey_data['survey_type']) {

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

        $urlQuestion.'&type=multiplechoiceother&survey_id='.$survey_id

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

        $tool_name = get_lang('Selective display');

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

                $my_question_id_survey,

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

        $urlQuestion.'&type=multiplechoice&survey_id='.$survey_id

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

        $urlQuestion.'&type=dropdown&survey_id='.$survey_id

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

            $urlQuestion.'&type=personality&survey_id='.$survey_id

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

    api_location(api_get_path(WEB_CODE_PATH).'survey/survey.php?survey_id='.$survey_id.'&'.api_get_cidreq());

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

    api_location(api_get_path(WEB_CODE_PATH).'survey/survey.php?survey_id='.$survey_id.'&'.api_get_cidreq());

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

$survey_actions .= SurveyUtil::getAdditionalTeacherActions($survey_id, ICON_SIZE_MEDIUM);

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

    if (3 != $survey_data['survey_type']) {

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

        $survey_data = SurveyManager::get_survey($survey_id);

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

$survey_actions .= '<a

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

    $survey_actions .= '<a href="'.api_get_path(WEB_CODE_PATH).'survey/preview.php?'.api_get_cidreq().'&survey_id='.$survey_id.'">'.

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

        $urlQuestion.'&type=multipleresponse&survey_id='.$survey_id

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

$question_counter = 1;

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

$question_counter_max = Database::num_rows($result);

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

        if ($question_counter > 1) {

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

$table_survey = Database::get_course_table(TABLE_SURVEY);

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

$table_course = Database::get_main_table(TABLE_MAIN_COURSE);

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

                WHERE c_id = '.$course_id.' AND id = '.intval($_GET['gid']).' AND survey_id = '.$survey_id;

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

$survey_actions = '';

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

        FROM $table_survey_question survey_question

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

    echo '    <td>'.$question_counter.'</td>';

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

        api_get_cidreq().'&action=delete&survey_id='.$survey_id.'&question_id='.$questionId.'"

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_question_group" is not in valid camel caps format
Open

        $sql = 'DELETE FROM '.$table_survey_question_group.'

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

            $result = SurveyManager::deleteQuestion($my_question_id_survey);

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

    $survey_actions = '<a href="'.api_get_path(WEB_CODE_PATH).'survey/create_new_survey.php?'.api_get_cidreq(

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

        $survey_actions .= Display::url(

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

        $urlQuestion.'&type=open&survey_id='.$survey_id

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

$survey_id = (int) $_GET['survey_id'];

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

            Database::query('INSERT INTO '.$table_survey_question_group.' (c_id, title,description,survey_id) values ('.$course_id.', \''.Database::escape_string($_POST['name']).'\',\''.Database::escape_string($_POST['description']).'\',\''.$survey_id.'\') ');

Multi-line function call not indented correctly; expected 4 spaces but found 8
Open

        ).'&action=edit&survey_id='.$survey_id.'">'.

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

$survey_actions .= '<a href="'.api_get_path(WEB_CODE_PATH).'survey/survey_invite.php?'.api_get_cidreq().'&survey_id='.$survey_id.'">'.

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

        $urlQuestion.'&type=yesno&survey_id='.$survey_id

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

    if (3 != $survey_data['survey_type']) {

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

            'survey/question.php?'.api_get_cidreq().'&action=edit&type='.$row['type'].'&survey_id='.$survey_id.'&question_id='.$questionId.'">'.

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

$table_survey_question_group = Database::get_course_table(TABLE_SURVEY_QUESTION_GROUP);

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

if (3 != $survey_data['survey_type']) {

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

    $survey_actions .= '<a href="'.api_get_path(WEB_CODE_PATH).'survey/preview.php?'.api_get_cidreq().'&survey_id='.$survey_id.'">'.

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

    if (0 == $survey_data['one_question_per_page']) {

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

if ($is_survey_type_1) {

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

        $tool_name = get_lang('Yes / No');

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

    if (3 != $survey_data['survey_type']) {

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

    href="'.api_get_path(WEB_CODE_PATH).'survey/survey_list.php?'.api_get_cidreq().'&action=delete&survey_id='.$survey_id.'" onclick="javascript:if(!confirm(\''.addslashes(api_htmlentities(get_lang('Delete survey').'?', ENT_QUOTES)).'\')) return false;">'.

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

        $tool_name = get_lang(api_ucfirst(Security::remove_XSS($row['type'])));

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

        api_get_cidreq().'&action=copyquestion&type='.$row['type'].'&survey_id='.$survey_id.'&question_id='.$questionId.'">'.

Add a single space after each comma delimiter
Open

            echo Display::getMdiIcon(ActionIcon::DOWN, 'ch-tool-icon-disabled', null, ICON_SIZE_SMALL,'&nbsp;');

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

                c_id = '.$course_id.' AND

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

                survey_id = '.intval($survey_id).'

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

        '<a href="'.api_get_path(WEB_CODE_PATH).'survey/survey.php?survey_id='.$survey_id.'&gid='.$row['id'].'&action=editgroup">'.

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

    $question_counter++;

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

                'survey/survey.php?'.api_get_cidreq().'&action=movedown&survey_id='.$survey_id.'&question_id='.$questionId.'">'.

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

                onclick="window.location.href = \'survey.php?survey_id='.Security::remove_XSS($survey_id).'\';" />';

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

        action="'.api_get_path(WEB_CODE_PATH).'survey/survey.php?action=addgroup&survey_id='.$survey_id.'" method="post">';

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

            FROM '.$table_survey_question_group.'

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

            href="'.api_get_path(WEB_CODE_PATH).'survey/survey.php?survey_id='.$survey_id.'&gid='.$row['id'].'&action=deletegroup"

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

if ($is_survey_type_1) {

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

        $sql = 'SELECT title, description FROM '.$table_survey_question_group.'

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

                WHERE id = '.intval($_GET['gid']).' AND survey_id = '.$survey_id.'

Multi-line function call not indented correctly; expected 4 spaces but found 8
Open

        ).'&action=edit&survey_id='.$survey_id.'">'.

No space found after comma in function call
Open

            echo Display::getMdiIcon(ActionIcon::DOWN, 'ch-tool-icon-disabled', null, ICON_SIZE_SMALL,'&nbsp;');

There are no issues that match your filters.

Category
Status