Minor -flint fixes

pull/2818/head
Julio 6 years ago
parent 5ebef6db05
commit 7526aa89dc
  1. 65
      main/admin/index.php
  2. 2
      main/admin/system_announcements.php
  3. 162
      main/admin/user_list.php
  4. 34
      main/create_course/add_course.php
  5. 3
      main/group/group_space.php
  6. 7
      main/inc/email_editor.php
  7. 8
      main/inc/introductionSection.inc.php
  8. 3
      main/inc/lib/display.lib.php
  9. 18
      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. 2
      main/inc/lib/sortable_table.class.php
  14. 13
      main/inc/lib/tracking.lib.php
  15. 1
      main/mySpace/myStudents.php
  16. 2
      main/wiki/wiki.inc.php
  17. 1
      src/GraphQlBundle/ChamiloGraphQlBundle.php
  18. 2
      src/GraphQlBundle/Map/InterfaceMap.php
  19. 4
      src/GraphQlBundle/Map/QueryMap.php
  20. 2
      src/GraphQlBundle/Resolver/CourseResolver.php
  21. 2
      src/GraphQlBundle/Resolver/SessionResolver.php
  22. 2
      src/GraphQlBundle/Resolver/UserResolver.php
  23. 2
      user_portal.php

@ -13,7 +13,7 @@ use League\Flysystem\Filesystem;
$cidReset = true;
// Including some necessary chamilo files.
require_once __DIR__ . '/../inc/global.inc.php';
require_once __DIR__.'/../inc/global.inc.php';
// Setting the section (for the tabs).
$this_section = SECTION_PLATFORM_ADMIN;
@ -73,10 +73,10 @@ $search_form = '
<form method="get" class="form-inline" action="user_list.php">
<div class="form-group mb-2">
<input class="form-control" type="text" name="keyword" value=""
aria-label="' . get_lang('Search') . '">
aria-label="'.get_lang('Search').'">
</div>
<button class="btn btn-primary mb-2" type="submit">
<em class="fa fa-search"></em> ' . get_lang('Search') . '
<em class="fa fa-search"></em> '.get_lang('Search').'
</button>
</form>';
$blocks['users']['search_form'] = $search_form;
@ -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) {
@ -149,10 +148,10 @@ if (api_is_platform_admin()) {
$search_form = ' <form method="get" class="form-inline" action="course_list.php">
<div class="form-group mb-2">
<input class="form-control" type="text" name="keyword" value=""
aria-label="' . get_lang('Search') . '">
aria-label="'.get_lang('Search').'">
</div>
<button class="btn btn-primary mb-2" type="submit">
<em class="fa fa-search"></em> ' . get_lang('Search') . '
<em class="fa fa-search"></em> '.get_lang('Search').'
</button>
</form>';
$blocks['courses']['search_form'] = $search_form;
@ -183,7 +182,7 @@ if (api_is_platform_admin()) {
$items[] = ['url' => 'extra_fields.php?type=course', 'label' => get_lang('ManageCourseFields')];
$items[] = [
'url' => api_get_path(WEB_CODE_PATH) . 'admin/teacher_time_report.php',
'url' => api_get_path(WEB_CODE_PATH).'admin/teacher_time_report.php',
'label' => get_lang('TeacherTimeReport'),
];
@ -205,28 +204,28 @@ if (api_is_platform_admin()) {
if (api_is_platform_admin()) {
$blocks['sessions']['editable'] = true;
}
$sessionPath = api_get_path(WEB_CODE_PATH) . 'session/';
$sessionPath = api_get_path(WEB_CODE_PATH).'session/';
$search_form = ' <form method="GET" class="form-inline" action="' . $sessionPath . 'session_list.php">
$search_form = ' <form method="GET" class="form-inline" action="'.$sessionPath.'session_list.php">
<div class="form-group mb-2">
<input class="form-control"
type="text"
name="keyword"
value=""
aria-label="' . get_lang('Search') . '">
aria-label="'.get_lang('Search').'">
</div>
<button class="btn btn-primary mb-2" type="submit">
<em class="fa fa-search"></em> ' . get_lang('Search') . '
<em class="fa fa-search"></em> '.get_lang('Search').'
</button>
</form>';
$blocks['sessions']['search_form'] = $search_form;
$items = [];
$items[] = ['url' => $sessionPath . 'session_list.php', 'label' => get_lang('ListSession')];
$items[] = ['url' => $sessionPath . 'session_add.php', 'label' => get_lang('AddSession')];
$items[] = ['url' => $sessionPath . 'session_category_list.php', 'label' => get_lang('ListSessionCategory')];
$items[] = ['url' => $sessionPath . 'session_import.php', 'label' => get_lang('ImportSessionListXMLCSV')];
$items[] = ['url' => $sessionPath . 'session_import_drh.php', 'label' => get_lang('ImportSessionDrhList')];
$items[] = ['url' => $sessionPath.'session_list.php', 'label' => get_lang('ListSession')];
$items[] = ['url' => $sessionPath.'session_add.php', 'label' => get_lang('AddSession')];
$items[] = ['url' => $sessionPath.'session_category_list.php', 'label' => get_lang('ListSessionCategory')];
$items[] = ['url' => $sessionPath.'session_import.php', 'label' => get_lang('ImportSessionListXMLCSV')];
$items[] = ['url' => $sessionPath.'session_import_drh.php', 'label' => get_lang('ImportSessionDrhList')];
if (isset($extAuthSource) && isset($extAuthSource['ldap']) && count($extAuthSource['ldap']) > 0) {
$items[] = [
'url' => 'ldap_import_students_to_session.php',
@ -234,7 +233,7 @@ if (api_is_platform_admin()) {
];
}
$items[] = [
'url' => $sessionPath . 'session_export.php',
'url' => $sessionPath.'session_export.php',
'label' => get_lang('ExportSessionListXMLCSV'),
];
@ -249,7 +248,7 @@ if (api_is_platform_admin()) {
if (api_is_platform_admin() || ($allowCareer && api_is_session_admin())) {
// option only visible in development mode. Enable through code if required
if (is_dir(api_get_path(SYS_TEST_PATH) . 'datafiller/')) {
if (is_dir(api_get_path(SYS_TEST_PATH).'datafiller/')) {
$items[] = ['url' => 'user_move_stats.php', 'label' => get_lang('MoveUserStats')];
}
$items[] = ['url' => 'career_dashboard.php', 'label' => get_lang('CareersAndPromotions')];
@ -291,7 +290,7 @@ if (api_is_platform_admin()) {
];
$items[] = [
'url' => api_get_path(WEB_CODE_PATH) . 'social/skills_ranking.php',
'url' => api_get_path(WEB_CODE_PATH).'social/skills_ranking.php',
'label' => get_lang('SkillsRanking'),
];
$items[] = [
@ -327,21 +326,21 @@ if (api_is_platform_admin()) {
$blocks['platform']['description'] = get_lang('Configure your platform, view reports, publish and send announcements globally');
$blocks['platform']['class'] = 'block-admin-platform';
$blocks['platform']['editable'] = true;
$search_form = ' <form method="get" action="' . api_get_path(WEB_PUBLIC_PATH) . 'admin/settings/search_settings' . '" class="form-inline">
$search_form = ' <form method="get" action="'.api_get_path(WEB_PUBLIC_PATH).'admin/settings/search_settings'.'" class="form-inline">
<div class="form-group mb-2">
<input class="form-control"
type="text"
name="keyword" value=""
aria-label="' . get_lang('Search') . '" >
aria-label="'.get_lang('Search').'" >
</div>
<button class="btn btn-primary mb-2" type="submit">
<em class="fa fa-search"></em> ' . get_lang('Search') . '
<em class="fa fa-search"></em> '.get_lang('Search').'
</button>
</form>';
$blocks['platform']['search_form'] = $search_form;
//$url = Container::getRouter()->generate('chamilo_platform_settings', ['namespace' => 'platform']);
$url = api_get_path(WEB_PUBLIC_PATH) . 'admin/settings/platform';
$url = api_get_path(WEB_PUBLIC_PATH).'admin/settings/platform';
$items = [];
$items[] = ['url' => $url, 'label' => get_lang('PlatformConfigSettings')];
$items[] = ['url' => 'languages.php', 'label' => get_lang('Languages')];
@ -349,7 +348,7 @@ if (api_is_platform_admin()) {
$items[] = ['url' => 'settings.php?category=Regions', 'label' => get_lang('Regions')];
$items[] = ['url' => 'system_announcements.php', 'label' => get_lang('SystemAnnouncements')];
$items[] = [
'url' => api_get_path(WEB_CODE_PATH) . 'calendar/agenda_js.php?type=admin',
'url' => api_get_path(WEB_CODE_PATH).'calendar/agenda_js.php?type=admin',
'label' => get_lang('GlobalAgenda'),
];
// Replaced by page blocks
@ -357,13 +356,13 @@ if (api_is_platform_admin()) {
$items[] = ['url' => 'configure_inscription.php', 'label' => get_lang('ConfigureInscription')];
$items[] = ['url' => 'statistics/index.php', 'label' => get_lang('Statistics')];
$items[] = [
'url' => api_get_path(WEB_CODE_PATH) . 'mySpace/company_reports.php',
'url' => api_get_path(WEB_CODE_PATH).'mySpace/company_reports.php',
'label' => get_lang('Reports'),
];
if (api_get_configuration_value('chamilo_cms')) {
$items[] = [
'url' => api_get_path(WEB_PATH) . 'web/app_dev.php/administration/dashboard',
'url' => api_get_path(WEB_PATH).'web/app_dev.php/administration/dashboard',
'label' => get_lang('CMS'),
];
}
@ -378,7 +377,7 @@ if (api_is_platform_admin()) {
if (api_get_plugin_setting('dictionary', 'enable_plugin_dictionary') == 'true') {
$items[] = [
'url' => api_get_path(WEB_PLUGIN_PATH) . 'dictionary/terms.php',
'url' => api_get_path(WEB_PLUGIN_PATH).'dictionary/terms.php',
'label' => get_lang('Dictionary'),
];
}
@ -387,7 +386,7 @@ if (api_is_platform_admin()) {
$items[] = ['url' => 'legal_add.php', 'label' => get_lang('TermsAndConditions')];
}
$items[] = ['url' => api_get_path(WEB_PUBLIC_PATH) . 'admin/lti/', 'label' => get_lang('External tools')];
$items[] = ['url' => api_get_path(WEB_PUBLIC_PATH).'admin/lti/', 'label' => get_lang('External tools')];
$blocks['platform']['items'] = $items;
$blocks['platform']['extra'] = null;
@ -420,7 +419,7 @@ if (api_is_platform_admin()) {
'url' => 'system_status.php',
'label' => get_lang('SystemStatus'),
];
if (is_dir(api_get_path(SYS_TEST_PATH) . 'datafiller/')) {
if (is_dir(api_get_path(SYS_TEST_PATH).'datafiller/')) {
$items[] = [
'url' => 'filler.php',
'label' => get_lang('DataFiller'),
@ -439,7 +438,7 @@ if (api_is_platform_admin()) {
}
$items[] = [
'url' => api_get_path(WEB_CODE_PATH) . 'ticket/tickets.php',
'url' => api_get_path(WEB_CODE_PATH).'ticket/tickets.php',
'label' => get_lang('TicketSystem'),
];
@ -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',
@ -588,7 +585,7 @@ if (api_is_platform_admin()) {
}
//end hack
}
$admin_ajax_url = api_get_path(WEB_AJAX_PATH) . 'admin.ajax.php';
$admin_ajax_url = api_get_path(WEB_AJAX_PATH).'admin.ajax.php';
$tpl = new Template();
@ -632,7 +629,7 @@ if (api_is_platform_admin()) {
if (!empty($extraData['block'])) {
//$fileSystem->put('admin/'.$extraData['block'].'_extra.html', $extraData['extra_content']);
header('Location: ' . api_get_self());
header('Location: '.api_get_self());
exit;
}
}

@ -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']
);

@ -10,7 +10,7 @@ use ChamiloSession as Session;
* @package chamilo.admin
*/
$cidReset = true;
require_once __DIR__ . '/../inc/global.inc.php';
require_once __DIR__.'/../inc/global.inc.php';
api_protect_session_admin_list_users();
@ -32,7 +32,7 @@ if (isset($_GET['user_id']) && $action == 'login_as') {
$userId
);
$url = api_get_path(WEB_PATH) . 'user_portal.php';
$url = api_get_path(WEB_PATH).'user_portal.php';
$goTo = sprintf(get_lang('LoginSuccessfulGoToX'), Display::url($url, $url));
Display::display_header(get_lang('UserList'));
echo Display::return_message($message, 'normal', false);
@ -50,8 +50,8 @@ api_protect_admin_script(true);
trimVariables();
$url = api_get_path(WEB_AJAX_PATH) . 'course.ajax.php?a=get_user_courses';
$urlSession = api_get_path(WEB_AJAX_PATH) . 'session.ajax.php?a=get_user_sessions';
$url = api_get_path(WEB_AJAX_PATH).'course.ajax.php?a=get_user_courses';
$urlSession = api_get_path(WEB_AJAX_PATH).'session.ajax.php?a=get_user_sessions';
$extraField = new ExtraField('user');
$variables = $extraField->get_all_extra_field_by_type(ExtraField::FIELD_TYPE_TAG);
$variablesSelect = $extraField->get_all_extra_field_by_type(ExtraField::FIELD_TYPE_SELECT);
@ -77,7 +77,7 @@ function load_course_list (div_course,my_user_id) {
beforeSend: function(myObject) {
$("div#"+div_course).html("<img src=\'../inc/lib/javascript/indicator.gif\' />"); },
type: "POST",
url: "' . $url . '",
url: "'.$url.'",
data: "user_id="+my_user_id,
success: function(datos) {
$("div#"+div_course).html(datos);
@ -93,7 +93,7 @@ function load_session_list(div_session, my_user_id) {
beforeSend: function(myObject) {
$("div#"+div_session).html("<img src=\'../inc/lib/javascript/indicator.gif\' />"); },
type: "POST",
url: "' . $urlSession . '",
url: "'.$urlSession.'",
data: "user_id="+my_user_id,
success: function(datos) {
$("div#"+div_session).html(datos);
@ -114,26 +114,26 @@ function active_user(element_div) {
}
user_id=id_image.split("_");
ident="#img_"+user_id[1];
if (confirm("' . get_lang('AreYouSureToEditTheUserStatus', '') . '")) {
if (confirm("'.get_lang('AreYouSureToEditTheUserStatus', '').'")) {
$.ajax({
contentType: "application/x-www-form-urlencoded",
beforeSend: function(myObject) {
$(ident).attr("src","' . Display::returnIconPath('loading1.gif') . '"); }, //candy eye stuff
$(ident).attr("src","'.Display::returnIconPath('loading1.gif').'"); }, //candy eye stuff
type: "GET",
url: "' . api_get_path(WEB_AJAX_PATH) . 'user_manager.ajax.php?a=active_user",
url: "'.api_get_path(WEB_AJAX_PATH).'user_manager.ajax.php?a=active_user",
data: "user_id="+user_id[1]+"&status="+status,
success: function(data) {
if (data == 1) {
$(ident).attr("src", "' . Display::returnIconPath('accept.png', ICON_SIZE_TINY) . '");
$(ident).attr("title","' . get_lang('Lock') . '");
$(ident).attr("src", "'.Display::returnIconPath('accept.png', ICON_SIZE_TINY).'");
$(ident).attr("title","'.get_lang('Lock').'");
}
if (data == 0) {
$(ident).attr("src","' . Display::returnIconPath('error.png') . '");
$(ident).attr("title","' . get_lang('Unlock') . '");
$(ident).attr("src","'.Display::returnIconPath('error.png').'");
$(ident).attr("title","'.get_lang('Unlock').'");
}
if (data == -1) {
$(ident).attr("src", "' . Display::returnIconPath('warning.png') . '");
$(ident).attr("title","' . get_lang('ActionNotAllowed') . '");
$(ident).attr("src", "'.Display::returnIconPath('warning.png').'");
$(ident).attr("title","'.get_lang('ActionNotAllowed').'");
}
}
});
@ -152,10 +152,10 @@ function clear_session_list(div_session) {
function display_advanced_search_form () {
if ($("#advanced_search_form").css("display") == "none") {
$("#advanced_search_form").css("display","block");
$("#img_plus_and_minus").html(\'&nbsp;' . Display::returnFontAwesomeIcon('arrow-down') . ' ' . get_lang('AdvancedSearch') . '\');
$("#img_plus_and_minus").html(\'&nbsp;'.Display::returnFontAwesomeIcon('arrow-down').' '.get_lang('AdvancedSearch').'\');
} else {
$("#advanced_search_form").css("display","none");
$("#img_plus_and_minus").html(\'&nbsp;' . Display::returnFontAwesomeIcon('arrow-right') . ' ' . get_lang('AdvancedSearch') . '\');
$("#img_plus_and_minus").html(\'&nbsp;'.Display::returnFontAwesomeIcon('arrow-right').' '.get_lang('AdvancedSearch').'\');
}
}
@ -174,7 +174,7 @@ $(document).ready(function() {
//Load user calendar
function load_calendar(user_id, month, year) {
var url = "' . api_get_path(WEB_AJAX_PATH) . 'agenda.ajax.php?a=get_user_agenda&user_id=" +user_id + "&month="+month+"&year="+year;
var url = "'.api_get_path(WEB_AJAX_PATH).'agenda.ajax.php?a=get_user_agenda&user_id=" +user_id + "&month="+month+"&year="+year;
$(".modal-body").load(url);
}
</script>';
@ -281,7 +281,7 @@ function prepare_user_sql_query($getCount)
*/
if (isset($_GET['keyword']) && !empty($_GET['keyword'])) {
$keywordFiltered = Database::escape_string("%" . $_GET['keyword'] . "%");
$keywordFiltered = Database::escape_string("%".$_GET['keyword']."%");
$sql .= " WHERE (
u.firstname LIKE '$keywordFiltered' OR
u.lastname LIKE '$keywordFiltered' OR
@ -315,13 +315,13 @@ function prepare_user_sql_query($getCount)
*/
$sql .= " $query_admin_table
WHERE (
u.firstname LIKE '" . Database::escape_string("%" . $keywordListValues['keyword_firstname'] . "%") . "' AND
u.lastname LIKE '" . Database::escape_string("%" . $keywordListValues['keyword_lastname'] . "%") . "' AND
u.username LIKE '" . Database::escape_string("%" . $keywordListValues['keyword_username'] . "%") . "' AND
u.email LIKE '" . Database::escape_string("%" . $keywordListValues['keyword_email'] . "%") . "' AND
u.status LIKE '" . Database::escape_string($keywordListValues['keyword_status']) . "' ";
u.firstname LIKE '".Database::escape_string("%".$keywordListValues['keyword_firstname']."%")."' AND
u.lastname LIKE '".Database::escape_string("%".$keywordListValues['keyword_lastname']."%")."' AND
u.username LIKE '".Database::escape_string("%".$keywordListValues['keyword_username']."%")."' AND
u.email LIKE '".Database::escape_string("%".$keywordListValues['keyword_email']."%")."' AND
u.status LIKE '".Database::escape_string($keywordListValues['keyword_status'])."' ";
if (!empty($keywordListValues['keyword_officialcode'])) {
$sql .= " AND u.official_code LIKE '" . Database::escape_string("%" . $keywordListValues['keyword_officialcode'] . "%") . "' ";
$sql .= " AND u.official_code LIKE '".Database::escape_string("%".$keywordListValues['keyword_officialcode']."%")."' ";
}
$sql .= "
@ -343,7 +343,7 @@ function prepare_user_sql_query($getCount)
$preventSessionAdminsToManageAllUsers = api_get_setting('prevent_session_admins_to_manage_all_users');
if (api_is_session_admin() && $preventSessionAdminsToManageAllUsers === 'true') {
$sql .= " AND u.creator_id = " . api_get_user_id();
$sql .= " AND u.creator_id = ".api_get_user_id();
}
$variables = Session::read('variables_to_show', []);
@ -352,11 +352,11 @@ function prepare_user_sql_query($getCount)
$extraFieldResult = [];
$extraFieldHasData = [];
foreach ($variables as $variable) {
if (isset($_GET['extra_' . $variable])) {
if (is_array($_GET['extra_' . $variable])) {
$values = $_GET['extra_' . $variable];
if (isset($_GET['extra_'.$variable])) {
if (is_array($_GET['extra_'.$variable])) {
$values = $_GET['extra_'.$variable];
} else {
$values = [$_GET['extra_' . $variable]];
$values = [$_GET['extra_'.$variable]];
}
if (empty($values)) {
@ -402,7 +402,7 @@ function prepare_user_sql_query($getCount)
}
if (!empty($extraFieldHasData)) {
$sql .= " AND (u.id IN ('" . implode("','", $extraFieldResult) . "')) ";
$sql .= " AND (u.id IN ('".implode("','", $extraFieldResult)."')) ";
}
}
@ -410,7 +410,7 @@ function prepare_user_sql_query($getCount)
if ((api_is_platform_admin() || api_is_session_admin()) &&
api_get_multiple_access_url()
) {
$sql .= " AND url_rel_user.access_url_id=" . api_get_current_access_url_id();
$sql .= " AND url_rel_user.access_url_id=".api_get_current_access_url_id();
}
return $sql;
@ -468,9 +468,9 @@ function get_user_data($from, $number_of_items, $column, $direction)
);
$is_admin = in_array($user[0], $_admins_list);
$photo = '<img
src="' . $userPicture . '" class="rounded-circle avatar"
alt="' . api_get_person_name($user[2], $user[3]) . '"
title="' . api_get_person_name($user[2], $user[3]) . '" />';
src="'.$userPicture.'" class="rounded-circle avatar"
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])) {
// check expiration date
@ -508,7 +508,7 @@ function get_user_data($from, $number_of_items, $column, $direction)
if ($action === 'edit') {
$iconActive = Display::return_icon(
$image . '.png',
$image.'.png',
get_lang('AccountExpired'),
[],
16
@ -518,15 +518,15 @@ function get_user_data($from, $number_of_items, $column, $direction)
// accounts including your own => everybody is locked out and nobody
// can change it anymore.
$iconActive = Display::return_icon(
$image . '.png',
$image.'.png',
get_lang(ucfirst($action)),
['onclick' => 'active_user(this);', 'id' => 'img_' . $user['0']],
['onclick' => 'active_user(this);', 'id' => 'img_'.$user['0']],
16
);
}
$profile = '<div class="avatar-user">' . $photo . '<span class="is-admin">'
. $iconAdmin . '</span><span class="is-active">' . $iconActive . '</span></div>';
$profile = '<div class="avatar-user">'.$photo.'<span class="is-admin">'
.$iconAdmin.'</span><span class="is-active">'.$iconActive.'</span></div>';
// forget about the expiration date field
$users[] = [
@ -546,7 +546,6 @@ function get_user_data($from, $number_of_items, $column, $direction)
return $users;
}
/**
* Returns a mailto-link.
*
@ -570,7 +569,7 @@ function email_filter($email)
*/
function user_filter($name, $params, $row)
{
return '<a href="' . api_get_path(WEB_PATH) . 'whoisonline.php?origin=user_list&id=' . $row[0] . '">' . $name . '</a>';
return '<a href="'.api_get_path(WEB_PATH).'whoisonline.php?origin=user_list&id='.$row[0].'">'.$name.'</a>';
}
/**
@ -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'];
@ -599,21 +597,21 @@ function modify_filter($user_id, $url_params, $row)
$icon = Display::return_icon(
'course.png',
get_lang('Courses'),
['onmouseout' => 'clear_course_list (\'div_' . $user_id . '\')']
['onmouseout' => 'clear_course_list (\'div_'.$user_id.'\')']
);
$result .= '<a href="javascript:void(0)" onclick="load_course_list(\'div_' . $user_id . '\',' . $user_id . ')" >
' . $icon . '
<div class="blackboard_hide" id="div_' . $user_id . '"></div>
$result .= '<a href="javascript:void(0)" onclick="load_course_list(\'div_'.$user_id.'\','.$user_id.')" >
'.$icon.'
<div class="blackboard_hide" id="div_'.$user_id.'"></div>
</a>';
$icon = Display::return_icon(
'session.png',
get_lang('Sessions'),
['onmouseout' => 'clear_session_list (\'div_s_' . $user_id . '\')']
['onmouseout' => 'clear_session_list (\'div_s_'.$user_id.'\')']
);
$result .= '<a href="javascript:void(0)" onclick="load_session_list(\'div_s_' . $user_id . '\',' . $user_id . ')" >
' . $icon . '
<div class="blackboard_hide" id="div_s_' . $user_id . '"></div>
$result .= '<a href="javascript:void(0)" onclick="load_session_list(\'div_s_'.$user_id.'\','.$user_id.')" >
'.$icon.'
<div class="blackboard_hide" id="div_s_'.$user_id.'"></div>
</a>';
} else {
$result .= Display::return_icon('course_na.png', get_lang('Courses'));
@ -622,8 +620,8 @@ function modify_filter($user_id, $url_params, $row)
if (api_is_platform_admin()) {
if (!$user_is_anonymous) {
$result .= '<a href="user_information.php?user_id=' . $user_id . '">' .
Display::return_icon('info2.png', get_lang('Info')) . '</a>';
$result .= '<a href="user_information.php?user_id='.$user_id.'">'.
Display::return_icon('info2.png', get_lang('Info')).'</a>';
} else {
$result .= Display::return_icon('info2_na.png', get_lang('Info'));
}
@ -643,8 +641,8 @@ function modify_filter($user_id, $url_params, $row)
if (api_is_platform_admin() || $sessionAdminCanLoginAs) {
if (!$user_is_anonymous) {
if (api_global_admin_can_edit_admin($user_id, null, $sessionAdminCanLoginAs)) {
$result .= '<a href="user_list.php?action=login_as&user_id=' . $user_id . '&sec_token=' . Security::getTokenFromSession() . '">' .
Display::return_icon('login_as.png', get_lang('LoginAs')) . '</a>';
$result .= '<a href="user_list.php?action=login_as&user_id='.$user_id.'&sec_token='.Security::getTokenFromSession().'">'.
Display::return_icon('login_as.png', get_lang('LoginAs')).'</a>';
} else {
$result .= Display::return_icon('login_as_na.png', get_lang('LoginAs'));
}
@ -661,8 +659,8 @@ function modify_filter($user_id, $url_params, $row)
get_lang('Reporting')
);
} else {
$result .= '<a href="../mySpace/myStudents.php?student=' . $user_id . '">' .
Display::return_icon('statistics.png', get_lang('Reporting')) .
$result .= '<a href="../mySpace/myStudents.php?student='.$user_id.'">'.
Display::return_icon('statistics.png', get_lang('Reporting')).
'</a>';
}
@ -671,13 +669,13 @@ function modify_filter($user_id, $url_params, $row)
if (!$user_is_anonymous &&
api_global_admin_can_edit_admin($user_id, null, true)
) {
$result .= '<a href="' . $editProfileUrl . '">' .
$result .= '<a href="'.$editProfileUrl.'">'.
Display::return_icon(
'edit.png',
get_lang('Edit'),
[],
ICON_SIZE_SMALL
) .
).
'</a>';
} else {
$result .= Display::return_icon(
@ -685,7 +683,7 @@ function modify_filter($user_id, $url_params, $row)
get_lang('Edit'),
[],
ICON_SIZE_SMALL
) . '</a>';
).'</a>';
}
}
@ -699,7 +697,7 @@ function modify_filter($user_id, $url_params, $row)
null,
ICON_SIZE_SMALL
),
api_get_path(WEB_CODE_PATH) . 'badge/assign.php?' . http_build_query(['user' => $user_id])
api_get_path(WEB_CODE_PATH).'badge/assign.php?'.http_build_query(['user' => $user_id])
);
}
@ -757,37 +755,37 @@ function modify_filter($user_id, $url_params, $row)
api_global_admin_can_edit_admin($user_id, null, true)
) {
// you cannot lock yourself out otherwise you could disable all the accounts including your own => everybody is locked out and nobody can change it anymore.
$result .= ' <a href="user_list.php?action=delete_user&user_id=' . $user_id . '&' . $url_params . '&sec_token=' . Security::getTokenFromSession() . '" onclick="javascript:if(!confirm(' . "'" . addslashes(api_htmlentities(get_lang("ConfirmYourChoice"))) . "'" . ')) return false;">' .
$result .= ' <a href="user_list.php?action=delete_user&user_id='.$user_id.'&'.$url_params.'&sec_token='.Security::getTokenFromSession().'" onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice")))."'".')) return false;">'.
Display::return_icon(
'delete.png',
get_lang('Delete'),
[],
ICON_SIZE_SMALL
) .
).
'</a>';
}
}
if (api_is_platform_admin()) {
$result .= ' <a data-title="' . get_lang('FreeBusyCalendar') . '" href="' . api_get_path(WEB_AJAX_PATH) . 'agenda.ajax.php?a=get_user_agenda&user_id=' . $user_id . '&modal_size=lg" class="agenda_opener ajax">' .
$result .= ' <a data-title="'.get_lang('FreeBusyCalendar').'" href="'.api_get_path(WEB_AJAX_PATH).'agenda.ajax.php?a=get_user_agenda&user_id='.$user_id.'&modal_size=lg" class="agenda_opener ajax">'.
Display::return_icon(
'calendar.png',
get_lang('FreeBusyCalendar'),
[],
ICON_SIZE_SMALL
) .
).
'</a>';
if ($user_id != api_get_user_id() &&
!$user_is_anonymous &&
api_global_admin_can_edit_admin($user_id)
) {
$result .= ' <a href="user_list.php?action=anonymize&user_id=' . $user_id . '&' . $url_params . '&sec_token=' . Security::getTokenFromSession() . '" onclick="javascript:if(!confirm(' . "'" . addslashes(api_htmlentities(get_lang("ConfirmYourChoice"))) . "'" . ')) return false;">' .
$result .= ' <a href="user_list.php?action=anonymize&user_id='.$user_id.'&'.$url_params.'&sec_token='.Security::getTokenFromSession().'" onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice")))."'".')) return false;">'.
Display::return_icon(
'anonymous.png',
get_lang('Anonymize'),
[],
ICON_SIZE_SMALL
) .
).
'</a>';
}
@ -799,13 +797,13 @@ function modify_filter($user_id, $url_params, $row)
) {
// you cannot lock yourself out otherwise you could disable all the accounts
// including your own => everybody is locked out and nobody can change it anymore.
$result .= ' <a href="user_list.php?action=delete_user&user_id=' . $user_id . '&' . $url_params . '&sec_token=' . Security::getTokenFromSession() . '" onclick="javascript:if(!confirm(' . "'" . addslashes(api_htmlentities(get_lang("ConfirmYourChoice"))) . "'" . ')) return false;">' .
$result .= ' <a href="user_list.php?action=delete_user&user_id='.$user_id.'&'.$url_params.'&sec_token='.Security::getTokenFromSession().'" onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice")))."'".')) return false;">'.
Display::return_icon(
'delete.png',
get_lang('Delete'),
[],
ICON_SIZE_SMALL
) .
).
'</a>';
} else {
$result .= Display::return_icon(
@ -853,7 +851,7 @@ function active_filter($active, $params, $row)
if ($action === 'edit') {
$result = Display::return_icon(
$image . '.png',
$image.'.png',
get_lang('AccountExpired'),
[],
16
@ -863,9 +861,9 @@ function active_filter($active, $params, $row)
// accounts including your own => everybody is locked out and nobody
// can change it anymore.
$result = Display::return_icon(
$image . '.png',
$image.'.png',
get_lang(ucfirst($action)),
['onclick' => 'active_user(this);', 'id' => 'img_' . $row['0']],
['onclick' => 'active_user(this);', 'id' => 'img_'.$row['0']],
16
);
}
@ -911,14 +909,14 @@ if (!empty($action)) {
$result = UrlManager::add_user_to_url($user_id, $urlId);
if ($result) {
$user_info = api_get_user_info($user_id);
$message = get_lang('UserAdded') . ' ' . $user_info['complete_name_with_username'];
$message = get_lang('UserAdded').' '.$user_info['complete_name_with_username'];
$message = Display::return_message($message, 'confirmation');
}
break;
case 'delete_user':
$message = UserManager::deleteUserWithVerification($_GET['user_id']);
Display::addFlash($message);
header('Location: ' . api_get_self());
header('Location: '.api_get_self());
exit;
break;
case 'delete':
@ -1002,7 +1000,7 @@ if (!empty($action)) {
case 'anonymize':
$message = UserManager::anonymizeUserWithVerification($_GET['user_id']);
Display::addFlash($message);
header('Location: ' . api_get_self());
header('Location: '.api_get_self());
exit;
break;
}
@ -1026,15 +1024,15 @@ $searchAdvanced = '
<a id="advanced_params" href="javascript://"
class="btn btn-light advanced_options" onclick="display_advanced_search_form();">
<span id="img_plus_and_minus">&nbsp;
' . Display::returnFontAwesomeIcon('arrow-right') . ' ' . get_lang('AdvancedSearch') . '
'.Display::returnFontAwesomeIcon('arrow-right').' '.get_lang('AdvancedSearch').'
</span>
</a>';
$actionsLeft = '';
$actionsCenter = '';
$actionsRight = '';
if (api_is_platform_admin()) {
$actionsRight .= '<a class="float-right" href="' . api_get_path(WEB_CODE_PATH) . 'admin/user_add.php">' .
Display::return_icon('new_user.png', get_lang('AddUsers'), '', ICON_SIZE_MEDIUM) . '</a>';
$actionsRight .= '<a class="float-right" href="'.api_get_path(WEB_CODE_PATH).'admin/user_add.php">'.
Display::return_icon('new_user.png', get_lang('AddUsers'), '', ICON_SIZE_MEDIUM).'</a>';
}
$actionsLeft .= $form->returnForm();
@ -1100,7 +1098,7 @@ $data = $extraField->addElements($form, 0, [], true, false, $variablesToShow);
$htmlHeadXtra[] = '
<script>
$(document).ready(function() {
' . $data['jquery_ready_content'] . '
'.$data['jquery_ready_content'].'
})
</script>
';
@ -1195,15 +1193,15 @@ if ($table->get_total_number_of_items() == 0) {
if ($urlId == $url_info['access_url_id']) {
$add_user = false;
}
$access_info_to_string .= $url_info['url'] . '<br />';
$access_info_to_string .= $url_info['url'].'<br />';
}
}
if ($add_user) {
$row_table = [];
$row_table[] = api_get_person_name($user['firstname'],
$user['lastname']) . ' (' . $user['username'] . ') ';
$user['lastname']).' ('.$user['username'].') ';
$row_table[] = $access_info_to_string;
$url = api_get_self() . '?action=add_user_to_my_url&user_id=' . $user['id'] . '&sec_token=' . Security::getTokenFromSession();
$url = api_get_self().'?action=add_user_to_my_url&user_id='.$user['id'].'&sec_token='.Security::getTokenFromSession();
$row_table[] = Display::url(
get_lang('AddUserToMyURL'),
$url,

@ -21,7 +21,7 @@ use Chamilo\CoreBundle\Repository\CourseCategoryRepository;
// Flag forcing the "current course" reset.
$cidReset = true;
require_once __DIR__ . '/../inc/global.inc.php';
require_once __DIR__.'/../inc/global.inc.php';
// Check access rights.
if (!api_is_allowed_to_create_course()) {
@ -58,7 +58,7 @@ $htmlHeadXtra[] = '<script>
</script>';
$interbreadcrumb[] = [
'url' => api_get_path(WEB_PATH) . 'user_portal.php',
'url' => api_get_path(WEB_PATH).'user_portal.php',
'name' => get_lang('MyCourses'),
];
@ -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,
]
);
@ -106,7 +106,7 @@ $allowed_picture_types = api_get_supported_image_extensions(false);
$form->addRule(
'picture',
get_lang('OnlyImagesAllowed') . ' (' . implode(',', $allowed_picture_types) . ')',
get_lang('OnlyImagesAllowed').' ('.implode(',', $allowed_picture_types).')',
'filetype',
$allowed_picture_types
);
@ -118,7 +118,7 @@ $countCategories = $courseCategoriesRepo->countAllInAccessUrl(
if ($countCategories >= 100) {
// Category code
$url = api_get_path(WEB_AJAX_PATH) . 'course.ajax.php?a=search_category';
$url = api_get_path(WEB_AJAX_PATH).'course.ajax.php?a=search_category';
$form->addElement(
'select_ajax',
'category_code',
@ -229,7 +229,7 @@ if ($course_validation_feature) {
// if it is activated.
if (empty($terms_and_conditions_url)) {
if (api_get_setting('allow_terms_conditions') === 'true') {
$terms_and_conditions_url = api_get_path(WEB_CODE_PATH) . 'auth/inscription.php?legal';
$terms_and_conditions_url = api_get_path(WEB_CODE_PATH).'auth/inscription.php?legal';
}
}
@ -277,7 +277,7 @@ if (api_get_setting('teacher_can_select_course_template') === 'true') {
get_lang('PickACourseAsATemplateForThisNewCourse'),
],
null,
['url' => api_get_path(WEB_AJAX_PATH) . 'course.ajax.php?a=search_course']
['url' => api_get_path(WEB_AJAX_PATH).'course.ajax.php?a=search_course']
);
}
@ -340,8 +340,8 @@ if ($form->validate()) {
$params['gradebook_model_id'] = isset($course_values['gradebook_model_id']) ? $course_values['gradebook_model_id'] : null;
$params['course_template'] = isset($course_values['course_template']) ? $course_values['course_template'] : '';
include_once api_get_path(SYS_CODE_PATH) . 'lang/english/trad4all.inc.php';
$file_to_include = api_get_path(SYS_CODE_PATH) . 'lang/' . $course_language . '/trad4all.inc.php';
include_once api_get_path(SYS_CODE_PATH).'lang/english/trad4all.inc.php';
$file_to_include = api_get_path(SYS_CODE_PATH).'lang/'.$course_language.'/trad4all.inc.php';
if (file_exists($file_to_include)) {
include $file_to_include;
@ -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'])) {
@ -378,13 +377,13 @@ if ($form->validate()) {
$splash = api_get_setting('course_creation_splash_screen');
if ($splash === 'true') {
$url = api_get_path(WEB_CODE_PATH);
$url .= 'course_info/start.php?' . api_get_cidreq_params($course_info['code']);
$url .= 'course_info/start.php?'.api_get_cidreq_params($course_info['code']);
$url .= '&first=1';
header('Location: ' . $url);
header('Location: '.$url);
exit;
} else {
$url = api_get_path(WEB_COURSE_PATH) . $course_info['directory'] . '/';
header('Location: ' . $url);
$url = api_get_path(WEB_COURSE_PATH).$course_info['directory'].'/';
header('Location: '.$url);
exit;
}
} else {
@ -412,7 +411,7 @@ if ($form->validate()) {
if ($request_id) {
$course_request_info = CourseRequestManager::get_course_request_info($request_id);
$message = (is_array($course_request_info) ? '<strong>' . $course_request_info['code'] . '</strong> : ' : '') . get_lang('CourseRequestCreated');
$message = (is_array($course_request_info) ? '<strong>'.$course_request_info['code'].'</strong> : ' : '').get_lang('CourseRequestCreated');
$message = Display::return_message(
$message,
'confirmation',
@ -422,7 +421,7 @@ if ($form->validate()) {
'div',
Display::url(
get_lang('Enter'),
api_get_path(WEB_PATH) . 'user_portal.php',
api_get_path(WEB_PATH).'user_portal.php',
['class' => 'btn btn-primary']
),
['style' => 'float: left; margin:0px; padding: 0px;']
@ -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,10 +56,10 @@ if (!empty($courseId)) {
$config = [
'ToolbarSet' => 'Basic',
'Width' => '100%',
'Height' => '300'
'Height' => '300',
];
$form->addHtmlEditor('intro_content', null, false, false, $config, ['card-full'=>true]);
$form->addHtmlEditor('intro_content', null, false, false, $config, ['card-full' => true]);
$form->addButtonSave(get_lang('SaveIntroText'), 'intro_cmdUpdate');
/* INTRODUCTION MICRO MODULE - COMMANDS SECTION (IF ALLOWED) */
@ -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,
];
}
}

@ -660,9 +660,10 @@ class Display
}
// Return encrypted mailto hyperlink
$classCut = '';
if($cut){
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
@ -297,7 +298,8 @@ class DocumentManager
public static function smartReadFile($fullFilename, $filename, $contentType = 'application/octet-stream')
{
if (!file_exists($fullFilename)) {
header ("HTTP/1.1 404 Not Found");
header("HTTP/1.1 404 Not Found");
return false;
}
@ -306,7 +308,8 @@ class DocumentManager
$fm = @fopen($fullFilename, 'rb');
if (!$fm) {
header ("HTTP/1.1 505 Internal server error");
header("HTTP/1.1 505 Internal server error");
return false;
}
@ -332,7 +335,7 @@ class DocumentManager
header('Cache-Control: public, must-revalidate, max-age=0');
header('Pragma: no-cache');
header('Accept-Ranges: bytes');
header('Content-Length:' . (($end - $begin) + 1));
header('Content-Length:'.(($end - $begin) + 1));
if (isset($_SERVER['HTTP_RANGE'])) {
header("Content-Range: bytes $begin-$end/$size");
}
@ -343,11 +346,12 @@ class DocumentManager
$cur = $begin;
fseek($fm, $begin, 0);
while(!feof($fm) && $cur <= $end && (connection_status() == 0)) {
print fread($fm, min(1024 * 16, ($end - $cur) + 1));
while (!feof($fm) && $cur <= $end && (connection_status() == 0)) {
echo fread($fm, min(1024 * 16, ($end - $cur) + 1));
$cur += 1024 * 16;
}
}
/**
* This function streams a file to the client.
*
@ -452,7 +456,7 @@ class DocumentManager
case 'audio/wav':
case 'video/ogg':
case 'video/webm':
self::smartReadFile($full_file_name,$filename,$contentType);
self::smartReadFile($full_file_name, $filename, $contentType);
exit;
case 'application/vnd.dwg':
case 'application/vnd.dwf':

@ -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.
*

@ -577,7 +577,7 @@ class SortableTable extends HTML_Table
$nav = $pager_links['first'].' '.$pager_links['back'];
$nav .= '<div class="btn btn-outline-secondary">'.$pager->getCurrentPageId().' / '.$pager->numPages().' </div>';
$nav .= $pager_links['next'].' '.$pager_links['last'];
$html = Display::tag('div',$nav,['class'=>'btn-group btn-group-sm', 'role' => 'group']);
$html = Display::tag('div', $nav, ['class' => 'btn-group btn-group-sm', 'role' => 'group']);
return $html;
}

@ -5935,23 +5935,23 @@ 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).",
labels:".json_encode($names).",
datasets: [
{
label: '".get_lang('MyResults')."',
backgroundColor: 'rgb(255, 99, 132)',
stack: 'Stack1',
data: ". json_encode($my_results).",
data: ".json_encode($my_results).",
},
{
label: '".get_lang('AverageScore')."',
backgroundColor: 'rgb(75, 192, 192)',
stack: 'Stack2',
data: ". json_encode($average).",
data: ".json_encode($average).",
},
],
};
@ -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;

@ -6076,7 +6076,7 @@ class Wiki
get_lang('RecentChanges'),
'',
ICON_SIZE_MEDIUM
) .'</a>';
).'</a>';
echo Display::toolbarAction('toolbar-wiki', [$actionsLeft]);
}

@ -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;

@ -280,5 +280,5 @@ Session::erase('session_id');
Session::erase('studentview');
api_remove_in_gradebook();
$controller->tpl->assign('content',$controller->tpl->fetch('@ChamiloTheme/Index/userportal.html.twig'));
$controller->tpl->assign('content', $controller->tpl->fetch('@ChamiloTheme/Index/userportal.html.twig'));
$controller->tpl->display_one_col_template();

Loading…
Cancel
Save