Update from master (format code)

pull/3240/head
Julio Montoya 5 years ago
parent 39483d1b9e
commit fe5352b3f3
  1. 2
      main/admin/access_url_add_courses_to_url.php
  2. 2
      main/admin/access_url_add_usergroup_to_url.php
  3. 2
      main/admin/access_url_add_users_to_url.php
  4. 3
      main/admin/access_url_check_user_session.php
  5. 5
      main/admin/access_url_edit.php
  6. 2
      main/admin/access_url_edit_course_category_to_url.php
  7. 2
      main/admin/access_url_edit_courses_to_url.php
  8. 2
      main/admin/access_url_edit_usergroup_to_url.php
  9. 2
      main/admin/access_url_edit_users_to_url.php
  10. 3
      main/admin/access_urls.php
  11. 3
      main/admin/add_courses_to_usergroup.php
  12. 1
      main/admin/add_drh_to_user.php
  13. 4
      main/admin/add_sessions_to_promotion.php
  14. 4
      main/admin/add_sessions_to_usergroup.php
  15. 4
      main/admin/add_users_to_usergroup.php
  16. 1
      main/admin/archive_cleanup.php
  17. 3
      main/admin/career_dashboard.php
  18. 3
      main/admin/career_diagram.php
  19. 3
      main/admin/careers.php
  20. 3
      main/admin/course_edit.php
  21. 7
      main/admin/course_export.php
  22. 8
      main/admin/course_import.php
  23. 2
      main/admin/course_information.php
  24. 3
      main/admin/course_request_accepted.php
  25. 3
      main/admin/course_request_edit.php
  26. 9
      main/admin/course_request_rejected.php
  27. 3
      main/admin/course_request_review.php
  28. 6
      main/admin/course_user_import.php
  29. 6
      main/admin/course_user_import_by_email.php
  30. 4
      main/admin/dashboard_add_courses_to_user.php
  31. 2
      main/admin/dashboard_add_sessions_to_user.php
  32. 2
      main/admin/dashboard_add_users_to_user.php
  33. 2
      main/admin/email_tester.php
  34. 3
      main/admin/export_certificates.php
  35. 3
      main/admin/extra_field_options.php
  36. 3
      main/admin/extra_field_workflow.php
  37. 3
      main/admin/extra_fields.php
  38. 2
      main/admin/filler.php
  39. 3
      main/admin/grade_models.php
  40. 2
      main/admin/gradebook_dependency.php
  41. 2
      main/admin/gradebook_list.php
  42. 2
      main/admin/languages.php
  43. 8
      main/admin/legal_add.php
  44. 3
      main/admin/promotions.php
  45. 3
      main/admin/questions.php
  46. 2
      main/admin/settings.lib.php
  47. 2
      main/admin/settings.php
  48. 2
      main/admin/skill.php
  49. 2
      main/admin/skill_badge.php
  50. 2
      main/admin/skill_badge_create.php
  51. 2
      main/admin/skill_level.php
  52. 2
      main/admin/skill_list.php
  53. 3
      main/admin/skills.php
  54. 3
      main/admin/skills_gradebook.php
  55. 1
      main/admin/skills_import.php
  56. 3
      main/admin/skills_profile.php
  57. 3
      main/admin/skills_wheel.php
  58. 2
      main/admin/specific_fields_add.php
  59. 3
      main/admin/statistics.php
  60. 1
      main/admin/system_status.php
  61. 3
      main/admin/user_export.php
  62. 2
      main/admin/user_import.php
  63. 3
      main/admin/user_information.php
  64. 12
      main/admin/user_list.php
  65. 6
      main/admin/user_list_consent.php
  66. 2
      main/admin/user_move_stats.php
  67. 2
      main/admin/user_update_import.php
  68. 3
      main/admin/usergroup_export.php
  69. 2
      main/admin/usergroup_import.php
  70. 4
      main/admin/usergroup_user_import.php
  71. 3
      main/admin/usergroup_users.php
  72. 3
      main/admin/usergroups.php
  73. 14
      main/announcements/announcements.php
  74. 4
      main/announcements/download.php
  75. 6
      main/badge/assertion.php
  76. 2
      main/badge/assign.php
  77. 2
      main/badge/class.php
  78. 2
      main/badge/criteria.php
  79. 4
      main/badge/issued.php
  80. 4
      main/badge/issued_all.php
  81. 2
      main/badge/issuer.php
  82. 2
      main/blog/blog.php
  83. 2
      main/blog/blog_admin.php
  84. 4
      main/blog/download.php
  85. 7
      main/calendar/agenda.php
  86. 5
      main/calendar/agenda_js.php
  87. 6
      main/calendar/agenda_list.php
  88. 2
      main/course_description/add.php
  89. 2
      main/course_description/course_description_controller.php
  90. 2
      main/course_description/edit.php
  91. 2
      main/course_description/layout.php
  92. 4
      main/course_info/download.php
  93. 2
      main/course_info/legal.php
  94. 6
      main/dropbox/dropbox_init.inc.php
  95. 2
      main/dropbox/update.php
  96. 3
      main/exercise/Draggable.php
  97. 1
      main/exercise/HotSpotDelineation.php
  98. 5
      main/exercise/Hpdownload.php
  99. 3
      main/exercise/MultipleAnswerTrueFalseDegreeCertainty.php
  100. 3
      main/exercise/ReadingComprehension.php
  101. Some files were not shown because too many files have changed in this diff Show More

@ -5,8 +5,6 @@
* It displays a list of users and a list of courses;
* you can select multiple users and courses and then click on.
*
* @package chamilo.admin
*
* @author Julio Montoya <gugli100@gmail.com>
*/
$cidReset = true;

@ -5,8 +5,6 @@
* It displays a list of users and a list of courses;
* you can select multiple users and courses and then click on.
*
* @package chamilo.admin
*
* @author Julio Montoya <gugli100@gmail.com>
*/
$cidReset = true;

@ -5,8 +5,6 @@
* It displays a list of users and a list of courses;
* you can select multiple users and courses and then click on.
*
* @package chamilo.admin
*
* @author Julio Montoya <gugli100@gmail.com>
*/
$cidReset = true;

@ -1,9 +1,8 @@
<?php
/* For licensing terms, see /license.txt */
/**
* @author Bart Mollet, Julio Montoya lot of fixes
*
* @package chamilo.admin
*/
$cidReset = true;
require_once __DIR__.'/../inc/global.inc.php';

@ -1,9 +1,8 @@
<?php
/* For licensing terms, see /license.txt */
/**
* @package chamilo.admin
*
* @author Julio Montoya <gugli100@gmail.com>
*/
$cidReset = true;
@ -31,7 +30,7 @@ if ($form->validate()) {
$url_to_go = 'access_urls.php';
if (!empty($url_id)) {
//we can't change the status of the url with id=1
if ($url_id == 1) {
if (1 == $url_id) {
$active = 1;
}

@ -2,8 +2,6 @@
/* For licensing terms, see /license.txt */
/**
* @package chamilo.admin
*
* @author Julio Montoya <gugli100@gmail.com>
*/

@ -2,8 +2,6 @@
/* For licensing terms, see /license.txt */
/**
* @package chamilo.admin
*
* @author Julio Montoya <gugli100@gmail.com>
*/
// resetting the course id

@ -2,8 +2,6 @@
/* For licensing terms, see /license.txt */
/**
* @package chamilo.admin
*
* @author Julio Montoya <gugli100@gmail.com>
*/
// resetting the course id

@ -1,8 +1,6 @@
<?php
/* For licensing terms, see /license.txt */
/**
* @package chamilo.admin
*
* @author Julio Montoya <gugli100@gmail.com>
*/
// resetting the course id

@ -1,10 +1,9 @@
<?php
/* For licensing terms, see /license.txt */
/**
* Frontend script for multiple access urls.
*
* @package chamilo.admin
*
* @author Julio Montoya <gugli100@gmail.com>
* @author Yannick Warnier <yannick.warnier@beeznest.com>
*/

@ -1,8 +1,5 @@
<?php
/* For licensing terms, see /license.txt */
/**
* @package chamilo.admin
*/
// Resetting the course id.
$cidReset = true;

@ -1,4 +1,5 @@
<?php
/* For licensing terms, see /license.txt */
use Chamilo\CoreBundle\Entity\UserRelUser;

@ -1,8 +1,6 @@
<?php
/* For licensing terms, see /license.txt */
/**
* @package chamilo.admin
*/
// resetting the course id
$cidReset = true;

@ -1,8 +1,6 @@
<?php
/* For licensing terms, see /license.txt */
/**
* @package chamilo.admin
*/
// resetting the course id
$cidReset = true;

@ -1,10 +1,6 @@
<?php
/* For licensing terms, see /license.txt */
/**
* @package chamilo.admin
*/
// resetting the course id
$cidReset = true;

@ -4,7 +4,6 @@
$cidReset = true;
// including some necessary files
require_once __DIR__.'/../inc/global.inc.php';
ini_set('memory_limit', -1);

@ -1,10 +1,9 @@
<?php
/* For licensing terms, see /license.txt */
/**
* Careers dashboard.
*
* @package chamilo.admin.career
*/
$cidReset = true;
require_once __DIR__.'/../inc/global.inc.php';

@ -1,9 +1,6 @@
<?php
/* For licensing terms, see /license.txt */
/**
* @package chamilo.admin
*/
/*
*

@ -3,9 +3,6 @@
use ChamiloSession as Session;
/**
* @package chamilo.admin
*/
$cidReset = true;
require_once __DIR__.'/../inc/global.inc.php';

@ -6,9 +6,6 @@ use Chamilo\CoreBundle\Entity\CourseCategory;
use Chamilo\CoreBundle\Entity\Repository\CourseCategoryRepository;
use Chamilo\UserBundle\Entity\User;
/**
* @package chamilo.admin
*/
$cidReset = true;
require_once __DIR__.'/../inc/global.inc.php';

@ -1,10 +1,9 @@
<?php
/* For licensing terms, see /license.txt */
/**
* This tool allows platform admins to export courses to CSV file.
*
* @package chamilo.admin
*/
$cidReset = true;
@ -32,10 +31,10 @@ $courses = $selected_courses = [];
if (isset($_POST['formSent']) && $_POST['formSent']) {
$formSent = $_POST['formSent'];
$select_type = intval($_POST['select_type']);
$select_type = (int) ($_POST['select_type']);
$file_type = $_POST['file_type'];
if ($select_type == 2) {
if (2 == $select_type) {
// Get selected courses from courses list in form sent
$selected_courses = $_POST['course_code'];
if (is_array($selected_courses)) {

@ -4,8 +4,6 @@
/**
* This tool allows platform admins to create courses by uploading a CSV file
* Copyright (c) 2005 Bart Mollet <bart.mollet@hogent.be>.
*
* @package chamilo.admin
*/
/**
@ -13,7 +11,7 @@
*
* @param array $courses
*
* @return array $errors
* @return array
*/
function validate_courses_data($courses)
{
@ -159,9 +157,7 @@ function save_courses_data($courses)
*/
function parse_csv_courses_data($file)
{
$courses = Import::csv_reader($file);
return $courses;
return Import::csv_reader($file);
}
$cidReset = true;

@ -4,8 +4,6 @@
* This script gives information about a course.
*
* @author Bart Mollet
*
* @package chamilo.admin
*/
$cidReset = true;
require_once __DIR__.'/../inc/global.inc.php';

@ -1,11 +1,10 @@
<?php
/* For licensing terms, see /license.txt */
/**
* A list containig the accepted course requests.
*
* @package chamilo.admin
*
* @author José Manuel Abuin Mosquera <chema@cesga.es>, 2010
* @author Bruno Rubio Gayo <brubio@cesga.es>, 2010
* Centro de Supercomputacion de Galicia (CESGA)

@ -1,11 +1,10 @@
<?php
/* For licensing terms, see /license.txt */
/**
* A page for detailed preview or edition of a given course request.
*
* @package chamilo.admin
*
* @author Ivan Tcholakov <ivantcholakov@gmail.com>, 2010
*/
$cidReset = true;

@ -1,11 +1,10 @@
<?php
/* For licensing terms, see /license.txt */
/**
* A list containing the rejected course requests.
*
* @package chamilo.admin
*
* @author José Manuel Abuin Mosquera <chema@cesga.es>, 2010
* @author Bruno Rubio Gayo <brubio@cesga.es>, 2010
* Centro de Supercomputacion de Galicia (CESGA)
@ -114,9 +113,9 @@ function get_request_data($from, $number_of_items, $column, $direction)
$keyword = isset($_GET['keyword']) ? Database::escape_string(trim($_GET['keyword'])) : '';
$course_request_table = Database::get_main_table(TABLE_MAIN_COURSE_REQUEST);
$from = intval($from);
$number_of_items = intval($number_of_items);
$column = intval($column);
$from = (int) $from;
$number_of_items = (int) $number_of_items;
$column = (int) $column;
$direction = !in_array(strtolower(trim($direction)), ['asc', 'desc']) ? 'asc' : $direction;
$sql = "SELECT

@ -1,11 +1,10 @@
<?php
/* For licensing terms, see /license.txt */
/**
* A list containing the pending course requests.
*
* @package chamilo.admin
*
* @author José Manuel Abuin Mosquera <chema@cesga.es>, 2010
* Centro de Supercomputacion de Galicia (CESGA)
* @author Ivan Tcholakov <ivantcholakov@gmail.com> (technical adaptation for Chamilo 1.8.8), 2010

@ -4,8 +4,6 @@
/**
* This tool allows platform admins to update course-user relations by uploading
* a CSV file.
*
* @package chamilo.admin
*/
/**
@ -142,9 +140,7 @@ function save_data($users_courses)
*/
function parse_csv_data($file)
{
$courses = Import::csvToArray($file);
return $courses;
return Import::csvToArray($file);
}
$cidReset = true;

@ -4,8 +4,6 @@ exit;
/**
* This tool allows platform admins to update course-user relations by uploading
* a CSV file.
*
* @package chamilo.admin
*/
/**
* Validates the imported data.
@ -140,9 +138,7 @@ function save_data($users_courses)
*/
function parse_csv_data($file)
{
$courses = Import::csv_reader($file);
return $courses;
return Import::csv_reader($file);
}
$cidReset = true;

@ -3,8 +3,6 @@
/**
* Interface for assigning courses to Human Resources Manager.
*
* @package chamilo.admin
*/
// resetting the course id
$cidReset = true;
@ -30,7 +28,7 @@ $tbl_course_rel_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
$tbl_course_rel_access_url = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_COURSE);
// initializing variables
$user_id = intval($_GET['user']);
$user_id = (int) ($_GET['user']);
$user_info = api_get_user_info($user_id);
$user_anonymous = api_get_anonymous_id();
$current_user_id = api_get_user_id();

@ -3,8 +3,6 @@
/**
* Interface for assigning sessions to Human Resources Manager.
*
* @package chamilo.admin
*/
// resetting the course id
$cidReset = true;

@ -3,8 +3,6 @@
/**
* Interface for assigning users to Human Resources Manager.
*
* @package chamilo.admin
*/
// resetting the course id

@ -2,8 +2,6 @@
/* For licensing terms, see /license.txt */
/**
* Index page of the admin tools.
*
* @package chamilo.admin
*/
// Resetting the course id.
$cidReset = true;

@ -1,9 +1,6 @@
<?php
/* For licensing terms, see /license.txt */
/**
* @package chamilo.admin
*/
$cidReset = true;
require_once __DIR__.'/../inc/global.inc.php';
Display::display_header(null);

@ -1,9 +1,6 @@
<?php
/* For licensing terms, see /license.txt */
/**
* @package chamilo.admin
*/
$cidReset = true;
require_once __DIR__.'/../inc/global.inc.php';

@ -3,9 +3,6 @@
use Chamilo\CoreBundle\Entity\ExtraFieldOptionRelFieldOption;
/**
* @package chamilo.admin
*/
$cidReset = true;
require_once __DIR__.'/../inc/global.inc.php';

@ -1,9 +1,6 @@
<?php
/* For licensing terms, see /license.txt */
/**
* @package chamilo.admin
*/
$cidReset = true;
require_once __DIR__.'/../inc/global.inc.php';

@ -3,8 +3,6 @@
/**
* Index of the admin tools.
*
* @package chamilo.admin
*/
// resetting the course id

@ -1,9 +1,6 @@
<?php
/* For licensing terms, see /license.txt */
/**
* @package chamilo.admin
*/
$cidReset = true;
require_once __DIR__.'/../inc/global.inc.php';

@ -8,7 +8,7 @@ require_once __DIR__.'/../inc/global.inc.php';
api_protect_admin_script();
$allow = api_get_configuration_value('gradebook_dependency');
if ($allow == false) {
if (false == $allow) {
api_not_allowed(true);
}

@ -10,7 +10,7 @@ require_once __DIR__.'/../inc/global.inc.php';
api_protect_admin_script();
$allow = api_get_configuration_value('gradebook_dependency');
if ($allow == false) {
if (false == $allow) {
api_not_allowed(true);
}

@ -12,8 +12,6 @@
* @author Roan EMbrechts, code cleaning
*
* @since Dokeos 1.6
*
* @package chamilo.admin
*/
// we are in the admin area so we do not need a course id

@ -3,8 +3,6 @@
/**
* Management of legal conditions.
*
* @package chamilo.admin
*/
$cidReset = true;
require_once __DIR__.'/../inc/global.inc.php';
@ -12,7 +10,7 @@ $this_section = SECTION_PLATFORM_ADMIN;
api_protect_admin_script();
if (api_get_setting('allow_terms_conditions') !== 'true') {
if ('true' !== api_get_setting('allow_terms_conditions')) {
api_not_allowed(true);
}
@ -70,10 +68,10 @@ if ($form->validate()) {
$default['content'] = $content;
if (isset($values['language'])) {
if ($submit == 'back') {
if ('back' == $submit) {
header('Location: legal_add.php');
exit;
} elseif ($submit === 'save') {
} elseif ('save' === $submit) {
$id = LegalManager::add($lang, $content, $type, $changes, $values);
if (!empty($id)) {
Display::addFlash(Display::return_message(get_lang('TermAndConditionSaved'), 'success'));

@ -1,9 +1,6 @@
<?php
/* For licensing terms, see /license.txt */
/**
* @package chamilo.admin
*/
$cidReset = true;
require_once __DIR__.'/../inc/global.inc.php';

@ -7,9 +7,6 @@ use ChamiloSession as Session;
use Doctrine\Common\Collections\Criteria;
use Knp\Component\Pager\Paginator;
/**
* @package chamilo.admin
*/
$cidReset = true;
require_once __DIR__.'/../inc/global.inc.php';

@ -13,8 +13,6 @@ use Symfony\Component\Filesystem\Filesystem;
* @author Guillaume Viguier <guillaume@viguierjust.com>
*
* @since Chamilo 1.8.7
*
* @package chamilo.admin
*/
define('CSS_UPLOAD_PATH', api_get_path(SYS_APP_PATH).'Resources/public/css/themes/');

@ -9,8 +9,6 @@ use ChamiloSession as Session;
*
* @author Patrick Cool
* @author Julio Montoya - Multiple URL site
*
* @package chamilo.admin
*/
// Resetting the course id.

@ -5,8 +5,6 @@ use Chamilo\CoreBundle\Entity\Skill;
/**
* This script manages the skills, levels and profiles assignments.
*
* @package chamilo.skill
*/
$cidReset = true;
require_once __DIR__.'/../inc/global.inc.php';

@ -4,8 +4,6 @@
* Show information about Mozilla OpenBadges.
*
* @author Angel Fernando Quiroz Campos <angel.quiroz@beeznest.com>
*
* @package chamilo.admin.openbadges
*/
$cidReset = true;

@ -5,8 +5,6 @@
* Show information about Mozilla OpenBadges.
*
* @author Angel Fernando Quiroz Campos <angel.quiroz@beeznest.com>
*
* @package chamilo.admin.openbadges
*/
$cidReset = true;

@ -5,8 +5,6 @@ use Chamilo\SkillBundle\Entity\Level;
/**
* Add a skill Level.
*
* @package chamilo.skill
*/
$cidReset = true;

@ -5,8 +5,6 @@
* Skill list for management.
*
* @author Angel Fernando Quiroz Campos <angel.quiroz@beeznest.com>
*
* @package chamilo.admin
*/
$cidReset = true;

@ -1,9 +1,6 @@
<?php
/* For licensing terms, see /license.txt */
/**
* @package chamilo.admin
*/
$cidReset = true;
require_once __DIR__.'/../inc/global.inc.php';

@ -1,9 +1,6 @@
<?php
/* For licensing terms, see /license.txt */
/**
* @package chamilo.admin
*/
$cidReset = true;
require_once __DIR__.'/../inc/global.inc.php';

@ -3,7 +3,6 @@
/**
* This tool allows platform admins to add skills by uploading a CSV or XML file.
*
* @package chamilo.admin
* @documentation Some interesting basic skills can be found in the "Skills"
* section here: http://en.wikipedia.org/wiki/Personal_knowledge_management
*/

@ -3,9 +3,6 @@
use ChamiloSession as Session;
/**
* @package chamilo.admin
*/
$cidReset = true;
require_once __DIR__.'/../inc/global.inc.php';
$this_section = SECTION_PLATFORM_ADMIN;

@ -1,9 +1,6 @@
<?php
/* For licensing terms, see /license.txt */
/**
* @package chamilo.admin
*/
$cidReset = true;
require_once __DIR__.'/../inc/global.inc.php';

@ -3,8 +3,6 @@
/**
* Add form.
*
* @package chamilo.admin
*/
// Resetting the course id.

@ -1,9 +1,6 @@
<?php
/* For licensing terms, see /license.txt */
/**
* @package chamilo.admin
*/
$cidReset = true;
require_once __DIR__.'/../inc/global.inc.php';
$this_section = SECTION_PLATFORM_ADMIN;

@ -1,7 +1,6 @@
<?php
/* For licensing terms, see /license.txt */
/**
* @author Julio Montoya <gugli100@gmail.com>
*/

@ -1,9 +1,6 @@
<?php
/* For licensing terms, see /license.txt */
/**
* @package chamilo.admin
*/
$cidReset = true;
require_once __DIR__.'/../inc/global.inc.php';

@ -6,8 +6,6 @@ use ChamiloSession as Session;
/**
* This tool allows platform admins to add users by uploading a CSV or XML file.
*
* @package chamilo.admin
*/
$cidReset = true;
require_once __DIR__.'/../inc/global.inc.php';

@ -653,7 +653,7 @@ if ($hrmList) {
echo '</div>';
}
if ($user['status'] == DRH) {
if (DRH == $user['status']) {
$usersAssigned = UserManager::get_users_followed_by_drh($userId);
if ($usersAssigned) {
@ -700,7 +700,6 @@ echo Tracking::displayUserSkills(
);
if (api_get_configuration_value('allow_career_users')) {
$careers = UserManager::getUserCareers($userId);
if (!empty($careers)) {
echo Display::page_subheader(get_lang('Careers'), null, 'h3', ['class' => 'section-title']);
$table = new HTML_Table(['class' => 'data_table']);

@ -485,7 +485,7 @@ function get_user_data($from, $number_of_items, $column, $direction)
alt="'.api_get_person_name($user[2], $user[3]).'"
title="'.api_get_person_name($user[2], $user[3]).'" />';
if ($user[7] == 1 && !empty($user['exp'])) {
if (1 == $user[7] && !empty($user['exp'])) {
// check expiration date
$expiration_time = convert_sql_date($user['exp']);
// if expiration date is passed, store a special value for active field
@ -820,20 +820,20 @@ function active_filter($active, $params, $row)
{
$_user = api_get_user_info();
if ($active == '1') {
if ('1' == $active) {
$action = 'Lock';
$image = 'accept';
} elseif ($active == '-1') {
} elseif ('-1' == $active) {
$action = 'edit';
$image = 'warning';
} elseif ($active == '0') {
} elseif ('0' == $active) {
$action = 'Unlock';
$image = 'error';
}
$result = '';
if ($action === 'edit') {
if ('edit' === $action) {
$result = Display::return_icon(
$image.'.png',
get_lang('AccountExpired'),
@ -1170,7 +1170,7 @@ $table_result = $table->return_table();
$extra_search_options = '';
// Try to search the user everywhere
if ($table->get_total_number_of_items() == 0) {
if (0 == $table->get_total_number_of_items()) {
if (api_get_multiple_access_url() && isset($_REQUEST['keyword'])) {
$keyword = Database::escape_string($_REQUEST['keyword']);
$conditions = ['username' => $keyword];

@ -6,8 +6,6 @@ use ChamiloSession as Session;
/**
* @author Bart Mollet
* @author Julio Montoya <gugli100@gmail.com> BeezNest 2011
*
* @package chamilo.admin
*/
$cidReset = true;
require_once __DIR__.'/../inc/global.inc.php';
@ -100,7 +98,7 @@ function prepare_user_sql_query($getCount)
}
}
if ($atLeastOne == false) {
if (false == $atLeastOne) {
$keywordListValues = [];
}
@ -225,7 +223,7 @@ function get_user_data($from, $number_of_items, $column, $direction)
alt="'.api_get_person_name($user[2], $user[3]).'"
title="'.api_get_person_name($user[2], $user[3]).'" />';
if ($user[7] == 1 && !empty($user[10])) {
if (1 == $user[7] && !empty($user[10])) {
// check expiration date
$expiration_time = convert_sql_date($user[10]);
// if expiration date is passed, store a special value for active field

@ -3,8 +3,6 @@
/**
* User move script (to move between courses and sessions).
*
* @package chamilo.admin
*/
$cidReset = true;
require_once __DIR__.'/../inc/global.inc.php';

@ -3,8 +3,6 @@
/**
* This tool allows platform admins to add users by uploading a CSV or XML file.
*
* @package chamilo.admin
*/
use Ddeboer\DataImport\Reader\CsvReader;

@ -1,9 +1,6 @@
<?php
/* For licensing terms, see /license.txt */
/**
* @package chamilo.admin
*/
$cidReset = true;
require_once __DIR__.'/../inc/global.inc.php';

@ -5,8 +5,6 @@
* This tool allows platform admins to add classes by uploading a CSV file.
*
* @todo Add some langvars to DLTT
*
* @package chamilo.admin
*/
/**

@ -1,8 +1,6 @@
<?php
/* For licensing terms, see /license.txt */
/**
* @package chamilo.admin
*/
/**
* Code
* This tool allows platform admins to update class-user relations by uploading

@ -1,9 +1,6 @@
<?php
/* For licensing terms, see /license.txt */
/**
* @package chamilo.admin
*/
require_once __DIR__.'/../inc/global.inc.php';
$this_section = SECTION_PLATFORM_ADMIN;

@ -1,9 +1,6 @@
<?php
/* For licensing terms, see /license.txt */
/**
* @package chamilo.admin
*/
$cidReset = true;
require_once __DIR__.'/../inc/global.inc.php';

@ -11,8 +11,6 @@
* Announcements tool and also add the resource linker here. The database also needed refactoring
* as there was no title field (the title was merged into the content field) multiple functions
*/
// use anonymous mode when accessing this course tool
$use_anonymous = true;
require_once __DIR__.'/../inc/global.inc.php';
@ -97,13 +95,13 @@ switch ($action) {
/* Move announcement up/down */
if (!empty($_GET['down'])) {
$thisAnnouncementId = intval($_GET['down']);
$sortDirection = "DESC";
$thisAnnouncementId = (int) ($_GET['down']);
$sortDirection = 'DESC';
}
if (!empty($_GET['up'])) {
$thisAnnouncementId = intval($_GET['up']);
$sortDirection = "ASC";
$thisAnnouncementId = (int) ($_GET['up']);
$sortDirection = 'ASC';
}
if (!empty($sortDirection)) {
@ -327,7 +325,7 @@ switch ($action) {
case 'delete_all':
if (api_is_allowed_to_edit()) {
$allow = api_get_configuration_value('disable_delete_all_announcements');
if ($allow === false) {
if (false === $allow) {
AnnouncementManager::delete_all_announcements($_course);
Display::addFlash(Display::return_message(get_lang('AnnouncementDeletedAll')));
}
@ -614,7 +612,7 @@ switch ($action) {
$config = api_get_configuration_value('announcements_hide_send_to_hrm_users');
if ($config === false) {
if (false === $config) {
$form->addCheckBox(
'send_to_hrm_users',
null,

@ -41,7 +41,7 @@ if (is_dir($full_file_name)) {
//remove last slash if present
//$doc_url = ($doc_url{strlen($doc_url)-1}=='/')?substr($doc_url,0,strlen($doc_url)-1):$doc_url;
//mod_rewrite can change /some/path/ to /some/path// in some cases, so clean them all off (René)
while ($doc_url[$dul = strlen($doc_url) - 1] == '/') {
while ('/' == $doc_url[$dul = strlen($doc_url) - 1]) {
$doc_url = substr($doc_url, 0, $dul);
}
//create the path
@ -71,7 +71,7 @@ if (Database::num_rows($result) > 0) {
)
) {
$result = DocumentManager::file_send_for_download($full_file_name, true, $title);
if ($result === false) {
if (false === $result) {
api_not_allowed(true);
}
}

@ -5,8 +5,6 @@
* Show information about a new assertion.
*
* @author Angel Fernando Quiroz Campos <angel.quiroz@beeznest.com>
*
* @package chamilo.badge
*/
require_once __DIR__.'/../inc/global.inc.php';
@ -15,7 +13,7 @@ $skillId = isset($_GET['skill']) ? (int) $_GET['skill'] : 0;
$courseId = isset($_GET['course']) ? (int) $_GET['course'] : 0;
$sessionId = isset($_GET['session']) ? (int) $_GET['session'] : 0;
if ($userId === 0 || $skillId === 0) {
if (0 === $userId || 0 === $skillId) {
exit;
}
@ -32,7 +30,7 @@ $userSkill = $objSkillRelUser->getByUserAndSkill(
$sessionId
);
if ($userSkill == false) {
if (false == $userSkill) {
exit;
}

@ -8,8 +8,6 @@ use Skill as SkillManager;
* Page for assign skills to a user.
*
* @author: Jose Loguercio <jose.loguercio@beeznest.com>
*
* @package chamilo.badge
*/
require_once __DIR__.'/../inc/global.inc.php';

@ -5,8 +5,6 @@
* Show information about the OpenBadge class.
*
* @author Angel Fernando Quiroz Campos <angel.quiroz@beeznest.com>
*
* @package chamilo.badge
*/
require_once __DIR__.'/../inc/global.inc.php';

@ -5,8 +5,6 @@
* Show information about OpenBadge criteria.
*
* @author Angel Fernando Quiroz Campos <angel.quiroz@beeznest.com>
*
* @package chamilo.badge
*/
require_once __DIR__.'/../inc/global.inc.php';

@ -10,8 +10,6 @@ use SkillRelUser as SkillRelUserManager;
*
* @author Angel Fernando Quiroz Campos <angel.quiroz@beeznest.com>
* @author José Loguercio Silva <jose.loguercio@beeznest.com>
*
* @package chamilo.badge
*/
require_once __DIR__.'/../inc/global.inc.php';
@ -233,7 +231,7 @@ if ($allowExport) {
$backpack = 'https://backpack.openbadges.org/';
$configBackpack = api_get_setting('openbadges_backpack');
if (strcmp($backpack, $configBackpack) !== 0) {
if (0 !== strcmp($backpack, $configBackpack)) {
$backpack = $configBackpack;
if (substr($backpack, -1) !== '/') {
$backpack .= '/';

@ -9,8 +9,6 @@ use SkillRelUser as SkillRelUserManager;
* Show information about all issued badges with same skill by user.
*
* @author José Loguercio Silva <jose.loguercio@beeznest.com>
*
* @package chamilo.badge
*/
require_once __DIR__.'/../inc/global.inc.php';
@ -220,7 +218,7 @@ foreach ($userSkills as $index => $skillIssue) {
$backpack = 'https://backpack.openbadges.org/';
$configBackpack = api_get_setting('openbadges_backpack');
if (strcmp($backpack, $configBackpack) !== 0) {
if (0 !== strcmp($backpack, $configBackpack)) {
$backpack = $configBackpack;
if (substr($backpack, -1) !== '/') {
$backpack .= '/';

@ -5,8 +5,6 @@
* Show information about the OpenBadge issuer.
*
* @author Angel Fernando Quiroz Campos <angel.quiroz@beeznest.com>
*
* @package chamilo.badge
*/
require_once __DIR__.'/../inc/global.inc.php';

@ -3,8 +3,6 @@
/**
* BLOG HOMEPAGE
* This file takes care of all blog navigation and displaying.
*
* @package chamilo.blogs
*/
require_once __DIR__.'/../inc/global.inc.php';

@ -4,8 +4,6 @@
/**
* BLOG HOMEPAGE
* This file takes care of all blog navigation and displaying.
*
* @package chamilo.blogs
*/
require_once __DIR__.'/../inc/global.inc.php';
$current_course_tool = TOOL_BLOGS;

@ -5,8 +5,6 @@
* Html files are parsed to fix a few problems with URLs,
* but this code will hopefully be replaced soon by an Apache URL
* rewrite mechanism.
*
* @package chamilo.blogs
*/
session_cache_limiter('public');
@ -36,7 +34,7 @@ $full_file_name = api_get_path(SYS_COURSE_PATH).api_get_course_path().'/upload/b
//if the rewrite rule asks for a directory, we redirect to the course view
if (is_dir($full_file_name)) {
//remove last slash if present
while ($doc_url[$dul = strlen($doc_url) - 1] == '/') {
while ('/' == $doc_url[$dul = strlen($doc_url) - 1]) {
$doc_url = substr($doc_url, 0, $dul);
}
//create the path

@ -1,10 +1,6 @@
<?php
/* For licensing terms, see /license.txt */
/**
* @package chamilo.calendar
*/
// use anonymous mode when accessing this course tool
$use_anonymous = true;
require_once __DIR__.'/../inc/global.inc.php';
@ -31,10 +27,7 @@ if (empty($action)) {
$logInfo = [
'tool' => TOOL_CALENDAR_EVENT,
'tool_id' => 0,
'tool_id_detail' => 0,
'action' => $action,
'info' => '',
];
Event::registerLog($logInfo);

@ -1,9 +1,6 @@
<?php
/* For licensing terms, see /license.txt */
/**
* @package chamilo.calendar
*/
// use anonymous mode when accessing this course tool
$use_anonymous = true;
@ -274,7 +271,7 @@ $form->addHtmlEditor(
]
);
if ($agenda->type === 'course') {
if ('course' === $agenda->type) {
$form->addHtml('<div id="add_as_announcement_div" style="display: none">');
$form->addElement('checkbox', 'add_as_annonuncement', null, get_lang('AddAsAnnouncement'));
$form->addHtml('</div>');

@ -1,17 +1,13 @@
<?php
/* For licensing terms, see /license.txt */
/**
* @package chamilo.calendar
*/
require_once __DIR__.'/../inc/global.inc.php';
$action = isset($_GET['action']) ? Security::remove_XSS($_GET['action']) : 'calendar_list';
$logInfo = [
'tool' => TOOL_CALENDAR_EVENT,
'tool_id' => 0,
'tool_id_detail' => 0,
'action' => $action,
];
Event::registerLog($logInfo);

@ -5,8 +5,6 @@
* View (MVC patter) for adding a course description.
*
* @author Christian Fasanando <christian1827@gmail.com>
*
* @package chamilo.course_description
*/
// protect a course script

@ -7,8 +7,6 @@
* it should be included inside a dispatcher file (e.g: index.php).
*
* @author Christian Fasanando <christian1827@gmail.com>
*
* @package chamilo.course_description
*/
class CourseDescriptionController
{

@ -5,8 +5,6 @@
* View (MVC patter) for editing a course description.
*
* @author Christian Fasanando <christian1827@gmail.com>
*
* @package chamilo.course_description
*/
// protect a course script

@ -5,8 +5,6 @@
* Layout (principal view) used for structuring other views.
*
* @author Christian Fasanando <christian1827@gmail.com>
*
* @package chamilo.course_description
*/
// protect a course script

@ -5,8 +5,6 @@ use Chamilo\CourseBundle\Component\CourseCopy\CourseArchiver;
/**
* Download script for course info.
*
* @package chamilo.course_info
*/
require_once __DIR__.'/../inc/global.inc.php';
$this_section = SECTION_COURSES;
@ -32,7 +30,7 @@ if (in_array($extension, ['xml', 'csv']) &&
(api_is_platform_admin(true) || api_is_drh())
) {
$content_type = 'application/force-download';
} elseif ($extension === 'zip' && $_cid && (api_is_platform_admin(true) || api_is_course_admin())) {
} elseif ('zip' === $extension && $_cid && (api_is_platform_admin(true) || api_is_course_admin())) {
$content_type = 'application/force-download';
}

@ -23,7 +23,7 @@ $enabled = api_get_plugin_setting('courselegal', 'tool_enable');
$pluginExtra = null;
$pluginLegal = false;
if ($enabled == 'true') {
if ('true' == $enabled) {
$pluginLegal = true;
require_once api_get_path(SYS_PLUGIN_PATH).'courselegal/config.php';
$plugin = CourseLegalPlugin::create();

@ -15,8 +15,6 @@ use ChamiloSession as Session;
* @author Roan Embrechts, virtual course support
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University (see history version 1.3)
*
* @package chamilo.dropbox
*
* @todo complete refactoring. Currently there are about at least 3 sql queries needed for every individual dropbox document.
* first we find all the documents that were sent (resp. received) by the user
* then for every individual document the user(s)information who received (resp. sent) the document is searched
@ -108,8 +106,6 @@ Version 1.1
* download file / folder (download icon)
* same action on multiple documents
* extended feedback
*
* @package chamilo.dropbox
*/
require_once __DIR__.'/../inc/global.inc.php';
$is_allowed_in_course = api_is_allowed_in_course();
@ -156,7 +152,7 @@ if (empty($session_id)) {
// off all the documents that have already been sent.
// @todo consider moving the javascripts in a function that displays the javascripts
// only when it is needed.
if ($action == 'add') {
if ('add' == $action) {
$dropbox_person = new Dropbox_Person(
$user_id,
$is_courseAdmin,

@ -6,7 +6,7 @@ require_once 'dropbox_init.inc.php';
api_protect_course_script();
if (api_get_session_id() != 0 && !api_is_allowed_to_session_edit(false, true)) {
if (0 != api_get_session_id() && !api_is_allowed_to_session_edit(false, true)) {
api_not_allowed(true);
}

@ -1,4 +1,5 @@
<?php
/* For licensing terms, see /license.txt */
/**
@ -158,7 +159,7 @@ class Draggable extends Question
} else {
$form->setDefaults(['orientation' => 'h']);
if ($this->isContent == 1) {
if (1 == $this->isContent) {
$form->setDefaults($defaults);
}
}

@ -1,4 +1,5 @@
<?php
/* For licensing terms, see /license.txt */
/**

@ -1,10 +1,9 @@
<?php
/* For licensing terms, see /license.txt */
/**
* This script shows the list of exercises for administrators and students.
*
* @package chamilo.exercise
*
* @author Istvan Mandak
*
* @version $Id: Hpdownload.php 22201 2009-07-17 19:57:03Z cfasanando $
@ -41,7 +40,7 @@ if (!Security::check_abs_path($full_file_name, $course_path.'/')) {
}
$extension = explode('.', $filename);
$extension = strtolower($extension[sizeof($extension) - 1]);
$extension = strtolower($extension[count($extension) - 1]);
switch ($extension) {
case 'gz':

@ -1,4 +1,5 @@
<?php
/* For licensing terms, see /license.txt */
use ChamiloSession as Session;
@ -7,8 +8,6 @@ use ChamiloSession as Session;
* Class MultipleAnswerTrueFalseDegreeCertainty
* This class allows to instantiate an object of type MULTIPLE_ANSWER
* (MULTIPLE CHOICE, MULTIPLE ANSWER), extending the class question.
*
* @package chamilo.exercise
*/
class MultipleAnswerTrueFalseDegreeCertainty extends Question
{

@ -1,4 +1,5 @@
<?php
/* For licensing terms, see /license.txt */
/**
@ -6,8 +7,6 @@
*
* This class allows to instantiate an object of type READING_COMPREHENSION
* extending the class question
*
* @package chamilo.exercise
*/
class ReadingComprehension extends UniqueAnswer
{

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save