Minor -flint fixes

pull/2818/head
Julio 7 years ago
parent 5ebef6db05
commit 7526aa89dc
  1. 3
      main/admin/index.php
  2. 2
      main/admin/system_announcements.php
  3. 2
      main/admin/user_list.php
  4. 6
      main/create_course/add_course.php
  5. 3
      main/group/group_space.php
  6. 7
      main/inc/email_editor.php
  7. 6
      main/inc/introductionSection.inc.php
  8. 1
      main/inc/lib/display.lib.php
  9. 8
      main/inc/lib/document.lib.php
  10. 8
      main/inc/lib/exercise.lib.php
  11. 1
      main/inc/lib/formvalidator/FormValidator.class.php
  12. 2
      main/inc/lib/groupmanager.lib.php
  13. 7
      main/inc/lib/tracking.lib.php
  14. 1
      main/mySpace/myStudents.php
  15. 1
      src/GraphQlBundle/ChamiloGraphQlBundle.php
  16. 2
      src/GraphQlBundle/Map/InterfaceMap.php
  17. 4
      src/GraphQlBundle/Map/QueryMap.php
  18. 2
      src/GraphQlBundle/Resolver/CourseResolver.php
  19. 2
      src/GraphQlBundle/Resolver/SessionResolver.php
  20. 2
      src/GraphQlBundle/Resolver/UserResolver.php

@ -110,7 +110,6 @@ if (api_is_platform_admin()) {
['url' => 'usergroups.php', 'label' => get_lang('Classes')],
];
if (api_is_session_admin()) {
if ('true' === api_get_setting('limit_session_admin_role')) {
$items = array_filter($items, function (array $item) {
@ -459,7 +458,6 @@ if (api_is_platform_admin()) {
$blocks['settings']['items'] = $items;
$blocks['settings']['extra'] = null;
$blocks['settings']['search_form'] = null;
}
if (api_is_platform_admin()) {
@ -506,7 +504,6 @@ if (api_is_platform_admin()) {
}
}
/* Chamilo.org */
$blocks['chamilo']['icon'] = Display::return_icon(
'platform.png',

@ -174,7 +174,7 @@ if ($action_todo) {
'picture',
[
get_lang('Add Picture'),
get_lang('The image must have a maximum dimension of 950 x 712 pixelss')
get_lang('The image must have a maximum dimension of 950 x 712 pixelss'),
],
['id' => 'picture', 'class' => 'picture-form', 'crop_image' => true, 'crop_ratio' => '4/3']
);

@ -546,7 +546,6 @@ function get_user_data($from, $number_of_items, $column, $direction)
return $users;
}
/**
* Returns a mailto-link.
*
@ -586,7 +585,6 @@ function user_filter($name, $params, $row)
*/
function modify_filter($user_id, $url_params, $row)
{
$statusname = api_get_status_langvars();
$user_is_anonymous = false;
$current_user_status_label = $row['7'];

@ -93,12 +93,12 @@ $form->addElement(
$form->addFile(
'picture',
[
get_lang('AddPicture')
get_lang('AddPicture'),
],
[
'id' => 'picture',
'class' => 'picture-form',
'crop_image' => true
'crop_image' => true,
]
);
@ -350,7 +350,6 @@ if ($form->validate()) {
$course_info = CourseManager::create_course($params);
if (!empty($course_info)) {
// update course picture
$picture = $_FILES['picture'];
if (!empty($picture['name'])) {
@ -454,7 +453,6 @@ if ($form->validate()) {
$formContent = $form->returnForm();
}
$tpl->assign('form', $formContent);
$layout = $tpl->fetch($tpl->get_template('create_course/add_course.html.twig'));
$tpl->assign('message', $message);

@ -536,7 +536,8 @@ function email_filter($email)
return Display::encrypted_mailto_link($email, $email);
}
function activeFilter($isActive) {
function activeFilter($isActive)
{
if ($isActive) {
return Display::return_icon('accept.png', get_lang('Active'), [], ICON_SIZE_TINY);
}

@ -79,11 +79,10 @@ if ($form->validate()) {
$text,
api_get_person_name($_user['firstname'], $_user['lastname']),
'',
['reply_to' =>
[
['reply_to' => [
'mail' => $_user['mail'],
'name' => api_get_person_name($_user['firstname'], $_user['lastname'])
]
'name' => api_get_person_name($_user['firstname'], $_user['lastname']),
],
]
);
} else {

@ -56,7 +56,7 @@ if (!empty($courseId)) {
$config = [
'ToolbarSet' => 'Basic',
'Width' => '100%',
'Height' => '300'
'Height' => '300',
];
$form->addHtmlEditor('intro_content', null, false, false, $config, ['card-full' => true]);
@ -375,7 +375,7 @@ if ($intro_dispDefault) {
'id' => 'introduction-tool',
'name' => $nameSection,
'help' => $helpSection,
'text' => $intro_content
'text' => $intro_content,
];
} else {
if (api_is_allowed_to_edit()) {
@ -383,7 +383,7 @@ if ($intro_dispDefault) {
'id' => 'introduction-course',
'name' => $nameSection,
'help' => $helpSection,
'text' => $intro_content
'text' => $intro_content,
];
}
}

@ -663,6 +663,7 @@ class Display
if ($cut) {
$classCut = 'cut-email';
}
return '<a href="'.$hmail.'"'.$style_class.' class="clickable_email_link '.$classCut.'">'.$hclickable_text.'</a>';
}

@ -285,8 +285,9 @@ class DocumentManager
return 'application/octet-stream';
}
/**
* This function smart streams a file to the client using HTTP headers
* This function smart streams a file to the client using HTTP headers.
*
* @param string $fullFilename The full path of the file to be sent
* @param string $filename The name of the file as shown to the client
@ -298,6 +299,7 @@ class DocumentManager
{
if (!file_exists($fullFilename)) {
header("HTTP/1.1 404 Not Found");
return false;
}
@ -307,6 +309,7 @@ class DocumentManager
$fm = @fopen($fullFilename, 'rb');
if (!$fm) {
header("HTTP/1.1 505 Internal server error");
return false;
}
@ -344,10 +347,11 @@ class DocumentManager
fseek($fm, $begin, 0);
while (!feof($fm) && $cur <= $end && (connection_status() == 0)) {
print fread($fm, min(1024 * 16, ($end - $cur) + 1));
echo fread($fm, min(1024 * 16, ($end - $cur) + 1));
$cur += 1024 * 16;
}
}
/**
* This function streams a file to the client.
*

@ -1,8 +1,8 @@
<?php
/* For licensing terms, see /license.txt */
use Chamilo\CoreBundle\Framework\Container;
use Chamilo\CoreBundle\Entity\TrackEExercises;
use Chamilo\CoreBundle\Framework\Container;
use ChamiloSession as Session;
/**
@ -4847,7 +4847,7 @@ EOT;
}
/**
* Display the ranking of results in a exercise
* Display the ranking of results in a exercise.
*
* @param int $exerciseId
* @param int $currentUserId
@ -4893,7 +4893,7 @@ EOT;
/**
* Get the ranking for results in a exercise.
* Function used internally by ExerciseLib::displayResultsInRanking
* Function used internally by ExerciseLib::displayResultsInRanking.
*
* @param int $exerciseId
* @param int $courseId
@ -4944,7 +4944,7 @@ EOT;
$data = array_map(
function ($item) use (&$lastScore, &$position) {
if ($item['exe_result'] < $lastScore) {
++$position;
$position++;
}
$lastScore = $item['exe_result'];

@ -1004,6 +1004,7 @@ EOT;
* @param bool $fullPage (optional) When it is true, the editor loads completed html code for a full page
* @param array $config (optional) Configuration settings for the online editor
* @param array $attributes
*
* @throws Exception
* @throws HTML_QuickForm_Error
*/

@ -1,8 +1,6 @@
<?php
/* For licensing terms, see /license.txt */
use Chamilo\CourseBundle\Entity\CGroupRelUser;
/**
* This library contains some functions for group-management.
*

@ -5935,9 +5935,9 @@ class Tracking
public static function generate_session_exercise_graph($names, $my_results, $average)
{
$cdnChartJs = 'https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.3/Chart.min.js';
$html .= Display::tag('script', '', array('src' => $cdnChartJs));
$canvas = Display::tag('canvas', '', array('id' => 'session_graph_chart'));
$html .= Display::tag('div',$canvas, array('style' => 'width:100%'));
$html .= Display::tag('script', '', ['src' => $cdnChartJs]);
$canvas = Display::tag('canvas', '', ['id' => 'session_graph_chart']);
$html .= Display::tag('div', $canvas, ['style' => 'width:100%']);
$jsStr = " var data = {
labels:".json_encode($names).",
datasets: [
@ -5982,6 +5982,7 @@ class Tracking
}
});";
$html .= Display::tag('script', $jsStr);
return $html;
}

@ -2,7 +2,6 @@
/* For licensing terms, see /license.txt */
use Chamilo\CoreBundle\Entity\Message;
use Chamilo\CourseBundle\Entity\CLp;
use Chamilo\CourseBundle\Entity\CLpCategory;
use ChamiloSession as Session;

@ -12,5 +12,4 @@ use Symfony\Component\HttpKernel\Bundle\Bundle;
*/
class ChamiloGraphQlBundle extends Bundle
{
}

@ -3,9 +3,9 @@
namespace Chamilo\GraphQlBundle\Map;
use Chamilo\CourseBundle\Entity\CTool;
use Chamilo\GraphQlBundle\Resolver\CourseResolver;
use Chamilo\GraphQlBundle\Traits\GraphQLTrait;
use Chamilo\CourseBundle\Entity\CTool;
use Overblog\GraphQLBundle\Resolver\ResolverMap;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;

@ -3,13 +3,12 @@
namespace Chamilo\GraphQlBundle\Map;
use Chamilo\CoreBundle\Security\Authorization\Voter\SessionVoter;
use Chamilo\GraphQlBundle\Traits\GraphQLTrait;
use Chamilo\CoreBundle\Entity\Course;
use Chamilo\CoreBundle\Entity\Message;
use Chamilo\CoreBundle\Entity\Session;
use Chamilo\CoreBundle\Entity\SessionCategory;
use Chamilo\CoreBundle\Security\Authorization\Voter\CourseVoter;
use Chamilo\CoreBundle\Security\Authorization\Voter\SessionVoter;
use Chamilo\CourseBundle\Entity\CForumCategory;
use Chamilo\CourseBundle\Entity\CForumForum;
use Chamilo\CourseBundle\Entity\CForumPost;
@ -17,6 +16,7 @@ use Chamilo\CourseBundle\Entity\CForumThread;
use Chamilo\CourseBundle\Entity\CLpCategory;
use Chamilo\CourseBundle\Entity\CNotebook;
use Chamilo\CourseBundle\Entity\CTool;
use Chamilo\GraphQlBundle\Traits\GraphQLTrait;
use Chamilo\UserBundle\Entity\User;
use GraphQL\Type\Definition\ResolveInfo;
use Overblog\GraphQLBundle\Definition\Argument;

@ -3,7 +3,6 @@
namespace Chamilo\GraphQlBundle\Resolver;
use Chamilo\GraphQlBundle\Traits\GraphQLTrait;
use Chamilo\CoreBundle\Entity\Course;
use Chamilo\CoreBundle\Entity\Session;
use Chamilo\CoreBundle\Entity\SessionRelCourseRelUser;
@ -15,6 +14,7 @@ use Chamilo\CourseBundle\Entity\CItemProperty;
use Chamilo\CourseBundle\Entity\CLpCategory;
use Chamilo\CourseBundle\Entity\CTool;
use Chamilo\CourseBundle\Repository\CNotebookRepository;
use Chamilo\GraphQlBundle\Traits\GraphQLTrait;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Criteria;
use Firebase\JWT\JWT;

@ -3,10 +3,10 @@
namespace Chamilo\GraphQlBundle\Resolver;
use Chamilo\GraphQlBundle\Traits\GraphQLTrait;
use Chamilo\CoreBundle\Entity\Session;
use Chamilo\CoreBundle\Entity\SessionRelCourse;
use Chamilo\CoreBundle\Security\Authorization\Voter\SessionVoter;
use Chamilo\GraphQlBundle\Traits\GraphQLTrait;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
/**

@ -3,8 +3,8 @@
namespace Chamilo\GraphQlBundle\Resolver;
use Chamilo\GraphQlBundle\Traits\GraphQLTrait;
use Chamilo\CoreBundle\Entity\Course;
use Chamilo\GraphQlBundle\Traits\GraphQLTrait;
use Chamilo\UserBundle\Entity\User;
use Doctrine\Common\Collections\ArrayCollection;
use Overblog\GraphQLBundle\Definition\Argument;

Loading…
Cancel
Save