Minor - Flint fixes

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

@ -75,4 +75,4 @@ foreach ($variables as $variable => $data) {
}
$id = $extraField->save($params);
//$extraField->delete($id);
}
}

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

@ -526,11 +526,11 @@ if (isset($_GET['action'])) {
api_get_path(WEB_PATH)
);
MessageManager::send_message_simple($userId, $subject, $content);
Display::addFlash(Display::return_message(get_lang('Sent')));*/
Display::addFlash(Display::return_message(get_lang('Sent')));*/
// ofaj
LegalManager::sendLegal($userId);
break;
case 'delete_legal':
case 'delete_legal':
// ofaj
LegalManager::deleteLegal($userId);
/*$extraFieldValue = new ExtraFieldValue('user');
@ -541,7 +541,7 @@ if (isset($_GET['action'])) {
$result = $extraFieldValue->delete($value['id']);
if ($result) {
Display::addFlash(Display::return_message(get_lang('Deleted')));
}*/
}*/
break;
case 'unsubscribe':
$courseId = !empty($_GET['course_id']) ? (int) $_GET['course_id'] : 0;

@ -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()
{
@ -297,7 +297,7 @@ class ssoTCC
// In all other cases, generate a link to the Drupal profile edition
$drupalUserId = $drupalUserIdData['value'];
$url = "{$this->protocol}{$this->domain}/user/{$drupalUserId}/edit";
return $url;
*/
return api_get_path(WEB_CODE_PATH).'auth/profile.php';

@ -39,7 +39,7 @@ if ($form->validate()) {
$moodleImport = new MoodleImport();
try {
$responseImport = $moodleImport->import($file);
$responseImport = $moodleImport->import($file);
Display::addFlash(
Display::return_message(

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

@ -96,7 +96,7 @@ if ($objExercise->selectResultsDisabled() == RESULT_DISABLE_SHOW_SCORE_ATTEMPT_S
$showOnlyScore = true;
$showResults = true;
$lpId = isset($trackExerciseInfo['orig_lp_id']) ? $trackExerciseInfo['orig_lp_id'] : 0;
$lpItemId = isset($trackExerciseInfo['orig_lp_item_id']) ? $trackExerciseInfo['orig_lp_item_id'] : 0;
$lpItemId = isset($trackExerciseInfo['orig_lp_item_id']) ? $trackExerciseInfo['orig_lp_item_id'] : 0;
if ($objExercise->attempts > 0) {
$attempts = Event::getExerciseResultsByUser(
api_get_user_id(),

@ -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;
}
}
@ -6643,7 +6642,7 @@ function postIsEditableByStudent($forum, $post)
}
/**
* @param int $postId
* @param int $postId
*
* @return bool
*/
@ -6692,7 +6691,7 @@ function getPostRevision($postId)
);
$revision = '';
if ($value && isset($value['value'])) {
$revision = $value['value'];
$revision = $value['value'];
}
return $revision;
@ -6742,7 +6741,7 @@ function getAskRevisionButton($postId, $threadInfo)
}
/**
* @param int $postId
* @param int $postId
* @param array $threadInfo
*
* @return string
@ -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,

@ -676,7 +676,7 @@ switch ($action) {
break;
case 'get_sessions':
$list_type = isset($_REQUEST['list_type']) ? $_REQUEST['list_type'] : 'simple';
$language = isset($_REQUEST['lang']) ? $_REQUEST['lang'] : '';
$language = isset($_REQUEST['lang']) ? $_REQUEST['lang'] : '';
$session_columns = SessionManager::getGridColumns($list_type);
$columns = $session_columns['simple_column_name'];

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

@ -63,7 +63,7 @@ switch ($action) {
// Only allow anonymous users to see user popup if the popup user
// is a teacher (which might be necessary to illustrate a course)
if ($user_info['status'] === COURSEMANAGER) {
echo $userData;
echo $userData;
} else {
echo '<h3>-</h3>';
}

@ -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)
{
@ -6295,7 +6295,7 @@ function api_replace_dangerous_char($filename, $treat_spaces_as_hyphens = true)
if (api_is_valid_utf8($result)) {
$filename = $result;
$encoding = 'UTF-8';
}
}
}
}
}

@ -154,11 +154,11 @@ class Attendance
$user_info = api_get_user_info();
$allowDelete = api_get_setting('allow_delete_attendance');
$student_param = '';
$student_param = '';
$studentRequestId = isset($_GET['student_id']) ? (int) $_GET['student_id'] : 0;
if (api_is_drh() && !empty($studentRequestId)) {
$student_param = '&student_id='.$studentRequestId;
}
}
while ($attendance = Database::fetch_row($res)) {
$session_star = '';

@ -827,7 +827,7 @@ function return_breadcrumb($interbreadcrumb, $language_file, $nameTools)
}
}
if (!empty($lis)) {
if (!empty($lis)) {
//Ofaj
$html .= Display::tag('ul', get_lang('YouAreHere').': '.$lis, ['class' => 'breadcrumb']);
}

@ -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
*/
@ -601,7 +601,7 @@ class CourseManager
*
* @param int $userId
* @param string $courseCode
* @param int $status (STUDENT, COURSEMANAGER, COURSE_ADMIN, NORMAL_COURSE_MEMBER)
* @param int $status (STUDENT, COURSEMANAGER, COURSE_ADMIN, NORMAL_COURSE_MEMBER)
* @param int $sessionId
* @param int $userCourseCategoryId
* @param bool $checkTeacherPermission
@ -648,7 +648,7 @@ class CourseManager
$sessionId = empty($sessionId) ? api_get_session_id() : (int) $sessionId;
$status = $status === STUDENT || $status === COURSEMANAGER ? $status : STUDENT;
$courseUserTable = Database::get_main_table(TABLE_MAIN_COURSE_USER);
// The user has been already subscribed to the course.
// The user has been already subscribed to the course.
if (!empty($sessionId)) {
SessionManager::subscribe_users_to_session_course(
[$userId],
@ -765,8 +765,8 @@ class CourseManager
);
}
// Add event to the system log
Event::addEvent(
// Add event to the system log
Event::addEvent(
LOG_SUBSCRIBE_USER_TO_COURSE,
LOG_COURSE_CODE,
$courseCode,
@ -775,7 +775,7 @@ class CourseManager
$courseId
);
Event::addEvent(
Event::addEvent(
LOG_SUBSCRIBE_USER_TO_COURSE,
LOG_USER_OBJECT,
$userInfo,
@ -784,8 +784,8 @@ class CourseManager
$courseId
);
return true;
}
return true;
}
return false;
}

@ -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)
{
@ -1919,7 +1919,7 @@ class Display
/**
* @param int $percentage
* @param bool $show_percentage
* @param bool $show_percentage
* @param string $extra_info
*
* @return string
@ -2801,7 +2801,6 @@ HTML;
default:
//$html = self::url($data['basename'], $fileUrl);
break;
}
//$html = self::url($content, $fileUrl, ['ajax']);

@ -3595,11 +3595,11 @@ class DocumentManager
}
/**
* @param int $doc_id
* @param int $doc_id
* @param array $courseInfo
* @param int $sessionId
* @param int $user_id
* @param int $groupId iid
* @param int $user_id
* @param int $groupId iid
* @param bool $checkParentVisibility
*
* @return bool
@ -3658,7 +3658,7 @@ class DocumentManager
return false;
} else {
if ($checkParentVisibility) {
return self::check_visibility_tree(
return self::check_visibility_tree(
$document_data['parent_id'],
$courseInfo,
$sessionId,

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

@ -18,14 +18,14 @@ class FormValidator extends HTML_QuickForm
/**
* Constructor.
*
* @param string $name Name of the form
* @param string $method (optional) Method ('post' (default) or 'get')
* @param string $action (optional) Action (default is $PHP_SELF)
* @param string $target (optional) Form's target defaults to '_self'
* @param mixed $attributes (optional) Extra attributes for <form> tag
* @param string $name Name of the form
* @param string $method (optional) Method ('post' (default) or 'get')
* @param string $action (optional) Action (default is $PHP_SELF)
* @param string $target (optional) Form's target defaults to '_self'
* @param mixed $attributes (optional) Extra attributes for <form> tag
* @param string $layout
* @param bool $trackSubmit (optional) Whether to track if the form was
* submitted by adding a special hidden field (default = true)
* @param bool $trackSubmit (optional) Whether to track if the form was
* submitted by adding a special hidden field (default = true)
*/
public function __construct(
$name,
@ -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
*
* @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');
@ -220,7 +222,7 @@ EOT;
/**
* @param string $name
* @param string $label
* @param array $attributes
* @param array $attributes
*
* @return mixed
*/
@ -232,7 +234,7 @@ EOT;
/**
* @param string $name
* @param string $label
* @param array $attributes
* @param array $attributes
*
* @return mixed
*/
@ -244,8 +246,8 @@ EOT;
/**
* @param string $name
* @param string $label
* @param array $options
* @param array $attributes
* @param array $options
* @param array $attributes
*
* @throws
*/
@ -266,7 +268,7 @@ EOT;
/**
* @param string $name
* @param string $label
* @param array $attributes
* @param array $attributes
*
* @return mixed
*/
@ -319,10 +321,10 @@ EOT;
/**
* @param string $name
* @param string $label
* @param string $icon font-awesome
* @param string $style default|primary|success|info|warning|danger|link
* @param string $size large|default|small|extra-small
* @param string $class Example plus is transformed to icon fa fa-plus
* @param string $icon font-awesome
* @param string $style default|primary|success|info|warning|danger|link
* @param string $size large|default|small|extra-small
* @param string $class Example plus is transformed to icon fa fa-plus
* @param array $attributes
* @param bool $createElement
*
@ -366,9 +368,9 @@ EOT;
/**
* Returns a button with the primary color and a check mark.
*
* @param string $label Text appearing on the button
* @param string $name Element name (for form treatment purposes)
* @param bool $createElement Whether to use the create or add method
* @param string $label Text appearing on the button
* @param string $name Element name (for form treatment purposes)
* @param bool $createElement Whether to use the create or add method
*
* @return HTML_QuickForm_button
*/
@ -389,9 +391,9 @@ EOT;
/**
* Returns a cancel button.
*
* @param string $label Text appearing on the button
* @param string $name Element name (for form treatment purposes)
* @param bool $createElement Whether to use the create or add method
* @param string $label Text appearing on the button
* @param string $name Element name (for form treatment purposes)
* @param bool $createElement Whether to use the create or add method
*
* @return HTML_QuickForm_button
*/
@ -412,10 +414,10 @@ EOT;
/**
* Returns a button with the primary color and a "plus" icon.
*
* @param string $label Text appearing on the button
* @param string $name Element name (for form treatment purposes)
* @param bool $createElement Whether to use the create or add method
* @param array $attributes Additional attributes
* @param string $label Text appearing on the button
* @param string $name Element name (for form treatment purposes)
* @param bool $createElement Whether to use the create or add method
* @param array $attributes Additional attributes
*
* @return HTML_QuickForm_button
*/
@ -436,9 +438,9 @@ EOT;
/**
* Returns a button with the primary color and a pencil icon.
*
* @param string $label Text appearing on the button
* @param string $name Element name (for form treatment purposes)
* @param bool $createElement Whether to use the create or add method
* @param string $label Text appearing on the button
* @param string $name Element name (for form treatment purposes)
* @param bool $createElement Whether to use the create or add method
*
* @return HTML_QuickForm_button
*/
@ -459,9 +461,9 @@ EOT;
/**
* Returns a button with the danger color and a trash icon.
*
* @param string $label Text appearing on the button
* @param string $name Element name (for form treatment purposes)
* @param bool $createElement Whether to use the create or add method
* @param string $label Text appearing on the button
* @param string $name Element name (for form treatment purposes)
* @param bool $createElement Whether to use the create or add method
*
* @return HTML_QuickForm_button
*/
@ -482,9 +484,9 @@ EOT;
/**
* Returns a move style button.
*
* @param string $label Text appearing on the button
* @param string $name Element name (for form treatment purposes)
* @param bool $createElement Whether to use the create or add method
* @param string $label Text appearing on the button
* @param string $name Element name (for form treatment purposes)
* @param bool $createElement Whether to use the create or add method
*
* @return HTML_QuickForm_button
*/
@ -505,10 +507,10 @@ EOT;
/**
* Returns a button with the primary color and a paper-plane icon.
*
* @param string $label Text appearing on the button
* @param string $name Element name (for form treatment purposes)
* @param bool $createElement Whether to use the create or add method
* @param array $attributes
* @param string $label Text appearing on the button
* @param string $name Element name (for form treatment purposes)
* @param bool $createElement Whether to use the create or add method
* @param array $attributes
*
* @return HTML_QuickForm_button
*/
@ -530,7 +532,7 @@ EOT;
* Returns a button with the default (grey?) color and a magnifier icon.
*
* @param string $label Text appearing on the button
* @param string $name Element name (for form treatment purposes)
* @param string $name Element name (for form treatment purposes)
*
* @return HTML_QuickForm_button
*/
@ -546,9 +548,9 @@ EOT;
/**
* Returns a button with the primary color and a right-pointing arrow icon.
*
* @param string $label Text appearing on the button
* @param string $name Element name (for form treatment purposes)
* @param array $attributes Additional attributes
* @param string $label Text appearing on the button
* @param string $name Element name (for form treatment purposes)
* @param array $attributes Additional attributes
*
* @return HTML_QuickForm_button
*/
@ -568,9 +570,9 @@ EOT;
/**
* Returns a button with the primary color and a check mark icon.
*
* @param string $label Text appearing on the button
* @param string $name Element name (for form treatment purposes)
* @param bool $createElement Whether to use the create or add method
* @param string $label Text appearing on the button
* @param string $name Element name (for form treatment purposes)
* @param bool $createElement Whether to use the create or add method
*
* @return HTML_QuickForm_button
*/
@ -591,9 +593,9 @@ EOT;
/**
* Returns a button with the primary color and a check-mark icon.
*
* @param string $label Text appearing on the button
* @param string $name Element name (for form treatment purposes)
* @param bool $createElement Whether to use the create or add method
* @param string $label Text appearing on the button
* @param string $name Element name (for form treatment purposes)
* @param bool $createElement Whether to use the create or add method
*
* @return HTML_QuickForm_button
*/
@ -614,9 +616,9 @@ EOT;
/**
* Shortcut to filter button.
*
* @param string $label Text appearing on the button
* @param string $name Element name (for form treatment purposes)
* @param bool $createElement Whether to use the create or add method
* @param string $label Text appearing on the button
* @param string $name Element name (for form treatment purposes)
* @param bool $createElement Whether to use the create or add method
*
* @return HTML_QuickForm_button
*/
@ -637,9 +639,9 @@ EOT;
/**
* Shortcut to reset button.
*
* @param string $label Text appearing on the button
* @param string $name Element name (for form treatment purposes)
* @param bool $createElement Whether to use the create or add method
* @param string $label Text appearing on the button
* @param string $name Element name (for form treatment purposes)
* @param bool $createElement Whether to use the create or add method
*
* @return HTML_QuickForm_button
*/
@ -679,9 +681,9 @@ EOT;
/**
* Returns a button with the primary color and an upload icon.
*
* @param string $label Text appearing on the button
* @param string $name Element name (for form treatment purposes)
* @param bool $createElement Whether to use the create or add method
* @param string $label Text appearing on the button
* @param string $name Element name (for form treatment purposes)
* @param bool $createElement Whether to use the create or add method
*
* @return HTML_QuickForm_button
*/
@ -702,9 +704,9 @@ EOT;
/**
* Returns a button with the primary color and a download icon.
*
* @param string $label Text appearing on the button
* @param string $name Element name (for form treatment purposes)
* @param bool $createElement Whether to use the create or add method
* @param string $label Text appearing on the button
* @param string $name Element name (for form treatment purposes)
* @param bool $createElement Whether to use the create or add method
*
* @return HTML_QuickForm_button
*/
@ -725,9 +727,9 @@ EOT;
/**
* Returns a button with the primary color and a magnifier icon.
*
* @param string $label Text appearing on the button
* @param string $name Element name (for form treatment purposes)
* @param bool $createElement Whether to use the create or add method
* @param string $label Text appearing on the button
* @param string $name Element name (for form treatment purposes)
* @param bool $createElement Whether to use the create or add method
*
* @return HTML_QuickForm_button
*/
@ -748,9 +750,9 @@ EOT;
/**
* Returns a button with the primary color and a copy (double sheet) icon.
*
* @param string $label Text appearing on the button
* @param string $name Element name (for form treatment purposes)
* @param bool $createElement Whether to use the create or add method
* @param string $label Text appearing on the button
* @param string $name Element name (for form treatment purposes)
* @param bool $createElement Whether to use the create or add method
*
* @return HTML_QuickForm_button
*/
@ -841,9 +843,9 @@ EOT;
* @param $name
* @param $label
* @param $collection
* @param array $attributes
* @param bool $addNoneOption
* @param string $textCallable set a function getStringValue() by default __toString()
* @param array $attributes
* @param bool $addNoneOption
* @param string $textCallable set a function getStringValue() by default __toString()
*
* @return HTML_QuickForm_element
*/
@ -991,7 +993,7 @@ EOT;
* Adds a HTML-editor to the form.
*
* @param string $name
* @param string $label The label for the form-element
* @param string $label The label for the form-element
* @param bool $required (optional) Is the form-element required (default=true)
* @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
@ -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").'");
}
});
}
@ -1211,8 +1213,8 @@ EOT;
* This function has been created for avoiding changes directly within QuickForm class.
* When we use it, the element is threated as 'required' to be dealt during validation.
*
* @param array $elements The array of elements
* @param string $message The message displayed
* @param array $elements The array of elements
* @param string $message The message displayed
*/
public function add_multiple_required_rule($elements, $message)
{
@ -1297,10 +1299,10 @@ EOT;
/**
* Adds a input of type url to the form.
*
* @param string $name The label for the form-element
* @param string $label 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
* @param string $name The label for the form-element
* @param string $label 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
*/
public function addUrl($name, $label, $required = true, $attributes = [])
{
@ -1317,10 +1319,10 @@ EOT;
* Adds a text field for letters to the form.
* A trim-filter is attached to the field.
*
* @param string $name The element name
* @param string $label The label for the form-element
* @param bool $required Optional. Is the form-element required (default=true)
* @param array $attributes Optional. List of attributes for the form-element
* @param string $name The element name
* @param string $label The label for the form-element
* @param bool $required Optional. Is the form-element required (default=true)
* @param array $attributes Optional. List of attributes for the form-element
*/
public function addTextLettersOnly(
$name,
@ -1364,10 +1366,10 @@ EOT;
* Adds a text field for alphanumeric characters to the form.
* A trim-filter is attached to the field.
*
* @param string $name The element name
* @param string $label The label for the form-element
* @param bool $required Optional. Is the form-element required (default=true)
* @param array $attributes Optional. List of attributes for the form-element
* @param string $name The element name
* @param string $label The label for the form-element
* @param bool $required Optional. Is the form-element required (default=true)
* @param array $attributes Optional. List of attributes for the form-element
*/
public function addTextAlphanumeric(
$name,
@ -1410,11 +1412,11 @@ EOT;
/**
* @param string $name
* @param $label
* @param bool $required
* @param bool $required
* @param array $attributes
* @param bool $allowNegative
* @param bool $allowNegative
* @param int $minValue
* @param null $maxValue
* @param null $maxValue
*/
public function addFloat(
$name,
@ -1490,10 +1492,10 @@ EOT;
* Adds a text field for letters and spaces to the form.
* A trim-filter is attached to the field.
*
* @param string $name The element name
* @param string $label The label for the form-element
* @param bool $required Optional. Is the form-element required (default=true)
* @param array $attributes Optional. List of attributes for the form-element
* @param string $name The element name
* @param string $label The label for the form-element
* @param bool $required Optional. Is the form-element required (default=true)
* @param array $attributes Optional. List of attributes for the form-element
*/
public function addTextLettersAndSpaces(
$name,
@ -1537,10 +1539,10 @@ EOT;
* Adds a text field for alphanumeric and spaces characters to the form.
* A trim-filter is attached to the field.
*
* @param string $name The element name
* @param string $label The label for the form-element
* @param bool $required Optional. Is the form-element required (default=true)
* @param array $attributes Optional. List of attributes for the form-element
* @param string $name The element name
* @param string $label The label for the form-element
* @param bool $required Optional. Is the form-element required (default=true)
* @param array $attributes Optional. List of attributes for the form-element
*/
public function addTextAlphanumericAndSpaces(
$name,
@ -1748,7 +1750,7 @@ EOT;
}
/**
* @param string $url page that will handle the upload
* @param string $url page that will handle the upload
* @param string $inputName
* @param string $urlToRedirect
*/
@ -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,9 +1886,10 @@ EOT;
}
/**
* Cleans HTML text filter
* Cleans HTML text filter.
*
* @param string $html HTML to clean
* @param int $mode (optional)
* @param int $mode (optional)
*
* @return string The cleaned HTML
*/

@ -1313,7 +1313,7 @@ class GroupManager
/**
* Get only students from a group (not tutors).
*
* @param int $group_id iid
* @param int $group_id iid
* @param bool $filterOnlyActive
*
* @return array

@ -721,9 +721,10 @@ function api_format_date($time, $format = null, $language = null)
* You can use it like this:
* Display::dateToStringAgoAndLongDate($dateInUtc);.
*
* @param string $date Result of a date function in this format -> date('Y-m-d H:i:s', time());
* @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

@ -386,11 +386,11 @@ class LegalManager
$webPath = api_get_path(WEB_PATH);
// @ofaj
$link = '<a href="'.$webPath.'contrat.php">'.$webPath.'contrat.php</a>';
$link = '<a href="'.$webPath.'contrat.php">'.$webPath.'contrat.php</a>';
$content = sprintf(
get_lang('SendTermsDescriptionToUrlX'),
$userInfo['firstName'],
$link,
$link,
$senderInfo['firstName']
);
MessageManager::send_message_simple($userId, $subject, $content);

@ -911,6 +911,7 @@ class MessageManager
'message_id' => $message_id,
'size' => $file_attach['size'],
];
return Database::insert($table, $params);
}
}
@ -2380,7 +2381,7 @@ class MessageManager
);
if (!empty($result)) {
return $result;
return $result;
}
return false;

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

@ -797,7 +797,7 @@ class Template
// If not English and the language is supported by timepicker, localize
$assetsPath = api_get_path(SYS_PUBLIC_PATH).'assets/';
if ($isoCode != 'en') {
if (is_file($assetsPath.'jqueryui-timepicker-addon/dist/i18n/jquery-ui-timepicker-'.$isoCode.'.js') && is_file($assetsPath.'jquery-ui/ui/minified/i18n/datepicker-'.$isoCode.'.min.js')) {
if (is_file($assetsPath.'jqueryui-timepicker-addon/dist/i18n/jquery-ui-timepicker-'.$isoCode.'.js') && is_file($assetsPath.'jquery-ui/ui/minified/i18n/datepicker-'.$isoCode.'.min.js')) {
$bowerJsFiles[] = 'jqueryui-timepicker-addon/dist/i18n/jquery-ui-timepicker-'.$isoCode.'.js';
$bowerJsFiles[] = 'jquery-ui/ui/minified/i18n/datepicker-'.$isoCode.'.min.js';
}

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

@ -88,8 +88,8 @@ class ZombieManager
$sql .= " ORDER BY $column $direction";
if (!is_null($from) && !is_null($count)) {
$count = intval($count);
$from = intval($from);
$count = intval($count);
$from = intval($from);
$sql .= " LIMIT $from, $count ";
}

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

@ -806,7 +806,7 @@ class SurveyManager
* This function duplicates a survey (and also all the question in that survey.
*
* @param int $surveyId id of the survey that has to be duplicated
* @param int $courseId id of the course which survey has to be duplicated
* @param int $courseId id of the course which survey has to be duplicated
*
* @return true
*
@ -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)
{

@ -1,4 +1,4 @@
<?php
<?php
/**
* @copyright (c) 2011 University of Geneva
* @license GNU General Public License - http://www.gnu.org/copyleft/gpl.html

File diff suppressed because it is too large Load Diff

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