chamilo/chamilo-lms

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

Summary

Maintainability
A
0 mins
Test Coverage

The function lp_upload_quiz_action_handling() has an NPath complexity of 25014127887360. The configured NPath complexity threshold is 200.
Open

function lp_upload_quiz_action_handling()
{
    if (!isset($_POST['submit_upload_quiz'])) {
        return;
    }

NPathComplexity

Since: 0.1

The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

Example

class Foo {
    function bar() {
        // lots of complicated code
    }
}

Source https://phpmd.org/rules/codesize.html#npathcomplexity

Avoid using undefined variables such as '$categoryList' which will lead to PHP notices.
Open

                $categoryList[] = $cellDataInfo->getValue();

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

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

Avoid using undefined variables such as '$categoryList' which will lead to PHP notices.
Open

            if (isset($categoryList[$i]) && !empty($categoryList[$i])) {

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

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

Avoid using undefined variables such as '$categoryList' which will lead to PHP notices.
Open

            if (isset($categoryList[$i]) && !empty($categoryList[$i])) {

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

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

Avoid using undefined variables such as '$categoryList' which will lead to PHP notices.
Open

                $categoryName = $categoryList[$i];

UndefinedVariable

Since: 2.8.0

Detects when a variable is used that has not been defined before.

Example

class Foo
{
    private function bar()
    {
        // $message is undefined
        echo $message;
    }
}

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

Missing class import via use statement (line '307', column '37').
Open

                    $category = new TestCategory();

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Missing class import via use statement (line '348', column '35').
Open

                    $answer = new Matching();

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Missing class import via use statement (line '343', column '35').
Open

                    $answer = new FillBlanks();

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Missing class import via use statement (line '353', column '35').
Open

                    $answer = new UniqueAnswer();

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Missing class import via use statement (line '57', column '17').
Open

    $form = new FormValidator(

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Missing class import via use statement (line '335', column '35').
Open

                    $answer = new GlobalMultipleAnswer();

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Missing class import via use statement (line '331', column '35').
Open

                    $answer = new FreeAnswer();

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Missing class import via use statement (line '339', column '35').
Open

                    $answer = new MultipleAnswer();

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Missing class import via use statement (line '506', column '38').
Open

                    $objAnswer = new Answer($question_id, $courseId);

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Missing class import via use statement (line '72', column '18').
Open

    $table = new HTML_Table(['class' => 'table']);

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Missing class import via use statement (line '283', column '21').
Open

    $exercise = new Exercise();

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Missing class import via use statement (line '382', column '42').
Open

                        $objAnswer = new Answer($question_id, $courseId);

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

Missing class import via use statement (line '528', column '38').
Open

                    $objAnswer = new Answer($question_id, $courseId);

MissingImport

Since: 2.7.0

Importing all external classes in a file through use statements makes them clearly visible.

Example

function make() {
    return new \stdClass();
}

Source http://phpmd.org/rules/cleancode.html#MissingImport

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

        } else {
            if (is_numeric($answer_data['extra'])) {
                $isNumeric = true;
            }
        }

ElseExpression

Since: 1.4.0

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

Example

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

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

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

                                } else {
                                    $score = $incorrectScore;
                                }

ElseExpression

Since: 1.4.0

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

Example

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

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

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

                                    } else {
                                        if (isset($noNegativeScoreList[$i]) && 'x' == $noNegativeScoreList[$i]) {
                                            $score = 0;
                                        } else {
                                            $score = -abs($scoreList[$i]);

ElseExpression

Since: 1.4.0

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

Example

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

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

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

        } else {
            $type = GLOBAL_MULTIPLE_ANSWER;
        }

ElseExpression

Since: 1.4.0

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

Example

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

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

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

    } else {
        return;
    }

ElseExpression

Since: 1.4.0

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

Example

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

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

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

                            } else {
                                $comment = isset($feedbackFalseList[$i]) ? $feedbackFalseList[$i] : '';
                                $floatVal = (float) $answer_data['extra'];
                                if (is_numeric($floatVal)) {
                                    $score = $answer_data['extra'];

ElseExpression

Since: 1.4.0

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

Example

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

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

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

                                        } else {
                                            $score = -abs($scoreList[$i]);
                                        }

ElseExpression

Since: 1.4.0

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

Example

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

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

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

    } else {
        if ($correct > 1) {
            $type = MULTIPLE_ANSWER;
        } else {
            $type = FREE_ANSWER;

ElseExpression

Since: 1.4.0

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

Example

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

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

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

            } else {
                Session::write('oLP', $oLP);
            }

ElseExpression

Since: 1.4.0

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

Example

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

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

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

    } else {
        //  header('location: exercise.php?' . api_get_cidreq());
        $exerciseUrl = api_get_path(WEB_CODE_PATH).
            'exercise/admin.php?'.api_get_cidreq().'&exerciseId='.$quiz_id.'&session_id='.api_get_session_id();
        api_location($exerciseUrl);

ElseExpression

Since: 1.4.0

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

Example

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

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

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

        } else {
            $type = FREE_ANSWER;
        }

ElseExpression

Since: 1.4.0

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

Example

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

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

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

                    } else {
                        $continue = false;
                    }

ElseExpression

Since: 1.4.0

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

Example

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

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

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

            } else {
                $detectQuestionType = detectQuestionType($myAnswerList);
            }

ElseExpression

Since: 1.4.0

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

Example

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

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

The parameter $answers_data is not named in camelCase.
Open

function detectQuestionType($answers_data)
{
    $correct = 0;
    $isNumeric = false;

CamelCaseParameterName

Since: 0.2

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

Example

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

Source

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

    if (empty($_course)) {

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

    $random = $active = $results = $max_attempt = $expired_time = 0;

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

if (!$is_allowed_to_edit) {

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

    $_course = api_get_course_info();

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

    if (!in_array($path_info['extension'], ['xls', 'xlsx'])) {

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

    $quiz_id = $exercise->save();

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

                    $questionObj = Question::read($question_id, $_course);

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

                    $objAnswer = new Answer($question_id, $courseId);

Missing function doc comment
Open

function lp_upload_quiz_main()

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

    $courseId = $_course['real_id'];

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

            $question_id = null;

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

                $question_id = $answer->create_question(

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

function detectQuestionType($answers_data)

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

            $question_description_text = '<p></p>';

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

                        foreach ($myAnswerList as $answer_data) {

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

                                $floatVal = (float) $answer_data['extra'];

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

    foreach ($answers_data as $answer_data) {

Missing function doc comment
Open

function lp_upload_quiz_actions()

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

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

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

    $exercise->updateAttempts($max_attempt);

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

                    $questionObj = Question::read($question_id, $_course);

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

            $quiz_id,

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

    $path_info = pathinfo($_FILES['user_upload_quiz']['name']);

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

                    $question_description_text,

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

                    $objAnswer = new Answer($question_id, $courseId);

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

                    $questionObj = Question::read($question_id, $_course);

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

            'exercise/admin.php?'.api_get_cidreq().'&exerciseId='.$quiz_id.'&session_id='.api_get_session_id();

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

function lp_upload_quiz_action_handling()

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

                    $quiz_id,

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

                    $questionObj = Question::read($question_id, $_course);

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

function detectQuestionType($answers_data)

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

                    $question_description_text = '';

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

                        $question_id,

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

                        $objAnswer = new Answer($question_id, $courseId);

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

function lp_upload_quiz_actions()

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

function lp_upload_quiz_main()

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

                    $questionObj = Question::read($question_id, $_course);

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

    if ($quiz_id) {

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

                    if (is_array($myAnswerList) && !empty($myAnswerList) && !empty($question_id)) {

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

                    $questionObj = Question::read($question_id, $_course);

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

    if (empty($answers_data)) {

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

    foreach ($answers_data as $answer_data) {

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

$help_content = 'exercise_upload';

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

$this_section = SECTION_COURSES;

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

                $question_description_text = "<p>$description</p>";

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

                            if ('x' == strtolower($answer_data['extra'])) {

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

                                    $score = $answer_data['extra'];

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

                            if ('x' == strtolower($answer_data['extra'])) {

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

                        foreach ($myAnswerList as $answer_data) {

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

        api_get_self().'?'.api_get_cidreq().'&lp_id='.$lp_id,

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

                            $answerValue = $answer_data['data'];

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

$is_allowed_to_edit = api_is_allowed_to_edit(null, true);

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

    $random = $active = $results = $max_attempt = $expired_time = 0;

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

    $exercise->updateExpiredTime($expired_time);

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

                            $question_id,

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

                            $_course

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

            if (is_numeric($answer_data['extra'])) {

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

        if ('x' == strtolower($answer_data['extra'])) {

The variable $question_description_text is not named in camelCase.
Open

function lp_upload_quiz_action_handling()
{
    if (!isset($_POST['submit_upload_quiz'])) {
        return;
    }

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $answer_data is not named in camelCase.
Open

function lp_upload_quiz_action_handling()
{
    if (!isset($_POST['submit_upload_quiz'])) {
        return;
    }

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $question_id is not named in camelCase.
Open

function lp_upload_quiz_action_handling()
{
    if (!isset($_POST['submit_upload_quiz'])) {
        return;
    }

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $answers_data is not named in camelCase.
Open

function detectQuestionType($answers_data)
{
    $correct = 0;
    $isNumeric = false;

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $_course is not named in camelCase.
Open

function lp_upload_quiz_action_handling()
{
    if (!isset($_POST['submit_upload_quiz'])) {
        return;
    }

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $question_description_text is not named in camelCase.
Open

function lp_upload_quiz_action_handling()
{
    if (!isset($_POST['submit_upload_quiz'])) {
        return;
    }

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $answer_data is not named in camelCase.
Open

function lp_upload_quiz_action_handling()
{
    if (!isset($_POST['submit_upload_quiz'])) {
        return;
    }

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $max_attempt is not named in camelCase.
Open

function lp_upload_quiz_action_handling()
{
    if (!isset($_POST['submit_upload_quiz'])) {
        return;
    }

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $lp_id is not named in camelCase.
Open

function lp_upload_quiz_main()
{
    $lp_id = isset($_GET['lp_id']) ? (int) $_GET['lp_id'] : null;

    $form = new FormValidator(

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $lp_id is not named in camelCase.
Open

function lp_upload_quiz_main()
{
    $lp_id = isset($_GET['lp_id']) ? (int) $_GET['lp_id'] : null;

    $form = new FormValidator(

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $question_id is not named in camelCase.
Open

function lp_upload_quiz_action_handling()
{
    if (!isset($_POST['submit_upload_quiz'])) {
        return;
    }

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $quiz_id is not named in camelCase.
Open

function lp_upload_quiz_action_handling()
{
    if (!isset($_POST['submit_upload_quiz'])) {
        return;
    }

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $question_id is not named in camelCase.
Open

function lp_upload_quiz_action_handling()
{
    if (!isset($_POST['submit_upload_quiz'])) {
        return;
    }

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $question_id is not named in camelCase.
Open

function lp_upload_quiz_action_handling()
{
    if (!isset($_POST['submit_upload_quiz'])) {
        return;
    }

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $answer_data is not named in camelCase.
Open

function lp_upload_quiz_action_handling()
{
    if (!isset($_POST['submit_upload_quiz'])) {
        return;
    }

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $answers_data is not named in camelCase.
Open

function detectQuestionType($answers_data)
{
    $correct = 0;
    $isNumeric = false;

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $answer_data is not named in camelCase.
Open

function detectQuestionType($answers_data)
{
    $correct = 0;
    $isNumeric = false;

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $quiz_id is not named in camelCase.
Open

function lp_upload_quiz_action_handling()
{
    if (!isset($_POST['submit_upload_quiz'])) {
        return;
    }

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $answer_data is not named in camelCase.
Open

function lp_upload_quiz_action_handling()
{
    if (!isset($_POST['submit_upload_quiz'])) {
        return;
    }

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $answer_data is not named in camelCase.
Open

function detectQuestionType($answers_data)
{
    $correct = 0;
    $isNumeric = false;

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $max_attempt is not named in camelCase.
Open

function lp_upload_quiz_action_handling()
{
    if (!isset($_POST['submit_upload_quiz'])) {
        return;
    }

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $_course is not named in camelCase.
Open

function lp_upload_quiz_action_handling()
{
    if (!isset($_POST['submit_upload_quiz'])) {
        return;
    }

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $question_id is not named in camelCase.
Open

function lp_upload_quiz_action_handling()
{
    if (!isset($_POST['submit_upload_quiz'])) {
        return;
    }

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $_course is not named in camelCase.
Open

function lp_upload_quiz_action_handling()
{
    if (!isset($_POST['submit_upload_quiz'])) {
        return;
    }

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $answer_data is not named in camelCase.
Open

function lp_upload_quiz_action_handling()
{
    if (!isset($_POST['submit_upload_quiz'])) {
        return;
    }

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $answer_data is not named in camelCase.
Open

function lp_upload_quiz_action_handling()
{
    if (!isset($_POST['submit_upload_quiz'])) {
        return;
    }

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $_course is not named in camelCase.
Open

function lp_upload_quiz_action_handling()
{
    if (!isset($_POST['submit_upload_quiz'])) {
        return;
    }

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $quiz_id is not named in camelCase.
Open

function lp_upload_quiz_action_handling()
{
    if (!isset($_POST['submit_upload_quiz'])) {
        return;
    }

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $expired_time is not named in camelCase.
Open

function lp_upload_quiz_action_handling()
{
    if (!isset($_POST['submit_upload_quiz'])) {
        return;
    }

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $quiz_id is not named in camelCase.
Open

function lp_upload_quiz_action_handling()
{
    if (!isset($_POST['submit_upload_quiz'])) {
        return;
    }

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $question_description_text is not named in camelCase.
Open

function lp_upload_quiz_action_handling()
{
    if (!isset($_POST['submit_upload_quiz'])) {
        return;
    }

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $quiz_id is not named in camelCase.
Open

function lp_upload_quiz_action_handling()
{
    if (!isset($_POST['submit_upload_quiz'])) {
        return;
    }

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $answer_data is not named in camelCase.
Open

function detectQuestionType($answers_data)
{
    $correct = 0;
    $isNumeric = false;

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $question_id is not named in camelCase.
Open

function lp_upload_quiz_action_handling()
{
    if (!isset($_POST['submit_upload_quiz'])) {
        return;
    }

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $_course is not named in camelCase.
Open

function lp_upload_quiz_action_handling()
{
    if (!isset($_POST['submit_upload_quiz'])) {
        return;
    }

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $_course is not named in camelCase.
Open

function lp_upload_quiz_action_handling()
{
    if (!isset($_POST['submit_upload_quiz'])) {
        return;
    }

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $expired_time is not named in camelCase.
Open

function lp_upload_quiz_action_handling()
{
    if (!isset($_POST['submit_upload_quiz'])) {
        return;
    }

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $question_description_text is not named in camelCase.
Open

function lp_upload_quiz_action_handling()
{
    if (!isset($_POST['submit_upload_quiz'])) {
        return;
    }

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $answer_data is not named in camelCase.
Open

function lp_upload_quiz_action_handling()
{
    if (!isset($_POST['submit_upload_quiz'])) {
        return;
    }

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $question_id is not named in camelCase.
Open

function lp_upload_quiz_action_handling()
{
    if (!isset($_POST['submit_upload_quiz'])) {
        return;
    }

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $_course is not named in camelCase.
Open

function lp_upload_quiz_action_handling()
{
    if (!isset($_POST['submit_upload_quiz'])) {
        return;
    }

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $path_info is not named in camelCase.
Open

function lp_upload_quiz_action_handling()
{
    if (!isset($_POST['submit_upload_quiz'])) {
        return;
    }

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $question_id is not named in camelCase.
Open

function lp_upload_quiz_action_handling()
{
    if (!isset($_POST['submit_upload_quiz'])) {
        return;
    }

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $path_info is not named in camelCase.
Open

function lp_upload_quiz_action_handling()
{
    if (!isset($_POST['submit_upload_quiz'])) {
        return;
    }

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $question_id is not named in camelCase.
Open

function lp_upload_quiz_action_handling()
{
    if (!isset($_POST['submit_upload_quiz'])) {
        return;
    }

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $question_id is not named in camelCase.
Open

function lp_upload_quiz_action_handling()
{
    if (!isset($_POST['submit_upload_quiz'])) {
        return;
    }

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

The variable $question_id is not named in camelCase.
Open

function lp_upload_quiz_action_handling()
{
    if (!isset($_POST['submit_upload_quiz'])) {
        return;
    }

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

There are no issues that match your filters.

Category
Status