The method get_stats_table_by_attempt() has an NPath complexity of 2424. The configured NPath complexity threshold is 200. Open
public static function get_stats_table_by_attempt($exercise, $category_list = [])
{
if (empty($category_list) || empty($exercise)) {
return '';
}
- Read upRead up
- Exclude checks
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 getQuestionsByCat() has an NPath complexity of 740. The configured NPath complexity threshold is 200. Open
public static function getQuestionsByCat(
int $exerciseId,
array $checkInQuestionList = [],
array $categoriesAddedInExercise = [],
$onlyMandatory = false
- Read upRead up
- Exclude checks
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
Missing class import via use statement (line '688', column '22'). Open
$table = new HTML_Table(
- Read upRead up
- Exclude checks
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 '369', column '21'). Open
$quiz = new Exercise();
- Read upRead up
- Exclude checks
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 '266', column '25'). Open
$exercise = new Exercise($courseId);
- Read upRead up
- Exclude checks
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 get_stats_table_by_attempt uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$resultsArray[] = 0;
}
- Read upRead up
- Exclude checks
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 getNumberOfQuestionRandomByCategory uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. Open
} else {
$count += $nbQuestionInThisCat;
}
- Read upRead up
- Exclude checks
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 local variables such as '$label'. Open
foreach ($labelsWithId as $categoryId => $label) {
- Read upRead up
- Exclude checks
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
Avoid unused parameters such as '$courseId'. Open
public static function get_category_id_for_title($title, $courseId = 0)
- Read upRead up
- Exclude checks
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 '$course'. Open
$course = api_get_course_entity($courseId);
- Read upRead up
- Exclude checks
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
Avoid unused local variables such as '$tabquestion'. Open
foreach ($in_tab as $cat_id => $tabquestion) {
- Read upRead up
- Exclude checks
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
Avoid unused local variables such as '$catId'. Open
foreach ($categories as $catId => $cat) {
- Read upRead up
- Exclude checks
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
Avoid unused local variables such as '$session'. Open
$session = api_get_session_entity($sessionId);
- Read upRead up
- Exclude checks
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
Avoid unused local variables such as '$val'. Open
foreach ($tabCatName as $key => $val) {
- Read upRead up
- Exclude checks
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
Avoid unused parameters such as '$grouped_by_category'. Open
public static function getListOfCategoriesNameForTest($exerciseId, $grouped_by_category = true)
- Read upRead up
- Exclude checks
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 using count() function in for loops. Open
for ($i = 1; $i <= count($questionList); $i++) {
if (self::getCategoryForQuestion($questionList[$i]) == $categoryId) {
$nbCatResult++;
}
}
- Read upRead up
- Exclude checks
CountInLoopExpression
Since: 2.7.0
Using count/sizeof in loops expressions is considered bad practice and is a potential source of many bugs, especially when the loop manipulates an array, as count happens on each iteration.
Example
class Foo {
public function bar()
{
$array = array();
for ($i = 0; count($array); $i++) {
// ...
}
}
}
Source https://phpmd.org/rules/design.html#countinloopexpression
The parameter $in_display_category_name is not named in camelCase. Open
public static function returnCategoryAndTitle($questionId, $in_display_category_name = 1)
{
$is_student = !(api_is_allowed_to_edit(null, true) || api_is_session_admin());
$objExercise = Session::read('objExercise');
if (!empty($objExercise)) {
- Read upRead up
- Exclude checks
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 $in_tab is not named in camelCase. Open
public static function sortTabByBracketLabel($in_tab)
{
$tabResult = [];
$tabCatName = []; // tab of category name
foreach ($in_tab as $cat_id => $tabquestion) {
- Read upRead up
- Exclude checks
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 $category_list is not named in camelCase. Open
public static function get_stats_table_by_attempt($exercise, $category_list = [])
{
if (empty($category_list) || empty($exercise)) {
return '';
}
- Read upRead up
- Exclude checks
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 $grouped_by_category is not named in camelCase. Open
public static function getListOfCategoriesNameForTest($exerciseId, $grouped_by_category = true)
{
$result = [];
$categories = self::getListOfCategoriesIDForTest($exerciseId);
- Read upRead up
- Exclude checks
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 "category_list" is not in valid camel caps format Open
$category_list = [$category_list];
- Exclude checks
Variable "category_list" is not in valid camel caps format Open
if (!empty($category_list)) {
- Exclude checks
Variable "in_display_category_name" is not in valid camel caps format Open
$in_display_category_name = $objExercise->display_category_name;
- Exclude checks
Variable "in_tab" is not in valid camel caps format Open
foreach ($in_tab as $cat_id => $tabquestion) {
- Exclude checks
Variable "categories_in_exercise" is not in valid camel caps format Open
$categories_in_exercise = array_unique(array_filter($categories_in_exercise));
- Exclude checks
Variable "display_category_name" is not in valid camel caps format Open
$in_display_category_name = $objExercise->display_category_name;
- Exclude checks
Variable "res_num_max" is not in valid camel caps format Open
if ($nbQuestionInThisCat > $res_num_max) {
- Exclude checks
Variable "categories_in_exercise" is not in valid camel caps format Open
$categories_in_exercise = array_merge($categories_in_exercise, $category_list);
- Exclude checks
Variable "grouped_by_category" is not in valid camel caps format Open
public static function getListOfCategoriesNameForTest($exerciseId, $grouped_by_category = true)
- Exclude checks
Variable "in_tab" is not in valid camel caps format Open
public static function sortTabByBracketLabel($in_tab)
- Exclude checks
Variable "cat_id" is not in valid camel caps format Open
$category = $category->getCategory($cat_id);
- Exclude checks
Variable "cat_id" is not in valid camel caps format Open
$tabCatName[$cat_id] = $category->name;
- Exclude checks
Variable "res_num_max" is not in valid camel caps format Open
$res_num_max = $nbQuestionInThisCat;
- Exclude checks
Missing function doc comment Open
public static function getCategoryInfoForQuestion($questionId, $courseId = 0)
- Exclude checks
Expected 8 spaces after parameter type; 1 found Open
* @param int $courseId
- Exclude checks
Variable "categories_in_exercise" is not in valid camel caps format Open
$categories_in_exercise = [];
- Exclude checks
Variable "category_list" is not in valid camel caps format Open
if (is_numeric($category_list)) {
- Exclude checks
Variable "category_list" is not in valid camel caps format Open
public static function get_stats_table_by_attempt($exercise, $category_list = [])
- Exclude checks
Variable "category_list" is not in valid camel caps format Open
$none_category = $category_list['none'];
- Exclude checks
Variable "tbl_question_rel_cat" is not in valid camel caps format Open
$sql = "DELETE FROM $tbl_question_rel_cat
- Exclude checks
Variable "in_tab" is not in valid camel caps format Open
$tabResult[$key] = $in_tab[$key];
- Exclude checks
Variable "category_list" is not in valid camel caps format Open
if (isset($category_list['none'])) {
- Exclude checks
Variable "category_list" is not in valid camel caps format Open
$category_list = [$category_list];
- Exclude checks
Variable "categories_in_exercise" is not in valid camel caps format Open
if (!empty($categories_in_exercise)) {
- Exclude checks
Variable "cat_id" is not in valid camel caps format Open
$cat = (array) $cat->getCategory($cat_id);
- Exclude checks
Variable "categories_in_exercise" is not in valid camel caps format Open
return $categories_in_exercise;
- Exclude checks
Variable "in_tab" is not in valid camel caps format Open
reset($in_tab);
- Exclude checks
Variable "question_list" is not in valid camel caps format Open
foreach ($question_list as $questionInfo) {
- Exclude checks
Variable "category_list" is not in valid camel caps format Open
$categories_in_exercise = array_merge($categories_in_exercise, $category_list);
- Exclude checks
Expected 2 spaces after parameter type; 1 found Open
* @param int $exerciseId
- Exclude checks
Variable "is_student" is not in valid camel caps format Open
$is_student = !(api_is_allowed_to_edit(null, true) || api_is_session_admin());
- Exclude checks
Variable "question_id" is not in valid camel caps format Open
$question_id = $questionInfo['question_id'];
- Exclude checks
Variable "categories_in_exercise" is not in valid camel caps format Open
$categories_in_exercise = array_merge($categories_in_exercise, $category_list);
- Exclude checks
Variable "in_display_category_name" is not in valid camel caps format Open
public static function returnCategoryAndTitle($questionId, $in_display_category_name = 1)
- Exclude checks
Missing parameter name Open
* @param bool
- Exclude checks
Method name "TestCategory::get_stats_table_by_attempt" is not in camel caps format Open
public static function get_stats_table_by_attempt($exercise, $category_list = [])
- Exclude checks
Variable "none_category" is not in valid camel caps format Open
$none_category = $category_list['none'];
- Exclude checks
Variable "categories_in_exercise" is not in valid camel caps format Open
$categories_in_exercise = array_unique(array_filter($categories_in_exercise));
- Exclude checks
Variable "cat_id" is not in valid camel caps format Open
foreach ($in_tab as $cat_id => $tabquestion) {
- Exclude checks
Variable "none_category" is not in valid camel caps format Open
$none_category = [];
- Exclude checks
Variable "cat_id" is not in valid camel caps format Open
foreach ($categories as $cat_id) {
- Exclude checks
Variable "in_display_category_name" is not in valid camel caps format Open
(1 == $in_display_category_name || !$is_student)
- Exclude checks
Variable "res_num_max" is not in valid camel caps format Open
$res_num_max = 0;
- Exclude checks
Variable "tbl_question_rel_cat" is not in valid camel caps format Open
$tbl_question_rel_cat = Database::get_course_table(TABLE_QUIZ_QUESTION_REL_CATEGORY);
- Exclude checks
Variable "course_id" is not in valid camel caps format Open
$category = $this->getCategory($id, $course_id);
- Exclude checks
Missing parameter name Open
* @param $questionId
- Exclude checks
Variable "category_list" is not in valid camel caps format Open
$category_list = self::getCategoryForQuestion($question_id);
- Exclude checks
Variable "category_list" is not in valid camel caps format Open
unset($category_list['none']);
- Exclude checks
Variable "course_id" is not in valid camel caps format Open
$course_id = api_get_course_int_id();
- Exclude checks
Variable "question_list" is not in valid camel caps format Open
$question_list = $exercise->getQuestionOrderedListByName();
- Exclude checks
Variable "res_num_max" is not in valid camel caps format Open
return $res_num_max;
- Exclude checks
Variable "category_list" is not in valid camel caps format Open
if (empty($category_list) || empty($exercise)) {
- Exclude checks
Variable "question_id" is not in valid camel caps format Open
$category_list = self::getCategoryForQuestion($question_id);
- Exclude checks
Variable "is_student" is not in valid camel caps format Open
(1 == $in_display_category_name || !$is_student)
- Exclude checks
Variable "none_category" is not in valid camel caps format Open
$none_category['total'],
- Exclude checks
Variable "none_category" is not in valid camel caps format Open
$none_category['total'],
- Exclude checks
Variable "category_item" is not in valid camel caps format Open
$tempResult[$category_id] = $category_item['total'] != 0 ? round($category_item['score'] / $category_item['total'] * 10) : 0;
- Exclude checks
Variable "parent_id" is not in valid camel caps format Open
if (!empty($this->parent_id)) {
- Exclude checks
Variable "cat_id" is not in valid camel caps format Open
$value = isset($saved_categories) && isset($saved_categories[$cat_id]) ? $saved_categories[$cat_id]['count_questions'] : -1;
- Exclude checks
Variable "cat_id" is not in valid camel caps format Open
"category[$cat_id]",
- Exclude checks
Variable "category_item" is not in valid camel caps format Open
$category_item['score'],
- Exclude checks
Variable "parent_cat" is not in valid camel caps format Open
$parent_cat = new self();
- Exclude checks
Variable "parent_cat" is not in valid camel caps format Open
$parent_cat = $parent_cat->getCategory($this->parent_id);
- Exclude checks
Variable "category_parent_list" is not in valid camel caps format Open
$form->addSelect('parent_id', get_lang('Parent'), $category_parent_list, ['id' => 'parent_id']);
- Exclude checks
Variable "category_list" is not in valid camel caps format Open
$total = $category_list['total'];
- Exclude checks
Variable "category_id" is not in valid camel caps format Open
$category_item = $category_list[$category_id];
- Exclude checks
Variable "parent_cat" is not in valid camel caps format Open
$category_parent_list = [$parent_cat->id => $parent_cat->name];
- Exclude checks
Variable "category_item" is not in valid camel caps format Open
$category_item = $category_list[$category_id];
- Exclude checks
Variable "parent_id" is not in valid camel caps format Open
$parent_cat = $parent_cat->getCategory($this->parent_id);
- Exclude checks
Variable "parent_cat" is not in valid camel caps format Open
$category_parent_list = [$parent_cat->id => $parent_cat->name];
- Exclude checks
Variable "out_res" is not in valid camel caps format Open
$out_res = 0;
- Exclude checks
Variable "results_disabled" is not in valid camel caps format Open
if ($countCategories > 2 && RESULT_DISABLE_RADAR === (int) $exercise->results_disabled) {
- Exclude checks
Variable "cat_id" is not in valid camel caps format Open
$cat_id = $category['iid'];
- Exclude checks
Variable "category_item" is not in valid camel caps format Open
$tempResult[$category_id] = $category_item['total'] != 0 ? round($category_item['score'] / $category_item['total'] * 10) : 0;
- Exclude checks
Variable "category_list" is not in valid camel caps format Open
unset($category_list['total']);
- Exclude checks
Variable "category_item" is not in valid camel caps format Open
$category_item['total'],
- Exclude checks
Method name "TestCategory::get_category_id_for_title" is not in camel caps format Open
public static function get_category_id_for_title($title, $courseId = 0)
- Exclude checks
Variable "category_id" is not in valid camel caps format Open
if (!isset($category_list[$category_id])) {
- Exclude checks
Variable "none_category" is not in valid camel caps format Open
$none_category['score'],
- Exclude checks
Variable "parent_id" is not in valid camel caps format Open
$defaults['parent_id'] = $this->parent_id;
- Exclude checks
Variable "out_res" is not in valid camel caps format Open
return $out_res;
- Exclude checks
Variable "category_list" is not in valid camel caps format Open
$countCategories = count($category_list);
- Exclude checks
Variable "category_list" is not in valid camel caps format Open
if (!isset($category_list[$category_id])) {
- Exclude checks
Variable "parent_cat" is not in valid camel caps format Open
$script .= '<script>$(function() { $("#parent_id").trigger("addItem",[{"title": "'.$parent_cat->name.'", "value": "'.$parent_cat->id.'"}]); });</script>';
- Exclude checks
Variable "saved_categories" is not in valid camel caps format Open
$saved_categories = $exercise->getCategoriesInExercise();
- Exclude checks
Variable "category_id" is not in valid camel caps format Open
foreach ($labelsWithId as $category_id => $title) {
- Exclude checks
Variable "category_item" is not in valid camel caps format Open
$tempResult[$category_id] = $category_item['total'] != 0 ? round($category_item['score'] / $category_item['total'] * 10) : 0;
- Exclude checks
Variable "category_parent_list" is not in valid camel caps format Open
$category_parent_list = [];
- Exclude checks
Variable "parent_cat" is not in valid camel caps format Open
$parent_cat = $parent_cat->getCategory($this->parent_id);
- Exclude checks
Variable "category_list" is not in valid camel caps format Open
if (isset($category_list['total'])) {
- Exclude checks
Variable "category_parent_list" is not in valid camel caps format Open
$category_parent_list = [$parent_cat->id => $parent_cat->name];
- Exclude checks
Variable "parent_cat" is not in valid camel caps format Open
$script .= '<script>$(function() { $("#parent_id").trigger("addItem",[{"title": "'.$parent_cat->name.'", "value": "'.$parent_cat->id.'"}]); });</script>';
- Exclude checks
Variable "category_item" is not in valid camel caps format Open
$category_item['score'],
- Exclude checks
Variable "real_question_count" is not in valid camel caps format Open
$real_question_count = count($exercise->getQuestionList());
- Exclude checks
Variable "category_item" is not in valid camel caps format Open
$category_item['total'],
- Exclude checks
Variable "cat_id" is not in valid camel caps format Open
$value = isset($saved_categories) && isset($saved_categories[$cat_id]) ? $saved_categories[$cat_id]['count_questions'] : -1;
- Exclude checks
Variable "saved_categories" is not in valid camel caps format Open
$value = isset($saved_categories) && isset($saved_categories[$cat_id]) ? $saved_categories[$cat_id]['count_questions'] : -1;
- Exclude checks
Variable "category_list" is not in valid camel caps format Open
$category_item = $category_list[$category_id];
- Exclude checks
Variable "real_question_count" is not in valid camel caps format Open
if ($nbQuestionsTotal != $real_question_count) {
- Exclude checks
Variable "out_res" is not in valid camel caps format Open
$out_res = $data['iid'];
- Exclude checks
Variable "category_id" is not in valid camel caps format Open
$tempResult[$category_id] = $category_item['total'] != 0 ? round($category_item['score'] / $category_item['total'] * 10) : 0;
- Exclude checks
Variable "none_category" is not in valid camel caps format Open
if (!empty($none_category)) {
- Exclude checks
Variable "none_category" is not in valid camel caps format Open
$none_category['score'],
- Exclude checks
Variable "saved_categories" is not in valid camel caps format Open
$value = isset($saved_categories) && isset($saved_categories[$cat_id]) ? $saved_categories[$cat_id]['count_questions'] : -1;
- Exclude checks
Variable "saved_categories" is not in valid camel caps format Open
$value = isset($saved_categories) && isset($saved_categories[$cat_id]) ? $saved_categories[$cat_id]['count_questions'] : -1;
- Exclude checks
The variable $question_id is not named in camelCase. Open
public static function getListOfCategoriesIDForTestObject(Exercise $exercise)
{
// parcourir les questions d'un test, recup les categories uniques dans un tableau
$categories_in_exercise = [];
$question_list = $exercise->getQuestionOrderedListByName();
- Read upRead up
- Exclude checks
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 $in_display_category_name is not named in camelCase. Open
public static function returnCategoryAndTitle($questionId, $in_display_category_name = 1)
{
$is_student = !(api_is_allowed_to_edit(null, true) || api_is_session_admin());
$objExercise = Session::read('objExercise');
if (!empty($objExercise)) {
- Read upRead up
- Exclude checks
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 $is_student is not named in camelCase. Open
public static function returnCategoryAndTitle($questionId, $in_display_category_name = 1)
{
$is_student = !(api_is_allowed_to_edit(null, true) || api_is_session_admin());
$objExercise = Session::read('objExercise');
if (!empty($objExercise)) {
- Read upRead up
- Exclude checks
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 $category_list is not named in camelCase. Open
public static function get_stats_table_by_attempt($exercise, $category_list = [])
{
if (empty($category_list) || empty($exercise)) {
return '';
}
- Read upRead up
- Exclude checks
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 $category_id is not named in camelCase. Open
public static function get_stats_table_by_attempt($exercise, $category_list = [])
{
if (empty($category_list) || empty($exercise)) {
return '';
}
- Read upRead up
- Exclude checks
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 $category_id is not named in camelCase. Open
public static function get_stats_table_by_attempt($exercise, $category_list = [])
{
if (empty($category_list) || empty($exercise)) {
return '';
}
- Read upRead up
- Exclude checks
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 $category_item is not named in camelCase. Open
public static function get_stats_table_by_attempt($exercise, $category_list = [])
{
if (empty($category_list) || empty($exercise)) {
return '';
}
- Read upRead up
- Exclude checks
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_cat is not named in camelCase. Open
public function getForm(&$form, $action = 'new')
{
switch ($action) {
case 'new':
$header = get_lang('Add category');
- Read upRead up
- Exclude checks
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_rel_cat is not named in camelCase. Open
public function removeCategory($id)
{
$tbl_question_rel_cat = Database::get_course_table(TABLE_QUIZ_QUESTION_REL_CATEGORY);
$id = (int) $id;
$course_id = api_get_course_int_id();
- Read upRead up
- Exclude checks
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 $category_list is not named in camelCase. Open
public static function getListOfCategoriesIDForTestObject(Exercise $exercise)
{
// parcourir les questions d'un test, recup les categories uniques dans un tableau
$categories_in_exercise = [];
$question_list = $exercise->getQuestionOrderedListByName();
- Read upRead up
- Exclude checks
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 $in_display_category_name is not named in camelCase. Open
public static function returnCategoryAndTitle($questionId, $in_display_category_name = 1)
{
$is_student = !(api_is_allowed_to_edit(null, true) || api_is_session_admin());
$objExercise = Session::read('objExercise');
if (!empty($objExercise)) {
- Read upRead up
- Exclude checks
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 $none_category is not named in camelCase. Open
public static function get_stats_table_by_attempt($exercise, $category_list = [])
{
if (empty($category_list) || empty($exercise)) {
return '';
}
- Read upRead up
- Exclude checks
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 $saved_categories is not named in camelCase. Open
public function returnCategoryForm(Exercise $exercise)
{
$categories = $this->getListOfCategoriesForTest($exercise);
$sortedCategories = [];
foreach ($categories as $catId => $cat) {
- Read upRead up
- Exclude checks
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 $categories_in_exercise is not named in camelCase. Open
public static function getListOfCategoriesIDForTestObject(Exercise $exercise)
{
// parcourir les questions d'un test, recup les categories uniques dans un tableau
$categories_in_exercise = [];
$question_list = $exercise->getQuestionOrderedListByName();
- Read upRead up
- Exclude checks
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 $categories_in_exercise is not named in camelCase. Open
public static function getListOfCategoriesIDForTestObject(Exercise $exercise)
{
// parcourir les questions d'un test, recup les categories uniques dans un tableau
$categories_in_exercise = [];
$question_list = $exercise->getQuestionOrderedListByName();
- Read upRead up
- Exclude checks
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 $cat_id is not named in camelCase. Open
public static function getListOfCategoriesForTest(Exercise $exercise)
{
$result = [];
$categories = self::getListOfCategoriesIDForTestObject($exercise);
foreach ($categories as $cat_id) {
- Read upRead up
- Exclude checks
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 $in_tab is not named in camelCase. Open
public static function sortTabByBracketLabel($in_tab)
{
$tabResult = [];
$tabCatName = []; // tab of category name
foreach ($in_tab as $cat_id => $tabquestion) {
- Read upRead up
- Exclude checks
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 $cat_id is not named in camelCase. Open
public static function sortTabByBracketLabel($in_tab)
{
$tabResult = [];
$tabCatName = []; // tab of category name
foreach ($in_tab as $cat_id => $tabquestion) {
- Read upRead up
- Exclude checks
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 $res_num_max is not named in camelCase. Open
public static function getNumberMaxQuestionByCat($exerciseId)
{
$res_num_max = 0;
$categories = self::getListOfCategoriesIDForTest($exerciseId);
foreach ($categories as $category) {
- Read upRead up
- Exclude checks
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 $none_category is not named in camelCase. Open
public static function get_stats_table_by_attempt($exercise, $category_list = [])
{
if (empty($category_list) || empty($exercise)) {
return '';
}
- Read upRead up
- Exclude checks
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_cat is not named in camelCase. Open
public function getForm(&$form, $action = 'new')
{
switch ($action) {
case 'new':
$header = get_lang('Add category');
- Read upRead up
- Exclude checks
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 $cat_id is not named in camelCase. Open
public function returnCategoryForm(Exercise $exercise)
{
$categories = $this->getListOfCategoriesForTest($exercise);
$sortedCategories = [];
foreach ($categories as $catId => $cat) {
- Read upRead up
- Exclude checks
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 $none_category is not named in camelCase. Open
public static function get_stats_table_by_attempt($exercise, $category_list = [])
{
if (empty($category_list) || empty($exercise)) {
return '';
}
- Read upRead up
- Exclude checks
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_cat is not named in camelCase. Open
public function getForm(&$form, $action = 'new')
{
switch ($action) {
case 'new':
$header = get_lang('Add category');
- Read upRead up
- Exclude checks
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 $cat_id is not named in camelCase. Open
public static function sortTabByBracketLabel($in_tab)
{
$tabResult = [];
$tabCatName = []; // tab of category name
foreach ($in_tab as $cat_id => $tabquestion) {
- Read upRead up
- Exclude checks
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 $category_item is not named in camelCase. Open
public static function get_stats_table_by_attempt($exercise, $category_list = [])
{
if (empty($category_list) || empty($exercise)) {
return '';
}
- Read upRead up
- Exclude checks
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 $categories_in_exercise is not named in camelCase. Open
public static function getListOfCategoriesIDForTestObject(Exercise $exercise)
{
// parcourir les questions d'un test, recup les categories uniques dans un tableau
$categories_in_exercise = [];
$question_list = $exercise->getQuestionOrderedListByName();
- Read upRead up
- Exclude checks
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 $is_student is not named in camelCase. Open
public static function returnCategoryAndTitle($questionId, $in_display_category_name = 1)
{
$is_student = !(api_is_allowed_to_edit(null, true) || api_is_session_admin());
$objExercise = Session::read('objExercise');
if (!empty($objExercise)) {
- Read upRead up
- Exclude checks
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 $category_list is not named in camelCase. Open
public static function get_stats_table_by_attempt($exercise, $category_list = [])
{
if (empty($category_list) || empty($exercise)) {
return '';
}
- Read upRead up
- Exclude checks
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 $category_list is not named in camelCase. Open
public static function get_stats_table_by_attempt($exercise, $category_list = [])
{
if (empty($category_list) || empty($exercise)) {
return '';
}
- Read upRead up
- Exclude checks
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 $category_item is not named in camelCase. Open
public static function get_stats_table_by_attempt($exercise, $category_list = [])
{
if (empty($category_list) || empty($exercise)) {
return '';
}
- Read upRead up
- Exclude checks
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 $saved_categories is not named in camelCase. Open
public function returnCategoryForm(Exercise $exercise)
{
$categories = $this->getListOfCategoriesForTest($exercise);
$sortedCategories = [];
foreach ($categories as $catId => $cat) {
- Read upRead up
- Exclude checks
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_list is not named in camelCase. Open
public static function getListOfCategoriesIDForTestObject(Exercise $exercise)
{
// parcourir les questions d'un test, recup les categories uniques dans un tableau
$categories_in_exercise = [];
$question_list = $exercise->getQuestionOrderedListByName();
- Read upRead up
- Exclude checks
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 $none_category is not named in camelCase. Open
public static function get_stats_table_by_attempt($exercise, $category_list = [])
{
if (empty($category_list) || empty($exercise)) {
return '';
}
- Read upRead up
- Exclude checks
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 $saved_categories is not named in camelCase. Open
public function returnCategoryForm(Exercise $exercise)
{
$categories = $this->getListOfCategoriesForTest($exercise);
$sortedCategories = [];
foreach ($categories as $catId => $cat) {
- Read upRead up
- Exclude checks
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 $out_res is not named in camelCase. Open
public static function get_category_id_for_title($title, $courseId = 0)
{
$out_res = 0;
$tableCategory = Database::get_course_table(TABLE_QUIZ_QUESTION_CATEGORY);
$sql = "SELECT iid FROM $tableCategory
- Read upRead up
- Exclude checks
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 $category_list is not named in camelCase. Open
public static function getListOfCategoriesIDForTestObject(Exercise $exercise)
{
// parcourir les questions d'un test, recup les categories uniques dans un tableau
$categories_in_exercise = [];
$question_list = $exercise->getQuestionOrderedListByName();
- Read upRead up
- Exclude checks
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 $cat_id is not named in camelCase. Open
public static function getListOfCategoriesForTest(Exercise $exercise)
{
$result = [];
$categories = self::getListOfCategoriesIDForTestObject($exercise);
foreach ($categories as $cat_id) {
- Read upRead up
- Exclude checks
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 $res_num_max is not named in camelCase. Open
public static function getNumberMaxQuestionByCat($exerciseId)
{
$res_num_max = 0;
$categories = self::getListOfCategoriesIDForTest($exerciseId);
foreach ($categories as $category) {
- Read upRead up
- Exclude checks
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 $category_item is not named in camelCase. Open
public static function get_stats_table_by_attempt($exercise, $category_list = [])
{
if (empty($category_list) || empty($exercise)) {
return '';
}
- Read upRead up
- Exclude checks
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 $category_item is not named in camelCase. Open
public static function get_stats_table_by_attempt($exercise, $category_list = [])
{
if (empty($category_list) || empty($exercise)) {
return '';
}
- Read upRead up
- Exclude checks
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 $saved_categories is not named in camelCase. Open
public function returnCategoryForm(Exercise $exercise)
{
$categories = $this->getListOfCategoriesForTest($exercise);
$sortedCategories = [];
foreach ($categories as $catId => $cat) {
- Read upRead up
- Exclude checks
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 $cat_id is not named in camelCase. Open
public function returnCategoryForm(Exercise $exercise)
{
$categories = $this->getListOfCategoriesForTest($exercise);
$sortedCategories = [];
foreach ($categories as $catId => $cat) {
- Read upRead up
- Exclude checks
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 $categories_in_exercise is not named in camelCase. Open
public static function getListOfCategoriesIDForTestObject(Exercise $exercise)
{
// parcourir les questions d'un test, recup les categories uniques dans un tableau
$categories_in_exercise = [];
$question_list = $exercise->getQuestionOrderedListByName();
- Read upRead up
- Exclude checks
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 $categories_in_exercise is not named in camelCase. Open
public static function getListOfCategoriesIDForTestObject(Exercise $exercise)
{
// parcourir les questions d'un test, recup les categories uniques dans un tableau
$categories_in_exercise = [];
$question_list = $exercise->getQuestionOrderedListByName();
- Read upRead up
- Exclude checks
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 $category_list is not named in camelCase. Open
public static function get_stats_table_by_attempt($exercise, $category_list = [])
{
if (empty($category_list) || empty($exercise)) {
return '';
}
- Read upRead up
- Exclude checks
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 $category_item is not named in camelCase. Open
public static function get_stats_table_by_attempt($exercise, $category_list = [])
{
if (empty($category_list) || empty($exercise)) {
return '';
}
- Read upRead up
- Exclude checks
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 $category_item is not named in camelCase. Open
public static function get_stats_table_by_attempt($exercise, $category_list = [])
{
if (empty($category_list) || empty($exercise)) {
return '';
}
- Read upRead up
- Exclude checks
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 $none_category is not named in camelCase. Open
public static function get_stats_table_by_attempt($exercise, $category_list = [])
{
if (empty($category_list) || empty($exercise)) {
return '';
}
- Read upRead up
- Exclude checks
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 $out_res is not named in camelCase. Open
public static function get_category_id_for_title($title, $courseId = 0)
{
$out_res = 0;
$tableCategory = Database::get_course_table(TABLE_QUIZ_QUESTION_CATEGORY);
$sql = "SELECT iid FROM $tableCategory
- Read upRead up
- Exclude checks
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 $category_item is not named in camelCase. Open
public static function get_stats_table_by_attempt($exercise, $category_list = [])
{
if (empty($category_list) || empty($exercise)) {
return '';
}
- Read upRead up
- Exclude checks
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 $category_list is not named in camelCase. Open
public static function getListOfCategoriesIDForTestObject(Exercise $exercise)
{
// parcourir les questions d'un test, recup les categories uniques dans un tableau
$categories_in_exercise = [];
$question_list = $exercise->getQuestionOrderedListByName();
- Read upRead up
- Exclude checks
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 $category_list is not named in camelCase. Open
public static function getListOfCategoriesIDForTestObject(Exercise $exercise)
{
// parcourir les questions d'un test, recup les categories uniques dans un tableau
$categories_in_exercise = [];
$question_list = $exercise->getQuestionOrderedListByName();
- Read upRead up
- Exclude checks
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 $categories_in_exercise is not named in camelCase. Open
public static function getListOfCategoriesIDForTestObject(Exercise $exercise)
{
// parcourir les questions d'un test, recup les categories uniques dans un tableau
$categories_in_exercise = [];
$question_list = $exercise->getQuestionOrderedListByName();
- Read upRead up
- Exclude checks
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 $cat_id is not named in camelCase. Open
public static function sortTabByBracketLabel($in_tab)
{
$tabResult = [];
$tabCatName = []; // tab of category name
foreach ($in_tab as $cat_id => $tabquestion) {
- Read upRead up
- Exclude checks
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 $category_list is not named in camelCase. Open
public static function get_stats_table_by_attempt($exercise, $category_list = [])
{
if (empty($category_list) || empty($exercise)) {
return '';
}
- Read upRead up
- Exclude checks
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 $category_id is not named in camelCase. Open
public static function get_stats_table_by_attempt($exercise, $category_list = [])
{
if (empty($category_list) || empty($exercise)) {
return '';
}
- Read upRead up
- Exclude checks
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 removeCategory($id)
{
$tbl_question_rel_cat = Database::get_course_table(TABLE_QUIZ_QUESTION_REL_CATEGORY);
$id = (int) $id;
$course_id = api_get_course_int_id();
- Read upRead up
- Exclude checks
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 removeCategory($id)
{
$tbl_question_rel_cat = Database::get_course_table(TABLE_QUIZ_QUESTION_REL_CATEGORY);
$id = (int) $id;
$course_id = api_get_course_int_id();
- Read upRead up
- Exclude checks
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 $res_num_max is not named in camelCase. Open
public static function getNumberMaxQuestionByCat($exerciseId)
{
$res_num_max = 0;
$categories = self::getListOfCategoriesIDForTest($exerciseId);
foreach ($categories as $category) {
- Read upRead up
- Exclude checks
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 $category_list is not named in camelCase. Open
public static function get_stats_table_by_attempt($exercise, $category_list = [])
{
if (empty($category_list) || empty($exercise)) {
return '';
}
- Read upRead up
- Exclude checks
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 $category_list is not named in camelCase. Open
public static function get_stats_table_by_attempt($exercise, $category_list = [])
{
if (empty($category_list) || empty($exercise)) {
return '';
}
- Read upRead up
- Exclude checks
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 $category_parent_list is not named in camelCase. Open
public function getForm(&$form, $action = 'new')
{
switch ($action) {
case 'new':
$header = get_lang('Add category');
- Read upRead up
- Exclude checks
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_list is not named in camelCase. Open
public static function getListOfCategoriesIDForTestObject(Exercise $exercise)
{
// parcourir les questions d'un test, recup les categories uniques dans un tableau
$categories_in_exercise = [];
$question_list = $exercise->getQuestionOrderedListByName();
- Read upRead up
- Exclude checks
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 $category_list is not named in camelCase. Open
public static function getListOfCategoriesIDForTestObject(Exercise $exercise)
{
// parcourir les questions d'un test, recup les categories uniques dans un tableau
$categories_in_exercise = [];
$question_list = $exercise->getQuestionOrderedListByName();
- Read upRead up
- Exclude checks
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 $category_list is not named in camelCase. Open
public static function get_stats_table_by_attempt($exercise, $category_list = [])
{
if (empty($category_list) || empty($exercise)) {
return '';
}
- Read upRead up
- Exclude checks
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 getListOfCategoriesIDForTestObject(Exercise $exercise)
{
// parcourir les questions d'un test, recup les categories uniques dans un tableau
$categories_in_exercise = [];
$question_list = $exercise->getQuestionOrderedListByName();
- Read upRead up
- Exclude checks
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 $res_num_max is not named in camelCase. Open
public static function getNumberMaxQuestionByCat($exerciseId)
{
$res_num_max = 0;
$categories = self::getListOfCategoriesIDForTest($exerciseId);
foreach ($categories as $category) {
- Read upRead up
- Exclude checks
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 $category_list is not named in camelCase. Open
public static function get_stats_table_by_attempt($exercise, $category_list = [])
{
if (empty($category_list) || empty($exercise)) {
return '';
}
- Read upRead up
- Exclude checks
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 $category_list is not named in camelCase. Open
public static function get_stats_table_by_attempt($exercise, $category_list = [])
{
if (empty($category_list) || empty($exercise)) {
return '';
}
- Read upRead up
- Exclude checks
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 $none_category is not named in camelCase. Open
public static function get_stats_table_by_attempt($exercise, $category_list = [])
{
if (empty($category_list) || empty($exercise)) {
return '';
}
- Read upRead up
- Exclude checks
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_cat is not named in camelCase. Open
public function getForm(&$form, $action = 'new')
{
switch ($action) {
case 'new':
$header = get_lang('Add category');
- Read upRead up
- Exclude checks
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 $out_res is not named in camelCase. Open
public static function get_category_id_for_title($title, $courseId = 0)
{
$out_res = 0;
$tableCategory = Database::get_course_table(TABLE_QUIZ_QUESTION_CATEGORY);
$sql = "SELECT iid FROM $tableCategory
- Read upRead up
- Exclude checks
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 $category_list is not named in camelCase. Open
public static function getListOfCategoriesIDForTestObject(Exercise $exercise)
{
// parcourir les questions d'un test, recup les categories uniques dans un tableau
$categories_in_exercise = [];
$question_list = $exercise->getQuestionOrderedListByName();
- Read upRead up
- Exclude checks
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 $in_tab is not named in camelCase. Open
public static function sortTabByBracketLabel($in_tab)
{
$tabResult = [];
$tabCatName = []; // tab of category name
foreach ($in_tab as $cat_id => $tabquestion) {
- Read upRead up
- Exclude checks
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 $in_tab is not named in camelCase. Open
public static function sortTabByBracketLabel($in_tab)
{
$tabResult = [];
$tabCatName = []; // tab of category name
foreach ($in_tab as $cat_id => $tabquestion) {
- Read upRead up
- Exclude checks
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 $none_category is not named in camelCase. Open
public static function get_stats_table_by_attempt($exercise, $category_list = [])
{
if (empty($category_list) || empty($exercise)) {
return '';
}
- Read upRead up
- Exclude checks
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_cat is not named in camelCase. Open
public function getForm(&$form, $action = 'new')
{
switch ($action) {
case 'new':
$header = get_lang('Add category');
- Read upRead up
- Exclude checks
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_cat is not named in camelCase. Open
public function getForm(&$form, $action = 'new')
{
switch ($action) {
case 'new':
$header = get_lang('Add category');
- Read upRead up
- Exclude checks
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 $category_parent_list is not named in camelCase. Open
public function getForm(&$form, $action = 'new')
{
switch ($action) {
case 'new':
$header = get_lang('Add category');
- Read upRead up
- Exclude checks
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 $real_question_count is not named in camelCase. Open
public function returnCategoryForm(Exercise $exercise)
{
$categories = $this->getListOfCategoriesForTest($exercise);
$sortedCategories = [];
foreach ($categories as $catId => $cat) {
- Read upRead up
- Exclude checks
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 $cat_id is not named in camelCase. Open
public function returnCategoryForm(Exercise $exercise)
{
$categories = $this->getListOfCategoriesForTest($exercise);
$sortedCategories = [];
foreach ($categories as $catId => $cat) {
- Read upRead up
- Exclude checks
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 $cat_id is not named in camelCase. Open
public function returnCategoryForm(Exercise $exercise)
{
$categories = $this->getListOfCategoriesForTest($exercise);
$sortedCategories = [];
foreach ($categories as $catId => $cat) {
- Read upRead up
- Exclude checks
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_rel_cat is not named in camelCase. Open
public function removeCategory($id)
{
$tbl_question_rel_cat = Database::get_course_table(TABLE_QUIZ_QUESTION_REL_CATEGORY);
$id = (int) $id;
$course_id = api_get_course_int_id();
- Read upRead up
- Exclude checks
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 $categories_in_exercise is not named in camelCase. Open
public static function getListOfCategoriesIDForTestObject(Exercise $exercise)
{
// parcourir les questions d'un test, recup les categories uniques dans un tableau
$categories_in_exercise = [];
$question_list = $exercise->getQuestionOrderedListByName();
- Read upRead up
- Exclude checks
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 $category_id is not named in camelCase. Open
public static function get_stats_table_by_attempt($exercise, $category_list = [])
{
if (empty($category_list) || empty($exercise)) {
return '';
}
- Read upRead up
- Exclude checks
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 $category_parent_list is not named in camelCase. Open
public function getForm(&$form, $action = 'new')
{
switch ($action) {
case 'new':
$header = get_lang('Add category');
- Read upRead up
- Exclude checks
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_cat is not named in camelCase. Open
public function getForm(&$form, $action = 'new')
{
switch ($action) {
case 'new':
$header = get_lang('Add category');
- Read upRead up
- Exclude checks
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 $real_question_count is not named in camelCase. Open
public function returnCategoryForm(Exercise $exercise)
{
$categories = $this->getListOfCategoriesForTest($exercise);
$sortedCategories = [];
foreach ($categories as $catId => $cat) {
- Read upRead up
- Exclude checks
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_stats_table_by_attempt is not named in camelCase. Open
public static function get_stats_table_by_attempt($exercise, $category_list = [])
{
if (empty($category_list) || empty($exercise)) {
return '';
}
- Read upRead up
- Exclude checks
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_category_id_for_title is not named in camelCase. Open
public static function get_category_id_for_title($title, $courseId = 0)
{
$out_res = 0;
$tableCategory = Database::get_course_table(TABLE_QUIZ_QUESTION_CATEGORY);
$sql = "SELECT iid FROM $tableCategory
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}