chamilo/chamilo-lms

View on GitHub
public/main/work/edit.php

Summary

Maintainability
A
0 mins
Test Coverage

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

$work_table = Database::get_course_table(TABLE_STUDENT_PUBLICATION);
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

if (false == $is_course_member) {
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

$has_ended = false;
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

$interbreadcrumb[] = ['url' => '#', 'name' => $form_title];
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

    } elseif ($student_can_edit_in_session && false == $has_ended) {
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

    $is_course_member = CourseManager::is_user_subscribed_in_course($user_id, $course_code, true, $session_id);
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

    $is_course_member = CourseManager::is_user_subscribed_in_course($user_id, $course_code, true, $session_id);
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

            $has_expired = false;
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

        $is_author = user_is_author($item_to_edit_id);
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

            $add_to_update = null;
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

    $is_course_member = CourseManager::is_user_subscribed_in_course($user_id, $course_code);
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

    $is_course_member = CourseManager::is_user_subscribed_in_course($user_id, $course_code, true, $session_id);
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

$student_can_edit_in_session = api_is_allowed_to_session_edit(false, true);
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

            $time_expires = api_strtotime($homework['expires_on'], 'UTC');
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

        $expires_on = api_convert_and_format_date($homework['expires_on']);
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

$form->addElement('hidden', 'item_id', $item_id);
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

$_course = api_get_course_info();
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

    if ($student_can_edit_in_session && $check) {
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

                $has_ended = true;
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

$form->addElement('hidden', 'id', $work_id);
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

    header('Location: '.api_get_path(WEB_CODE_PATH).'work/'.$script.'?'.api_get_cidreq().'&id='.$work_id);
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

$this_section = SECTION_COURSES;
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

$session_id = api_get_session_id();
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

$parent_data = $my_folder_data = get_work_data_by_id($work_id);
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

$show_progress_bar = false;
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

if ($is_allowed_to_edit) {
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

            $work_data = get_work_data_by_id($item_to_edit_id);
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

if (!empty($work_id)) {
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

$work_id = isset($_REQUEST['id']) ? (int) ($_REQUEST['id']) : null;
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

$item_id = isset($_REQUEST['item_id']) ? (int) ($_REQUEST['item_id']) : null;
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

$course_info = api_get_course_info();
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

    $is_course_member = CourseManager::is_user_subscribed_in_course($user_id, $course_code);
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

$form_title = get_lang('Edit');
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

$form->addElement('header', $form_title);
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

            $description = isset($_POST['description']) ? $_POST['description'] : $work_data['description'];
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

                    $url = api_get_path(WEB_CODE_PATH).'work/view.php?'.api_get_cidreq().'&id='.$item_to_edit_id;
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

if (empty($work_id) || empty($item_id)) {
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

$parent_data = $my_folder_data = get_work_data_by_id($work_id);
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

    $is_course_member = CourseManager::is_user_subscribed_in_course($user_id, $course_code, true, $session_id);
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

$is_author = false;
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

                $has_expired = true;
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

        'url' => api_get_path(WEB_CODE_PATH).'work/work_list.php?'.api_get_cidreq().'&id='.$work_id,
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

    api_get_self().'?'.api_get_cidreq().'&id='.$work_id,
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

            $time_ends = api_strtotime($homework['ends_on'], 'UTC');
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

    if ($is_allowed_to_edit) {
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

if (empty($work_id) || empty($item_id)) {
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

if (empty($parent_data)) {
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

if ($is_allowed_to_edit && !empty($item_id)) {
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

            $difference = $time_expires - $time_now;
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

    if ($is_allowed_to_edit) {
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

        $item_to_edit_id = (int) ($_POST['item_to_edit']);
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

    } elseif ($student_can_edit_in_session && false == $has_ended) {
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

    $is_course_member = CourseManager::is_user_subscribed_in_course($user_id, $course_code);
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

$is_author = user_is_author($item_id);
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

        $time_now = time();
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

            $difference = $time_expires - $time_now;
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

            $difference2 = $time_ends - $time_now;
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

        'url' => api_get_path(WEB_CODE_PATH).'work/work_list_all.php?'.api_get_cidreq().'&id='.$work_id,
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

            $work_data = get_work_data_by_id($item_to_edit_id);
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

            if ($is_allowed_to_edit && isset($_POST['qualification'])) {
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

$is_allowed_to_edit = api_is_allowed_to_edit();
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

$course_id = api_get_course_int_id();
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

if (empty($session_id)) {
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

if (!$is_author) {
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

        $is_author = user_is_author($item_to_edit_id);
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

$parent_data = $my_folder_data = get_work_data_by_id($work_id);
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

$is_course_member = $is_course_member || api_is_platform_admin();
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

if (!empty($my_folder_data)) {
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

            $difference2 = $time_ends - $time_now;
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

        'name' => $parent_data['title'],
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

        'name' => $parent_data['title'],
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

            '<a href="'.api_get_path(WEB_CODE_PATH).'work/download.php?id='.$item_id.'&'.api_get_cidreq().'">'.
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

if ($is_allowed_to_edit && !empty($item_id)) {
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

        if ($is_author) {
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

    } elseif ($is_author) {
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

$user_id = api_get_user_id();
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

$is_author = user_is_author($item_id);
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

        $ends_on = api_convert_and_format_date($homework['ends_on']);
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

$form->addElement('hidden', 'item_to_edit', $item_id);
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

    $homework = get_work_assignment_by_id($my_folder_data['iid']);
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

                $title = isset($_POST['title']) ? $_POST['title'] : $work_data['title'];
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

        if (api_resource_is_locked_by_gradebook($work_id, LINK_STUDENTPUBLICATION)) {
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

$current_course_tool = TOOL_STUDENTPUBLICATION;
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

$course_code = api_get_course_id();
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

$is_course_member = $is_course_member || api_is_platform_admin();
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

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

$studentPublication = $repo->find($item_id);
Severity: Minor
Found in public/main/work/edit.php by phpcodesniffer

There are no issues that match your filters.

Category
Status