Minor - flint fixes

pull/2818/head
Julio Montoya 7 years ago
parent 53253908e3
commit 5e3679d495
  1. 4
      main/admin/system_announcements.php
  2. 16
      main/auth/courses_categories.php
  3. 1
      main/course_description/course_description_controller.php
  4. 2
      main/course_info/about.php
  5. 2
      main/document/document_slideshow.inc.php
  6. 2
      main/dropbox/dropbox_functions.inc.php
  7. 10
      main/dropbox/index.php
  8. 2
      main/exercise/MultipleAnswerTrueFalseDegreeCertainty.php
  9. 26
      main/exercise/ReadingComprehension.php
  10. 2
      main/exercise/TestCategory.php
  11. 44
      main/exercise/question.class.php
  12. 4
      main/gradebook/lib/be/category.class.php
  13. 2
      main/gradebook/lib/fe/gradebooktable.class.php
  14. 4
      main/gradebook/lib/fe/linkform.class.php
  15. 2
      main/gradebook/lib/fe/resulttable.class.php
  16. 2
      main/gradebook/lib/gradebook_data_generator.class.php
  17. 3
      main/inc/lib/CoursesAndSessionsCatalog.class.php
  18. 4
      main/inc/lib/api.lib.php
  19. 4
      main/inc/lib/blog.lib.php
  20. 5
      main/inc/lib/course.lib.php
  21. 2
      main/inc/lib/course_category.lib.php
  22. 41
      main/inc/lib/display.lib.php
  23. 8
      main/inc/lib/document.lib.php
  24. 2
      main/inc/lib/extra_field_option.lib.php
  25. 21
      main/inc/lib/link.lib.php
  26. 2
      main/inc/lib/plugin.lib.php
  27. 6
      main/inc/lib/social.lib.php
  28. 6
      main/inc/lib/system_announcements.lib.php
  29. 11
      main/inc/lib/usergroup.lib.php
  30. 5
      main/inc/lib/userportal.lib.php
  31. 2
      main/lp/learnpath.class.php
  32. 4
      main/lp/learnpathItem.class.php
  33. 2
      main/lp/lp_ajax_save_item.php
  34. 2
      main/mySpace/student.php
  35. 2
      main/mySpace/users.php
  36. 1
      main/social/group_view.php
  37. 2
      main/social/groups.php
  38. 2
      main/social/home.php
  39. 1
      main/ticket/ticket_details.php
  40. 2
      main/webservices/lp.php
  41. 18
      main/webservices/registration.soap.php
  42. 2
      main/work/work.lib.php
  43. 4
      plugin/advanced_subscription/src/HookAdvancedSubscription.php
  44. 2
      src/ApiBundle/GraphQL/Resolver/CourseResolver.php
  45. 3
      src/CoreBundle/Block/BreadcrumbBlockService.php
  46. 2
      src/CoreBundle/Component/Editor/CkEditor/Toolbar/TestMatching.php
  47. 2
      src/CoreBundle/Controller/EditorController.php
  48. 2
      src/CoreBundle/Controller/ResourceController.php
  49. 2
      src/CoreBundle/EventListener/LoginSuccessHandler.php
  50. 2
      src/CoreBundle/EventListener/LogoutSuccessHandler.php
  51. 2
      src/CoreBundle/Framework/PageController.php
  52. 4
      src/CoreBundle/Settings/AbstractSettingsSchema.php
  53. 6
      src/CourseBundle/Controller/Home/HomeController.php
  54. 14
      src/LtiBundle/Entity/ExternalTool.php
  55. 1
      src/UserBundle/Entity/User.php
  56. 2
      src/UserBundle/Repository/UserRepository.php
  57. 2
      src/UserBundle/Security/LoginFormAuthenticator.php
  58. 2
      user_portal.php

@ -185,7 +185,6 @@ if ($action_todo) {
$allowed_picture_types
);
$image = '';
// Display announcements picture
$store_path = api_get_path(SYS_UPLOAD_PATH).'announcements'; // course path
@ -198,7 +197,6 @@ if ($action_todo) {
$form->addHtml($image);
$form->addElement('checkbox', 'delete_picture', null, get_lang('DeletePicture'));
}
} catch (Exception $e) {
} catch (HTML_QuickForm_Error $e) {
error_log($e);
@ -285,7 +283,6 @@ if ($action_todo) {
);
if ($announcement_id !== false) {
// ADD Picture
$picture = $_FILES['picture'];
if (!empty($picture['name'])) {
@ -325,7 +322,6 @@ if ($action_todo) {
$sendMail,
$sendMailTest
)) {
$deletePicture = isset($values['delete_picture']) ? $values['delete_picture'] : '';
if ($deletePicture) {

@ -75,7 +75,6 @@ $message = null;
<?php
if (!isset($_GET['hidden_links']) || intval($_GET['hidden_links']) != 1) {
$term = empty($_POST['search_term']) ? '' : api_htmlentities($searchTerm);
$urlAction = CourseCategory::getCourseCategoryUrl(1, $pageLength, 'ALL', 0, 'subscribe');
$formSearch = new FormValidator('search_catalog', 'post', $urlAction, null, [], FormValidator::LAYOUT_BOX_SEARCH);
@ -93,7 +92,6 @@ $message = null;
$options = [];
foreach ($browse_course_categories[0] as $category) {
$categoryCode = $category['code'];
$countCourse = $category['count_courses'];
if (empty($countCourse)) {
@ -101,7 +99,6 @@ $message = null;
}
$options[$categoryCode] = $category['name'].' ('.$countCourse.')';
}
if (empty($codeType)) {
@ -111,8 +108,6 @@ $message = null;
$select = $formSelect->returnForm();
}
if ($showCourses && $action != 'display_sessions') {
if (!empty($message)) {
$message = Display::return_message($message, 'confirmation', false);
@ -143,7 +138,6 @@ if ($showCourses && $action != 'display_sessions') {
}
if (!empty($browse_courses_in_category)) {
foreach ($browse_courses_in_category as $course) {
$course_hidden = $course['visibility'] == COURSE_VISIBILITY_HIDDEN;
@ -167,7 +161,6 @@ if ($showCourses && $action != 'display_sessions') {
// display the course bloc
$course['category_title'] = '';
if (isset($course['category'])) {
$course['category_title'] = isset($categoryList[$course['category']]) ? $categoryList[$course['category']] : '';
@ -261,11 +254,9 @@ if ($showCourses && $action != 'display_sessions') {
'teachers' => $teachers,
'ranking' => $rating,
'description_ajax' => CourseManager::returnDescriptionButton($course),
'subscribe' => $subscribeButton
'subscribe' => $subscribeButton,
];
}
} else {
if (!isset($_REQUEST['subscribe_user_with_password']) &&
!isset($_REQUEST['subscribe_course'])
@ -278,7 +269,6 @@ if ($showCourses && $action != 'display_sessions') {
}
}
$template = new Template(get_lang('Course Catalog'));
$template->assign('search', $search);
$template->assign('select', $select);
@ -290,10 +280,6 @@ $content = $template->fetch($layout);
echo $content;
/**
* Display the goto course button of a course in the course catalog.
*

@ -124,7 +124,6 @@ class CourseDescriptionController
$content = $tpl->fetch($templateName);
$tpl->assign('content', $content);
$tpl->display_one_col_template();
}

@ -139,8 +139,6 @@ if ($checker) {
);
}
$courseItem = [
'code' => $course->getCode(),
'title' => $course->getTitle(),

@ -1,8 +1,6 @@
<?php
/* For licensing terms, see /license.txt */
use ChamiloSession as Session;
/**
* This is a plugin for the documents tool. It looks for .jpg, .jpeg, .gif, .png
* files (since these are the files that can be viewed in a browser) and creates

@ -862,7 +862,7 @@ function removeMoreIfMailing($file_id)
* @param array $file
* @param Dropbox_SentWork $work
*
* @return array|null|string
* @return array|string|null
*/
function store_add_dropbox($file = [], $work = null)
{

@ -318,20 +318,18 @@ if ($action != 'add') {
$activeSend = $activeReceived = '';
if (!$view || $view == 'sent') {
$activeSend = 'active';
}
?>
} ?>
<li class="nav-item">
<a class="nav-link <?php echo $activeSend ?>" href="<?php echo api_get_path(WEB_CODE_PATH).'dropbox/'; ?>index.php?<?php echo api_get_cidreq(); ?>&view=sent" >
<a class="nav-link <?php echo $activeSend; ?>" href="<?php echo api_get_path(WEB_CODE_PATH).'dropbox/'; ?>index.php?<?php echo api_get_cidreq(); ?>&view=sent" >
<?php echo get_lang('SentFiles'); ?>
</a>
</li>
<?php
if ($view == 'received') {
$activeReceived = 'active';
}
?>
} ?>
<li class="nav-item">
<a class="nav-link <?php echo $activeReceived ?>" href="<?php echo api_get_path(WEB_CODE_PATH).'dropbox/'; ?>index.php?<?php echo api_get_cidreq(); ?>&view=received" >
<a class="nav-link <?php echo $activeReceived; ?>" href="<?php echo api_get_path(WEB_CODE_PATH).'dropbox/'; ?>index.php?<?php echo api_get_cidreq(); ?>&view=received" >
<?php echo get_lang('ReceivedFiles'); ?>
</a>
</li>

@ -304,7 +304,7 @@ class MultipleAnswerTrueFalseDegreeCertainty extends Question
* @param int $counter
* @param float $score
*
* @return null|string
* @return string|null
*/
public function return_header($exercise, $counter = null, $score = null)
{

@ -53,7 +53,7 @@ class ReadingComprehension extends UniqueAnswer
/**
* Indicates how show the question list.
* 1 = all in one page; 2 = one per page (default)
* 1 = all in one page; 2 = one per page (default).
*
* @var int
*/
@ -197,6 +197,18 @@ class ReadingComprehension extends UniqueAnswer
return $select_level;
}
/**
* @param int $type
*
* @return ReadingComprehension
*/
public function setExerciseType($type)
{
$this->exerciseType = (int) $type;
return $this;
}
/**
* @param $wordsCount
* @param $turns
@ -216,16 +228,4 @@ class ReadingComprehension extends UniqueAnswer
$view->assign('exercise_type', $this->exerciseType);
$view->display($template);
}
/**
* @param int $type
*
* @return ReadingComprehension
*/
public function setExerciseType($type)
{
$this->exerciseType = (int) $type;
return $this;
}
}

@ -648,7 +648,7 @@ class TestCategory
* @param int $questionId
* @param int $in_display_category_name
*
* @return null|string
* @return string|null
*/
public static function returnCategoryAndTitle($questionId, $in_display_category_name = 1)
{

@ -2309,6 +2309,28 @@ abstract class Question
return '<br />'.Display::return_message($this->feedback, 'normal', false);
}
/**
* Check if this question exists in another exercise.
*
* @throws \Doctrine\ORM\Query\QueryException
*
* @return mixed
*/
public function existsInAnotherExercises()
{
$em = Database::getManager();
$count = $em
->createQuery('
SELECT COUNT(qq.iid) FROM ChamiloCourseBundle:CQuizRelQuestion qq
WHERE qq.questionId = :id
')
->setParameters(['id' => (int) $this->id])
->getSingleScalarResult();
return $count > 1;
}
/**
* Resizes a picture || Warning!: can only be called after uploadPicture,
* or if picture is already available in object.
@ -2373,26 +2395,4 @@ abstract class Question
return false;
}
/**
* Check if this question exists in another exercise.
*
* @throws \Doctrine\ORM\Query\QueryException
*
* @return mixed
*/
public function existsInAnotherExercises()
{
$em = Database::getManager();
$count = $em
->createQuery('
SELECT COUNT(qq.iid) FROM ChamiloCourseBundle:CQuizRelQuestion qq
WHERE qq.questionId = :id
')
->setParameters(['id' => (int) $this->id])
->getSingleScalarResult();
return $count > 1;
}
}

@ -298,7 +298,7 @@ class Category implements GradebookItem
}
/**
* @return null|int
* @return int|null
*/
public function get_grade_model_id()
{
@ -2709,7 +2709,7 @@ class Category implements GradebookItem
* Internal function used by get_tree().
*
* @param int $level
* @param null|int $visible
* @param int|null $visible
*
* @return array
*/

@ -1164,7 +1164,7 @@ class GradebookTable extends SortableTable
/**
* @param AbstractLink $item
*
* @return null|string
* @return string|null
*/
private function build_edit_column($item)
{

@ -140,9 +140,9 @@ class LinkForm extends FormValidator
/**
* @param int $link
* @param null|string $courseCode
* @param string|null $courseCode
*
* @return AttendanceLink|DropboxLink|ExerciseLink|ForumThreadLink|LearnpathLink|null|StudentPublicationLink|SurveyLink
* @return AttendanceLink|DropboxLink|ExerciseLink|ForumThreadLink|LearnpathLink|StudentPublicationLink|SurveyLink|null
*/
private function createLink($link, $courseCode)
{

@ -22,7 +22,7 @@ class ResultTable extends SortableTable
*
* @param string $evaluation
* @param array $results
* @param null|string $iscourse
* @param string|null $iscourse
* @param array $addparams
* @param bool $forprint
*/

@ -448,7 +448,7 @@ class GradebookDataGenerator
* @param GradebookItem $item
* @param bool $ignore_score_color
*
* @return null|string
* @return string|null
*/
private function build_result_column(
$userId,

@ -469,8 +469,9 @@ class CoursesAndSessionsCatalog
* @param string $date (optional) The date of sessions
* @param array $limit
*
* @return array The session list
* @throws Exception
*
* @return array The session list
*/
public static function browseSessions($date = null, $limit = [])
{

@ -1738,7 +1738,7 @@ function api_get_user_entity($userId)
}
/**
* @return null|User
* @return User|null
*/
function api_get_current_user()
{
@ -7997,7 +7997,7 @@ function api_get_user_info_from_official_code($officialCode)
* @param string $usernameInputId
* @param string $passwordInputId
*
* @return null|string
* @return string|null
*/
function api_get_password_checker_js($usernameInputId, $passwordInputId)
{

@ -2888,7 +2888,7 @@ class Blog
[
'ToolbarSet' => 'Profile',
'Width' => '100%',
'Height' => '130'
'Height' => '130',
]
);
$form->addElement('hidden', 'new_blog_submit', 'true');
@ -3222,7 +3222,7 @@ class Blog
* @param string $fullText
* @param int $length
*
* @return null|string
* @return string|null
*/
private static function getPostExtract($fullText, $length = BLOG_MAX_PREVIEW_CHARS)
{

@ -3272,11 +3272,10 @@ class CourseManager
$data['extrafield'] = $fieldValues;
if (isset($descriptions) && count($descriptions) > 0) {
foreach ($descriptions as $description) {
if ($description->description_type === '1') {
$data['description'] = [
'title' => Security::remove_XSS($description->title),
'content' => Security::remove_XSS($description->content)
'content' => Security::remove_XSS($description->content),
];
}
}
@ -6752,7 +6751,7 @@ class CourseManager
* @param Course $course
* @param bool $fullSize
*
* @return null|string
* @return string|null
*/
public static function getPicturePath(Course $course, $fullSize = false)
{

@ -409,7 +409,7 @@ class CourseCategory
/**
* @param string $categoryCode
*
* @return null|string
* @return string|null
*/
public static function getParentsToString($categoryCode)
{

@ -1244,7 +1244,7 @@ class Display
[
'id' => $id.'-'.$i,
'href' => $item['url'],
'class' => 'nav-link '.$class
'class' => 'nav-link '.$class,
]
);
$lis .= self::tag('li', $item, ['class' => 'nav-item']);
@ -1904,7 +1904,7 @@ class Display
/**
* @param array $list
*
* @return null|string
* @return string|null
*/
public static function description($list)
{
@ -1956,7 +1956,7 @@ class Display
* @param string $count
* @param string $type
*
* @return null|string
* @return string|null
*/
public static function badge($count, $type = "warning")
{
@ -2047,7 +2047,7 @@ class Display
* @param array $items
* @param string $class
*
* @return null|string
* @return string|null
*/
public static function actions($items, $class = 'new_actions')
{
@ -2141,7 +2141,7 @@ class Display
* @param string $file
* @param array $params
*
* @return null|string
* @return string|null
*/
public static function getMediaPlayer($file, $params = [])
{
@ -2607,7 +2607,7 @@ class Display
* @param bool|true $open
* @param bool|false $fullClickable
*
* @return null|string
* @return string|null
*
* @todo rework function to easy use
*/
@ -2725,20 +2725,6 @@ HTML;
return $html;
}
/**
* Displays the reduced page header (without banner).
*/
private static function set_header()
{
global $show_learnpath, $tool_name;
self::$global_template = new Template(
$tool_name,
false,
false,
$show_learnpath
);
}
public static function randomColor($id)
{
static $colors = [];
@ -2759,12 +2745,25 @@ HTML;
$result = [
'color' => '#'.$color,
'luminosity' => $type
'luminosity' => $type,
];
$colors[$id] = $result;
return $result; // example: #fc443a
}
}
/**
* Displays the reduced page header (without banner).
*/
private static function set_header()
{
global $show_learnpath, $tool_name;
self::$global_template = new Template(
$tool_name,
false,
false,
$show_learnpath
);
}
}

@ -427,7 +427,7 @@ class DocumentManager
* @param string $path
* @param int $sessionId
*
* @return null|string
* @return string|null
*/
public static function getSessionFolderFilters($path, $sessionId)
{
@ -6676,7 +6676,7 @@ class DocumentManager
* @param string $target
* @param string $overwrite_url
*
* @return null|string
* @return string|null
*/
private static function parseFile(
$userInfo,
@ -6777,7 +6777,7 @@ class DocumentManager
* @param array $resource
* @param int $lp_id
*
* @return null|string
* @return string|null
*/
private static function parseFolder($folderId, $resource, $lp_id)
{
@ -6980,7 +6980,7 @@ class DocumentManager
* @param bool $isCertificateMode
* @param int $parentId
*
* @return null|string
* @return string|null
*/
private static function getButtonVisibility(
$isReadOnly,

@ -721,7 +721,7 @@ class ExtraFieldOption extends Model
/**
* @param $priority
*
* @return null|string
* @return string|null
*/
public function getPriorityMessageType($priority)
{

@ -1187,7 +1187,7 @@ class Link extends Model
'pencil-alt',
null,
[
'title' => get_lang('Modify')
'title' => get_lang('Modify'),
]);
// DISPLAY MOVE UP COMMAND only if it is not the top link.
@ -1199,10 +1199,9 @@ class Link extends Model
'level-up-alt',
'outline-secondary',
[
'title' => get_lang("Up")
'title' => get_lang("Up"),
]
);
} else {
$tools .= Display::toolbarButton(
null,
@ -1211,7 +1210,7 @@ class Link extends Model
'outline-secondary',
[
'title' => get_lang("Up"),
'class' => 'disabled'
'class' => 'disabled',
]
);
}
@ -1225,10 +1224,9 @@ class Link extends Model
'level-down-alt',
'outline-secondary',
[
'title' => get_lang("Down")
'title' => get_lang("Down"),
]
);
} else {
$tools .= Display::toolbarButton(
null,
@ -1237,7 +1235,7 @@ class Link extends Model
'outline-secondary',
[
'title' => get_lang("Down"),
'class' => 'disabled'
'class' => 'disabled',
]
);
}
@ -1249,12 +1247,10 @@ class Link extends Model
'outline-secondary',
[
'title' => get_lang("Delete"),
'onclick' => "javascript: if(!confirm('".get_lang('CategoryDelconfirm')."')) return false;"
'onclick' => "javascript: if(!confirm('".get_lang('CategoryDelconfirm')."')) return false;",
]
);
return $tools;
}
@ -1690,7 +1686,6 @@ class Link extends Model
echo '</div>';
$linksPerCategory = self::showLinksPerCategory(0, $course_id, $session_id);
if (empty($countCategories)) {
echo $linksPerCategory;
} else {
@ -1719,11 +1714,9 @@ class Link extends Model
$visibilityClass = null;
if ($myrow['visibility'] == '1') {
$url = 'link.php?'.api_get_cidreq().'&sec_token='.$token.'&action=invisible&id='.$myrow['id'].'&scope='.TOOL_LINK_CATEGORY;
$title = get_lang('Hide');
$strVisibility = Display::toolbarButton(null, $url, 'eye', null, ['title' => $title]);
} elseif ($myrow['visibility'] == '0') {
$visibilityClass = 'text-muted';
$url = 'link.php?'.api_get_cidreq().'&sec_token='.$token.'&action=visible&id='.$myrow['id'].'&scope='.TOOL_LINK_CATEGORY;
@ -1766,7 +1759,6 @@ class Link extends Model
}
$category['children'] = $childrenContent;
$list[] = $category;
}
$tpl = new Template(null);
$tpl->assign('data', $list);
@ -1774,7 +1766,6 @@ class Link extends Model
$content = $tpl->fetch($courseInfoLayout);
echo $content;
}
/**

@ -259,7 +259,7 @@ class AppPlugin
* @param Twig_Environment $template
* @param bool $forced
*
* @return null|string
* @return string|null
*/
public function loadRegion($pluginName, $region, $template, $forced = false)
{

@ -821,7 +821,7 @@ class SocialManager extends UserManager
'complete_name' => $userInfo['complete_name'],
'username' => $userInfo['username'],
'email' => $userInfo['email'],
'status' => $userInfo['status']
'status' => $userInfo['status'],
];
$show_groups = [
@ -856,13 +856,12 @@ class SocialManager extends UserManager
$groupInfo['picture'],
128,
GROUP_IMAGE_SIZE_MEDIUM
)
),
];
$template->assign('show_group', true);
$template->assign('group', $groupInfo);
$template->assign('avatar', $userGroupImage);
} else {
$template->assign('show_group', false);
$template->assign('show_user', true);
@ -1869,7 +1868,6 @@ class SocialManager extends UserManager
$userInfo = api_get_user_info($userId, true, false, true, true);
$userGroup = new UserGroup();
$groupInfo = $userGroup->get($groupId);

@ -307,7 +307,6 @@ class SystemAnnouncementManager
return $result ? $result : false;
}
/**
* @param int $start
* @param string $user_id
@ -1026,7 +1025,8 @@ class SystemAnnouncementManager
* get announcement picture.
*
* @param int $announcementId
* @return null|string
*
* @return string|null
*/
private static function getPictureAnnouncement($announcementId)
{
@ -1035,8 +1035,10 @@ class SystemAnnouncementManager
if (file_exists($announcementPicture)) {
$web_path = api_get_path(WEB_UPLOAD_PATH).'announcements';
$urlPicture = $web_path.'/announcement_'.$announcementId.'.png';
return $urlPicture;
}
return null;
}
}

@ -1324,8 +1324,8 @@ class UserGroup extends Model
/**
* @param int $groupId
* @param string $picture
*
* @param string $cropParameters
*
* @return bool|string
*/
public function manageFileUpload($groupId, $picture, $cropParameters)
@ -1361,14 +1361,13 @@ class UserGroup extends Model
* It will be checked and modified for compatibility with the file system.
* If full name is provided, path component is ignored.
* If an empty name is provided, then old user photos are deleted only,
*
* @param string $source_file the full system name of the image from which user photos will be created
*
* @param string $cropParameters
*
* @return mixed Returns the resulting common file name of created images which usually should be stored in database.
* When an image is removed the function returns an empty string. In case of internal error or negative validation it returns FALSE.
* @see UserManager::delete_user_picture() as the prefered way for deletion.
*
* @see UserManager::delete_user_picture() as the prefered way for deletion.
*/
public function update_group_picture($group_id, $file = null, $source_file = null, $cropParameters = null)
{
@ -1390,7 +1389,6 @@ class UserGroup extends Model
@mkdir($path, api_get_permissions_for_new_directories(), true);
}
// Exit if only deletion has been requested. Return an empty picture name.
if ($delete) {
return '';
@ -1427,7 +1425,6 @@ class UserGroup extends Model
$normal->resize(450);
$normal->send_image($groupImageBig, -1, 'jpg');
return $filename;
}
@ -1611,7 +1608,6 @@ class UserGroup extends Model
// Picture
//$allowed_picture_types = $this->getAllowedPictureExtensions();
// Picture
$form->addFile(
'picture',
@ -2196,7 +2192,6 @@ class UserGroup extends Model
$result = Database::query($sql);
$array = [];
while ($row = Database::fetch_array($result, 'ASSOC')) {
$description = Security::remove_XSS($row['description'], STUDENT, true);
$row['description'] = cut($description, 250, true);
$row['name'] = Security::remove_XSS($row['name'], STUDENT, true);

@ -1095,7 +1095,6 @@ class IndexManager
$useUserLanguageFilterIfAvailable
);
// Display courses.
$courses = CourseManager::returnCourses(
$user_id,
@ -1103,7 +1102,6 @@ class IndexManager
$useUserLanguageFilterIfAvailable
);
// Course option (show student progress)
// This code will add new variables (Progress, Score, Certificate)
if ($studentInfoProgress || $studentInfoScore || $studentInfoCertificate) {
@ -1218,7 +1216,6 @@ class IndexManager
$courseCount = count($courseCompleteList);
}
$listSessions = null;
/*$collapsable = api_get_configuration_value('allow_user_session_collapsable');
@ -1439,7 +1436,6 @@ class IndexManager
$params['category'] = $session_box['category'];
$params['color'] = Display::randomColor($session_box['category']['id']);
if ($showSimpleSessionInfo) {
$params['subtitle'] = self::getSimpleSessionDetails(
$session_box['coach_name'],
@ -1466,7 +1462,6 @@ class IndexManager
$sessionCount++;
}
}
}
$allCoursesInSessions = [];

@ -5,7 +5,6 @@ use Chamilo\CoreBundle\Repository\CourseRepository;
use Chamilo\CourseBundle\Component\CourseCopy\CourseArchiver;
use Chamilo\CourseBundle\Component\CourseCopy\CourseBuilder;
use Chamilo\CourseBundle\Component\CourseCopy\CourseRestorer;
use Chamilo\CourseBundle\Entity\CDocument;
use Chamilo\CourseBundle\Entity\CItemProperty;
use Chamilo\CourseBundle\Entity\CLp;
use Chamilo\CourseBundle\Entity\CLpCategory;
@ -10020,7 +10019,6 @@ class learnpath
if (in_array($item_type, [TOOL_DOCUMENT, TOOL_LP_FINAL_ITEM, TOOL_HOTPOTATOES])) {
$documentData = DocumentManager::get_document_data_by_id($row['path'], $course_code);
if (empty($documentData)) {
$table = Database::get_course_table(TABLE_DOCUMENT);
$sql = "SELECT path FROM $table
WHERE

@ -89,7 +89,7 @@ class learnpathItem
* @param int $id Learning path item ID
* @param int $user_id User ID
* @param int $course_id Course int id
* @param null|array $item_content An array with the contents of the item
* @param array|null $item_content An array with the contents of the item
*/
public function __construct(
$id,
@ -4276,7 +4276,7 @@ class learnpathItem
/**
* Adds an audio file attached to the current item (store on disk and in db).
*
* @return bool|null|string
* @return bool|string|null
*/
public function add_audio()
{

@ -38,7 +38,7 @@ require_once __DIR__.'/../inc/global.inc.php';
* @param int $userNavigatesAway Whether the user is moving to another item
* @param int $statusSignalReceived Whether the SCO called SetValue(lesson_status)
*
* @return bool|null|string The resulting JS string
* @return bool|string|null The resulting JS string
*/
function save_item(
$lp_id,

@ -268,7 +268,7 @@ if (api_is_drh()) {
'#'
);
$actions .= Display::url(
Display::return_icon('skills.png', get_lang('Skills'), array(), ICON_SIZE_MEDIUM),
Display::return_icon('skills.png', get_lang('Skills'), [], ICON_SIZE_MEDIUM),
$webCodePath.'social/my_skills_report.php'
);
$actionsLeft .= Display::url(

@ -242,7 +242,7 @@ if (api_is_drh()) {
'#'
);
$actions .= Display::url(
Display::return_icon('skills.png', get_lang('Skills'), array(), ICON_SIZE_MEDIUM),
Display::return_icon('skills.png', get_lang('Skills'), [], ICON_SIZE_MEDIUM),
$webCodePath.'social/my_skills_report.php'
);
$actionsLeft .= Display::url(

@ -298,7 +298,6 @@ if ($is_group_member || $groupInfo['visibility'] == GROUP_PERMISSION_OPEN) {
$listTopic = $content;
$listMembers = $member_content;
} else {
// if I already sent an invitation message
if (!in_array(

@ -220,7 +220,6 @@ if (is_array($results) && count($results) > 0) {
$picture = $usergroup->get_picture_group($result['id'], $result['picture'], 80);
$result['picture'] = '<img class="mr-3" src="'.$picture.'" />';
$html .= '<li class="media item-3">';
$html .= $result['picture'];
$html .= '<div class="media-body">';
@ -375,7 +374,6 @@ if (isset($_GET['view']) && $_GET['view'] == 'mygroups') {
$show_menu = $_GET['view'];
}
$tpl->setHelp('Groups');
$tpl->assign('social_right_content', $social_right_content);
$social_layout = $tpl->get_template('social/groups.html.twig');

@ -77,7 +77,6 @@ $userGroup = new UserGroup();
}
}*/
$socialSearch = UserManager::getSearchForm('');
// Top Last
@ -104,7 +103,6 @@ $tpl = new Template(get_lang('SocialNetwork'));
SocialManager::setSocialUserBlock($tpl, api_get_user_id(), 'home');
$tpl->assign('social_friend_block', $friend_html);
$tpl->assign('session_list', $social_session_block);
$tpl->assign('social_search', $socialSearch);

@ -354,7 +354,6 @@ if ($ticket['ticket']['status_id'] == TicketManager::STATUS_CLOSE) {
}
$senderData = get_lang('AddedBy').' '.$ticket['usuario']['complete_name_with_message_link'];
echo '<table width="100%" >
<tr>
<td colspan="3">

@ -592,7 +592,7 @@ $server->register(
/**
* @param array $params
*
* @return null|soap_fault
* @return soap_fault|null
*/
function WSCreateLp($params)
{

@ -19,7 +19,7 @@ define('DEFAULT_ADMIN_USER_ID', 1);
/**
* @param string $code
*
* @return null|soap_fault
* @return soap_fault|null
*/
function returnError($code)
{
@ -1119,7 +1119,7 @@ $server->register(
*
* @param array $params - WSFunction parameters (include VerifyKey)
*
* @return bool|null|soap_fault A simple boolean (true if teacher successful subscribed, false otherwise)
* @return bool|soap_fault|null A simple boolean (true if teacher successful subscribed, false otherwise)
*/
function WSSubscribeTeacherToSessionCourse($params)
{
@ -1178,7 +1178,7 @@ $server->register(
*
* @param array $params - WSFunction parameters (include VerifyKey)
*
* @return bool|null|soap_fault A simple boolean (true if teacher successful unsubscribed, false otherwise)
* @return bool|soap_fault|null A simple boolean (true if teacher successful unsubscribed, false otherwise)
*/
function WSUnsubscribeTeacherFromSessionCourse($params)
{
@ -1609,7 +1609,7 @@ $server->register(
*
* @throws \Doctrine\DBAL\DBALException
*
* @return bool|int|null|soap_fault
* @return bool|int|soap_fault|null
*/
function WSEditUserCredentials($params)
{
@ -4720,7 +4720,7 @@ $server->register(
*
* @param array $params
*
* @return array|int|null|soap_fault|string
* @return array|int|soap_fault|string|null
*/
function WSSubscribeUserToCourseSimple($params)
{
@ -5241,7 +5241,7 @@ $server->register(
/**
* @param array $params
*
* @return array|null|soap_fault
* @return array|soap_fault|null
*/
function WSUnSubscribeUserFromCourseSimple($params)
{
@ -5540,7 +5540,7 @@ $server->register(
/**
* @param array $params
*
* @return int|null|soap_fault|string
* @return int|soap_fault|string|null
*/
function WSSubscribeUserToSessionSimple($params)
{
@ -6298,7 +6298,7 @@ $server->register(
/**
* @param array $params
*
* @return int|null|soap_fault
* @return int|soap_fault|null
*/
function WSUpdateUserApiKey($params)
{
@ -6481,7 +6481,7 @@ $server->register(
*
* @param array $params Array of parameters (course and user_id)
*
* @return bool|null|soap_fault A simple boolean (true if user is subscribed, false otherwise)
* @return bool|soap_fault|null A simple boolean (true if user is subscribed, false otherwise)
*/
function WSUserSubscribedInCourse($params)
{

@ -3819,7 +3819,7 @@ function checkExistingWorkFileName($filename, $workId)
* @param bool $checkDuplicated
* @param bool $showFlashMessage
*
* @return null|string
* @return string|null
*/
function processWorkForm(
$workInfo,

@ -405,7 +405,7 @@ class HookAdvancedSubscription extends HookObserver implements HookAdminBlockObs
/**
* @param $params
*
* @return null|soap_fault
* @return soap_fault|null
*/
public static function WSSessionListInCategory($params)
{
@ -456,7 +456,7 @@ class HookAdvancedSubscription extends HookObserver implements HookAdminBlockObs
/**
* @param $params
*
* @return null|soap_fault
* @return soap_fault|null
*/
public static function WSSessionGetDetailsByUser($params)
{

@ -35,7 +35,7 @@ class CourseResolver implements ContainerAwareInterface
* @param Course $course
* @param Argument $args
*
* @return null|string
* @return string|null
*/
public function getPicture(Course $course, Argument $args)
{

@ -61,9 +61,6 @@ class BreadcrumbBlockService extends BaseBreadcrumbMenuBlockService
// Add course
/** @var Course $course */
if ($course = $blockContext->getBlock()->getSetting('course')) {
if (is_array($course)) {
$title = $course['title'];
$code = $course['code'];

@ -88,7 +88,7 @@ class TestMatching extends Basic
'Superscript',
'ShowBlocks',
], ['JustifyLeft', 'JustifyCenter', 'JustifyRight'],
['Source']
['Source'],
];
}

@ -59,7 +59,7 @@ class EditorController extends BaseController
{
\Chat::setDisableChat();
$params = [
'course_condition' => '?'.$this->getCourseUrlQuery()
'course_condition' => '?'.$this->getCourseUrlQuery(),
];
return $this->render('@ChamiloTheme/Editor/elfinder.html.twig', $params);

@ -153,7 +153,7 @@ class ResourceController extends BaseController implements CourseControllerInter
* @param Request $request
* @param string $fileType
*
* @return null|\Symfony\Component\HttpFoundation\RedirectResponse|Response
* @return \Symfony\Component\HttpFoundation\RedirectResponse|Response|null
*/
public function createResource(Request $request, $fileType = 'file')
{

@ -45,7 +45,7 @@ class LoginSuccessHandler
* @param Request $request
* @param TokenInterface $token
*
* @return null|RedirectResponse|Response
* @return RedirectResponse|Response|null
*/
public function onSecurityInteractiveLogin(InteractiveLoginEvent $event)
{

@ -38,7 +38,7 @@ class LogoutSuccessHandler implements LogoutSuccessHandlerInterface
/**
* @param Request $request
*
* @return null|RedirectResponse
* @return RedirectResponse|null
*/
public function onLogoutSuccess(Request $request)
{

@ -882,7 +882,7 @@ class PageController
* @param string $filter current|history
* @param int $page
*
* @return bool|null|string
* @return bool|string|null
*/
public function returnSessions($user_id, $filter, $page)
{

@ -3,11 +3,11 @@
namespace Chamilo\CoreBundle\Settings;
use Sylius\Bundle\SettingsBundle\Schema\SchemaInterface;
use Sylius\Bundle\SettingsBundle\Schema\AbstractSettingsBuilder;
use Sylius\Bundle\SettingsBundle\Schema\SchemaInterface;
/**
* Class AbstractSettingsSchema
* Class AbstractSettingsSchema.
*
* @package Chamilo\CoreBundle\Settings
*/

@ -155,7 +155,7 @@ class HomeController extends ToolBaseController
*
* @param $iconId
*
* @return null|string
* @return string|null
*/
public function showIconAction($iconId)
{
@ -177,7 +177,7 @@ class HomeController extends ToolBaseController
*
* @param $iconId
*
* @return null|string
* @return string|null
*/
public function hideIconAction($iconId)
{
@ -203,7 +203,7 @@ class HomeController extends ToolBaseController
*
* @param $iconId
*
* @return null|string
* @return string|null
*/
public function deleteIcon($iconId)
{

@ -68,7 +68,7 @@ class ExternalTool
*/
private $activeDeepLinking = false;
/**
* @var null|string
* @var string|null
*
* @ORM\Column(name="privacy", type="text", nullable=true, options={"default": null})
*/
@ -164,7 +164,7 @@ class ExternalTool
}
/**
* @return null|string
* @return string|null
*/
public function getDescription()
{
@ -172,7 +172,7 @@ class ExternalTool
}
/**
* @param null|string $description
* @param string|null $description
*
* @return ExternalTool
*/
@ -244,7 +244,7 @@ class ExternalTool
}
/**
* @return null|string
* @return string|null
*/
public function getCustomParams()
{
@ -252,7 +252,7 @@ class ExternalTool
}
/**
* @param null|string $customParams
* @param string|null $customParams
*
* @return ExternalTool
*/
@ -274,7 +274,7 @@ class ExternalTool
/**
* @param array $params
*
* @return null|string
* @return string|null
*/
public function encodeCustomParams(array $params)
{
@ -387,7 +387,7 @@ class ExternalTool
/**
* Get privacy.
*
* @return null|string
* @return string|null
*/
public function getPrivacy()
{

@ -1980,6 +1980,7 @@ class User extends BaseUser implements ThemeUser, EquatableInterface //implement
if ($uri) {
return 'users/'.substr((string) $id, 0, 1).'/'.$id.'/'.'small_'.$uri;
}
return '';
}

@ -1349,7 +1349,7 @@ class UserRepository extends EntityRepository
*
* @throws \Exception
*
* @return null|TrackELogin
* @return TrackELogin|null
*/
public function getLastLogin(User $user)
{

@ -64,7 +64,7 @@ class LoginFormAuthenticator extends AbstractFormLoginAuthenticator
* @param array $credentials
* @param UserProviderInterface $userProvider
*
* @return null|UserInterface
* @return UserInterface|null
*/
public function getUser($credentials, UserProviderInterface $userProvider)
{

@ -131,7 +131,6 @@ $myCourseListAsCategory = api_get_configuration_value('my_courses_list_as_catego
$controller = new IndexManager(get_lang('MyCourses'));
if (!$myCourseListAsCategory) {
// Main courses and session list
if (isset($_COOKIE['defaultMyCourseView'.$userId]) &&
$_COOKIE['defaultMyCourseView'.$userId] == IndexManager::VIEW_BY_SESSION &&
@ -244,7 +243,6 @@ if (empty($courseAndSessions['html_courses']) && !isset($_GET['history'])) {
$showWelcomeCourse = true;
}
$controller->tpl->assign('show_welcome_course', $showWelcomeCourse);
$controller->tpl->assign('html_sessions', $courseAndSessions['html_sessions']);
$controller->tpl->assign('html_courses', $courseAndSessions['html_courses']);

Loading…
Cancel
Save