chamilo/chamilo-lms

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

Summary

Maintainability
A
0 mins
Test Coverage

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

$current_question = $currentQuestionFromUrl = isset($_REQUEST['num']) ? (int) $_REQUEST['num'] : null;

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

Session::write('duration_time_previous', [$current_expired_time_key => $current_timestamp]);

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

        [$current_expired_time_key => $durationTime[$current_expired_time_key]]

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

        sprintf(get_lang('You cannot take test <b>%s</b> because you have already reached the maximum of %s attempts.'), $exercise_title, $objExercise->selectAttempts()),

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

        $extraParams = "&learnpath_id=$learnpath_id&learnpath_item_id=$learnpath_item_id&learnpath_item_view_id=$learnpath_item_view_id";

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

    $learnpath_id,

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

$this_section = SECTION_COURSES;

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

$learnpath_item_id = isset($_REQUEST['learnpath_item_id']) ? (int) $_REQUEST['learnpath_item_id'] : 0;

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

    'action' => $learnpath_id,

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

Session::write('duration_time_previous', [$current_expired_time_key => $current_timestamp]);

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

                                    $question_info->question,

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

        echo $attempt_html;

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

        $clock_expired_time = api_get_utc_datetime($expected_time, false, true);

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

$current_course_tool = TOOL_QUIZ;

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

    $total_seconds = $objExercise->expired_time * 60;

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

$show_clock = true;

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

        (int) $learnpath_item_view_id

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

                    $user_id,

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

                if (!empty($exercise_stat_info)) {

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

                    $attempt_html .= $messageReachedMax;

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

            error_log('5.1. $current_timestamp '.$current_timestamp);

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

Session::write('duration_time', [$current_expired_time_key => $current_timestamp]);

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

                        $user_id,

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

                            foreach ($questions as $question_data) {

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

                                $question_id = $question_data['question_id'];

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

$current_timestamp = time();

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

$time_control = false;

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

                        get_lang('Date').': '.api_get_local_time($last_attempt_info['exe_date']),

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

    $total_weight = 0;

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

    if ($time_control) {

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

            error_log('5.3. $expected_time '.$clock_expired_time);

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

$learnpath_id = isset($_REQUEST['learnpath_id']) ? (int) $_REQUEST['learnpath_id'] : 0;

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

$remind_question_id = isset($_REQUEST['remind_question_id']) ? (int) $_REQUEST['remind_question_id'] : 0;

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

        $extraParams = "&learnpath_id=$learnpath_id&learnpath_item_id=$learnpath_item_id&learnpath_item_view_id=$learnpath_item_view_id";

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

        [$current_expired_time_key => $durationTime[$current_expired_time_key]]

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

                    $last_attempt_info = $exercise_stat_info[$max_exe_id];

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

                        $last_attempt_info['max_score']

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

                    $attempt_html .= $messageReachedMax;

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

    $learnpath_id,

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

if (empty($exercise_stat_info)) {

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

$learnpath_item_view_id = isset($_REQUEST['learnpath_item_view_id']) ? (int) $_REQUEST['learnpath_item_view_id'] : 0;

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

    $attempt_html = '';

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

        (int) $learnpath_id,

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

                    $max_exe_id = max(array_keys($exercise_stat_info));

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

                        foreach ($last_attempt_info['question_list'] as $questions) {

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

                                $question_info = Question::read($question_id);

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

                $attempt_html .= $messageReachedMax;

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

    if (-1 == $remind_question_id) {

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

$current_expired_time_key = ExerciseLib::get_time_control_key(

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

$user_id = api_get_user_id();

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

    $attempt_count = Event::get_attempt_count(

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

            if (0 == $objExercise->results_disabled && !in_array($origin, ['learnpath', 'embeddable'])) {

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

$exercise_attempt_table = Database::get_main_table(TABLE_STATISTIC_TRACK_E_ATTEMPT);

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

        (!$objExercise->selectStatus() && !$is_allowedToEdit && !in_array($origin, ['learnpath', 'embeddable']))

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

        $show_clock = false;

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

                    $last_attempt_info = $exercise_stat_info[$max_exe_id];

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

                                $question_id = $question_data['question_id'];

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

    foreach ($questionListUncompressed as $question_id) {

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

$template->assign('shuffle_answers', $objExercise->random_answers);

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

                                $attempt_html .= Display::div(

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

                        $last_attempt_info['score'],

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

    $learnpath_item_view_id

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

$is_allowedToEdit = api_is_allowed_to_edit(null, true);

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

$exercise_sound = $objExercise->getSound();

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

    $learnpath_item_id

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

                    if (!empty($last_attempt_info['question_list'])) {

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

                                $attempt_html .= Display::div(

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

$clock_expired_time = null;

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

    'action_details' => $learnpath_id,

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

            $attempt_html .= $messageReachedMax;

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

$exercise_stat_info = $objExercise->get_stat_track_exercise_info(

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

    $learnpath_item_id,

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

Session::write('duration_time', [$current_expired_time_key => $current_timestamp]);

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

        $user_id,

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

        (int) $learnpath_item_id,

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

                $exercise_stat_info = Event::getExerciseResultsByUser(

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

                    $last_attempt_info = $exercise_stat_info[$max_exe_id];

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

                                $question_info = Question::read($question_id);

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

                    $attempt_html .= Display::div(

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

        $objQuestionTmp = Question::read($question_id);

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

        $clock_expired_time = api_get_utc_datetime($expected_time, false, true);

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

$exercise_title = $objExercise->selectTitle();

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

if ($objExercise->review_answers) {

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

    if ($attempt_count >= $objExercise->selectAttempts()) {

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

                    $attempt_html .= Display::div(

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

        $expected_time = $current_timestamp + $total_seconds;

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

        $extraParams = "&learnpath_id=$learnpath_id&learnpath_item_id=$learnpath_item_id&learnpath_item_view_id=$learnpath_item_view_id";

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

if (0 != $objExercise->expired_time) {

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

    $time_control = true;

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

if (!empty($durationTime) && isset($durationTime[$current_expired_time_key])) {

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

if ($time_control) {

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

    $total_seconds = $objExercise->expired_time * 60;

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

                    $max_exe_id = max(array_keys($exercise_stat_info));

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

                                $marks = $question_data['marks'];

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

        $total_weight += (float) $objQuestionTmp->weighting;

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

        $expected_time = $current_timestamp + $total_seconds;

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

        $expected_time = $current_timestamp + $total_seconds;

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

            error_log('5.2. $expected_time '.$expected_time);

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

    if (!isset($_SESSION['expired_time'][$current_expired_time_key])) {

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

            $expected_time = $current_timestamp + $new_expired_time_in_seconds;

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

                error_log('7.8. $expected_time1: '.$expected_time);

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

        $clock_expired_time = $_SESSION['expired_time'][$current_expired_time_key];

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

                    $nro_question = $current_question; // - 1;

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

                    $attempt_count = Event::get_attempt_count(

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

                header('Location: exercise_result.php?'.api_get_cidreq()."&exe_id=$exe_id&learnpath_id=$learnpath_id&learnpath_item_id=$learnpath_item_id&learnpath_item_view_id=$learnpath_item_view_id");

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

                        (int) $learnpath_item_view_id

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

    $exe_id = $objExercise->save_stat_track_exercise_info(

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

        $learnpath_item_view_id,

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

        $learnpath_item_id,

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

$saveDurationUrl = api_get_path(WEB_AJAX_PATH).'exercise.ajax.php?a=update_duration&exe_id='.$exe_id.'&'.api_get_cidreq();

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

$params = "exe_id=$exe_id&exerciseId=$exerciseId&learnpath_id=$learnpath_id&learnpath_item_id=$learnpath_item_id&learnpath_item_view_id=$learnpath_item_view_id&".api_get_cidreq().'&reminder='.$reminder;

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

            $_SESSION['expired_time'][$current_expired_time_key]

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

                        (int) $learnpath_item_view_id

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

                header('Location: exercise_result.php?'.api_get_cidreq()."&exe_id=$exe_id&learnpath_id=$learnpath_id&learnpath_item_id=$learnpath_item_id&learnpath_item_view_id=$learnpath_item_view_id");

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

if (0 != $question_count) {

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

        $_SESSION['expired_time'][$current_expired_time_key] = $clock_expired_time;

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

        $_SESSION['expired_time'][$current_expired_time_key] = $clock_expired_time;

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

        $learnpath_id,

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

        $learnpath_item_view_id

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

$time_left = api_strtotime($clock_expired_time, 'UTC') - time();

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

    if ($objExercise->review_answers && isset($_GET['category_id'])) {

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

                    $nro_question = $current_question; // - 1;

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

                            $exe_id,

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

            $exe_id

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

        isset($exercise_stat_info) &&

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

if (!empty($exercise_stat_info['questions_to_check'])) {

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

            $expired_time_of_this_attempt = $exercise_stat_info['expired_time_control'];

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

                $diff = $current_timestamp - api_strtotime($exercise_stat_info['start_date'], 'UTC');

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

                $last_attempt_date = api_get_utc_datetime(

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

            $new_expired_time_in_seconds = api_strtotime($expired_time_of_this_attempt, 'UTC') - api_strtotime($last_attempt_date, 'UTC');

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

if ($current_question > $question_count) {

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

        $hotspot_id = (int) $_REQUEST['hidden_hotspot_id'];

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

if (null === $current_question) {

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

        $current_question = $objExercise->getPositionInCompressedQuestionList($latestQuestionId);

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

                        (int) $learnpath_item_id,

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

            if ($current_question == $i) {

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

                '5.4. Setting the $_SESSION[expired_time]: '.$_SESSION['expired_time'][$current_expired_time_key]

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

    $exe_id = $exercise_stat_info['exe_id'];

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

            !empty($exercise_stat_info['data_tracking'])

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

            $expired_time_of_this_attempt = $exercise_stat_info['expired_time_control'];

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

            $last_attempt_date = Event::getLastAttemptDateOfExercise($exercise_stat_info['exe_id']);

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

            $expected_time = $current_timestamp + $new_expired_time_in_seconds;

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

            $_SESSION['expired_time'][$current_expired_time_key] = $clock_expired_time;

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

            $_SESSION['expired_time'][$current_expired_time_key] = $clock_expired_time;

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

if ($time_control) {

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

                if ((int) $current_question + 1 === count($questionList)) {

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

            $params.'&num='.$current_question.'&category_id='.$isLastQuestionInCategory;

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

                        (int) $learnpath_item_id,

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

$show_quiz_edition = $objExercise->added_in_lp();

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

$params = "exe_id=$exe_id&exerciseId=$exerciseId&learnpath_id=$learnpath_id&learnpath_item_id=$learnpath_item_id&learnpath_item_view_id=$learnpath_item_view_id&".api_get_cidreq().'&reminder='.$reminder;

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

            $clock_expired_time = api_get_utc_datetime($expected_time);

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

    if ($objExercise->isRandom() && !empty($exercise_stat_info['data_tracking'])) {

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

    if (!empty($currentAttempt) && isset($currentAttempt[$exe_id]) &&

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

        $answeredQuestions = array_keys($currentAttempt[$exe_id]['question_list']);

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

$question_count = 0;

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

                            $user_id, $objExercise, $exe_id

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

        $total_weight

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

                error_log('7.5 $expired_time_of_this_attempt: '.$expired_time_of_this_attempt);

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

                    if (false === $objExercise->review_answers) {

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

if ($current_question > $question_count) {

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

                header('Location: exercise_result.php?'.api_get_cidreq()."&exe_id=$exe_id&learnpath_id=$learnpath_id&learnpath_item_id=$learnpath_item_id&learnpath_item_view_id=$learnpath_item_view_id");

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

    $current_question = 1;

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

                        ."&exe_id=$exe_id&learnpath_id=$learnpath_id&learnpath_item_id="

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

                "exercise/exercise_submit.php?$params&num=$nextQuestion&remind_question_id=$remind_question_id";

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

        $learnpath_id,

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

        $resolvedQuestions = Event::getAllExerciseEventByExeId($exe_id);

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

Session::write('exe_id', $exe_id);

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

            $expected_time = $current_timestamp + $new_expired_time_in_seconds;

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

        $questionList = explode(',', $exercise_stat_info['data_tracking']);

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

        isset($currentAttempt[$exe_id]['question_list'])

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

    if (isset($exercise_stat_info['blocked_categories']) && !empty($exercise_stat_info['blocked_categories'])) {

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

        $choice = [$hotspot_id => ''];

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

                header('Location: exercise_result.php?'.api_get_cidreq()."&exe_id=$exe_id&learnpath_id=$learnpath_id&learnpath_item_id=$learnpath_item_id&learnpath_item_view_id=$learnpath_item_view_id");

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

    if (false == $show_quiz_edition) {

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

        $clock_expired_time,

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

ExerciseLib::create_chat_exercise_session($exe_id);

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

            if (empty($last_attempt_date)) {

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

        $blockedCategories = explode(',', $exercise_stat_info['blocked_categories']);

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

    $question_count = count($questionList);

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

                        (int) $learnpath_id,

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

                header('Location: exercise_result.php?'.api_get_cidreq()."&exe_id=$exe_id&learnpath_id=$learnpath_id&learnpath_item_id=$learnpath_item_id&learnpath_item_view_id=$learnpath_item_view_id");

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

        $current_question > $question_count

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

        $learnpath_item_id,

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

    $exe_id = $exercise_stat_info['exe_id'];

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

        $questionList = explode(',', $exercise_stat_info['data_tracking']);

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

                $last_attempt_date = api_get_utc_datetime(api_strtotime($last_attempt_date, 'UTC') + $diff);

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

            $sql = "UPDATE $exercise_attempt_table SET

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

$time_left = api_strtotime($clock_expired_time, 'UTC') - time();

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

    if (ALL_ON_ONE_PAGE == $objExercise->type || $current_question >= $question_count) {

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

                    if ($attempt_count >= $objExercise->selectAttempts()) {

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

                header('Location: exercise_result.php?'.api_get_cidreq()."&exe_id=$exe_id&learnpath_id=$learnpath_id&learnpath_item_id=$learnpath_item_id&learnpath_item_view_id=$learnpath_item_view_id");

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

    $current_question++;

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

                            sprintf(get_lang('You cannot take test <b>%s</b> because you have already reached the maximum of %s attempts.'), $exercise_title, $objExercise->selectAttempts()),

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

                        .$learnpath_item_id

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

            $attemptQuestionList = explode(',', $exercise_stat_info['data_tracking']);

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

if ($time_control) {

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

        if (!empty($exercise_stat_info)) {

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

    if (false == $time_control) {

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

                            sprintf(get_lang('You cannot take test <b>%s</b> because you have already reached the maximum of %s attempts.'), $exercise_title, $objExercise->selectAttempts()),

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

                    if ($attempt_count >= $objExercise->selectAttempts()) {

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

    $myRemindList = $exercise_stat_info['questions_to_check'];

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

                    api_strtotime($exercise_stat_info['start_date'], 'UTC') + $diff

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

                error_log('7.6. $last_attempt_date: '.$last_attempt_date);

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

                error_log('7.7. $new_expired_time_in_seconds: '.$new_expired_time_in_seconds);

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

                error_log('7.9. $clock_expired_time: '.$clock_expired_time);

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

                    if (isset($exe_id)) {

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

$latestQuestionId = Event::getLatestQuestionIdFromAttempt($exe_id);

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

                        ."&exe_id=$exe_id&learnpath_id=$learnpath_id&learnpath_item_id="

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

    $exercise_stat_info = $objExercise->get_stat_track_exercise_info(

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

                $diff = $current_timestamp - api_strtotime($last_attempt_date, 'UTC');

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

                $last_attempt_date = api_get_utc_datetime(api_strtotime($last_attempt_date, 'UTC') + $diff);

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

            $clock_expired_time = api_get_utc_datetime($expected_time);

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

            $current_question = $count;

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

$params = "exe_id=$exe_id&exerciseId=$exerciseId&learnpath_id=$learnpath_id&learnpath_item_id=$learnpath_item_id&learnpath_item_view_id=$learnpath_item_view_id&".api_get_cidreq().'&reminder='.$reminder;

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

            $last_attempt_date = Event::getLastAttemptDateOfExercise($exercise_stat_info['exe_id']);

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

                $diff = $current_timestamp - api_strtotime($exercise_stat_info['start_date'], 'UTC');

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

                $diff = $current_timestamp - api_strtotime($last_attempt_date, 'UTC');

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

                        tms = '".$last_attempt_date."' ";

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

        $clock_expired_time = $_SESSION['expired_time'][$current_expired_time_key];

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

    if (isset($exercise_stat_info['blocked_categories']) && !empty($exercise_stat_info['blocked_categories'])) {

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

        if ((int) $current_question === $count) {

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

    if (ALL_ON_ONE_PAGE == $objExercise->type || $current_question >= $question_count) {

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

                header('Location: exercise_result.php?'.api_get_cidreq()."&exe_id=$exe_id&learnpath_id=$learnpath_id&learnpath_item_id=$learnpath_item_id&learnpath_item_view_id=$learnpath_item_view_id");

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

                header('Location: exercise_result.php?'.api_get_cidreq()."&exe_id=$exe_id&learnpath_id=$learnpath_id&learnpath_item_id=$learnpath_item_id&learnpath_item_view_id=$learnpath_item_view_id");

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

                    $attempt_count = Event::get_attempt_count(

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

                if ($objExercise->review_answers) {

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

                            $user_id, $objExercise, $exe_id

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

                        ."&learnpath_item_view_id=$learnpath_item_view_id"

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

$checkAnswersUrl = api_get_path(WEB_AJAX_PATH).'exercise.ajax.php?a=check_answers&exe_id='.$exe_id.'&'.api_get_cidreq();

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

        !empty($exercise_stat_info['data_tracking'])

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

        error_log('7.2. $current_expired_time_key  '.$current_expired_time_key);

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

                error_log('7.11. Setting the $_SESSION[expired_time]: '.$_SESSION['expired_time'][$current_expired_time_key]);

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

    $currentAttempt = Event::get_exercise_results_by_attempt($exe_id, 'incomplete');

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

                            $objExercise->propagate_neg,

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

        $current_question > $question_count

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

                        (int) $learnpath_id,

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

    $media_is_activated = $objExercise->mediaIsActivated();

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

    if (false == $media_is_activated &&

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

$params = "exe_id=$exe_id&exerciseId=$exerciseId&learnpath_id=$learnpath_id&learnpath_item_id=$learnpath_item_id&learnpath_item_view_id=$learnpath_item_view_id&".api_get_cidreq().'&reminder='.$reminder;

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

            $new_expired_time_in_seconds = api_strtotime($expired_time_of_this_attempt, 'UTC') - api_strtotime($last_attempt_date, 'UTC');

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

            $new_expired_time_in_seconds = api_strtotime($expired_time_of_this_attempt, 'UTC') - api_strtotime($last_attempt_date, 'UTC');

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

                        exe_id = '".$exercise_stat_info['exe_id']."' AND

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

    $htmlHeadXtra[] = $objExercise->showTimeControlJS($time_left);

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

        $current_question = 0;

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

        $timeSpent = Event::getAttemptQuestionDuration($exe_id, $objQuestionTmp->iid);

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

            window.location = "'.$script_php.'?'.$params.'";

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

         <input type="hidden" name="learnpath_item_view_id" value="'.$learnpath_item_view_id.'" />';

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

    if (isset($exercise_stat_info['questions_to_check']) &&

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

        $remind_list = explode(',', $exercise_stat_info['questions_to_check']);

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

                $user_choice,

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

    $exercise_end_time = api_strtotime($objExercise->end_time, 'UTC');

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

            $message_warning = $permission_to_start ? get_lang('Time limit reached') : get_lang('The test did not start yet');

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

                url = "exercise_submit.php?'.$params.'&num='.$current_question.'&remind_question_id='.$remind_question_id.'&reminder=2";

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

            if ($current_question != $i) {

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

$is_visible_return = $objExercise->is_visible(

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

$limit_time_exists = !empty($objExercise->start_time) || !empty($objExercise->end_time) ? true : false;

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

    $exercise_start_time = api_strtotime($objExercise->start_time, 'UTC');

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

                        if ($remind_question_id == $data_tracking[$i]) {

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

                            $current_question = $i + 1; // last question

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

    $remind_list = [];

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

        $permission_to_start = (($time_now - $exercise_start_time) > 0) ? true : false;

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

    $data_tracking = $exercise_stat_info['data_tracking'];

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

                                $remind_question_id = $myRemindList[$j + 1];

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

$script_php = 'exercise_result.php';

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

        $user_choice = null;

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

        $is_remind_on = false;

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

            $remind_highlight = ' remind_highlight ';

Multi-line function call not indented correctly; expected 20 spaces but found 16
Open

                $myRemindList,

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

            $current_question

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

    echo $is_visible_return['message'];

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

    $exercise_start_time = api_strtotime($objExercise->start_time, 'UTC');

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

            $exercise_timeover = $time_now - $exercise_end_time > 0 ? true : false;

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

                    $exercise_title,

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

                                $current_question = $i + 1; // last question

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

                    if ($myRemindList[$j] == $data_tracking[$i]) {

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

                            $remind_question_id = $myRemindList[$j + 1];

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

    $number_of_hotspot_questions = 0;

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

                                '&remind_question_id='.$remind_question_id.'&reminder=2";

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

                    if (isset($attempt_list[$questionId])) {

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

            $is_remind_on = true;

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

            $remind_question = true;

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

    $learnpath_id,

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

if (false == $is_visible_return['value']) {

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

    $exercise_end_time = api_strtotime($objExercise->end_time, 'UTC');

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

            $exercise_timeover = $time_now - $exercise_end_time > 0 ? true : false;

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

    if (!$permission_to_start || $exercise_timeover) {

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

    $data_tracking = explode(',', $data_tracking);

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

        for ($i = 0; $i < count($data_tracking); $i++) {

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

                if (!empty($remind_question_id)) {

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

                            $remind_question_id = -1;

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

                url = "exercise_submit.php?'.$params.'&num='.$current_question.'&remind_question_id='.$remind_question_id.'";

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

                        url = "exercise_question_reminder.php?'.$params.'&num='.($current_question - 1).'&category_id='.$isLastQuestionInCategory.'";

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

                        $learnpath_id,

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

        if ($objExercise->review_answers) {

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

            $remind_question_div = Display::tag(

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

                    $message_warning,

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

            href="../document/download.php?doc_url=%2Faudio%2F'.Security::remove_XSS($exercise_sound).'"

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

                            url = "exercise_reminder.php?'.$params.'&num='.$current_question.'";

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

            $remind_highlight = 'no_remind_highlight';

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

                url = "exercise_reminder.php?'.$params.'&num='.$current_question.'";

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

                            url = "exercise_submit.php?'.$params.'&num='.$current_question.

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

    $attempt_list = [];

Multi-line function call not indented correctly; expected 20 spaces but found 16
Open

                $showPreviousButton

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

$limit_time_exists = !empty($objExercise->start_time) || !empty($objExercise->end_time) ? true : false;

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

    if (!$permission_to_start || $exercise_timeover) {

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

if ($time_control) {

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

                    if ($remind_question_id == $myRemindList[$j]) {

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

        if (isset($attempt_list[$questionId])) {

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

                        $learnpath_id,

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

        $remind_highlight = '';

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

                $remind_question_div,

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

if ($limit_time_exists) {

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

        $permission_to_start = (($time_now - $exercise_start_time) > 0) ? true : false;

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

        if ($objExercise->review_answers) {

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

    if (!empty($exercise_sound)) {

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

                        $number_of_hotspot_questions++;

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

                                '&remind_question_id='.$remind_question_id.'";

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

         <input type="hidden" name="learnpath_item_id" value="'.$learnpath_item_id.'" />

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

        $remind_list = explode(',', $exercise_stat_info['questions_to_check']);

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

                $user_choice = $correctAnswers[$questionId];

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

    $learnpath_item_id,

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

    $permission_to_start = true;

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

            $message_warning = $permission_to_start ? get_lang('Time limit reachedAdmin') : get_lang('The trainer did not allow the test to start yet');

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

                                $current_question = $i + 1;

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

                            $current_question = $i + 1; // last question

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

                    $number_of_hotspot_questions++;

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

                            window.location = "'.$script_php.'?'.$params.'";

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

    if (isset($exe_id)) {

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

            $user_choice = $attempt_list[$questionId];

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

                        $learnpath_item_id

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

        echo '<div id="question_div_'.$questionId.'" class="main-question '.$remind_highlight.'" >';

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

                    $current_question,

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

$exercise_timeover = false;

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

            $exercise_timeover = $time_now - $exercise_end_time > 0 ? true : false;

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

    $data_tracking = $exercise_stat_info['data_tracking'];

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

    $current_question = 1; //set by default the 1st question

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

                            url = "exercise_submit.php?'.$params.'&num='.$current_question.

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

$limit_time_exists = !empty($objExercise->start_time) || !empty($objExercise->end_time) ? true : false;

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

    if (!empty($objExercise->start_time)) {

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

        $permission_to_start = (($time_now - $exercise_start_time) > 0) ? true : false;

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

            $message_warning = $permission_to_start ? get_lang('Time limit reached') : get_lang('The test did not start yet');

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

            $message_warning = $permission_to_start ? get_lang('Time limit reachedAdmin') : get_lang('The trainer did not allow the test to start yet');

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

                    $message_warning,

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

                    $exercise_title,

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

    $data_tracking = explode(',', $data_tracking);

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

                url = "exercise_submit.php?'.$params.'&num='.$current_question.'&remind_question_id='.$remind_question_id.'&reminder=2";

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

         <input type="hidden" name="exe_id" value="'.$exe_id.'" />

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

         <input type="hidden" name="learnpath_id" value="'.$learnpath_id.'" />

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

        $attempt_list = Event::getAllExerciseEventByExeId($exe_id);

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

            $user_choice = $attempt_list[$questionId];

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

    $learnpath_item_view_id

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

    $time_now = time();

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

        if (!empty($objExercise->end_time)) {

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

                        if ($remind_question_id == $data_tracking[$i]) {

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

                                $remind_question_id = -1;

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

    $script_php = 'exercise_reminder.php';

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

        $attempt_list = Event::getAllExerciseEventByExeId($exe_id);

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

        !empty($exercise_stat_info['questions_to_check'])

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

                        $learnpath_item_id,

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

if ($objExercise->review_answers) {

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

                url = "exercise_submit.php?'.$params.'&num='.$current_question.'&remind_question_id='.$remind_question_id.'";

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

         <input type="hidden" name="num" value="'.$current_question.'" id="num_current_id" />

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

        if (in_array($questionId, $remind_list)) {

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

                if ($current_question != $i) {

Only one argument is allowed per line in a multi-line function call
Open

                            $user_id, $objExercise, $exe_id

Only one argument is allowed per line in a multi-line function call
Open

                            $user_id, $objExercise, $exe_id

Expected 0 spaces before closing bracket; newline found
Open

                    header('Location: exercise_result.php?'

Line indented incorrectly; expected 4 spaces, found 8
Open

        }

Multi-line function call not indented correctly; expected 20 spaces but found 16
Open

                $showPreviousButton

Line indented incorrectly; expected 4 spaces, found 0
Open

if (!in_array($origin, ['learnpath', 'embeddable'])) {

Line indented incorrectly; expected 8 spaces, found 12
Open

            if (ONE_PER_PAGE == $objExercise->type) {

Line indented incorrectly; expected 0 spaces, found 4
Open

    }

Multi-line function call not indented correctly; expected 20 spaces but found 16
Open

                $myRemindList,

Line indented incorrectly; expected 8 spaces, found 12
Open

            }

Line indented incorrectly; expected at least 4 spaces, found 0
Open

Display::display_footer();

Line indented incorrectly; expected 4 spaces, found 0
Open

}

Line indented incorrectly; expected 12 spaces, found 16
Open

                }

Line indented incorrectly; expected 4 spaces, found 8
Open

        foreach ($questionList as $questionId) {

Line indented incorrectly; expected 16 spaces, found 20
Open

                    if (HOT_SPOT == $objQuestionTmp->selectType() ||

Line indented incorrectly; expected 16 spaces, found 20
Open

                    }

Line indented incorrectly; expected 12 spaces, found 16
Open

                }

Line indented incorrectly; expected 0 spaces, found 4
Open

    if (!empty($questionList)) {

Line indented incorrectly; expected at least 8 spaces, found 4
Open

    echo '</div>'; //End glossary div

Line indented incorrectly; expected 12 spaces, found 16
Open

                if ($current_question != $i) {

Line indented incorrectly; expected 0 spaces, found 4
Open

    if (!empty($exercise_sound)) {

Line indented incorrectly; expected 8 spaces, found 12
Open

            } else {

Line indented incorrectly; expected 12 spaces, found 16
Open

                } else {

Line indented incorrectly; expected 0 spaces, found 4
Open

    }

Line indented incorrectly; expected 12 spaces, found 16
Open

                if (HOT_SPOT == $objQuestionTmp->selectType() ||

There are no issues that match your filters.

Category
Status