chamilo/chamilo-lms

View on GitHub
public/main/exercise/exercise_show.php

Summary

Maintainability
A
0 mins
Test Coverage

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

$lp_item_view_id = $track_exercise_info['orig_lp_item_view_id'];

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

            $show_results = false;

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

$user_info = api_get_user_info($student_id);

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

            $questionScore = $question_result['score'];

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

    if (!isset($category_list['none']['total'])) {

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

$current_course_tool = TOOL_QUIZ;

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

$track_exercise_info = ExerciseLib::get_exercise_track_exercise_info($id);

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

$learnpath_item_id = $track_exercise_info['orig_lp_item_id'];

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

$locked = api_resource_is_locked_by_gradebook($exercise_id, LINK_EXERCISE);

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

    $show_results = false;

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

$user_restriction = $is_allowedToEdit ? '' : " AND user_id= $student_id ";

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

                $show_results,

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

$student_id = $track_exercise_info['exe_user_id'];

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

    if ($student_id != $currentUserId) {

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

                $show_results = true;

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

    $show_results = false;

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

$question_list_from_database = [];

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

        $questionList = $temp_question_list;

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

    if ($show_results && HOT_SPOT != $answerType) {

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

            $category_list[$objQuestionTmp->category]['total'] = 0;

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

            $category_list[$category_id]['score'] += $my_total_score;

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

    $objExercise->read($exercise_id);

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

if (!$is_allowedToEdit) {

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

    $result_disabled = $track_exercise_info['results_disabled'];

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

                RESULT_DISABLE_SHOW_SCORE_ATTEMPT_SHOW_ANSWERS_LAST_ATTEMPT_NO_FEEDBACK == $result_disabled

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

$user_info = api_get_user_info($student_id);

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

$user_restriction = $is_allowedToEdit ? '' : " AND user_id= $student_id ";

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

        INNER JOIN $TBL_TRACK_EXERCISES AS stats_exercises

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

            attempts.exe_id = $id $user_restriction

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

                $show_results,

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

            $category_list[$category_id]['total'] += $my_total_weight;

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

    if (0 == $objExercise->selectPropagateNeg() && $my_total_score < 0) {

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

$TBL_EXERCISE_QUESTION = Database::get_course_table(TABLE_QUIZ_TEST_QUESTION);

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

    $result_disabled = $track_exercise_info['results_disabled'];

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

            $show_results = false;

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

            $question_result = $objExercise->manage_answer(

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

            $totalScore += $question_result['score'];

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

            if ($show_results || $showTotalScoreAndUserChoicesInLastAttempt) {

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

            $questionScore = $question_result['score'];

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

            $feedback_form->setDefaults($default);

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

    $category_was_added_for_this_test = false;

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

        $category_list[$objQuestionTmp->category]['total'] += $my_total_weight;

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

        $category_list[$objQuestionTmp->category]['total'] += $my_total_weight;

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

        INNER JOIN $TBL_QUESTIONS AS questions

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

if (!empty($track_exercise_info['data_tracking'])) {

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

            $totalScore += $question_result['score'];

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

            $totalScore += $question_result['score'];

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

    if ($show_results) {

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

        if ($is_allowedToEdit && $isFeedbackAllowed && 'export' != $action) {

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

    if (isset($objQuestionTmp->category_list) && !empty($objQuestionTmp->category_list)) {

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

        foreach ($objQuestionTmp->category_list as $category_id) {

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

            $category_list[$category_id]['total'] += $my_total_weight;

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

$learnpath_id = $track_exercise_info['orig_lp_id'];

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

            if ($numberAttempts >= $track_exercise_info['max_attempt']) {

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

                $show_results = true;

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

    $question_list_from_database[] = $row['question_id'];

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

$exercise_id = $track_exercise_info['iid'];

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

    $temp_question_list = explode(',', $track_exercise_info['data_tracking']);

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

            if ($show_results || $showTotalScoreAndUserChoicesInLastAttempt) {

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

            $renderer = &$feedback_form->defaultRenderer();

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

if (RESULT_DISABLE_RADAR === (int) $objExercise->results_disabled) {

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

        $category_list[$objQuestionTmp->category]['score'] += $my_total_score;

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

            $category_was_added_for_this_test = true;

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

$show_only_total_score = false;

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

                $show_results,

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

                $show_results,

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

    $my_total_score = $questionScore;

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

$TBL_QUESTIONS = Database::get_course_table(TABLE_QUIZ_QUESTION);

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

$TBL_TRACK_EXERCISES = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES);

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

    if (!$is_allowedToEdit) {

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

$show_results = true;

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

            if ($is_allowedToEdit &&

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

        $user_info,

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

            $questionScore = $question_result['score'];

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

            $question_result = $objExercise->manage_answer(

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

            $questionScore = $question_result['score'];

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

            if ($show_results) {

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

                $url_name = get_lang('Edit individual feedback and grade the open question');

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

        if (!isset($category_list[$objQuestionTmp->category]['total'])) {

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

            $category_list[$category_id]['score'] += $my_total_score;

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

$exercise_id = $track_exercise_info['iid'];

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

$learnpath_id = $track_exercise_info['orig_lp_id'];

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

$learnpath_item_id = $track_exercise_info['orig_lp_item_id'];

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

    if (UserManager::userIsBossOfStudent($currentUserId, $student_id)) {

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

$is_allowedToEdit =

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

if (api_is_excluded_user_type(true, $student_id)) {

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

if (!empty($track_exercise_info)) {

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

    $temp_question_list = explode(',', $track_exercise_info['data_tracking']);

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

$category_list = [];

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

        if ($is_allowedToEdit && false == $locked && !api_is_drh() && $isCoachAllowedToEdit) {

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

                    $url_name = get_lang('Edit individual feedback');

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

                $feedback_form->addHtmlEditor(

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

        $category_list[$objQuestionTmp->category]['score'] += $my_total_score;

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

        foreach ($objQuestionTmp->category_list as $category_id) {

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

    if (false == $category_was_added_for_this_test) {

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

        $category_list['none']['total'] += $my_total_weight;

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

if (empty($track_exercise_info)) {

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

    'url' => 'overview.php?exerciseId='.$exercise_id.'&'.api_get_cidreq(),

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

$user_restriction = $is_allowedToEdit ? '' : " AND user_id= $student_id ";

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

        $questionList = $question_list_from_database;

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

$exercise_content = '';

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

                $show_results,

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

                $url_name,

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

        $category_list['none']['score'] = 0;

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

        $category_list['none']['score'] += $my_total_score;

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

    switch ($result_disabled) {

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

                $show_only_total_score = true;

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

        INNER JOIN $TBL_EXERCISE_QUESTION AS quizz_rel_questions

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

    if (!empty($temp_question_list)) {

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

            $feedback_form = new FormValidator('frmcomments'.$questionId);

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

        if (!isset($category_list[$objQuestionTmp->category]['score'])) {

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

            $category_list[$category_id]['score'] += $my_total_score;

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

$student_id = $track_exercise_info['exe_user_id'];

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

                if ($currentUserId == $student_id) {

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

                $track_exercise_info['orig_lp_id'],

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

                $show_only_total_score = true;

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

if ($is_allowedToEdit && in_array($action, ['qualify', 'edit', 'export'])) {

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

    $show_results = true;

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

    $questionList = $question_list_from_database;

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

$total_weighting = 0;

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

            echo $objExercise->getDelineationResult($objQuestionTmp, $questionId, $show_results, $question_result);

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

            $question_result = $objExercise->manage_answer(

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

            $feedback_form->display();

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

        $category_list['none']['score'] += $my_total_score;

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

$this_section = SECTION_COURSES;

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

            $show_only_total_score = true;

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

if ($show_results || $show_only_total_score || $showTotalScoreAndUserChoicesInLastAttempt) {

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

if ($show_results || $show_only_total_score || $showTotalScoreAndUserChoicesInLastAttempt) {

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

        $total_weighting += $objQuestionTmp->selectWeighting();

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

            echo $objExercise->getDelineationResult($objQuestionTmp, $questionId, $show_results, $question_result);

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

                echo ExerciseLib::getOralFeedbackForm($id, $questionId, $exercise_id);

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

$lp_item_view_id = $track_exercise_info['orig_lp_item_view_id'];

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

$feedback_type = $objExercise->getFeedbackType();

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

        FROM $TBL_TRACK_ATTEMPT as attempts

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

                $url_name = get_lang('Add individual feedback');

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

                $feedback_form->addElement('textarea', $textareaId, ['id' => $textareaId]);

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

            $category_list[$objQuestionTmp->category]['score'] = 0;

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

    if (isset($objQuestionTmp->category_list) && !empty($objQuestionTmp->category_list)) {

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

            $category_list[$category_id]['total'] += $my_total_weight;

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

        $category_list['none']['total'] = 0;

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

if (!empty($sessionId) && !$is_allowedToEdit) {

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

                $track_exercise_info['orig_lp_item_id'],

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

        $track_exercise_info,

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

            $question_result = $objExercise->manage_answer(

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

            $totalScore += $question_result['score'];

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

    $my_total_weight = $questionWeighting;

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

        $category_was_added_for_this_test = true;

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

    if (!isset($category_list['none']['score'])) {

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

        $category_list['none']['total'] += $my_total_weight;

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

    if ($show_results || $show_only_total_score || $showTotalScoreAndUserChoicesInLastAttempt) {

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

    $track_exercise_info['results_disabled'],

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

    if (empty($track_exercise_info['orig_lp_id']) || empty($track_exercise_info['orig_lp_item_id'])) {

Closing brace indented incorrectly; expected 0 spaces, found 4
Open

    }

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

        $scorePassed = ExerciseLib::scorePassed($my_total_score, $my_total_weight);

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

$end_of_message = $objExercise->getFinishText($totalScore, $totalWeighting);

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

    if (RESULT_DISABLE_NO_SCORE_AND_EXPECTED_ANSWERS != $objExercise->results_disabled) {

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

        $track_exercise_info['title'],

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

            'fb_type' => $feedback_type,

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

        $score['weight'] = $my_total_weight;

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

    if ($show_results || $show_only_total_score || $showTotalScoreAndUserChoicesInLastAttempt) {

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

    echo TestCategory::get_stats_table_by_attempt($objExercise, $category_list);

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

            .$track_exercise_info['orig_lp_item_id'].'&lp_id='.$track_exercise_info['orig_lp_id'].'&'.api_get_cidreq()

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

        $href = 'fullscreen' == $lp_mode

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

        $my_total_score = 0;

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

        $score['score'] = $my_total_score;

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

        if (isset($question_result['user_answered'])) {

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

    ($show_results || $show_only_total_score || $showTotalScoreAndUserChoicesInLastAttempt)

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

            .$track_exercise_info['orig_lp_item_id'].'&lp_id='.$track_exercise_info['orig_lp_id'].'&'.api_get_cidreq()

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

    if ($show_results) {

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

    $exercise_content .= Display::panel($questionContent);

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

    echo Display::return_message($end_of_message, 'normal', false);

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

            'score' => $my_total_score,

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

    ($show_results || $show_only_total_score || $showTotalScoreAndUserChoicesInLastAttempt)

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

    if (empty($track_exercise_info['orig_lp_id']) || empty($track_exercise_info['orig_lp_item_id'])) {

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

    if ($show_results && $objQuestionTmp) {

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

        $emailForm->addHidden('my_exe_exo_id', $exercise_id);

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

        $exercise_id,

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

        $scorePassed = ExerciseLib::scorePassed($my_total_score, $my_total_weight);

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

            $score['user_answered'] = $question_result['user_answered'];

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

if (!empty($end_of_message) && ('learnpath' === $origin)) {

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

echo $exercise_content;

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

        $emailForm->addHidden('lp_item_id', $learnpath_id);

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

            'exerciseId' => $exercise_id,

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

        $url = api_get_path(WEB_CODE_PATH).'exercise/result.php?id='.$track_exercise_info['exe_id'].'&'.api_get_cidreq()

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

            $my_total_score,

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

        $emailForm->addHidden('lp_item_view_id', $lp_item_view_id);

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

        $track_exercise_info['exe_id'],

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

            'exerciseId' => $exercise_id,

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

        $student_id,

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

if ($show_results) {

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

if (!empty($category_list) &&

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

        $student_id,

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

        $lp_mode = Session::read('lp_mode');

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

            $my_total_weight,

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

            $user_info['complete_name'].' '.

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

        $emailForm->addHidden('student_id', $student_id);

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

            'lp_id' => $learnpath_id,

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

    $category_list['total'] = [

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

            'lp_item_id' => $learnpath_item_id,

Line indented incorrectly; expected 0 spaces, found 4
Open

    }

Closing brace indented incorrectly; expected 0 spaces, found 4
Open

    }

There are no issues that match your filters.

Category
Status