chamilo/chamilo-lms

View on GitHub
public/main/gradebook/index.php

Summary

Maintainability
A
0 mins
Test Coverage

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

            $category_to_lock = Category::load($_GET['category_id']);

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

    $list_actions[] = 'deletecat';

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

    $list_values[] = $_GET['visibleeval'];

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

$my_actions = implode(';', $list_actions);

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

    $session_id,

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

            $cat->set_user_id($stud_id);

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

                .'&movecat='.$moveCategoryId.'&targetcat='.$move_form->exportValue('move_cat'));

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

        $course_to_crsind = (null != $cats[0]->getCourseId() && null == $targetcat[0]->getCourseId());

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

        $confirmation_message = get_lang('This assessment has been locked. You cannot unlock it. If you really need to unlock it, please contact the platform administrator, explaining the reason why you would need to do that (it might otherwise be considered as fraud attempt).');

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

    'action' => $my_actions,

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

$tbl_attendance = Database::get_course_table(TABLE_ATTENDANCE);

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

        $session_id,

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

$course_code = api_get_course_id();

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

    $list_actions[] = 'visibleeval';

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

$filter_warning_msg = true;

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

    $first_time = 1;

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

    $list_values[] = $_GET['movecat'];

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

        $category_to_lock = Category::load($_GET['category_id']);

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

$list_actions = [];

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

    $list_values[] = $_GET['movelink'];

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

$_in_course = true;

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

$session_id = api_get_session_id();

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

    $list_actions[] = 'movelink';

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

    $list_values[] = $_GET['visiblecat'];

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

    $list_values[] = $_GET['deletelink'];

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

    $list_actions[] = $_GET['action'];

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

$my_actions = implode(';', $list_actions);

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

$first_time = null;

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

        if ($move_form->validate()) {

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

$current_course_tool = TOOL_GRADEBOOK;

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

        $move_form = new EvalForm(

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

        if ($move_form->validate()) {

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

    $list_actions[] = 'deleteeval';

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

    'action_details' => $my_actions_values,

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

$tbl_forum_thread = Database::get_course_table(TABLE_FORUM_THREAD);

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

        $category_to_lock[0]->lockAllItems(1);

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

    $list_actions[] = 'deletelink';

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

$my_actions_values = implode(';', $list_values);

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

$filter_confirm_msg = true;

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

            $category_to_lock[0]->lockAllItems(0);

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

    $list_actions[] = 'moveeval';

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

    $list_actions[] = 'visiblecat';

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

    $list_values[] = $_GET['deleteeval'];

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

        $move_form = new CatForm(

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

    $list_actions[] = 'movecat';

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

    $list_values[] = $_GET['moveeval'];

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

    $list_actions[] = 'visiblelink';

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

            $confirmation_message = get_lang('Evaluation has been unlocked');

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

    $list_actions[] = 'lockedeval';

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

$my_actions_values = implode(';', $list_values);

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

    $coursecat = Category::get_not_created_course_categories($stud_id);

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

$course_id = api_get_course_int_id();

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

    $list_values[] = $_GET['deletecat'];

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

$tbl_grade_links = Database::get_main_table(TABLE_MAIN_GRADEBOOK_LINK);

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

        if (!($course_to_crsind && !isset($_GET['confirm']))) {

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

$stud_id = api_get_user_id();

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

$this_section = SECTION_COURSES;

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

    $list_values[] = $_GET['lockedeval'];

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

    $list_values[] = $_GET['visiblelink'];

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

                .'&movecat='.$moveCategoryId.'&targetcat='.$move_form->exportValue('move_cat'));

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

$list_values = [];

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

        $warning_message = get_lang('No resource selected');

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

                $confirmation_message = get_lang('The resources became invisible');

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

        $data_array = $datagen->get_data(

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

$no_qualification = false;

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

        $confirmation_message = get_lang('Visibility modified');

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

        $visibility_command = 1;

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

            $sql = 'UPDATE '.$tbl_forum_thread.' SET

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

                         WHERE id = '.$get_delete_link.' AND type = '.LINK_ATTENDANCE.'

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

    $stud_id = api_is_allowed_to_edit() ? null : $stud_id;

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

        $allcat = $cats[0]->get_subcategories($stud_id, $course_id, $session_id);

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

                            $course_id,

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

                            $session_id,

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

        $confirmation_message = get_lang('Visibility modified');

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

    $get_delete_link = (int) $_GET['deletelink'];

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

                $confirmation_message = get_lang('The resources became visible');

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

                $currentScore = Category::getCurrentScore($stud_id, $category, true);

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

        if (!($course_to_crsind && !isset($_GET['confirm']))) {

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

        $confirmation_message = get_lang('InVisibility modified');

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

                $confirmation_message =

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

if (isset($warning_message)) {

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

        foreach ($data_array as $data) {

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

        $alleval = $cats[0]->get_evaluations($stud_id);

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

    $course_id = CourseManager::get_course_by_category($selectCat);

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

            $alllink = $cat->get_links($stud_id, true, $course_id, $session_id);

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

                    $is_course_admin,

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

    $visibility_command = 0;

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

        $link[0]->set_visible($visibility_command);

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

        $filter_warning_msg = false;

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

                        $number_of_deleted_categories++;

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

if (isset($confirmation_message)) {

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

    Display::addFlash(Display::return_message($warning_message, 'warning', $filter_warning_msg));

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

$simple_search_form = '';

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

            $cat->set_name($course_code.' - '.get_lang('Session').' '.$sessionName);

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

    if (empty($show_message)) {

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

        $course_id,

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

            $grade_model_id = $cats[0]->get_grade_model_id();

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

                    $form_grade->addButtonSave(get_lang('Save'));

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

    if ($visibility_command) {

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

    $confirmation_message = get_lang('Evaluation has been locked');

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

    $filter_confirm_msg = false;

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

                         SELECT ref_id FROM '.$tbl_grade_links.'

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

    $stud_id = api_is_allowed_to_edit() ? null : $stud_id;

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

            $allcat = $cat->get_subcategories($stud_id, $course_id, $session_id);

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

        $course_to_crsind = null != $evals[0]->getCourseId() && null == $targetcat[0]->getCourseId();

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

    $visibility_command = 0;

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

        $confirmation_message = get_lang('InVisibility modified');

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

        $filter_confirm_msg = false;

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

        $confirmation_message = get_lang('InVisibility modified');

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

                $number_of_deleted_links = 0;

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

                        $number_of_deleted_evaluations++;

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

    $eval[0]->set_visible($visibility_command);

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

                    get_lang('Deleted evaluations').' : <b>'.$number_of_deleted_evaluations.'</b><br />'.

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

    $type_locked = 1;

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

    Display::addFlash(Display::return_message($confirmation_message, 'confirmation', $filter_confirm_msg));

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

if (!empty($course_to_crsind) && !isset($_GET['confirm'])) {

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

    Display::addFlash(Display::return_message($warning_message, 'warning', $filter_warning_msg));

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

        $alllink = $cats[0]->get_links($stud_id);

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

    $allcat = $cats[0]->get_subcategories($stud_id, $course_id, $session_id);

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

    $show_message = Category::show_message_resource_delete($course_id);

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

        $stud_id = api_is_allowed_to_edit() ? null : api_get_user_id();

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

if (isset($first_time) && 1 == $first_time && api_is_allowed_to_edit(null, true)) {

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

                        $form_grade->display();

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

                    $obj->fill_grade_model_select_in_form($form_grade, 'grade_model_id', $grade_model_id);

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

                        $value = $form_grade->exportValue('grade_model_id');

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

                    get_lang('Deleted links').' : <b>'.$number_of_deleted_links.'</b><br /><br />'.

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

$is_platform_admin = api_is_platform_admin();

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

                Category::registerCurrentScore($currentScore, $stud_id, $selectCat);

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

                .'&targetcat='.$move_form->exportValue('move_cat'));

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

        $filter_confirm_msg = false;

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

    $confirmation_message = get_lang('The category has been deleted.');

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

    $filter_confirm_msg = false;

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

        $filter_confirm_msg = false;

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

                $number_of_deleted_evaluations = 0;

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

            $sessionName = api_get_session_name($session_id);

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

        $cat->set_user_id($stud_id);

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

    $move_form = new LinkForm(

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

        $can_edit = api_is_allowed_to_edit(true, true);

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

            if ((1 == count($cats) && empty($grade_model_id)) ||

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

    if ($move_form->validate()) {

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

                (1 == count($cats) && -1 != $grade_model_id)

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

        $visibility_command = 1;

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

                    $form_grade = new FormValidator('grade_model_settings');

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

            $alllink = $cat->get_links($stud_id, true, $course_id, $session_id);

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

                        WHERE id = '.$get_delete_link.' AND type = '.LINK_FORUM_THREAD.'

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

        $filter_confirm_msg = false;

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

    $show_message = Category::show_message_resource_delete($course_id);

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

                if (!empty($grade_models)) {

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

            $allcat = $cat->get_subcategories($stud_id, $course_id, $session_id);

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

                    $is_platform_admin,

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

                .'&targetcat='.$move_form->exportValue('move_cat'));

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

        $targetcat = Category::load($move_form->exportValue('move_cat'));

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

    if ($visibility_command) {

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

                $number_of_deleted_categories = 0;

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

        $session_id,

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

        if (!empty($session_id)) {

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

    $visibility_command = 0;

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

        if ($can_edit) {

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

            $alllink = $cat->get_links($stud_id, true, $course_id, $session_id);

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

        $eval[0]->lock($type_locked);

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

            $sql = 'UPDATE '.$tbl_attendance.' SET

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

    Display::addFlash(Display::return_message($move_form->toHtml(), 'normal', false));

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

$is_course_admin = api_is_allowed_to_edit(null, true);

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

    $alllink = $cats[0]->get_links($stud_id, true);

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

        $course_id,

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

if (isset($first_time) && 1 == $first_time && api_is_allowed_to_edit(null, true)) {

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

                    $obj->fill_grade_model_select_in_form($form_grade, 'grade_model_id', $grade_model_id);

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

            $alleval = $cat->get_evaluations($stud_id, false, $course_id, $session_id);

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

        $filter_confirm_msg = false;

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

    $confirmation_message = get_lang('Assessment deleted');

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

    $number_of_selected_items = count($_POST['id']);

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

                    get_lang('Total resources').' : <b>'.$number_of_selected_items.'</b>';

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

                $filter_confirm_msg = false;

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

                $filter_confirm_msg = false;

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

    Display::addFlash(Display::return_message($confirmation_message, 'confirmation', $filter_confirm_msg));

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

    $allcat = $cats[0]->get_subcategories($stud_id, $course_id, $session_id);

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

            $cat->set_name($course_code);

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

        $cat->setCourseId($course_id);

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

        $session_id,

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

                    if ($form_grade->validate()) {

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

            $allcat = $cat->get_subcategories($stud_id, $course_id, $session_id);

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

            $alleval = $cat->get_evaluations($stud_id, false, $course_id, $session_id);

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

    if ($visibility_command) {

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

        $filter_confirm_msg = false;

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

        $confirmation_message = get_lang('Visibility modified');

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

        $type_locked = 0;

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

        $confirmation_message = get_lang('Evaluation has been unlocked');

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

        $filter_confirm_msg = false;

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

    if (!empty($get_delete_link)) {

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

                        SELECT ref_id FROM '.$tbl_grade_links.'

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

        $confirmation_message = get_lang('The link has been deleted');

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

    $filter_warning_msg = false;

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

                            $number_of_deleted_links++;

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

                    get_lang('Deleted categories').' : <b>'.$number_of_deleted_categories.'</b><br />'.

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

if (isset($move_form)) {

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

    $allcat = $cats[0]->get_subcategories($stud_id, $course_id, $session_id);

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

    $alleval = $cats[0]->get_evaluations($stud_id, true);

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

        $allcat = $cats[0]->get_subcategories($stud_id, $course_id, $session_id);

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

                $certificate = Category::generateUserCertificate($category, $stud_id);

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

            $grade_models = $obj->get_all();

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

            $alleval = $cat->get_evaluations($stud_id, false, $course_id, $session_id);

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

    $cats[0]->set_visible($visibility_command);

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

        $visibility_command = 1;

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

    $filter_confirm_msg = false;

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

        $link = LinkFactory::load($get_delete_link);

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

    $warning_message = get_lang('Warning: moving gradebook elements can be dangerous for the data inside your gradebook.').'<br><br>'.$button;

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

    if (0 == $number_of_selected_items) {

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

                $filter_confirm_msg = false;

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

        $header_names = [

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

            $cat->set_session_id($session_id);

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

        $allcat = $cats[0]->get_subcategories($stud_id, $course_id, $session_id);

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

                    if (!empty($grade_models[$grade_model_id])) {

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

                    $simple_search_form,

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

                            get_lang('Grading model').': '.$grade_models[$grade_model_id]['title']

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

                            get_lang('Grading model').': '.$grade_models[$grade_model_id]['title']

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

                    if (!empty($grade_models[$grade_model_id])) {

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

                    $gradebookTable->td_attributes = [

There are no issues that match your filters.

Category
Status