Minor - flint fixes

pull/3464/head
Julio Montoya 5 years ago
parent 0b35a31100
commit 49451046b2
  1. 2
      .travis.yml
  2. 1
      public/main/admin/course_edit.php
  3. 2
      public/main/admin/skill.php
  4. 5
      public/main/admin/user_list_consent.php
  5. 1
      public/main/document/create_audio.php
  6. 2
      public/main/dropbox/dropbox_functions.inc.php
  7. 11
      public/main/extra/userInfoLib.php
  8. 15
      public/main/forum/forumfunction.inc.php
  9. 2
      public/main/gradebook/lib/fe/displaygradebook.php
  10. 2
      public/main/inc/lib/AnnouncementManager.php
  11. 3
      public/main/inc/lib/ExerciseCategoryManager.php
  12. 1
      public/main/inc/lib/UnserializeApi.php
  13. 1
      public/main/inc/lib/api.lib.php
  14. 5
      public/main/inc/lib/attendance.lib.php
  15. 4
      public/main/inc/lib/display.lib.php
  16. 14
      public/main/inc/lib/document.lib.php
  17. 2
      public/main/inc/lib/fileUpload.lib.php
  18. 6
      public/main/inc/lib/formvalidator/Rule/HTML.php
  19. 3
      public/main/inc/lib/formvalidator/Rule/MaxFileSize.php
  20. 20
      public/main/inc/lib/groupmanager.lib.php
  21. 7
      public/main/inc/lib/internationalization.lib.php
  22. 1
      public/main/inc/lib/message.lib.php
  23. 1
      public/main/inc/lib/pdf.lib.php
  24. 2
      public/main/inc/lib/plugin.lib.php
  25. 2
      public/main/inc/lib/search/ChamiloQuery.php
  26. 2
      public/main/inc/lib/security.lib.php
  27. 3
      public/main/inc/lib/template.lib.php
  28. 2
      public/main/inc/lib/text.lib.php
  29. 3
      public/main/inc/lib/thematic.lib.php
  30. 3
      public/main/lp/learnpath.class.php
  31. 3
      public/main/permissions/permissions_functions.inc.php
  32. 3
      public/main/session/resume_session.php
  33. 2
      src/CourseBundle/Entity/CQuiz.php

@ -101,8 +101,8 @@ script:
# Set to APP_ENV to test # Set to APP_ENV to test
- sed -i "s/APP_ENV='dev'/APP_ENV='test'/g" .env.local - sed -i "s/APP_ENV='dev'/APP_ENV='test'/g" .env.local
- cd tests/behat - cd tests/behat
- ../../vendor/behat/behat/bin/behat features/adminFillUsers.feature -vvv
- ../../vendor/behat/behat/bin/behat features/actionUserLogin.feature -vvv - ../../vendor/behat/behat/bin/behat features/actionUserLogin.feature -vvv
- ../../vendor/behat/behat/bin/behat features/adminFillUsers.feature -vvv
- ../../vendor/behat/behat/bin/behat features/adminSettings.feature -vvv - ../../vendor/behat/behat/bin/behat features/adminSettings.feature -vvv
- ../../vendor/behat/behat/bin/behat features/career.feature -vvv - ../../vendor/behat/behat/bin/behat features/career.feature -vvv
- ../../vendor/behat/behat/bin/behat features/class.feature -vvv - ../../vendor/behat/behat/bin/behat features/class.feature -vvv

@ -2,7 +2,6 @@
/* For licensing terms, see /license.txt */ /* For licensing terms, see /license.txt */
use Chamilo\CoreBundle\Entity\User;
use Chamilo\CoreBundle\Framework\Container; use Chamilo\CoreBundle\Framework\Container;
$cidReset = true; $cidReset = true;

@ -1,8 +1,8 @@
<?php <?php
/* For license terms, see /license.txt */ /* For license terms, see /license.txt */
use Chamilo\CoreBundle\Entity\Skill;
use Chamilo\CoreBundle\Entity\Profile; use Chamilo\CoreBundle\Entity\Profile;
use Chamilo\CoreBundle\Entity\Skill;
/** /**
* This script manages the skills, levels and profiles assignments. * This script manages the skills, levels and profiles assignments.

@ -270,9 +270,8 @@ function email_filter($email)
/** /**
* Returns a mailto-link. * Returns a mailto-link.
* *
* @param string $email An email-address * @param array $params Deprecated
* @param array $params Deprecated * @param array $row
* @param array $row
* *
* @return string HTML-code with a mailto-link * @return string HTML-code with a mailto-link
*/ */

@ -241,7 +241,6 @@ Display::display_footer();
/** /**
* This function save a post into a file mp3 from google services. * This function save a post into a file mp3 from google services.
* *
* @param $filepath
* @param $dir * @param $dir
* *
* @author Juan Carlos Raña Trabado <herodoto@telefonica.net> * @author Juan Carlos Raña Trabado <herodoto@telefonica.net>

@ -1155,8 +1155,6 @@ function feedback($array, $url)
/** /**
* This function returns the html code to display the feedback messages on a given dropbox file. * This function returns the html code to display the feedback messages on a given dropbox file.
* *
* @param $feedback_array an array that contains all the feedback messages about the given document
*
* @return string code * @return string code
* *
* @todo add the form for adding new comment (if the other party has not deleted it yet). * @todo add the form for adding new comment (if the other party has not deleted it yet).

@ -86,12 +86,11 @@ function edit_cat_def($id, $title, $comment, $nbline)
* @author - Hugues peeters <peeters@ipm.ucl.ac.be> * @author - Hugues peeters <peeters@ipm.ucl.ac.be>
* @author - Christophe Gesche <gesche@ipm.ucl.ac.be> * @author - Christophe Gesche <gesche@ipm.ucl.ac.be>
* *
* @param int $id - id of the category * @param int $id - id of the category
* or "ALL" for all category * or "ALL" for all category
* @param bool $force - FALSE (default) : prevents removal if users have * @param bool $force - FALSE (default) : prevents removal if users have
* already fill this category * already fill this category
* TRUE : bypass user content existence check * TRUE : bypass user content existence check
* @param int $nbline - lines number for the field the user will fill
* *
* @return bool - TRUE if succeed, ELSE otherwise * @return bool - TRUE if succeed, ELSE otherwise
*/ */

@ -239,8 +239,7 @@ function handleForum($url)
/** /**
* This function displays the form that is used to add a forum category. * This function displays the form that is used to add a forum category.
* *
* @param array $inputvalues (deprecated, set to null when calling) * @param int $lp_id Learning path ID
* @param int $lp_id Learning path ID
* *
* @return string * @return string
* *
@ -1430,7 +1429,6 @@ function get_forums_in_category($categoryId, $courseId = 0)
* Since it does not take the forum category into account there probably * Since it does not take the forum category into account there probably
* will be two or more forums that have forum_order=1, ... * will be two or more forums that have forum_order=1, ...
* *
* @param int $id forum id
* @param bool $includeGroupsForum * @param bool $includeGroupsForum
* @param int $sessionId * @param int $sessionId
* *
@ -1800,7 +1798,6 @@ function get_last_post_information($forum_id, $show_invisibles = false, $course_
/** /**
* Retrieve all the threads of a given forum. * Retrieve all the threads of a given forum.
* *
* @param int $forum_id
* @param int|null $courseId Optional If is null then it is considered the current course * @param int|null $courseId Optional If is null then it is considered the current course
* @param int|null $sessionId Optional. If is null then it is considered the current session * @param int|null $sessionId Optional. If is null then it is considered the current session
* *
@ -5775,8 +5772,7 @@ function get_name_thread_by_id($thread_id)
/** /**
* This function gets all the post written by an user. * This function gets all the post written by an user.
* *
* @param int $user_id * @param int $user_id
* @param string $course_code
* *
* @return string * @return string
*/ */
@ -5856,10 +5852,9 @@ function get_all_post_from_user($user_id, $courseId)
} }
/** /**
* @param string $course_code * @param int $thread_id
* @param int $thread_id * @param int $user_id
* @param int $user_id * @param int $limit
* @param int $limit
* *
* @return array * @return array
*/ */

@ -12,8 +12,6 @@ class DisplayGradebook
* *
* @param Evaluation $evalobj * @param Evaluation $evalobj
* @param $selectcat * @param $selectcat
* @param $shownavbar 1=show navigation bar
* @param $forpdf only output for pdf file
*/ */
public static function display_header_result($evalobj, $selectcat, $page) public static function display_header_result($evalobj, $selectcat, $page)
{ {

@ -450,8 +450,6 @@ class AnnouncementManager
/** /**
* Displays one specific announcement. * Displays one specific announcement.
* *
* @param int $id, the id of the announcement you want to display
*
* @return string * @return string
*/ */
public static function displayAnnouncement($id) public static function displayAnnouncement($id)

@ -29,9 +29,6 @@ class ExerciseCategoryManager extends Model
/** /**
* Formats the necessary elements for the given datatype. * Formats the necessary elements for the given datatype.
* *
* @param string $type The type of data to which this extra field
* applies (user, course, session, ...)
*
* @assert (-1) === false * @assert (-1) === false
*/ */
public function __construct() public function __construct()

@ -13,7 +13,6 @@ class UnserializeApi
* *
* @param string $type * @param string $type
* @param string $serialized * @param string $serialized
* @param bool $ignoreErrors. Optional.
* *
* @return mixed * @return mixed
*/ */

@ -8637,7 +8637,6 @@ function api_get_relative_path($from, $to)
* *
* @param string $type * @param string $type
* @param string $serialized * @param string $serialized
* @param bool $ignoreErrors. Optional.
* *
* @return mixed * @return mixed
*/ */

@ -59,8 +59,6 @@ class Attendance
/** /**
* Get the total number of attendance inside current course and current session. * Get the total number of attendance inside current course and current session.
* *
* @param int $active
*
* @return int * @return int
* *
* @see SortableTable#get_total_number_of_items() * @see SortableTable#get_total_number_of_items()
@ -2804,8 +2802,7 @@ class Attendance
/** /**
* It's used to print attendance sheet. * It's used to print attendance sheet.
* *
* @param string $action * @param int $attendance_id
* @param int $attendance_id
*/ */
public function attendance_sheet_export_to_pdf( public function attendance_sheet_export_to_pdf(
$attendance_id, $attendance_id,

@ -315,7 +315,6 @@ class Display
* 'page_nr' = The page to display * 'page_nr' = The page to display
* 'hide_navigation' = true to hide the navigation * 'hide_navigation' = true to hide the navigation
* @param array $query_vars Additional variables to add in the query-string * @param array $query_vars Additional variables to add in the query-string
* @param array $form actions Additional variables to add in the query-string
* @param mixed An array with bool values to know which columns show. * @param mixed An array with bool values to know which columns show.
* i.e: $visibility_options= array(true, false) we will only show the first column * i.e: $visibility_options= array(true, false) we will only show the first column
* Can be also only a bool value. TRUE: show all columns, FALSE: show nothing * Can be also only a bool value. TRUE: show all columns, FALSE: show nothing
@ -357,7 +356,6 @@ class Display
* 'page_nr' = The page to display * 'page_nr' = The page to display
* 'hide_navigation' = true to hide the navigation * 'hide_navigation' = true to hide the navigation
* @param array $query_vars Additional variables to add in the query-string * @param array $query_vars Additional variables to add in the query-string
* @param array $form actions Additional variables to add in the query-string
* @param mixed An array with bool values to know which columns show. i.e: * @param mixed An array with bool values to know which columns show. i.e:
* $visibility_options= array(true, false) we will only show the first column * $visibility_options= array(true, false) we will only show the first column
* Can be also only a bool value. TRUE: show all columns, FALSE: show nothing * Can be also only a bool value. TRUE: show all columns, FALSE: show nothing
@ -637,8 +635,6 @@ class Display
/** /**
* Prints an <option>-list with all letters (A-Z). * Prints an <option>-list with all letters (A-Z).
* *
* @param string $selected_letter The letter that should be selected
*
* @todo This is English language specific implementation. * @todo This is English language specific implementation.
* It should be adapted for the other languages. * It should be adapted for the other languages.
* *

@ -906,13 +906,12 @@ class DocumentManager
* This check if a document has the readonly property checked, then see if the user * This check if a document has the readonly property checked, then see if the user
* is the owner of this file, if all this is true then return true. * is the owner of this file, if all this is true then return true.
* *
* @param array $_course * @param array $_course
* @param int $user_id id of the current user * @param int $user_id id of the current user
* @param string $file path stored in the database (if not defined, $documentId must be used) * @param int $document_id in case you don't have the file path ,
* @param int $document_id in case you don't have the file path , * insert the id of the file here and leave $file in blank ''
* insert the id of the file here and leave $file in blank '' * @param bool $to_delete
* @param bool $to_delete * @param int $sessionId
* @param int $sessionId
* *
* @return bool true/false * @return bool true/false
* */ * */
@ -1649,7 +1648,6 @@ class DocumentManager
* Return all content to replace and all content to be replace. * Return all content to replace and all content to be replace.
* *
* @param int $user_id * @param int $user_id
* @param int $course_id
* @param bool $is_preview * @param bool $is_preview
* *
* @return array * @return array

@ -81,8 +81,6 @@ function get_document_title($name)
/** /**
* This function checks if the upload succeeded. * This function checks if the upload succeeded.
* *
* @param array|UploadedFile $uploadedFile ($_FILES)
*
* @return true if upload succeeded * @return true if upload succeeded
*/ */
function process_uploaded_file($uploadedFileData, $show_output = true) function process_uploaded_file($uploadedFileData, $show_output = true)

@ -28,10 +28,8 @@ class HTML_QuickForm_Rule_HTML extends HTML_QuickForm_Rule
/** /**
* Get allowed tags. * Get allowed tags.
* *
* @param int $mode NO_HTML, STUDENT_HTML, TEACHER_HTML, * @param int $mode NO_HTML, STUDENT_HTML, TEACHER_HTML,
* STUDENT_HTML_FULLPAGE or TEACHER_HTML_FULLPAGE * STUDENT_HTML_FULLPAGE or TEACHER_HTML_FULLPAGE
* @param bool $fullpage if true, the allowed tags for full-page editing
* are returned
*/ */
public static function get_allowed_tags($mode) public static function get_allowed_tags($mode)
{ {

@ -9,9 +9,6 @@
class HTML_QuickForm_Rule_MaxFileSize extends HTML_QuickForm_Rule class HTML_QuickForm_Rule_MaxFileSize extends HTML_QuickForm_Rule
{ {
/** /**
* @param $value array Uploaded file info (from $_FILES)
* @param null $options
*
* @return bool * @return bool
*/ */
public function validate($elementValue, $maxSize) public function validate($elementValue, $maxSize)

@ -997,20 +997,11 @@ class GroupManager
/** /**
* Create group category. * Create group category.
* *
* @param string $title The title of the new category * @param string $title The title of the new category
* @param string $description The description of the new category * @param string $description The description of the new category
* @param int $doc_state * @param int $selfRegistrationAllowed allow users to self register
* @param int $work_state * @param int $selfUnRegistrationAllowed allow user to self unregister
* @param int $calendar_state * @param int $documentAccess document access
* @param int $announcements_state
* @param int $forum_state
* @param int $wiki_state
* @param int $chat_state
* @param int $selfRegistrationAllowed allow users to self register
* @param int $selfUnRegistrationAllowed allow user to self unregister
* @param int $maximum_number_of_students
* @param int $groups_per_user
* @param int $documentAccess document access
* *
* @return mixed * @return mixed
*/ */
@ -1374,7 +1365,6 @@ class GroupManager
/** /**
* Get only students from a group (not tutors). * Get only students from a group (not tutors).
* *
* @param int $group_id iid
* @param bool $filterOnlyActive * @param bool $filterOnlyActive
* *
* @return array * @return array

@ -958,8 +958,6 @@ function api_to_system_encoding($string, $from_encoding = null, $check_utf8_vali
* *
* @param string $string the input string * @param string $string the input string
* @param int $quote_style (optional) The quote style - ENT_COMPAT (default), ENT_QUOTES, ENT_NOQUOTES * @param int $quote_style (optional) The quote style - ENT_COMPAT (default), ENT_QUOTES, ENT_NOQUOTES
* @param string $encoding (optional) The encoding (of the input string) used in conversion.
* If it is omitted, the platform character set is assumed.
* *
* @return string Returns the converted string. * @return string Returns the converted string.
* This function is aimed at replacing the function htmlentities() for human-language strings. * This function is aimed at replacing the function htmlentities() for human-language strings.
@ -2132,9 +2130,8 @@ function getLegacyToIso()
/** /**
* Returns returns person name convention for a given language. * Returns returns person name convention for a given language.
* *
* @param string $language the input language * @param string $type The type of the requested convention.
* @param string $type The type of the requested convention. * It may be 'format' for name order convention or 'sort_by' for name sorting convention.
* It may be 'format' for name order convention or 'sort_by' for name sorting convention.
* *
* @return mixed Depending of the requested type, * @return mixed Depending of the requested type,
* the returned result may be string or boolean; null is returned on error; * the returned result may be string or boolean; null is returned on error;

@ -438,7 +438,6 @@ class MessageManager
/** /**
* Sends a message to a user/group. * Sends a message to a user/group.
* *
* @param int $receiver_user_id
* @param string $subject * @param string $subject
* @param string $content * @param string $content
* @param array $attachments files array($_FILES) (optional) * @param array $attachments files array($_FILES) (optional)

@ -189,7 +189,6 @@ class PDF
* @param string $pdfName pdf name * @param string $pdfName pdf name
* @param string $courseCode (if you are using html that are located * @param string $courseCode (if you are using html that are located
* in the document tool you must provide this) * in the document tool you must provide this)
* @param bool $print_title add title
* @param bool $complete_style show header and footer if true * @param bool $complete_style show header and footer if true
* @param bool $addStyle * @param bool $addStyle
* @param string $mainTitle * @param string $mainTitle

@ -274,7 +274,6 @@ class AppPlugin
} }
/** /**
* @param array $pluginRegionList
* @param string $region * @param string $region
* @param Twig_Environment $template * @param Twig_Environment $template
* @param bool $forced * @param bool $forced
@ -353,7 +352,6 @@ class AppPlugin
} }
/** /**
* @param array $_plugins
* @param string $region * @param string $region
* @param Twig_Environment $template * @param Twig_Environment $template
* @param bool $forced * @param bool $forced

@ -30,8 +30,6 @@ function chamilo_query_simple_query($query_string, $offset = 0, $length = 10, $e
/** /**
* Wrapper for getting boolean queries. * Wrapper for getting boolean queries.
*
* @param string $query_string The term string
*/ */
function chamilo_get_boolean_query($term) function chamilo_get_boolean_query($term)
{ {

@ -485,8 +485,6 @@ class Security
* this method encourages a safe practice for generating icon paths, without using heavy solutions * this method encourages a safe practice for generating icon paths, without using heavy solutions
* based on HTMLPurifier for example. * based on HTMLPurifier for example.
* *
* @param string $img_path the input path of the image, it could be relative or absolute URL
*
* @return string returns sanitized image path or an empty string when the image path is not secure * @return string returns sanitized image path or an empty string when the image path is not secure
* *
* @author Ivan Tcholakov, March 2011 * @author Ivan Tcholakov, March 2011

@ -1035,9 +1035,6 @@ class Template
$this->responseCode = $code; $this->responseCode = $code;
} }
/**
* @param string $code
*/
public function getResponseCode() public function getResponseCode()
{ {
return $this->responseCode; return $this->responseCode;

@ -423,8 +423,6 @@ function domesticate($input)
* However the function simply returns the submitted text without any * However the function simply returns the submitted text without any
* transformation if it already contains some "<a href:" or "<img src=". * transformation if it already contains some "<a href:" or "<img src=".
* *
* @param string $text text to be converted
*
* @return text after conversion * @return text after conversion
* *
* @author Rewritten by Nathan Codding - Feb 6, 2001. * @author Rewritten by Nathan Codding - Feb 6, 2001.

@ -1130,8 +1130,7 @@ class Thematic
/** /**
* Delete a thematic plan description. * Delete a thematic plan description.
* *
* @param int $thematic_id Thematic id * @param int $thematic_id Thematic id
* @param int $description_type Description type
* *
* @return int Affected rows * @return int Affected rows
*/ */

@ -2166,7 +2166,6 @@ class learnpath
* of its prerequisite is completed, considering the time availability and * of its prerequisite is completed, considering the time availability and
* the LP visibility. * the LP visibility.
* *
* @param int $lp_id
* @param int $student_id * @param int $student_id
* @param array $courseInfo * @param array $courseInfo
* @param int $sessionId * @param int $sessionId
@ -7402,9 +7401,7 @@ class learnpath
* Return the HTML form to display an item (generally a dir item). * Return the HTML form to display an item (generally a dir item).
* *
* @param CLpItem $lpItem * @param CLpItem $lpItem
* @param string $title
* @param string $action * @param string $action
* @param string $extra_info
* *
* @throws Exception * @throws Exception
* @throws HTML_QuickForm_Error * @throws HTML_QuickForm_Error

@ -169,9 +169,6 @@ function get_permissions($content, $id)
* the array that contains the current permission a user, group or role has will now be changed depending on * the array that contains the current permission a user, group or role has will now be changed depending on
* the Dokeos Config Setting for the permissions (limited [add, edit, delete] or full [view, add, edit, delete, move, visibility]. * the Dokeos Config Setting for the permissions (limited [add, edit, delete] or full [view, add, edit, delete, move, visibility].
* *
* @param $content are we retrieving the rights of a user, a group or a role (the database depends on it)
* @param $id the id of the user, group or role
*
* @author Patrick Cool <patrick.cool@ugent.be>, Ghent University * @author Patrick Cool <patrick.cool@ugent.be>, Ghent University
* *
* @version 1.0 * @version 1.0

@ -1,13 +1,12 @@
<?php <?php
/* For licensing terms, see /license.txt */ /* For licensing terms, see /license.txt */
use Chamilo\CoreBundle\Entity\Promotion;
use Chamilo\CoreBundle\Entity\SequenceResource; use Chamilo\CoreBundle\Entity\SequenceResource;
use Chamilo\CoreBundle\Entity\Session; use Chamilo\CoreBundle\Entity\Session;
use Chamilo\CoreBundle\Entity\Promotion;
use Chamilo\CoreBundle\Entity\SessionRelCourse; use Chamilo\CoreBundle\Entity\SessionRelCourse;
use Chamilo\CoreBundle\Entity\SessionRelCourseRelUser; use Chamilo\CoreBundle\Entity\SessionRelCourseRelUser;
use Chamilo\CoreBundle\Repository\SequenceRepository; use Chamilo\CoreBundle\Repository\SequenceRepository;
use Chamilo\CoreBundle\Repository\SessionRepository;
/** /**
* @author Bart Mollet, Julio Montoya lot of fixes * @author Bart Mollet, Julio Montoya lot of fixes

@ -967,7 +967,7 @@ class CQuiz extends AbstractResource implements ResourceInterface
} }
/** /**
* Returns the sum of question's ponderation * Returns the sum of question's ponderation.
*/ */
public function getMaxScore(): int public function getMaxScore(): int
{ {

Loading…
Cancel
Save