Minor - Flint fixes

pull/3063/head
Julio Montoya 7 years ago
parent aa82ff785b
commit f5c57ac4a9
  1. 7
      load_search.php
  2. 1
      main/admin/skill_translate.php
  3. 2
      main/auth/inscription.php
  4. 2
      main/auth/sso/sso.Drupal.class.php
  5. 2
      main/auth/sso/sso.TCC.class.php
  6. 1
      main/document/showinframes.php
  7. 2
      main/dropbox/dropbox_functions.inc.php
  8. 2
      main/exercise/TestCategory.php
  9. 6
      main/exercise/overview.php
  10. 3
      main/forum/forumfunction.inc.php
  11. 12
      main/forum/viewforum.php
  12. 1
      main/forum/viewthread.php
  13. 6
      main/gradebook/lib/be/category.class.php
  14. 2
      main/gradebook/lib/fe/gradebooktable.class.php
  15. 4
      main/gradebook/lib/fe/linkform.class.php
  16. 2
      main/gradebook/lib/fe/resulttable.class.php
  17. 2
      main/gradebook/lib/gradebook_data_generator.class.php
  18. 2
      main/inc/ajax/statistics.ajax.php
  19. 2
      main/inc/lib/api.lib.php
  20. 2
      main/inc/lib/blog.lib.php
  21. 6
      main/inc/lib/chat.lib.php
  22. 4
      main/inc/lib/course.lib.php
  23. 1
      main/inc/lib/database.lib.php
  24. 3
      main/inc/lib/display.lib.php
  25. 1
      main/inc/lib/exercise.lib.php
  26. 1
      main/inc/lib/extra_field.lib.php
  27. 134
      main/inc/lib/formvalidator/Element/DateTimeRangePicker.php
  28. 19
      main/inc/lib/formvalidator/FormValidator.class.php
  29. 1
      main/inc/lib/internationalization.lib.php
  30. 1
      main/inc/lib/message.lib.php
  31. 1
      main/inc/lib/sessionmanager.lib.php
  32. 731
      main/inc/lib/social.lib.php
  33. 2
      main/inc/lib/tracking.lib.php
  34. 1
      main/inc/lib/usergroup.lib.php
  35. 3
      main/inc/lib/usermanager.lib.php
  36. 2
      main/inc/lib/userportal.lib.php
  37. 2
      main/install/configuration.dist.php
  38. 1
      main/lp/learnpath.class.php
  39. 4
      main/lp/learnpathItem.class.php
  40. 2
      main/lp/lp_ajax_save_item.php
  41. 2
      main/mySpace/myStudents.php
  42. 3
      main/social/home.php
  43. 2
      main/social/map.php
  44. 2
      main/social/profile_friends_and_groups.inc.php
  45. 4
      main/survey/preview.php
  46. 1
      main/survey/question.php
  47. 1
      main/survey/survey.lib.php
  48. 2
      main/webservices/lp.php
  49. 18
      main/webservices/registration.soap.php
  50. 2
      main/webservices/tcc.soap.php
  51. 2
      main/work/work.lib.php
  52. 4
      plugin/advanced_subscription/src/HookAdvancedSubscription.php
  53. 8
      search.php
  54. 2
      src/Chamilo/ContactBundle/Form/Type/ContactType.php
  55. 1
      src/Chamilo/FaqBundle/Entity/CategoryTranslation.php
  56. 1
      src/Chamilo/FaqBundle/Entity/Question.php
  57. 1
      src/Chamilo/FaqBundle/Entity/QuestionTranslation.php
  58. 2
      src/Chamilo/UserBundle/Repository/UserRepository.php

@ -329,7 +329,7 @@ $extra = $extraField->addElements(
$fieldsToShow = [
'heures_disponibilite_par_semaine',
'moment_de_disponibilite',
'langue_cible'
'langue_cible',
];
$extra = $extraFieldUser->addElements(
@ -387,9 +387,8 @@ $extra = $extraField->addElements(
true
);
$fieldsToShow = [
'langue_cible'
'langue_cible',
];
$extra = $extraFieldUser->addElements(
@ -659,7 +658,6 @@ if ($form->validate()) {
'item_id' => $userToLoad,
'extra_heures_disponibilite_par_semaine' => isset($userData['extra_heures_disponibilite_par_semaine']) ? $userData['extra_heures_disponibilite_par_semaine'] : '',
'extra_langue_cible' => isset($userData['extra_langue_cible']) ? $userData['extra_langue_cible'] : '',
];
$extraFieldValue->saveFieldValues(
$userDataToSave,
@ -929,7 +927,6 @@ if (!empty($filterToSend)) {
$url = api_get_path(WEB_AJAX_PATH).'model.ajax.php?a=get_sessions&_search=true&load_extra_field='.$extraFieldListToString.'&_force_search=true&rows=20&page=1&sidx=&sord=asc';
}
// Autowidth
$extra_params['autowidth'] = 'true';

@ -2,7 +2,6 @@
/* For licensing terms, see /license.txt */
use Chamilo\CoreBundle\Component\Utils\ChamiloApi;
use Chamilo\CoreBundle\Entity\ExtraField;
use Chamilo\CoreBundle\Entity\Language;
use Chamilo\CoreBundle\Entity\Skill;

@ -22,7 +22,7 @@ $allowedFields = [
'status',
'language',
'extra_fields',
'address'
'address',
];
$allowedFieldsConfiguration = api_get_configuration_value('allow_fields_inscription');

@ -91,7 +91,7 @@ class ssoDrupal
/**
* Validates the received active connection data with the database.
*
* @return null|false Return the loginFailed variable value to local.inc.php
* @return false|null Return the loginFailed variable value to local.inc.php
*/
public function check_user()
{

@ -89,7 +89,7 @@ class ssoTCC
/**
* Validates the received active connection data with the database.
*
* @return null|false Return the loginFailed variable value to local.inc.php
* @return false|null Return the loginFailed variable value to local.inc.php
*/
public function check_user()
{

@ -244,7 +244,6 @@ if ($is_freemind_available) {
$execute_iframe = false;
}
$execute_iframe = true;
if (!$playerSupported && $execute_iframe) {

@ -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)
{

@ -652,7 +652,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)
{

@ -76,12 +76,11 @@ if ($origin != 'learnpath') {
}
$tpl = new Template('Overview');
$list = array();
$list = [];
$html = '';
$message = '';
$isAllowedToEdit = api_is_allowed_to_edit(null, true);
$list['id'] = $objExercise->id;
$list['session_id'] = $objExercise->sessionId;
@ -316,7 +315,7 @@ if ($objExercise->selectAttempts()) {
}
if ($time_control) {
$tpl->assign('time_control',$objExercise->return_time_left_div());
$tpl->assign('time_control', $objExercise->return_time_left_div());
}
$tpl->assign('fluid', $fluid);
@ -329,4 +328,3 @@ $tpl->assign('table_result', $tableContent);
$layout = $tpl->get_template('exercise/overview.tpl');
$tpl->assign('content', $tpl->fetch($layout));
$tpl->display_one_col_template();

@ -5699,7 +5699,6 @@ function send_notifications($forum_id = 0, $thread_id = 0, $post_id = 0)
$forumCourseId = api_get_configuration_value('global_forums_course_id');
if (!empty($forumCourseId)) {
if ($_course['real_id'] == $forumCourseId) {
return false;
}
}
@ -6769,6 +6768,7 @@ function giveRevisionButton($postId, $threadInfo)
/**
* @param int $postId
* @param array $threadInfo
*
* @return string
*/
function getReportButton($postId, $threadInfo)
@ -6832,7 +6832,6 @@ function getReportRecepients()
case 'community_managers':
$managers = api_get_configuration_value('community_managers_user_list');
if (!empty($managers) && isset($managers['users'])) {
$users = array_merge($users, $managers['users']);
}
break;

@ -500,16 +500,16 @@ if (is_array($threads)) {
);
}
if($_user['status']==5) {
if($_user['has_certificates']){
if ($_user['status'] == 5) {
if ($_user['has_certificates']) {
$iconStatus = '<img src="'.$urlImg.'icons/svg/ofaj_graduated.svg" width="22px" height="22px">';
}else{
} else {
$iconStatus = '<img src="'.$urlImg.'icons/svg/ofaj_student.svg" width="22px" height="22px">';
}
}else if($_user['status'] == 1){
if($isAdmin){
} elseif ($_user['status'] == 1) {
if ($isAdmin) {
$iconStatus = '<img src="'.$urlImg.'icons/svg/ofaj_admin.svg" width="22px" height="22px">';
}else{
} else {
$iconStatus = '<img src="'.$urlImg.'icons/svg/ofaj_teacher.svg" width="22px" height="22px">';
}
}

@ -70,7 +70,6 @@ $(function() {
</script>';
/* Actions */
$my_action = isset($_GET['action']) ? $_GET['action'] : '';

@ -296,7 +296,7 @@ class Category implements GradebookItem
}
/**
* @return null|int
* @return int|null
*/
public function get_grade_model_id()
{
@ -514,7 +514,7 @@ class Category implements GradebookItem
$sql .= ' '.$order_by;
}
}
//var_dump($sql);
//var_dump($sql);
$result = Database::query($sql);
$categories = [];
if (Database::num_rows($result) > 0) {
@ -2644,7 +2644,7 @@ class Category implements GradebookItem
* Internal function used by get_tree().
*
* @param int $level
* @param null|int $visible
* @param int|null $visible
*
* @return array
*/

@ -1140,7 +1140,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
*/

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

@ -1,8 +1,6 @@
<?php
/* For licensing terms, see /license.txt */
use Chamilo\CoreBundle\Component\Utils\ChamiloApi;
/**
* Responses to AJAX calls.
*/

@ -4643,7 +4643,7 @@ function api_get_languages_combo($name = 'language')
* @param bool Hide form if only one language available (defaults to false = show the box anyway)
* @param bool $showAsButton
*
* @return null|string Display the box directly
* @return string|null Display the box directly
*/
function api_display_language_form($hide_if_no_choice = false, $showAsButton = false)
{

@ -3212,7 +3212,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)
{

@ -116,7 +116,6 @@ class Chat extends Model
$chats = [];
foreach ($chatHistory as $userId => $time) {
/*$items = $this->getPreviousMessages(
$userId,
api_get_user_id(),
@ -138,7 +137,6 @@ class Chat extends Model
$chats[$userId]['window_user_info'] = api_get_user_info($userId);
}
/*
foreach ($chatHistory as $chat) {
$userId = $chat['user_info']['user_id'];
@ -351,7 +349,7 @@ class Chat extends Model
'online' => $user_info['user_is_online'],
'avatar' => $user_info['avatar_small'],
'user_id' => $user_info['user_id'],
]
],
];
$items[$fromUserId] = $item;
@ -383,7 +381,7 @@ class Chat extends Model
'online' => $user_info['user_is_online'],
'avatar' => $user_info['avatar_small'],
'user_id' => $user_info['user_id'],
]
],
];
$items[$fromUserId] = $item;

@ -35,8 +35,8 @@ class CourseManager
* Creates a course.
*
* @param array $params Columns in the main.course table.
* @param int $authorId Optional.
* @param int $accessUrlId Optional.
* @param int $authorId optional
* @param int $accessUrlId optional
*
* @return mixed false if the course was not created, array with the course info
*/

@ -180,7 +180,6 @@ class Database
$sysPath."vendor/gedmo/doctrine-extensions/lib"
);
Type::overrideType(
Type::DATETIME,
self::getUTCDateTimeTypeClass()

@ -1900,7 +1900,7 @@ class Display
/**
* @param array $list
*
* @return null|string
* @return string|null
*/
public static function description($list)
{
@ -2801,7 +2801,6 @@ HTML;
default:
//$html = self::url($data['basename'], $fileUrl);
break;
}
//$html = self::url($content, $fileUrl, ['ajax']);

@ -1,7 +1,6 @@
<?php
/* For licensing terms, see /license.txt */
use Chamilo\CoreBundle\Entity\TrackEExercises;
use ChamiloSession as Session;
/**

@ -1391,7 +1391,6 @@ class ExtraField extends Model
$options[$option_details['option_value']] = $option_details['display_text'];
}
if ($orderDependingDefaults) {
$defaultOptions = $extraData['extra_'.$field_details['variable']];
if (!empty($defaultOptions)) {

@ -44,70 +44,6 @@ class DateTimeRangePicker extends DateRangePicker
'.$this->getElementJS();
}
/**
* Get the necessary javascript for this datepicker.
*
* @return string
*/
private function getElementJS()
{
$js = null;
$id = $this->getAttribute('id');
$js .= "<script>
$(function() {
var txtDate = $('#$id'),
inputGroup = txtDate.parents('.input-group'),
txtDateAlt = $('#{$id}_alt'),
txtDateAltText = $('#{$id}_alt_text');
txtDate
.hide()
.datepicker({
defaultDate: '".$this->getValue()."',
dateFormat: 'yy-mm-dd',
altField: '#{$id}_alt',
altFormat: \"".get_lang('DateFormatLongNoDayJS')."\",
showOn: 'both',
buttonImage: '".Display::return_icon('attendance.png', null, [], ICON_SIZE_TINY, true, true)."',
buttonImageOnly: true,
buttonText: '".get_lang('SelectDate')."',
changeMonth: true,
changeYear: true,
yearRange: 'c-60y:c+5y'
})
.on('change', function (e) {
txtDateAltText.text(txtDateAlt.val());
});
txtDateAltText.on('click', function () {
txtDate.datepicker('show');
});
inputGroup
.find('button')
.on('click', function (e) {
e.preventDefault();
$('#$id, #{$id}_alt').val('');
$('#{$id}_alt_text').html('');
});
$('#".$id."_time_range .time').timepicker({
'showDuration': true,
'timeFormat': 'H:i:s',
'scrollDefault': 'now',
});
var timeOnlyExampleEl = document.getElementById('".$id."_time_range');
var timeOnlyDatepair = new Datepair(timeOnlyExampleEl);
});
</script>";
return $js;
}
/**
* @param string $layout
*
@ -122,7 +58,7 @@ class DateTimeRangePicker extends DateRangePicker
if (empty($size)) {
$sizeTemp = 8;
}
$size = array(2, $sizeTemp, 2);
$size = [2, $sizeTemp, 2];
} else {
if (is_array($size)) {
if (count($size) != 3) {
@ -130,11 +66,11 @@ class DateTimeRangePicker extends DateRangePicker
if (empty($size)) {
$sizeTemp = 8;
}
$size = array(2, $sizeTemp, 2);
$size = [2, $sizeTemp, 2];
}
// else just keep the $size array as received
} else {
$size = array(2, intval($size), 2);
$size = [2, intval($size), 2];
}
}
@ -206,4 +142,68 @@ class DateTimeRangePicker extends DateRangePicker
break;
}
}
/**
* Get the necessary javascript for this datepicker.
*
* @return string
*/
private function getElementJS()
{
$js = null;
$id = $this->getAttribute('id');
$js .= "<script>
$(function() {
var txtDate = $('#$id'),
inputGroup = txtDate.parents('.input-group'),
txtDateAlt = $('#{$id}_alt'),
txtDateAltText = $('#{$id}_alt_text');
txtDate
.hide()
.datepicker({
defaultDate: '".$this->getValue()."',
dateFormat: 'yy-mm-dd',
altField: '#{$id}_alt',
altFormat: \"".get_lang('DateFormatLongNoDayJS')."\",
showOn: 'both',
buttonImage: '".Display::return_icon('attendance.png', null, [], ICON_SIZE_TINY, true, true)."',
buttonImageOnly: true,
buttonText: '".get_lang('SelectDate')."',
changeMonth: true,
changeYear: true,
yearRange: 'c-60y:c+5y'
})
.on('change', function (e) {
txtDateAltText.text(txtDateAlt.val());
});
txtDateAltText.on('click', function () {
txtDate.datepicker('show');
});
inputGroup
.find('button')
.on('click', function (e) {
e.preventDefault();
$('#$id, #{$id}_alt').val('');
$('#{$id}_alt_text').html('');
});
$('#".$id."_time_range .time').timepicker({
'showDuration': true,
'timeFormat': 'H:i:s',
'scrollDefault': 'now',
});
var timeOnlyExampleEl = document.getElementById('".$id."_time_range');
var timeOnlyDatepair = new Datepair(timeOnlyExampleEl);
});
</script>";
return $js;
}
}

@ -60,7 +60,7 @@ class FormValidator extends HTML_QuickForm
parent::__construct($name, $method, $action, $target, $attributes, $trackSubmit);
// Modify the default templates
$renderer = & $this->defaultRenderer();
$renderer = &$this->defaultRenderer();
// Form template
$formTemplate = $this->getFormTemplate();
@ -177,13 +177,15 @@ EOT;
/**
* Adds a text field to the form.
* A trim-filter is attached to the field.
*
* @param string $label The label for the form-element
* @param string $name The element name
* @param bool $required (optional) Is the form-element required (default=true)
* @param array $attributes (optional) List of attributes for the form-element
*
* @return HTML_QuickForm_text
*/
public function addText($name, $label, $required = true, $attributes = array())
public function addText($name, $label, $required = true, $attributes = [])
{
$element = $this->addElement('text', $name, $label, $attributes);
$this->applyFilter($name, 'trim');
@ -1084,7 +1086,7 @@ EOT;
$this->addHtml('<script>
$(function() {
if (typeof google === "object") {
var address = $("#' . $name.'").val();
var address = $("#'.$name.'").val();
initializeGeo'.$name.'(address, false);
$("#geolocalization_'.$name.'").on("click", function() {
@ -1119,7 +1121,7 @@ EOT;
};
var geoError = function(error) {
alert("Geocode ' . get_lang('Error').': " + error);
alert("Geocode '.get_lang('Error').': " + error);
};
var geoOptions = {
@ -1167,10 +1169,10 @@ EOT;
infowindow.open(map_'.$name.', marker);
});
} else {
alert("' . get_lang("NotFound").'");
alert("'.get_lang("NotFound").'");
}
} else {
alert("Geocode ' . get_lang('Error').': '.get_lang("AddressField").' '.get_lang("NotFound").'");
alert("Geocode '.get_lang('Error').': '.get_lang("AddressField").' '.get_lang("NotFound").'");
}
});
}
@ -1860,7 +1862,7 @@ EOT;
".$redirectCondition."
}).on('fileuploadfail', function (e, data) {
$.each(data.files, function (index) {
var failedMessage = '" . addslashes(get_lang('UplUploadFailed'))."';
var failedMessage = '".addslashes(get_lang('UplUploadFailed'))."';
var error = $('<div class=\"col-sm-3\">').html(
$('<span class=\"alert alert-danger\"/>').text(failedMessage)
);
@ -1884,7 +1886,8 @@ EOT;
}
/**
* Cleans HTML text filter
* Cleans HTML text filter.
*
* @param string $html HTML to clean
* @param int $mode (optional)
*

@ -724,6 +724,7 @@ function api_format_date($time, $format = null, $language = null)
* @param string $date Result of a date function in this format -> date('Y-m-d H:i:s', time());
* @param string $timeZone
* @param bool $returnDateDifference
*
* @return string
*
* @author Julio Montoya

@ -911,6 +911,7 @@ class MessageManager
'message_id' => $message_id,
'size' => $file_attach['size'],
];
return Database::insert($table, $params);
}
}

@ -564,7 +564,6 @@ class SessionManager
$inject_joins .= " LEFT JOIN $table su ON (su.session_id = s.id)";
}
if (!empty($language)) {
$table = Database::get_main_table(TABLE_MAIN_SESSION_COURSE);
$tableCourse = Database::get_main_table(TABLE_MAIN_COURSE);

File diff suppressed because it is too large Load Diff

@ -3211,7 +3211,7 @@ class Tracking
WHERE c_id = $course_id $condition_lp";
$result = Database::query($sql);
$session_condition = api_get_session_condition($session_id);
echo $sql;
echo $sql;
// calculates time
if (Database::num_rows($result) > 0) {
while ($row = Database::fetch_array($result)) {

@ -2115,7 +2115,6 @@ class UserGroup extends Model
$relationType = array_map('intval', $relationType);
$relationType = implode("','", $relationType);
$relationCondition = " AND ( gu.relation_type IN ('$relationType')) ";
} else {
$relationType = (int) $relationType;
$relationCondition = " AND gu.relation_type = $relationType ";

@ -5487,7 +5487,7 @@ class UserManager
}
/**
* Subscribe boss to students, if $bossList is empty then the boss list will be empty too
* Subscribe boss to students, if $bossList is empty then the boss list will be empty too.
*
* @param int $studentId
* @param array $bossList
@ -5516,7 +5516,6 @@ class UserManager
// Boss list is the same, nothing changed.
if ($bossList == $previousBossList) {
return false;
}

@ -103,7 +103,7 @@ class IndexManager
/**
* @param bool $show_slide
*
* @return null|string
* @return string|null
*/
public function return_announcements($show_slide = true)
{

@ -991,11 +991,9 @@ $_configuration['required_extra_fields_in_profile'] = [
// global forum in social network BT#15309
//$_configuration['global_forums_course_id'] = 0;
// ------ Custom DB changes (keep this at the end)
// Add user activation by confirmation email
// This option prevents the new user to login in the platform if your account is not confirmed via email
// You need add a new option called "confirmation" to the registration settings
//INSERT INTO settings_options (variable, value, display_text) VALUES ('allow_registration', 'confirmation', 'MailConfirmation');
// ------ (End) Custom DB changes

@ -6,7 +6,6 @@ use Chamilo\CoreBundle\Entity\Repository\ItemPropertyRepository;
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;

@ -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,
@ -4238,7 +4238,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,

@ -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;
@ -1049,7 +1048,6 @@ $userGroups = $userGroupManager->getNameListByUser(
}
}
// Display timezone if the user selected one and if the admin allows the use of user's timezone
$timezone = null;
$timezone_user = UserManager::get_extra_user_data_by_field(

@ -104,7 +104,6 @@ $social_search_block = Display::panel(
get_lang('SearchUsers')
);
/*
$results = $userGroup->get_groups_by_user($user_id,
[
@ -234,7 +233,7 @@ $formSearch->addText(
[
'aria-label' => get_lang('SearchUsers'),
'custom' => true,
'placeholder' => get_lang('ByName')
'placeholder' => get_lang('ByName'),
]
);
//$formSearch->addButtonSearch(get_lang('Search'));

@ -82,7 +82,6 @@ foreach ($data as &$result) {
}
}
$apiKey = api_get_configuration_value('google_api_key');
$htmlHeadXtra[] = '<script type="text/javascript" src="'.api_get_path(WEB_LIBRARY_JS_PATH).'map/markerclusterer.js"></script>';
$htmlHeadXtra[] = '<script type="text/javascript" src="'.api_get_path(WEB_LIBRARY_JS_PATH).'map/oms.min.js"></script>';
@ -115,6 +114,5 @@ $tpl->assign(
$tpl->assign('places', json_encode($data));
$tpl->assign('api_key', $apiKey);
$layout = $tpl->get_template('social/map.tpl');
$tpl->display($layout);

@ -138,7 +138,7 @@ if (isset($_GET['view']) && in_array($_GET['view'], $views)) {
echo '<div>'.$count_groups.'</div>';
foreach ($grid_my_groups as $group) {
echo Display::panel($group[0], $group[1]) ;
echo Display::panel($group[0], $group[1]);
}
echo '</div>';
}

@ -203,8 +203,8 @@ if (api_is_course_admin() ||
}
$before = 0;
if (isset($_GET['show']) && isset($paged_questions[$_GET['show'] -1])) {
$before = count($paged_questions[$_GET['show'] -1]);
if (isset($_GET['show']) && isset($paged_questions[$_GET['show'] - 1])) {
$before = count($paged_questions[$_GET['show'] - 1]);
}
// Selecting the maximum number of pages

@ -138,7 +138,6 @@ switch ($_GET['type']) {
break;
}
// We are editing a question
if (isset($_GET['question_id']) && !empty($_GET['question_id'])) {
$formData = SurveyManager::get_question($_GET['question_id']);

@ -2208,7 +2208,6 @@ class SurveyManager
];
self::save_question($surveyData, $values);
}
}
}
}

@ -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)
{

@ -22,7 +22,7 @@ define('WS_ERROR_SETTING', 4);
/**
* @param string $code
*
* @return null|soap_fault
* @return soap_fault|null
*/
function returnError($code)
{

@ -3786,7 +3786,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)
{

@ -451,7 +451,7 @@ foreach ($elements as $element) {
$fieldsToShow = [
'heures_disponibilite_par_semaine',
'moment_de_disponibilite'
'moment_de_disponibilite',
];
$extra = $extraField->addElements(
@ -685,14 +685,12 @@ $userForm->addLabel(null, get_lang('MonEnvironnementDeTravailExplanationIntro2')
$jqueryExtra .= $extra['jquery_ready_content'];
$fieldsToShow = [
'browser_platforme',
'browser_platforme_autre',
'browser_platforme_version',
];
$extra = $extraField->addElements(
$userForm,
api_get_user_id(),
@ -714,12 +712,8 @@ $userForm->addButtonSave(get_lang('Save'), 'submit_partial[collapseEight]');
$userForm->addHtml('</div></div></div>');
$userForm->addHtml('</div>');
$userForm->addHtml('</div>');
$htmlHeadXtra[] = '<script>
$(document).ready(function(){
'.$jqueryExtra.'

@ -5,6 +5,7 @@ namespace Chamilo\ContactBundle\Form\Type;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
@ -12,7 +13,6 @@ use Symfony\Component\Validator\Constraints\Collection;
use Symfony\Component\Validator\Constraints\Email;
use Symfony\Component\Validator\Constraints\Length;
use Symfony\Component\Validator\Constraints\NotBlank;
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
/**
* Class ContactType.

@ -13,7 +13,6 @@ use Knp\DoctrineBehaviors\Model as ORMBehaviors;
* @ORM\Entity
* @ORM\Table(name="faq_category_translation")
*
*
* @package Chamilo\FaqBundle\Entity
*/
class CategoryTranslation

@ -13,7 +13,6 @@ use Knp\DoctrineBehaviors\Model as ORMBehaviors;
* @ORM\Entity(repositoryClass="Chamilo\FaqBundle\Entity\QuestionRepository")
* @ORM\Table(name="faq_question")
*
*
* @package Chamilo\FaqBundle\Entity
*/
class Question

@ -13,7 +13,6 @@ use Knp\DoctrineBehaviors\Model as ORMBehaviors;
* @ORM\Entity
* @ORM\Table(name="faq_question_translation")
*
*
* @package Chamilo\FaqBundle\Entity
*/
class QuestionTranslation

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

Loading…
Cancel
Save