chamilo/chamilo-lms

View on GitHub
public/main/exercise/question.class.php

Summary

Maintainability
A
0 mins
Test Coverage

The method createForm() has an NPath complexity of 112896. The configured NPath complexity threshold is 200.
Open

    public function createForm(&$form, $exercise)
    {
        $zoomOptions = api_get_setting('exercise.quiz_image_zoom', true);
        if (isset($zoomOptions['options'])) {
            $finderFolder = api_get_path(WEB_PATH).'vendor/studio-42/elfinder/';

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

The method return_header() has an NPath complexity of 2654208. The configured NPath complexity threshold is 200.
Open

    public function return_header(Exercise $exercise, $counter = null, $score = [])
    {
        $counterLabel = '';
        if (!empty($counter)) {
            $counterLabel = (int) $counter;

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

The method read() has an NPath complexity of 684. The configured NPath complexity threshold is 200.
Open

    public static function read($id, $course_info = [], $getExerciseList = true)
    {
        $id = (int) $id;
        if (empty($course_info)) {
            $course_info = api_get_course_info();

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

The method search_engine_edit() has an NPath complexity of 7137. The configured NPath complexity threshold is 200.
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = false
    ) {

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 '$speeds' which will lead to PHP notices.
Open

                        ReadingComprehension::$speeds[$this->level],

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 '$speeds' which will lead to PHP notices.
Open

                        ReadingComprehension::$speeds[$this->level],

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

The class Question has a coupling between objects value of 21. Consider to reduce the number of dependencies under 13.
Open

abstract class Question
{
    public $id;
    public $iid;
    public $question;

CouplingBetweenObjects

Since: 1.1.0

A class with too many dependencies has negative impacts on several quality aspects of a class. This includes quality criteria like stability, maintainability and understandability

Example

class Foo {
    /**
     * @var \foo\bar\X
     */
    private $x = null;

    /**
     * @var \foo\bar\Y
     */
    private $y = null;

    /**
     * @var \foo\bar\Z
     */
    private $z = null;

    public function setFoo(\Foo $foo) {}
    public function setBar(\Bar $bar) {}
    public function setBaz(\Baz $baz) {}

    /**
     * @return \SplObjectStorage
     * @throws \OutOfRangeException
     * @throws \InvalidArgumentException
     * @throws \ErrorException
     */
    public function process(\Iterator $it) {}

    // ...
}

Source https://phpmd.org/rules/design.html#couplingbetweenobjects

Missing class import via use statement (line '682', column '27').
Open

                $di = new ChamiloIndexer();

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 '1078', column '27').
Open

                throw new Exception('implement copy of hotspot question');

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 '722', column '33').
Open

                $ic_slide = new IndexableChunk();

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 '1415', column '37').
Open

            $extraFieldValues = new ExtraFieldValue('question');

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 '1363', column '27').
Open

        $extraField = new ExtraField('question');

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 '818', column '32').
Open

            $newExercise = new Exercise($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 '1061', column '31').
Open

            $extraField = new ExtraFieldValue('question');

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 '958', column '31').
Open

            $extraField = new ExtraFieldValue('question');

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 search_engine_edit uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

                    } else {
                        $sql = "DELETE FROM %S
                            WHERE
                                course_code = '%s'
                                AND tool_id = '%s'

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 removeFromList uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            // deletes the position in the array containing the wanted exercise ID
            unset($this->exerciseList[$pos]);
            //update order of other elements
            $sql = "SELECT question_order

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 displayTypeMenu uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

            } else {
                echo $url = '<a href="question_pool.php?'.api_get_cidreq().'&fromExercise='.$exerciseId.'">';
            }

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 search_engine_edit uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

                    } else {
                        $sql = "INSERT INTO %s (
                                id, course_code, tool_id, ref_id_high_level, ref_id_second_level, search_did
                            )
                            VALUES (

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 return_header uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

            } else {
                $message = Display::div(
                    sprintf(
                        get_lang(
                            'Sorry, it seems like a speed of %s words/minute was too fast for this text of %s words.'

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

Avoid assigning values to variables in if clauses and the like (line '163', column '13').
Open

    public static function read($id, $course_info = [], $getExerciseList = true)
    {
        $id = (int) $id;
        if (empty($course_info)) {
            $course_info = api_get_course_info();

IfStatementAssignment

Since: 2.7.0

Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

Example

class Foo
{
    public function bar($flag)
    {
        if ($foo = 'bar') { // possible typo
            // ...
        }
        if ($baz = 0) { // always false
            // ...
        }
    }
}

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

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

        } else {
            // just removes the exercise from the list
            $this->removeFromList($deleteFromEx, $courseId);
            if ('true' == api_get_setting('search_enabled') && extension_loaded('xapian')) {
                // disassociate question with this exercise

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 return_header uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            /** @var ReadingComprehension $this */
            if (true === $score['pass']) {
                $message = Display::div(
                    sprintf(

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 search_engine_edit uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

                } else {
                    $question_exercises = [];
                }

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 return_header uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

                } else {
                    $scoreLabel = get_lang('Not reviewed');
                    $class = 'warning';
                    if (isset($score['weight'])) {
                        $weight = float_format($score['weight'], 1);

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 show_media_content uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            $html .= Display::page_subheader($this->selectTitle());
            $html .= $this->selectDescription();
        }

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 save uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            // Creates a new question
            $sql = "SELECT max(position)
                    FROM $TBL_QUESTIONS as question,
                    $TBL_EXERCISE_QUESTION as test_question

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 createForm uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            $form->addText('questionName', get_lang('Question'));
        }

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

Avoid assigning values to variables in if clauses and the like (line '695', column '36').
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = false
    ) {

IfStatementAssignment

Since: 2.7.0

Assignments in if clauses and the like are considered a code smell. Assignments in PHP return the right operand as their result. In many cases, this is an expected behavior, but can lead to many difficult to spot bugs, especially when the right operand could result in zero, null or an empty string and the like.

Example

class Foo
{
    public function bar($flag)
    {
        if ($foo = 'bar') { // possible typo
            // ...
        }
        if ($baz = 0) { // always false
            // ...
        }
    }
}

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

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

        } else {
            // update or add category for a question
            $table = Database::get_course_table(TABLE_QUIZ_QUESTION_REL_CATEGORY);
            $categoryId = (int) $categoryId;
            $questionId = (int) $this->id;

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 displayTypeMenu uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

        } else {
            if (in_array($feedbackType, [EXERCISE_FEEDBACK_TYPE_DIRECT, EXERCISE_FEEDBACK_TYPE_POPUP])) {
                echo $url = '<a href="question_pool.php?'.api_get_cidreq()."&type=1&fromExercise=$exerciseId\">";
            } else {
                echo $url = '<a href="question_pool.php?'.api_get_cidreq().'&fromExercise='.$exerciseId.'">';

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 saveCategory uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

            } else {
                $sql = "INSERT INTO $table (question_id, category_id)
                        VALUES ($questionId, $categoryId)
                        ";
                Database::query($sql);

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 search_engine_edit uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

            } else {
                $sql = 'SELECT * FROM %s
                    WHERE course_code=\'%s\' AND tool_id=\'%s\'
                    AND ref_id_high_level=%s AND ref_id_second_level=%s LIMIT 1';
                $sql = sprintf($sql, $tbl_se_ref, $course_id, TOOL_QUIZ, $exerciseId, $this->id);

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 getInstance uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
Open

                } else {
                    echo 'Can\'t instanciate class '.$className.' of type '.$type;
                }

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

Avoid unused parameters such as '$where_condition'.
Open

        $where_condition = []

UnusedFormalParameter

Since: 0.2

Avoid passing parameters to methods or constructors and then not using those parameters.

Example

class Foo
{
    private function bar($howdy)
    {
        // $howdy is not used
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

Avoid unused local variables such as '$url'.
Open

                echo $url = '<a href="question_pool.php?'.api_get_cidreq()."&type=1&fromExercise=$exerciseId\">";

UnusedLocalVariable

Since: 0.2

Detects when a local variable is declared and/or assigned, but not used.

Example

class Foo {
    public function doSomething()
    {
        $i = 5; // Unused
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

The parameter $quiz_id is not named in camelCase.
Open

    public function create_question(
        $quiz_id,
        $question_name,
        $question_description = '',
        $max_score = 0,

CamelCaseParameterName

Since: 0.2

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

Example

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

Source

The parameter $question_description is not named in camelCase.
Open

    public function create_question(
        $quiz_id,
        $question_name,
        $question_description = '',
        $max_score = 0,

CamelCaseParameterName

Since: 0.2

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

Example

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

Source

The parameter $course_id is not named in camelCase.
Open

    public static function get_course_medias(
        $course_id,
        $start = 0,
        $limit = 100,
        $sidx = 'question',

CamelCaseParameterName

Since: 0.2

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

Example

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

Source

The parameter $course_info is not named in camelCase.
Open

    public static function read($id, $course_info = [], $getExerciseList = true)
    {
        $id = (int) $id;
        if (empty($course_info)) {
            $course_info = api_get_course_info();

CamelCaseParameterName

Since: 0.2

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

Example

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

Source

The parameter $course_id is not named in camelCase.
Open

    public static function get_count_course_medias($course_id)
    {
        $table_question = Database::get_course_table(TABLE_QUIZ_QUESTION);
        $result = Database::select(
            'count(*) as count',

CamelCaseParameterName

Since: 0.2

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

Example

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

Source

The parameter $question_id is not named in camelCase.
Open

    public static function readQuestionOption($question_id)
    {
        $table = Database::get_course_table(TABLE_QUIZ_QUESTION_OPTION);

        return Database::select(

CamelCaseParameterName

Since: 0.2

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

Example

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

Source

The property $category_list is not named in camelCase.
Open

abstract class Question
{
    public $id;
    public $iid;
    public $question;

CamelCasePropertyName

Since: 0.2

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

Example

class ClassName {
    protected $property_name;
}

Source

The parameter $max_score is not named in camelCase.
Open

    public function create_question(
        $quiz_id,
        $question_name,
        $question_description = '',
        $max_score = 0,

CamelCaseParameterName

Since: 0.2

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

Example

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

Source

The property $parent_id is not named in camelCase.
Open

abstract class Question
{
    public $id;
    public $iid;
    public $question;

CamelCasePropertyName

Since: 0.2

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

Example

class ClassName {
    protected $property_name;
}

Source

The parameter $question_id is not named in camelCase.
Open

    public static function deleteAllQuestionOptions($question_id, $course_id)
    {
        $table = Database::get_course_table(TABLE_QUIZ_QUESTION_OPTION);
        Database::delete(
            $table,

CamelCaseParameterName

Since: 0.2

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

Example

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

Source

The parameter $question_name is not named in camelCase.
Open

    public function create_question(
        $quiz_id,
        $question_name,
        $question_description = '',
        $max_score = 0,

CamelCaseParameterName

Since: 0.2

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

Example

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

Source

The parameter $where_condition is not named in camelCase.
Open

    public static function get_course_medias(
        $course_id,
        $start = 0,
        $limit = 100,
        $sidx = 'question',

CamelCaseParameterName

Since: 0.2

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

Example

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

Source

The parameter $course_id is not named in camelCase.
Open

    public static function prepare_course_media_select($course_id)
    {
        $medias = self::get_course_medias($course_id);
        $media_list = [];
        $media_list[0] = get_lang('Not linked to media');

CamelCaseParameterName

Since: 0.2

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

Example

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

Source

The parameter $course_id is not named in camelCase.
Open

    public static function deleteAllQuestionOptions($question_id, $course_id)
    {
        $table = Database::get_course_table(TABLE_QUIZ_QUESTION_OPTION);
        Database::delete(
            $table,

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

        $this->parent_id = 0;

Missing function doc comment
Open

    public function getId()

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

    public static function read($id, $course_info = [], $getExerciseList = true)

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

            $course_info = api_get_course_info();

Abstract class name is not prefixed with "Abstract"
Open

abstract class Question

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

        $course_id = $course_info['real_id'];

Member variable "parent_id" is not in valid camel caps format
Open

    public $parent_id;

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

        if (empty($course_info)) {

Member variable "category_list" is not in valid camel caps format
Open

    public $category_list;

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

        $course_id = $course_info['real_id'];

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

        $this->category_list = [];

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

        if (empty($course_id) || -1 == $course_id) {

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

        if (empty($course_id) || -1 == $course_id) {

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

                            SE_DOCTYPE_EXERCISE_QUESTION == $se_doc_data[SE_DATA]['type']

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

                $ic_slide->xapian_data = serialize($xapian_data);

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

                    $course_id,

Doc comment for parameter $max_score does not match actual variable name $question_description
Open

     * @param int    $max_score            Maximum result for the question

Doc comment for parameter $level does not match actual variable name $type
Open

     * @param int    $level                Question level/category

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

        $max_position = $row_max->max_position + 1;

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

                $objQuestion->category = TestCategory::getCategoryForQuestion($id, $course_id);

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

        $TBL_QUESTIONS = Database::get_course_table(TABLE_QUIZ_QUESTION);

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

            $this->updatePosition($current_position + 1);

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

                                array_shift($question_exercises),

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

                    FROM $TBL_EXERCISE_QUESTION

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

                        $sql = "UPDATE $TBL_EXERCISE_QUESTION

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

            $sql = "DELETE FROM $TBL_QUESTIONS

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

        $courseEntity = api_get_course_entity($course_id);

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

                        $question_id,

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

        $question_description = '',

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

        $max_score = (float) $max_score;

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

                            $objQuestion->exerciseList[] = $obj->quiz_id;

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

            $current_position = Database::result($result, 0, 0);

Method name "Question::search_engine_edit" is not in camel caps format
Open

    public function search_engine_edit(

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

                $sql = sprintf($sql, $tbl_se_ref, $course_id, TOOL_QUIZ, $this->id);

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

                $sql = sprintf($sql, $tbl_se_ref, $course_id, TOOL_QUIZ, $this->id);

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

                                        $question_exercises[] = $old_value;

Doc comment for parameter $question_name does not match actual variable name $quiz_id
Open

     * @param int    $question_name        Quiz ID

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

        $tbl_quiz_rel_question = Database::get_course_table(TABLE_QUIZ_TEST_QUESTION);

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

            'description' => $question_description,

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

                FROM $TBL_QUESTIONS

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

                $categoryInfo = TestCategory::getCategoryInfoForQuestion($id, $course_id);

Missing function doc comment
Open

    public function setMandatory($value)

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

                        if (isset($se_doc_data[SE_DATA]['type']) &&

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

                                foreach ($se_doc_data[SE_DATA]['exercise_ids'] as $old_value) {

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

                $ic_slide->addCourseId($course_id);

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

        $TBL_EXERCISE_QUESTION = Database::get_course_table(TABLE_QUIZ_TEST_QUESTION);

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

                    $item['c_id'] = $course_id;

Method name "Question::get_question_type_name" is not in camel caps format
Open

    public function get_question_type_name()

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

            if (in_array($exercise->results_disabled, [

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

            if (in_array($exercise->results_disabled, [

Doc comment for parameter $type does not match actual variable name $max_score
Open

     * @param int    $type                 Type of question (see constants at beginning of question.class.php)

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

                INNER JOIN $tbl_quiz_rel_question r

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

        $row_max = Database::fetch_object($rs_max);

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

        $TBL_EXERCISE_QUESTION = Database::get_course_table(TABLE_QUIZ_TEST_QUESTION);

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

                    $question_exercises = [];

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

                $ic_slide->addToolId(TOOL_QUIZ);

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

                $ic_slide->xapian_data = serialize($xapian_data);

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

                $ic_slide->xapian_data = serialize($xapian_data);

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

                                $tbl_se_ref,

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

                        $sql = sprintf($sql, $tbl_se_ref, $course_id, TOOL_QUIZ, $exerciseId, $this->id, $did);

Use parentheses when instantiating classes
Open

            $type = new $type[1]();

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

                FROM $tbl_quiz_question q

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

                    quiz_id = $quiz_id";

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

                            FROM $TBL_EXERCISE_QUESTION q

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

        $TBL_EXERCISE_QUESTION = Database::get_course_table(TABLE_QUIZ_TEST_QUESTION);

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

            $tbl_se_ref = Database::get_main_table(TABLE_MAIN_SEARCH_ENGINE_REF);

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

                        $se_doc_data = UnserializeApi::unserialize(

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

                        $sql = sprintf($sql, $tbl_se_ref, $course_id, TOOL_QUIZ, $this->id);

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

            $sql = "DELETE FROM $TBL_REPONSES

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

        $quiz_id = (int) $quiz_id;

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

        $rs_max = Database::query($sql);

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

            'ponderation' => $max_score,

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

        $TBL_QUESTIONS = Database::get_course_table(TABLE_QUIZ_QUESTION);

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

            $course_id = api_get_course_id();

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

                $sql = sprintf($sql, $tbl_se_ref, $course_id, TOOL_QUIZ, $exerciseId, $this->id);

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

                if (false !== $se_doc) {

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

                    if (false !== ($se_doc_data = $di->get_document_data($se_doc))) {

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

                                foreach ($se_doc_data[SE_DATA]['exercise_ids'] as $old_value) {

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

                $di->remove_document($se_ref['search_did']);

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

                if (!empty($question_exercises)) { // if empty there is nothing to index

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

                if (true == $objExercise->exercise_was_added_in_lp) {

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

        if (true == $objExercise->exercise_was_added_in_lp) {

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

        if (in_array($exercise->results_disabled, [

Doc comment for parameter $quiz_id does not match actual variable name $level
Open

     * @param string $quiz_id

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

        $quiz_id = (int) $quiz_id;

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

        $row_max = Database::fetch_object($rs_max);

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

                        WHERE c_id = $course_id AND question_id = ".(int) ($this->id);

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

                                    if (!in_array($old_value, $question_exercises)) {

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

        $TBL_QUESTION_OPTIONS = Database::get_course_table(TABLE_QUIZ_QUESTION_OPTION);

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

            'position' => $max_position,

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

        if (empty($course_id)) {

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

                $sql = sprintf($sql, $tbl_se_ref, $course_id, TOOL_QUIZ, $exerciseId, $this->id);

Doc comment for parameter $position does not match actual variable name $name
Open

     * @param int    $position

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

    public static function deleteAllQuestionOptions($question_id, $course_id)

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

    public static function readQuestionOption($question_id)

Doc comment for parameter $counter does not match actual variable name $exercise
Open

     * @param int   $counter

Method name "Question::create_question" is not in camel caps format
Open

    public function create_question(

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

        $course_id = $this->course['real_id'];

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

            $course_id = api_get_course_int_id();

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

                $se_doc = $di->get_document((int) $se_ref['search_did']);

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

                            if (isset($se_doc_data[SE_DATA]['exercise_ids']) &&

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

                        $sql = sprintf($sql, $tbl_se_ref, $course_id, TOOL_QUIZ, $exerciseId, $this->id);

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

                        $sql = sprintf($sql, $tbl_se_ref, $course_id, TOOL_QUIZ, $exerciseId, $this->id);

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

        $TBL_QUESTIONS = Database::get_course_table(TABLE_QUIZ_QUESTION);

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

            $sql = "DELETE FROM $TBL_EXERCISE_QUESTION

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

    public static function deleteAllQuestionOptions($question_id, $course_id)

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

        $quiz_id,

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

                    $question_exercises = [(int) $exerciseId];

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

                $ic_slide->addCourseId($course_id);

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

                        if (!empty($question_exercises)) {

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

        $TBL_QUIZ_QUESTION_REL_CATEGORY = Database::get_course_table(TABLE_QUIZ_QUESTION_REL_CATEGORY);

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

                    Database::insert($TBL_QUESTION_OPTIONS, $item);

Method name "Question::get_question_type" is not in camel caps format
Open

    public static function get_question_type($type)

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

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

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

        $tbl_quiz_question = Database::get_course_table(TABLE_QUIZ_QUESTION);

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

        $question_id = Database::insert($tbl_quiz_question, $params);

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

        $question_id = Database::insert($tbl_quiz_question, $params);

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

                    WHERE quiz_id = $quiz_id ";

Missing function doc comment
Open

    public function getTitleToDisplay(Exercise $exercise, int $itemNumber): string

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

        $c_id = $this->course['real_id'];

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

                    FROM $TBL_QUESTIONS as question,

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

                    while (false !== ($key = array_search($exerciseId, $question_exercises))) {

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

                        'exercise_ids' => $question_exercises,

Doc comment for parameter $name does not match actual variable name $question
Open

     * @param string $name

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

                    $question_id,

Method name "Question::return_header" is not in camel caps format
Open

    public function return_header(Exercise $exercise, $counter = null, $score = [])

Doc comment for parameter $question_description does not match actual variable name $question_name
Open

     * @param string $question_description Question name

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

        if ($question_id) {

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

        $courseEntity = api_get_course_entity($c_id);

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

                            $se_doc_data

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

                                    if (!in_array($old_value, $question_exercises)) {

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

                                        $question_exercises[] = $old_value;

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

                $ic_slide = new IndexableChunk();

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

                        $sql = sprintf($sql, $tbl_se_ref, $course_id, TOOL_QUIZ, $this->id);

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

        $show_media = '';

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

        $max_position = $row_max->max_position + 1;

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

                $objQuestion->course = $course_info;

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

                $se_doc = $di->get_document((int) $se_ref['search_did']);

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

                $ic_slide->addValue('title', $this->question);

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

                    SE_COURSE_ID => $course_id,

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

        if ($show_media) {

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

        $question_name,

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

        $max_score = 0,

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

        $max_score = (float) $max_score;

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

        $max_position = $row_max->max_position + 1;

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

                    $TBL_EXERCISE_QUESTION as test_question

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

                $se_ref = Database::fetch_array($res);

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

                        unset($question_exercises[$key]);

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

                $xapian_data = [

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

                                $course_id,

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

                        $sql = sprintf($sql, $tbl_se_ref, $course_id, TOOL_QUIZ, $exerciseId, $this->id, $did);

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

            $sql = "DELETE FROM $TBL_QUIZ_QUESTION_REL_CATEGORY

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

        $course_id = $courseInfo['real_id'];

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

                    if (false !== ($se_doc_data = $di->get_document_data($se_doc))) {

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

                                is_array($se_doc_data[SE_DATA]['exercise_ids'])

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

                $ic_slide->addValue('content', $this->description);

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

                $di->addChunk($ic_slide);

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

        $TBL_REPONSES = Database::get_course_table(TABLE_QUIZ_ANSWER);

Doc comment for parameter $score does not match actual variable name $counter
Open

     * @param array $score

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

                if (in_array($exercise->results_disabled, [

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

        if ($exercise->display_category_name) {

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

            'question' => $question_name,

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

                    FROM $tbl_quiz_rel_question

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

            $sql = "INSERT INTO $tbl_quiz_rel_question (question_id, quiz_id, question_order)

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

        $media_list = [];

Method name "Question::get_default_levels" is not in camel caps format
Open

    public static function get_default_levels()

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

            $row_max_order = Database::fetch_object($rs_max_order);

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

            $rs_max_order = Database::query($sql);

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

                    VALUES($question_id, $quiz_id, $max_order)";

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

                $media_list[$media['id']] = empty($media['question']) ? get_lang('Untitled') : $media['question'];

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

        return $media_list;

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

        $table_question = Database::get_course_table(TABLE_QUIZ_QUESTION);

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

                $course_id,

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

        $course_id,

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

                    VALUES($question_id, $quiz_id, $max_order)";

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

                    VALUES($question_id, $quiz_id, $max_order)";

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

            $table_question,

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

    public static function get_count_course_medias($course_id)

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

            $html = $parent_question->show_media_content();

Use parentheses when instantiating classes
Open

        $swappedAnswer = new $answerClasses[$this->type]();

Method name "Question::prepare_course_media_select" is not in camel caps format
Open

    public static function prepare_course_media_select($course_id)

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

        $media_list[0] = get_lang('Not linked to media');

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

        $where_condition = []

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

                'where' => $default_where,

Method name "Question::get_count_course_medias" is not in camel caps format
Open

    public static function get_count_course_medias($course_id)

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

            $table_question,

Method name "Question::get_course_medias" is not in camel caps format
Open

    public static function get_course_medias(

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

            $max_order = $row_max_order->max_order + 1;

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

        return $question_id;

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

            $parent_question = self::read($this->parent_id);

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

            $row_max_order = Database::fetch_object($rs_max_order);

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

            $max_order = $row_max_order->max_order + 1;

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

                        $course_id,

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

        $medias = self::get_course_medias($course_id);

Method name "Question::show_media_content" is not in camel caps format
Open

    public function show_media_content()

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

        if (0 != $this->parent_id) {

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

            $max_order = $row_max_order->max_order + 1;

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

    public static function prepare_course_media_select($course_id)

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

            $parent_question = self::read($this->parent_id);

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

        $default_where = [

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

        $table_question = Database::get_course_table(TABLE_QUIZ_QUESTION);

The variable $se_doc_data is not named in camelCase.
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = 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_exercises is not named in camelCase.
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = 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 $TBL_QUESTIONS is not named in camelCase.
Open

    public static function read($id, $course_info = [], $getExerciseList = true)
    {
        $id = (int) $id;
        if (empty($course_info)) {
            $course_info = api_get_course_info();

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_id is not named in camelCase.
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = 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_exercises is not named in camelCase.
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = 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 $se_ref is not named in camelCase.
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = 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 $ic_slide is not named in camelCase.
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = 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 $ic_slide is not named in camelCase.
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = 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 $TBL_QUESTIONS is not named in camelCase.
Open

    public function delete($deleteFromEx = 0)
    {
        if (empty($this->course)) {
            return 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 $TBL_QUESTION_OPTIONS is not named in camelCase.
Open

    public function duplicate($courseInfo = [])
    {
        $courseInfo = empty($courseInfo) ? $this->course : $courseInfo;

        if (empty($courseInfo)) {

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_id is not named in camelCase.
Open

    public function duplicate($courseInfo = [])
    {
        $courseInfo = empty($courseInfo) ? $this->course : $courseInfo;

        if (empty($courseInfo)) {

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_score is not named in camelCase.
Open

    public function create_question(
        $quiz_id,
        $question_name,
        $question_description = '',
        $max_score = 0,

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_position is not named in camelCase.
Open

    public function create_question(
        $quiz_id,
        $question_name,
        $question_description = '',
        $max_score = 0,

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_order is not named in camelCase.
Open

    public function create_question(
        $quiz_id,
        $question_name,
        $question_description = '',
        $max_score = 0,

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 $media_list is not named in camelCase.
Open

    public static function prepare_course_media_select($course_id)
    {
        $medias = self::get_course_medias($course_id);
        $media_list = [];
        $media_list[0] = get_lang('Not linked to media');

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 $TBL_EXERCISE_QUESTION is not named in camelCase.
Open

    public static function read($id, $course_info = [], $getExerciseList = true)
    {
        $id = (int) $id;
        if (empty($course_info)) {
            $course_info = api_get_course_info();

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 $TBL_QUESTIONS is not named in camelCase.
Open

    public function save($exercise)
    {
        $TBL_EXERCISE_QUESTION = Database::get_course_table(TABLE_QUIZ_TEST_QUESTION);
        $TBL_QUESTIONS = Database::get_course_table(TABLE_QUIZ_QUESTION);
        $em = Database::getManager();

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 $c_id is not named in camelCase.
Open

    public function save($exercise)
    {
        $TBL_EXERCISE_QUESTION = Database::get_course_table(TABLE_QUIZ_TEST_QUESTION);
        $TBL_QUESTIONS = Database::get_course_table(TABLE_QUIZ_QUESTION);
        $em = Database::getManager();

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 $tbl_se_ref is not named in camelCase.
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = 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 $se_doc_data is not named in camelCase.
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = 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 $xapian_data is not named in camelCase.
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = 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_exercises is not named in camelCase.
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = 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 $tbl_quiz_question is not named in camelCase.
Open

    public function create_question(
        $quiz_id,
        $question_name,
        $question_description = '',
        $max_score = 0,

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 $table_question is not named in camelCase.
Open

    public static function get_course_medias(
        $course_id,
        $start = 0,
        $limit = 100,
        $sidx = 'question',

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 $default_where is not named in camelCase.
Open

    public static function get_course_medias(
        $course_id,
        $start = 0,
        $limit = 100,
        $sidx = 'question',

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 $current_position is not named in camelCase.
Open

    public function save($exercise)
    {
        $TBL_EXERCISE_QUESTION = Database::get_course_table(TABLE_QUIZ_TEST_QUESTION);
        $TBL_QUESTIONS = Database::get_course_table(TABLE_QUIZ_QUESTION);
        $em = Database::getManager();

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 $old_value is not named in camelCase.
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = 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 $se_ref is not named in camelCase.
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = 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 $tbl_se_ref is not named in camelCase.
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = 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 $TBL_QUIZ_QUESTION_REL_CATEGORY is not named in camelCase.
Open

    public function delete($deleteFromEx = 0)
    {
        if (empty($this->course)) {
            return 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_id is not named in camelCase.
Open

    public function duplicate($courseInfo = [])
    {
        $courseInfo = empty($courseInfo) ? $this->course : $courseInfo;

        if (empty($courseInfo)) {

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_id is not named in camelCase.
Open

    public function duplicate($courseInfo = [])
    {
        $courseInfo = empty($courseInfo) ? $this->course : $courseInfo;

        if (empty($courseInfo)) {

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 $tbl_quiz_question is not named in camelCase.
Open

    public function create_question(
        $quiz_id,
        $question_name,
        $question_description = '',
        $max_score = 0,

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 $row_max is not named in camelCase.
Open

    public function create_question(
        $quiz_id,
        $question_name,
        $question_description = '',
        $max_score = 0,

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 $TBL_QUESTIONS is not named in camelCase.
Open

    public static function read($id, $course_info = [], $getExerciseList = true)
    {
        $id = (int) $id;
        if (empty($course_info)) {
            $course_info = api_get_course_info();

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 $se_doc_data is not named in camelCase.
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = 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 $ic_slide is not named in camelCase.
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = 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_id is not named in camelCase.
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = 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 $rs_max is not named in camelCase.
Open

    public function create_question(
        $quiz_id,
        $question_name,
        $question_description = '',
        $max_score = 0,

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_id is not named in camelCase.
Open

    public static function get_course_medias(
        $course_id,
        $start = 0,
        $limit = 100,
        $sidx = 'question',

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_id is not named in camelCase.
Open

    public static function read($id, $course_info = [], $getExerciseList = true)
    {
        $id = (int) $id;
        if (empty($course_info)) {
            $course_info = api_get_course_info();

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_id is not named in camelCase.
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = 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 $se_doc_data is not named in camelCase.
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = 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 $old_value is not named in camelCase.
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = 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_exercises is not named in camelCase.
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = 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 $tbl_se_ref is not named in camelCase.
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = 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_id is not named in camelCase.
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = 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 $show_media is not named in camelCase.
Open

    public function return_header(Exercise $exercise, $counter = null, $score = [])
    {
        $counterLabel = '';
        if (!empty($counter)) {
            $counterLabel = (int) $counter;

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 is not named in camelCase.
Open

    public function create_question(
        $quiz_id,
        $question_name,
        $question_description = '',
        $max_score = 0,

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 $tbl_quiz_rel_question is not named in camelCase.
Open

    public function create_question(
        $quiz_id,
        $question_name,
        $question_description = '',
        $max_score = 0,

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 $TBL_EXERCISE_QUESTION is not named in camelCase.
Open

    public static function read($id, $course_info = [], $getExerciseList = true)
    {
        $id = (int) $id;
        if (empty($course_info)) {
            $course_info = api_get_course_info();

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 $tbl_se_ref is not named in camelCase.
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = 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_id is not named in camelCase.
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = 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_exercises is not named in camelCase.
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = 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_id is not named in camelCase.
Open

    public static function deleteAllQuestionOptions($question_id, $course_id)
    {
        $table = Database::get_course_table(TABLE_QUIZ_QUESTION_OPTION);
        Database::delete(
            $table,

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

    public function create_question(
        $quiz_id,
        $question_name,
        $question_description = '',
        $max_score = 0,

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_position is not named in camelCase.
Open

    public function create_question(
        $quiz_id,
        $question_name,
        $question_description = '',
        $max_score = 0,

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_id is not named in camelCase.
Open

    public static function get_count_course_medias($course_id)
    {
        $table_question = Database::get_course_table(TABLE_QUIZ_QUESTION);
        $result = Database::select(
            'count(*) as count',

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 $media_list is not named in camelCase.
Open

    public static function prepare_course_media_select($course_id)
    {
        $medias = self::get_course_medias($course_id);
        $media_list = [];
        $media_list[0] = get_lang('Not linked to media');

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_info is not named in camelCase.
Open

    public static function read($id, $course_info = [], $getExerciseList = true)
    {
        $id = (int) $id;
        if (empty($course_info)) {
            $course_info = api_get_course_info();

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_info is not named in camelCase.
Open

    public static function read($id, $course_info = [], $getExerciseList = true)
    {
        $id = (int) $id;
        if (empty($course_info)) {
            $course_info = api_get_course_info();

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 $tbl_se_ref is not named in camelCase.
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = 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 $tbl_se_ref is not named in camelCase.
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = 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 $se_ref is not named in camelCase.
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = 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 $ic_slide is not named in camelCase.
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = 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 $tbl_se_ref is not named in camelCase.
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = 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 $TBL_REPONSES is not named in camelCase.
Open

    public function delete($deleteFromEx = 0)
    {
        if (empty($this->course)) {
            return 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

    public static function readQuestionOption($question_id)
    {
        $table = Database::get_course_table(TABLE_QUIZ_QUESTION_OPTION);

        return Database::select(

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 $tbl_quiz_rel_question is not named in camelCase.
Open

    public function create_question(
        $quiz_id,
        $question_name,
        $question_description = '',
        $max_score = 0,

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 $tbl_quiz_rel_question is not named in camelCase.
Open

    public function create_question(
        $quiz_id,
        $question_name,
        $question_description = '',
        $max_score = 0,

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_name is not named in camelCase.
Open

    public function create_question(
        $quiz_id,
        $question_name,
        $question_description = '',
        $max_score = 0,

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 $default_where is not named in camelCase.
Open

    public static function get_course_medias(
        $course_id,
        $start = 0,
        $limit = 100,
        $sidx = 'question',

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_id is not named in camelCase.
Open

    public static function prepare_course_media_select($course_id)
    {
        $medias = self::get_course_medias($course_id);
        $media_list = [];
        $media_list[0] = get_lang('Not linked to media');

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 $media_list is not named in camelCase.
Open

    public static function prepare_course_media_select($course_id)
    {
        $medias = self::get_course_medias($course_id);
        $media_list = [];
        $media_list[0] = get_lang('Not linked to media');

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_info is not named in camelCase.
Open

    public static function read($id, $course_info = [], $getExerciseList = true)
    {
        $id = (int) $id;
        if (empty($course_info)) {
            $course_info = api_get_course_info();

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_id is not named in camelCase.
Open

    public static function read($id, $course_info = [], $getExerciseList = true)
    {
        $id = (int) $id;
        if (empty($course_info)) {
            $course_info = api_get_course_info();

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 $TBL_EXERCISE_QUESTION is not named in camelCase.
Open

    public function save($exercise)
    {
        $TBL_EXERCISE_QUESTION = Database::get_course_table(TABLE_QUIZ_TEST_QUESTION);
        $TBL_QUESTIONS = Database::get_course_table(TABLE_QUIZ_QUESTION);
        $em = Database::getManager();

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 $TBL_QUESTIONS is not named in camelCase.
Open

    public function save($exercise)
    {
        $TBL_EXERCISE_QUESTION = Database::get_course_table(TABLE_QUIZ_TEST_QUESTION);
        $TBL_QUESTIONS = Database::get_course_table(TABLE_QUIZ_QUESTION);
        $em = Database::getManager();

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 $ic_slide is not named in camelCase.
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = 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 $TBL_REPONSES is not named in camelCase.
Open

    public function delete($deleteFromEx = 0)
    {
        if (empty($this->course)) {
            return 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 $show_media is not named in camelCase.
Open

    public function return_header(Exercise $exercise, $counter = null, $score = [])
    {
        $counterLabel = '';
        if (!empty($counter)) {
            $counterLabel = (int) $counter;

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_order is not named in camelCase.
Open

    public function create_question(
        $quiz_id,
        $question_name,
        $question_description = '',
        $max_score = 0,

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 $table_question is not named in camelCase.
Open

    public static function get_count_course_medias($course_id)
    {
        $table_question = Database::get_course_table(TABLE_QUIZ_QUESTION);
        $result = Database::select(
            'count(*) as count',

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 $parent_question is not named in camelCase.
Open

    public function show_media_content()
    {
        $html = '';
        if (0 != $this->parent_id) {
            $parent_question = self::read($this->parent_id);

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_id is not named in camelCase.
Open

    public static function read($id, $course_info = [], $getExerciseList = true)
    {
        $id = (int) $id;
        if (empty($course_info)) {
            $course_info = api_get_course_info();

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_id is not named in camelCase.
Open

    public static function read($id, $course_info = [], $getExerciseList = true)
    {
        $id = (int) $id;
        if (empty($course_info)) {
            $course_info = api_get_course_info();

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_id is not named in camelCase.
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = 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 $se_doc_data is not named in camelCase.
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = 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

    public static function deleteAllQuestionOptions($question_id, $course_id)
    {
        $table = Database::get_course_table(TABLE_QUIZ_QUESTION_OPTION);
        Database::delete(
            $table,

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

    public function create_question(
        $quiz_id,
        $question_name,
        $question_description = '',
        $max_score = 0,

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 $tbl_quiz_question is not named in camelCase.
Open

    public function create_question(
        $quiz_id,
        $question_name,
        $question_description = '',
        $max_score = 0,

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

    public function create_question(
        $quiz_id,
        $question_name,
        $question_description = '',
        $max_score = 0,

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 $row_max_order is not named in camelCase.
Open

    public function create_question(
        $quiz_id,
        $question_name,
        $question_description = '',
        $max_score = 0,

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 $row_max_order is not named in camelCase.
Open

    public function create_question(
        $quiz_id,
        $question_name,
        $question_description = '',
        $max_score = 0,

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 $table_question is not named in camelCase.
Open

    public static function get_count_course_medias($course_id)
    {
        $table_question = Database::get_course_table(TABLE_QUIZ_QUESTION);
        $result = Database::select(
            'count(*) as count',

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 $parent_question is not named in camelCase.
Open

    public function show_media_content()
    {
        $html = '';
        if (0 != $this->parent_id) {
            $parent_question = self::read($this->parent_id);

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 $se_doc is not named in camelCase.
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = 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 $se_doc is not named in camelCase.
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = 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_exercises is not named in camelCase.
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = 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 $TBL_QUIZ_QUESTION_REL_CATEGORY is not named in camelCase.
Open

    public function delete($deleteFromEx = 0)
    {
        if (empty($this->course)) {
            return 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_score is not named in camelCase.
Open

    public function create_question(
        $quiz_id,
        $question_name,
        $question_description = '',
        $max_score = 0,

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 $rs_max is not named in camelCase.
Open

    public function create_question(
        $quiz_id,
        $question_name,
        $question_description = '',
        $max_score = 0,

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

    public function create_question(
        $quiz_id,
        $question_name,
        $question_description = '',
        $max_score = 0,

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_id is not named in camelCase.
Open

    public static function read($id, $course_info = [], $getExerciseList = true)
    {
        $id = (int) $id;
        if (empty($course_info)) {
            $course_info = api_get_course_info();

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_id is not named in camelCase.
Open

    public function updateType($type)
    {
        $table = Database::get_course_table(TABLE_QUIZ_ANSWER);
        $course_id = $this->course['real_id'];

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 $old_value is not named in camelCase.
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = 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_id is not named in camelCase.
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = 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_exercises is not named in camelCase.
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = 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 $TBL_EXERCISE_QUESTION is not named in camelCase.
Open

    public function delete($deleteFromEx = 0)
    {
        if (empty($this->course)) {
            return 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 $TBL_EXERCISE_QUESTION is not named in camelCase.
Open

    public function save($exercise)
    {
        $TBL_EXERCISE_QUESTION = Database::get_course_table(TABLE_QUIZ_TEST_QUESTION);
        $TBL_QUESTIONS = Database::get_course_table(TABLE_QUIZ_QUESTION);
        $em = Database::getManager();

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 $current_position is not named in camelCase.
Open

    public function save($exercise)
    {
        $TBL_EXERCISE_QUESTION = Database::get_course_table(TABLE_QUIZ_TEST_QUESTION);
        $TBL_QUESTIONS = Database::get_course_table(TABLE_QUIZ_QUESTION);
        $em = Database::getManager();

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 $se_doc is not named in camelCase.
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = 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 $se_doc_data is not named in camelCase.
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = 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_exercises is not named in camelCase.
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = 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 $TBL_QUESTIONS is not named in camelCase.
Open

    public function delete($deleteFromEx = 0)
    {
        if (empty($this->course)) {
            return 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 $TBL_EXERCISE_QUESTION is not named in camelCase.
Open

    public function delete($deleteFromEx = 0)
    {
        if (empty($this->course)) {
            return 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

    public function create_question(
        $quiz_id,
        $question_name,
        $question_description = '',
        $max_score = 0,

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 $rs_max_order is not named in camelCase.
Open

    public function create_question(
        $quiz_id,
        $question_name,
        $question_description = '',
        $max_score = 0,

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 $rs_max_order is not named in camelCase.
Open

    public function create_question(
        $quiz_id,
        $question_name,
        $question_description = '',
        $max_score = 0,

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

    public function create_question(
        $quiz_id,
        $question_name,
        $question_description = '',
        $max_score = 0,

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_id is not named in camelCase.
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = 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 $xapian_data is not named in camelCase.
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = 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 $ic_slide is not named in camelCase.
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = 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 $TBL_EXERCISE_QUESTION is not named in camelCase.
Open

    public function delete($deleteFromEx = 0)
    {
        if (empty($this->course)) {
            return 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

    public function create_question(
        $quiz_id,
        $question_name,
        $question_description = '',
        $max_score = 0,

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 $table_question is not named in camelCase.
Open

    public static function get_course_medias(
        $course_id,
        $start = 0,
        $limit = 100,
        $sidx = 'question',

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_info is not named in camelCase.
Open

    public static function read($id, $course_info = [], $getExerciseList = true)
    {
        $id = (int) $id;
        if (empty($course_info)) {
            $course_info = api_get_course_info();

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_id is not named in camelCase.
Open

    public function updateType($type)
    {
        $table = Database::get_course_table(TABLE_QUIZ_ANSWER);
        $course_id = $this->course['real_id'];

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 $se_doc_data is not named in camelCase.
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = 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 $se_doc_data is not named in camelCase.
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = 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 $ic_slide is not named in camelCase.
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = 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 $TBL_EXERCISE_QUESTION is not named in camelCase.
Open

    public function delete($deleteFromEx = 0)
    {
        if (empty($this->course)) {
            return 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_score is not named in camelCase.
Open

    public function create_question(
        $quiz_id,
        $question_name,
        $question_description = '',
        $max_score = 0,

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 $tbl_quiz_rel_question is not named in camelCase.
Open

    public function create_question(
        $quiz_id,
        $question_name,
        $question_description = '',
        $max_score = 0,

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 $media_list is not named in camelCase.
Open

    public static function prepare_course_media_select($course_id)
    {
        $medias = self::get_course_medias($course_id);
        $media_list = [];
        $media_list[0] = get_lang('Not linked to media');

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_id is not named in camelCase.
Open

    public function updateType($type)
    {
        $table = Database::get_course_table(TABLE_QUIZ_ANSWER);
        $course_id = $this->course['real_id'];

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_id is not named in camelCase.
Open

    public function updateType($type)
    {
        $table = Database::get_course_table(TABLE_QUIZ_ANSWER);
        $course_id = $this->course['real_id'];

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 $c_id is not named in camelCase.
Open

    public function save($exercise)
    {
        $TBL_EXERCISE_QUESTION = Database::get_course_table(TABLE_QUIZ_TEST_QUESTION);
        $TBL_QUESTIONS = Database::get_course_table(TABLE_QUIZ_QUESTION);
        $em = Database::getManager();

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_exercises is not named in camelCase.
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = 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_exercises is not named in camelCase.
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = 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_id is not named in camelCase.
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = 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 $TBL_QUESTION_OPTIONS is not named in camelCase.
Open

    public function duplicate($courseInfo = [])
    {
        $courseInfo = empty($courseInfo) ? $this->course : $courseInfo;

        if (empty($courseInfo)) {

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

    public function create_question(
        $quiz_id,
        $question_name,
        $question_description = '',
        $max_score = 0,

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 $row_max is not named in camelCase.
Open

    public function create_question(
        $quiz_id,
        $question_name,
        $question_description = '',
        $max_score = 0,

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

    public function create_question(
        $quiz_id,
        $question_name,
        $question_description = '',
        $max_score = 0,

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 method get_question_type_name is not named in camelCase.
Open

    public function get_question_type_name()
    {
        $key = self::$questionTypes[$this->type];

        return get_lang($key[1]);

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method prepare_course_media_select is not named in camelCase.
Open

    public static function prepare_course_media_select($course_id)
    {
        $medias = self::get_course_medias($course_id);
        $media_list = [];
        $media_list[0] = get_lang('Not linked to media');

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method return_header is not named in camelCase.
Open

    public function return_header(Exercise $exercise, $counter = null, $score = [])
    {
        $counterLabel = '';
        if (!empty($counter)) {
            $counterLabel = (int) $counter;

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method create_question is not named in camelCase.
Open

    public function create_question(
        $quiz_id,
        $question_name,
        $question_description = '',
        $max_score = 0,

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method get_question_type is not named in camelCase.
Open

    public static function get_question_type($type)
    {
        if (ORAL_EXPRESSION == $type && 'true' !== api_get_setting('enable_record_audio')) {
            return null;
        }

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method search_engine_edit is not named in camelCase.
Open

    public function search_engine_edit(
        $exerciseId,
        $addQs = false,
        $rmQs = false
    ) {

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method get_default_levels is not named in camelCase.
Open

    public static function get_default_levels()
    {
        return [
            1 => 1,
            2 => 2,

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method get_count_course_medias is not named in camelCase.
Open

    public static function get_count_course_medias($course_id)
    {
        $table_question = Database::get_course_table(TABLE_QUIZ_QUESTION);
        $result = Database::select(
            'count(*) as count',

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method get_course_medias is not named in camelCase.
Open

    public static function get_course_medias(
        $course_id,
        $start = 0,
        $limit = 100,
        $sidx = 'question',

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

The method show_media_content is not named in camelCase.
Open

    public function show_media_content()
    {
        $html = '';
        if (0 != $this->parent_id) {
            $parent_question = self::read($this->parent_id);

CamelCaseMethodName

Since: 0.2

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

Example

class ClassName {
    public function get_name() {
    }
}

Source

There are no issues that match your filters.

Category
Status