chamilo/chamilo-lms

View on GitHub
public/main/admin/course_request_edit.php

Summary

Maintainability
A
0 mins
Test Coverage

The parameter $caller_id is not named in camelCase.
Open

function get_caller_name($caller_id)
{
    switch ($caller_id) {
        case 1:
            return 'course_request_accepted.php';

CamelCaseParameterName

Since: 0.2

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

Example

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

Source

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

            $data = CourseCategory::getCategory($course_request_info['category_code']);

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

        if (COURSE_REQUEST_ACCEPTED != $course_request_info['status'] && (int) ($course_request_info['info']) <= 0) {

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

        $values['course_language'] = $course_request_info['course_language'];

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

                                            $course_request_values['wanted_code']

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

if (!is_array($course_request_info)) {

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

if ($course_validation_feature) {

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

            $course_request_values = $form->getSubmitValues();

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

                    $course_request_values['objetives'],

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

                    $course_request_values['exemplary_content']

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

        $values['description'] = $course_request_info['description'];

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

                                $course_request_values['wanted_code']

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

                    switch ($submit_button) {

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

                                            $course_request_values['wanted_code']

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

                        $course_request_values['wanted_code'].' - '.get_lang('CourseCourse codeAlreadyExists')

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

                    $course_request_values['target_audience'],

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

                                            $course_request_values['wanted_code'],

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

function get_caller_name($caller_id)

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

        if (COURSE_REQUEST_ACCEPTED != $course_request_info['status'] &&

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

        $values['visual_code'] = $course_request_info['visual_code'];

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

                $update_ok = CourseRequestManager::update_course_request(

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

                    $course_request_values['title'],

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

        $values['info'] = $course_request_info['info'];

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

            $course_code_ok = $course_request_values['wanted_code'] == $course_request_info['code']

You must use "/**" style comments for a function comment
Open

function get_caller_name($caller_id)

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

Display :: display_header($tool_name);

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

    if (!is_array($course_request_info)) {

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

        $values['title'] = $course_request_info['title'];

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

                $back_url = get_caller_name($caller);

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

$tool_name = get_lang('Edit a course request');

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

            COURSE_REQUEST_REJECTED != $course_request_info['status']

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

        $values['wanted_code'] = $course_request_info['code'];

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

                    $course_request_values['course_language'],

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

                if ($update_ok) {

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

    switch ($caller_id) {

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

    $course_request_info = CourseRequestManager::get_course_request_info($id);

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

        $values['status'] = $course_request_info['status'];

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

            $course_code_ok = $course_request_values['wanted_code'] == $course_request_info['code']

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

                                            $course_request_values['wanted_code']

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

$this_section = SECTION_PLATFORM_ADMIN;

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

        $submit_buttons[] = $form->addButtonSave(get_lang('Save'), 'save_button', true);

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

        if (COURSE_REQUEST_ACCEPTED != $course_request_info['status']) {

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

            $submit_buttons[] = $form->addButtonSave(get_lang('Accept'), 'accept_button', true);

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

        $form->addGroup($submit_buttons);

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

                : !CourseRequestManager::course_code_exists($course_request_values['wanted_code']);

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

            if ($course_code_ok) {

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

                    $course_request_values['user_id'],

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

                                $course_request_values['wanted_code']

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

                header('location:'.$back_url);

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

$course_validation_feature = 'true' === api_get_setting('course_validation');

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

        if (!empty($course_request_info['category_code'])) {

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

        $values['user_id'] = $course_request_info['user_id'];

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

        $values['request_date'] = $course_request_info['request_date'];

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

            $submit_button = isset($_POST['save_button']) ? 'save_button'

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

            $link_to_setting,

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

function get_caller_name($caller_id)

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

        if (COURSE_REQUEST_ACCEPTED != $course_request_info['status'] && (int) ($course_request_info['info']) <= 0) {

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

        $values['objetives'] = $course_request_info['objetives'];

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

        $values['target_audience'] = $course_request_info['target_audience'];

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

                    $course_request_values['wanted_code'],

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

                                            $course_request_values['wanted_code']

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

    $link_to_setting = api_get_path(WEB_CODE_PATH).'admin/settings.php?search_field=course_validation&submit_button=&category=search_setting';

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

if (!$course_validation_feature) {

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

        $values['tutor_name'] = $course_request_info['tutor_name'];

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

        $form->addElement('header', $tool_name);

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

            $submit_buttons[] = $form->addButtonPreview(get_lang('Ask for additional information'), 'ask_info_button', true);

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

        $values['directory'] = $course_request_info['directory'];

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

        $values['exemplary_content'] = $course_request_info['exemplary_content'];

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

            $course_code_ok = $course_request_values['wanted_code'] == $course_request_info['code']

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

                    $course_request_values['description'],

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

                                            $course_request_values['wanted_code']

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

            $submit_buttons[] = $form->addButtonCancel(get_lang('Reject'), 'reject_button', true);

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

                    $course_request_values['category_code'],

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

                                            $course_request_values['wanted_code']

The variable $caller_id is not named in camelCase.
Open

function get_caller_name($caller_id)
{
    switch ($caller_id) {
        case 1:
            return 'course_request_accepted.php';

CamelCaseVariableName

Since: 0.2

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

Example

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

Source

There are no issues that match your filters.

Category
Status