Scrutinizer Auto-Fixes

This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
pull/2487/head
Scrutinizer Auto-Fixer 8 years ago
parent e6e9249025
commit 6cd214a50f
  1. 8
      main/dashboard/dashboard.php
  2. 14
      main/document/record_audio.php
  3. 16
      main/document/showinframes.php
  4. 30
      main/gradebook/lib/fe/flatviewtable.class.php
  5. 14
      main/inc/ajax/course.ajax.php
  6. 22
      main/install/update-files-1.9.0-1.10.0.inc.php
  7. 6
      main/lp/lp_view_item.php
  8. 64
      main/social/home.php
  9. 32
      main/social/invitations.php
  10. 6
      main/work/upload_corrections.php
  11. 2
      plugin/google_maps/lang/english.php
  12. 2
      plugin/google_maps/lang/french.php
  13. 4
      plugin/ims_lti/edit.php
  14. 2
      plugin/vchamilo/views/editinstance.php

@ -13,7 +13,7 @@ api_block_anonymous_users();
// menu actions for dashboard views
$views = array('blocks', 'list');
if(isset($_GET['view']) && in_array($_GET['view'], $views)){
if (isset($_GET['view']) && in_array($_GET['view'], $views)) {
$dashboard_view = $_GET['view'];
}
@ -21,16 +21,16 @@ $link_blocks_view = $link_list_view = null;
if (isset($dashboard_view) && $dashboard_view == 'list') {
$link_blocks_view = '<a href="'.api_get_self().'?view=blocks">'.
Display::return_icon('blocks.png',get_lang('DashboardBlocks'),'',ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('blocks.png', get_lang('DashboardBlocks'), '', ICON_SIZE_MEDIUM).'</a>';
} else {
$link_list_view = '<a href="'.api_get_self().'?view=list">'.
Display::return_icon('edit.png',get_lang('EditBlocks'),'',ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('edit.png', get_lang('EditBlocks'), '', ICON_SIZE_MEDIUM).'</a>';
}
$configuration_link = null;
if (api_is_platform_admin()) {
$configuration_link = '<a href="'.api_get_path(WEB_CODE_PATH).'admin/settings.php?category=Plugins">'
.Display::return_icon('settings.png',get_lang('ConfigureDashboardPlugin'),'',ICON_SIZE_MEDIUM).'</a>';
.Display::return_icon('settings.png', get_lang('ConfigureDashboardPlugin'), '', ICON_SIZE_MEDIUM).'</a>';
}
echo '<div class="actions">';

@ -80,7 +80,7 @@ if (!is_dir($filepath)) {
//groups //TODO: clean
if (!empty($groupId)) {
$interbreadcrumb[] = array ("url" => "../group/group_space.php?".api_get_cidreq(), "name" => get_lang('GroupSpace'));
$interbreadcrumb[] = array("url" => "../group/group_space.php?".api_get_cidreq(), "name" => get_lang('GroupSpace'));
$noPHP_SELF = true;
$group = GroupManager :: get_group_properties($groupId);
$path = explode('/', $dir);
@ -138,14 +138,14 @@ if (isset($document_data['parents'])) {
//make some vars
$wamiuserid = api_get_user_id();
$htmlHeadXtra[] = '<script src="' . api_get_path(WEB_LIBRARY_JS_PATH) . 'rtc/RecordRTC.js"></script>';
$htmlHeadXtra[] = '<script src="' . api_get_path(WEB_LIBRARY_PATH) . 'wami-recorder/recorder.js"></script>';
$htmlHeadXtra[] = '<script src="' . api_get_path(WEB_LIBRARY_PATH) . 'wami-recorder/gui.js"></script>';
$htmlHeadXtra[] = '<script type="text/javascript" src="' . api_get_path(WEB_LIBRARY_PATH) . 'swfobject/swfobject.js"></script>';
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_JS_PATH).'rtc/RecordRTC.js"></script>';
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'wami-recorder/recorder.js"></script>';
$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'wami-recorder/gui.js"></script>';
$htmlHeadXtra[] = '<script type="text/javascript" src="'.api_get_path(WEB_LIBRARY_PATH).'swfobject/swfobject.js"></script>';
$actions = Display::toolbarButton(
get_lang('BackTo') . ' ' . get_lang('DocumentsOverview'),
'document.php?' . api_get_cidreq() . "&id=$document_id",
get_lang('BackTo').' '.get_lang('DocumentsOverview'),
'document.php?'.api_get_cidreq()."&id=$document_id",
'arrow-left',
'default',
[],

@ -145,7 +145,7 @@ if (empty($document_data['parents'])) {
}
} else {
foreach ($document_data['parents'] as $document_sub_data) {
if (!isset($_GET['createdir']) && $document_sub_data['id'] == $document_data['id']) {
if (!isset($_GET['createdir']) && $document_sub_data['id'] == $document_data['id']) {
$document_sub_data['document_url'] = '#';
}
$interbreadcrumb[] = array(
@ -173,7 +173,7 @@ $frameheight = 135;
if ($is_courseAdmin) {
$frameheight = 165;
}
$js_glossary_in_documents = '
$js_glossary_in_documents = '
$.frameReady(function(){
// $("<div>I am a div courses</div>").prependTo("body");
}, "top.mainFrame",
@ -193,7 +193,7 @@ $web_odf_supported_files = DocumentManager::get_web_odf_extension_list();
// PDF should be displayed with viewerJS
$web_odf_supported_files[] = 'pdf';
if (in_array(strtolower($pathinfo['extension']), $web_odf_supported_files)) {
$show_web_odf = true;
$show_web_odf = true;
/*
$htmlHeadXtra[] = api_get_js('webodf/webodf.js');
$htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_PATH).'javascript/webodf/webodf.css');
@ -236,7 +236,7 @@ if ($isChatFolder) {
$htmlHeadXtra[] = api_get_js('highlight/highlight.pack.js');
$htmlHeadXtra[] = api_get_css(api_get_path(WEB_CSS_PATH).'chat.css');
$htmlHeadXtra[] = api_get_css(
api_get_path(WEB_LIBRARY_PATH) . 'javascript/highlight/styles/github.css'
api_get_path(WEB_LIBRARY_PATH).'javascript/highlight/styles/github.css'
);
$htmlHeadXtra[] = '
<script>
@ -288,7 +288,7 @@ if ($show_web_odf) {
$execute_iframe = false;
}
$is_freemind_available = $pathinfo['extension']=='mm' && api_get_setting('enable_freemind') == 'true';
$is_freemind_available = $pathinfo['extension'] == 'mm' && api_get_setting('enable_freemind') == 'true';
if ($is_freemind_available) {
$execute_iframe = false;
}
@ -331,18 +331,18 @@ $file_url = api_get_path(WEB_COURSE_PATH).$courseInfo['path'].'/document'.$heade
$file_url_web = $file_url.'?'.api_get_cidreq();
if (in_array(strtolower($pathinfo['extension']), array('html', "htm"))) {
echo '<a class="btn btn-default" href="' . $file_url_web . '" target="_blank">' . get_lang('CutPasteLink') . '</a>';
echo '<a class="btn btn-default" href="'.$file_url_web.'" target="_blank">'.get_lang('CutPasteLink').'</a>';
}
if ($show_web_odf) {
$browser = api_get_navigator();
$pdfUrl = api_get_path(WEB_LIBRARY_PATH) . 'javascript/ViewerJS/index.html#' . $file_url;
$pdfUrl = api_get_path(WEB_LIBRARY_PATH).'javascript/ViewerJS/index.html#'.$file_url;
if ($browser['name'] == 'Mozilla' && preg_match('|.*\.pdf|i', $header_file)) {
$pdfUrl = $file_url;
}
echo '<div id="viewerJS">';
echo '<iframe id="viewerJSContent" frameborder="0" allowfullscreen="allowfullscreen" webkitallowfullscreen style="width:100%;"
src="' . $pdfUrl. '">
src="' . $pdfUrl.'">
</iframe>';
echo '</div>';
} elseif (!$originIsLearnpath) {

@ -204,9 +204,9 @@ class FlatViewTable extends SortableTable
$myCache = new pCache(array('CacheFolder' => substr($cachePath, 0, strlen($cachePath) - 1)));
$chartHash = $myCache->getHash($dataSet);
if ($myCache->isInCache($chartHash)) {
$imgPath = api_get_path(SYS_ARCHIVE_PATH) . $chartHash;
$imgPath = api_get_path(SYS_ARCHIVE_PATH).$chartHash;
$myCache->saveFromCache($chartHash, $imgPath);
$imgPath = api_get_path(WEB_ARCHIVE_PATH) . $chartHash;
$imgPath = api_get_path(WEB_ARCHIVE_PATH).$chartHash;
} else {
/* Create the pChart object */
$widthSize = 480;
@ -233,7 +233,7 @@ class FlatViewTable extends SortableTable
/* Set the default font */
$myPicture->setFontProperties(
array(
'FontName' => api_get_path(SYS_FONTS_PATH) . 'opensans/OpenSans-Regular.ttf',
'FontName' => api_get_path(SYS_FONTS_PATH).'opensans/OpenSans-Regular.ttf',
'FontSize' => 10
)
);
@ -305,11 +305,11 @@ class FlatViewTable extends SortableTable
/* Render the picture (choose the best way) */
$myCache->writeToCache($chartHash, $myPicture);
$imgPath = api_get_path(SYS_ARCHIVE_PATH) . $chartHash;
$imgPath = api_get_path(SYS_ARCHIVE_PATH).$chartHash;
$myCache->saveFromCache($chartHash, $imgPath);
$imgPath = api_get_path(WEB_ARCHIVE_PATH) . $chartHash;
$imgPath = api_get_path(WEB_ARCHIVE_PATH).$chartHash;
}
echo '<img src="' . $imgPath . '" >';
echo '<img src="'.$imgPath.'" >';
if ($i % 2 == 0 && $i != 0) {
echo '<br /><br />';
} else {
@ -352,10 +352,10 @@ class FlatViewTable extends SortableTable
// previous X
$header .= '<td style="width:100%;">';
if ($this->offset >= GRADEBOOK_ITEM_LIMIT) {
$header .= '<a href="' . api_get_self()
. '?selectcat=' . Security::remove_XSS($_GET['selectcat'])
. '&offset=' . (($this->offset) - GRADEBOOK_ITEM_LIMIT)
. (isset($_GET['search']) ? '&search=' . Security::remove_XSS($_GET['search']) : '') . '">'
$header .= '<a href="'.api_get_self()
. '?selectcat='.Security::remove_XSS($_GET['selectcat'])
. '&offset='.(($this->offset) - GRADEBOOK_ITEM_LIMIT)
. (isset($_GET['search']) ? '&search='.Security::remove_XSS($_GET['search']) : '').'">'
. Display::return_icon('action_prev.png', get_lang('PreviousPage'), array(), 32)
. '</a>';
} else {
@ -367,10 +367,10 @@ class FlatViewTable extends SortableTable
($totalitems - (GRADEBOOK_ITEM_LIMIT + $this->offset)) : GRADEBOOK_ITEM_LIMIT;
if ($calcnext > 0) {
$header .= '<a href="' . api_get_self()
. '?selectcat=' . Security::remove_XSS($_GET['selectcat'])
. '&offset=' . ($this->offset + GRADEBOOK_ITEM_LIMIT)
. (isset($_GET['search']) ? '&search=' . Security::remove_XSS($_GET['search']) : '') . '">'
$header .= '<a href="'.api_get_self()
. '?selectcat='.Security::remove_XSS($_GET['selectcat'])
. '&offset='.($this->offset + GRADEBOOK_ITEM_LIMIT)
. (isset($_GET['search']) ? '&search='.Security::remove_XSS($_GET['search']) : '').'">'
. Display::return_icon('action_next.png', get_lang('NextPage'), array(), 32)
. '</a>';
} else {
@ -477,6 +477,6 @@ class FlatViewTable extends SortableTable
*/
private function build_name_link($userId, $name)
{
return '<a href="user_stats.php?userid=' . $userId . '&selectcat=' . $this->selectcat->get_id() . '&'.api_get_cidreq().'">' . $name . '</a>';
return '<a href="user_stats.php?userid='.$userId.'&selectcat='.$this->selectcat->get_id().'&'.api_get_cidreq().'">'.$name.'</a>';
}
}

@ -90,7 +90,7 @@ switch ($action) {
0, //howMany
1, //$orderby = 1
'ASC',
-1, //visibility
-1, //visibility
$_GET['q'],
null, //$urlId
true //AlsoSearchCode
@ -112,7 +112,7 @@ switch ($action) {
if (!empty($course['category_code'])) {
$parents = CourseCategory::getParentsToString($course['category_code']);
$title = $parents . $course['title'];
$title = $parents.$course['title'];
}
$results['items'][] = array(
@ -192,7 +192,7 @@ switch ($action) {
ON u.user_id = r.user_id
WHERE session_id = %d AND c_id = '%s'
AND (u.firstname LIKE '%s' OR u.username LIKE '%s' OR u.lastname LIKE '%s')";
$needle = '%' . $_GET['q'] . '%';
$needle = '%'.$_GET['q'].'%';
$sql_query = sprintf($sql, $_GET['session_id'], $course['real_id'], $needle, $needle, $needle);
$result = Database::query($sql_query);
@ -211,7 +211,7 @@ switch ($action) {
case 'search_exercise_by_course':
if (api_is_platform_admin()) {
$course = api_get_course_info_by_id($_GET['course_id']);
$session_id = (!empty($_GET['session_id'])) ? intval($_GET['session_id']) : 0 ;
$session_id = (!empty($_GET['session_id'])) ? intval($_GET['session_id']) : 0;
$exercises = ExerciseLib::get_all_exercises(
$course,
$session_id,
@ -222,7 +222,7 @@ switch ($action) {
);
foreach ($exercises as $exercise) {
$data[] = array('id' => $exercise['id'], 'text' => html_entity_decode($exercise['title']) );
$data[] = array('id' => $exercise['id'], 'text' => html_entity_decode($exercise['title']));
}
if (!empty($data)) {
$data[] = array('id' => 'T', 'text' => 'TODOS');
@ -247,11 +247,11 @@ switch ($action) {
$sql,
intval($_GET['course_id']),
intval($_GET['session_id']),
'%' . Database::escape_string($_GET['q']).'%'
'%'.Database::escape_string($_GET['q']).'%'
);
$result = Database::query($sql_query);
while ($survey = Database::fetch_assoc($result)) {
$survey['title'] .= ($survey['anonymous'] == 1) ? ' (' . get_lang('Anonymous') . ')' : '';
$survey['title'] .= ($survey['anonymous'] == 1) ? ' ('.get_lang('Anonymous').')' : '';
$data[] = array(
'id' => $survey['id'],
'text' => strip_tags(html_entity_decode($survey['title']))

@ -14,7 +14,7 @@ use Symfony\Component\Filesystem\Exception\IOException;
* current configuration file.
* @package chamilo.install
*/
error_log("Starting " . basename(__FILE__));
error_log("Starting ".basename(__FILE__));
global $debug;
@ -143,12 +143,12 @@ if (defined('SYSTEM_INSTALLATION')) {
$list = scandir($langPath);
foreach ($list as $entry) {
if (is_dir($langPath . $entry) &&
if (is_dir($langPath.$entry) &&
in_array($entry, $officialLanguages)
) {
foreach ($filesToDelete as $file) {
if (is_file($langPath . $entry . '/' . $file . '.inc.php')) {
unlink($langPath . $entry . '/' . $file . '.inc.php');
if (is_file($langPath.$entry.'/'.$file.'.inc.php')) {
unlink($langPath.$entry.'/'.$file.'.inc.php');
}
}
}
@ -173,12 +173,12 @@ if (defined('SYSTEM_INSTALLATION')) {
// Move dirs into new structures.
$movePathList = [
api_get_path(SYS_CODE_PATH).'upload/users/groups' => api_get_path(SYS_UPLOAD_PATH) . 'groups',
api_get_path(SYS_CODE_PATH).'upload/users' => api_get_path(SYS_UPLOAD_PATH) . 'users',
api_get_path(SYS_CODE_PATH).'upload/badges' => api_get_path(SYS_UPLOAD_PATH) . 'badges',
api_get_path(SYS_PATH).'courses' => api_get_path(SYS_APP_PATH) . 'courses',
api_get_path(SYS_CODE_PATH).'upload/users/groups' => api_get_path(SYS_UPLOAD_PATH).'groups',
api_get_path(SYS_CODE_PATH).'upload/users' => api_get_path(SYS_UPLOAD_PATH).'users',
api_get_path(SYS_CODE_PATH).'upload/badges' => api_get_path(SYS_UPLOAD_PATH).'badges',
api_get_path(SYS_PATH).'courses' => api_get_path(SYS_APP_PATH).'courses',
api_get_path(SYS_PATH).'searchdb' => api_get_path(SYS_UPLOAD_PATH).'plugins/xapian/',
api_get_path(SYS_PATH).'home' => api_get_path(SYS_APP_PATH) . 'home'
api_get_path(SYS_PATH).'home' => api_get_path(SYS_APP_PATH).'home'
];
if ($debug) {
@ -199,7 +199,7 @@ if (defined('SYSTEM_INSTALLATION')) {
$fs->remove($origin);
} catch (IOException $e) {
// If removing the directory doesn't work, just log an error and continue
error_log('Could not move ' . $origin . ' to ' . $destination . '(' . $e->getMessage() . '). Please move it manually.');
error_log('Could not move '.$origin.' to '.$destination.'('.$e->getMessage().'). Please move it manually.');
}
}
}
@ -246,5 +246,5 @@ if (defined('SYSTEM_INSTALLATION')) {
@rrmdir(api_get_path(SYS_PATH).'archive');
} else {
echo 'You are not allowed here !'. __FILE__;
echo 'You are not allowed here !'.__FILE__;
}

@ -19,7 +19,7 @@ api_protect_course_script();
if (isset($_GET['lp_item_id'])) {
// Get parameter only came from lp_view.php.
$lp_item_id = intval($_GET['lp_item_id']);
$lp_item_id = intval($_GET['lp_item_id']);
if (isset($_SESSION['lpobject'])) {
$oLP = unserialize($_SESSION['lpobject']);
}
@ -69,12 +69,12 @@ if ((!$is_allowed_to_edit) || $isStudentView) {
$course_id = api_get_course_int_id();
$sql = "SELECT * FROM $tbl_lp
WHERE c_id = $course_id AND id = $learnpath_id";
$result=Database::query($sql);
$result = Database::query($sql);
$therow = Database::fetch_array($result);
/* SHOWING THE ADMIN TOOLS */
if (api_is_in_gradebook()) {
$interbreadcrumb[] = array (
$interbreadcrumb[] = array(
'url' => api_get_path(WEB_CODE_PATH).'gradebook/index.php?'.api_get_cidreq(),
'name' => get_lang('ToolGradebook')
);

@ -20,8 +20,8 @@ unset($_SESSION['this_section']);
api_block_anonymous_users();
if (api_get_setting('allow_social_tool') != 'true') {
$url = api_get_path(WEB_CODE_PATH) . 'auth/profile.php';
header('Location: ' . $url);
$url = api_get_path(WEB_CODE_PATH).'auth/profile.php';
header('Location: '.$url);
exit;
}
@ -45,10 +45,10 @@ if (api_get_setting('profile', 'picture') == 'true') {
$allowed_picture_types = api_get_supported_image_extensions();
$form->addRule(
'picture',
get_lang('OnlyImagesAllowed') . ' (' . implode(
get_lang('OnlyImagesAllowed').' ('.implode(
',',
$allowed_picture_types
) . ')',
).')',
'filetype',
$allowed_picture_types
);
@ -68,7 +68,7 @@ if (api_get_setting('profile', 'picture') == 'true') {
$sql = "UPDATE $table_user
SET
picture_uri = '$new_picture'
WHERE user_id = " . api_get_user_id();
WHERE user_id = ".api_get_user_id();
$result = Database::query($sql);
}
@ -95,9 +95,9 @@ if (!empty($results)) {
$result['name'] = Security::remove_XSS($result['name'], STUDENT, true);
if ($result['count'] == 1) {
$result['count'] = '1 ' . get_lang('Member');
$result['count'] = '1 '.get_lang('Member');
} else {
$result['count'] = $result['count'] . ' ' . get_lang('Members');
$result['count'] = $result['count'].' '.get_lang('Members');
}
$group_url = "group_view.php?id=$id";
@ -117,9 +117,9 @@ if (!empty($results)) {
GROUP_IMAGE_SIZE_BIG
);
$result['picture'] = '<img class="img-responsive" src="' . $picture['file'] . '" />';
$group_actions = '<div class="group-more"><a class="btn btn-default" href="groups.php?#tab_browse-2">' . get_lang('SeeMore') . '</a></div>';
$group_info= '<div class="description"><p>' . cut($result['description'], 120, true) . "</p></div>";
$result['picture'] = '<img class="img-responsive" src="'.$picture['file'].'" />';
$group_actions = '<div class="group-more"><a class="btn btn-default" href="groups.php?#tab_browse-2">'.get_lang('SeeMore').'</a></div>';
$group_info = '<div class="description"><p>'.cut($result['description'], 120, true)."</p></div>";
$groups_newest[] = array(
Display::url(
$result['picture'],
@ -146,9 +146,9 @@ foreach ($results as $result) {
$group_url = "group_view.php?id=$id";
if ($result['count'] == 1) {
$result['count'] = '1 ' . get_lang('Member');
$result['count'] = '1 '.get_lang('Member');
} else {
$result['count'] = $result['count'] . ' ' . get_lang('Members');
$result['count'] = $result['count'].' '.get_lang('Members');
}
$result['name'] = '<div class="group-name">'.Display::url(
api_ucwords(cut($result['name'], 40, true)), $group_url)
@ -160,42 +160,42 @@ foreach ($results as $result) {
null,
GROUP_IMAGE_SIZE_BIG
);
$result['picture_uri'] = '<img class="img-responsive" src="' . $picture['file'] . '" />';
$group_actions = '<div class="group-more"><a class="btn btn-default" href="groups.php?#tab_browse-3">' . get_lang('SeeMore') . '</a></div>';
$group_info= '<div class="description"><p>' . cut($result['description'], 120, true) . "</p></div>";
$result['picture_uri'] = '<img class="img-responsive" src="'.$picture['file'].'" />';
$group_actions = '<div class="group-more"><a class="btn btn-default" href="groups.php?#tab_browse-3">'.get_lang('SeeMore').'</a></div>';
$group_info = '<div class="description"><p>'.cut($result['description'], 120, true)."</p></div>";
$groups_pop[] = array(
Display::url($result['picture_uri'], $group_url),
$result['name'],$group_info. $group_actions
$result['name'], $group_info.$group_actions
);
}
$list=count($groups_newest);
$list = count($groups_newest);
$social_group_block = null;
if ($list > 0) {
$social_group_block .= '<div class="list-group-newest">';
$social_group_block .= '<div class="group-title">' . get_lang('Newest') . '</div>';
$social_group_block .= '<div class="group-title">'.get_lang('Newest').'</div>';
for ($i = 0; $i < $list; $i++) {
$social_group_block.='<div class="row">';
$social_group_block.='<div class="col-md-3">' . $groups_newest[$i][0] . '</div>';
$social_group_block.='<div class="col-md-9">' . $groups_newest[$i][1];
$social_group_block.= $groups_newest[$i][2] . '</div>';
$social_group_block.="</div>";
$social_group_block .= '<div class="row">';
$social_group_block .= '<div class="col-md-3">'.$groups_newest[$i][0].'</div>';
$social_group_block .= '<div class="col-md-9">'.$groups_newest[$i][1];
$social_group_block .= $groups_newest[$i][2].'</div>';
$social_group_block .= "</div>";
}
$social_group_block.= "</div>";
$social_group_block .= "</div>";
}
$list=count($groups_pop);
$list = count($groups_pop);
if ($list > 0) {
$social_group_block .= '<div class="list-group-newest">';
$social_group_block .= '<div class="group-title">' . get_lang('Popular') . '</div>';
$social_group_block .= '<div class="group-title">'.get_lang('Popular').'</div>';
for ($i = 0; $i < $list; $i++) {
$social_group_block.='<div class="row">';
$social_group_block.='<div class="col-md-3">' . $groups_pop[$i][0] . '</div>';
$social_group_block.='<div class="col-md-9">' . $groups_pop[$i][1];
$social_group_block.= $groups_pop[$i][2] . '</div>';
$social_group_block.="</div>";
$social_group_block .= '<div class="row">';
$social_group_block .= '<div class="col-md-3">'.$groups_pop[$i][0].'</div>';
$social_group_block .= '<div class="col-md-9">'.$groups_pop[$i][1];
$social_group_block .= $groups_pop[$i][2].'</div>';
$social_group_block .= "</div>";
}
$social_group_block.= "</div>";
$social_group_block .= "</div>";
}
// My friends
$friend_html = SocialManager::listMyFriendsBlock(

@ -16,8 +16,8 @@ if (api_get_setting('allow_social_tool') !== 'true') {
$this_section = SECTION_SOCIAL;
$interbreadcrumb[] = array ('url' =>'profile.php','name' => get_lang('SocialNetwork'));
$interbreadcrumb[] = array ('url' =>'#','name' => get_lang('Invitations'));
$interbreadcrumb[] = array('url' =>'profile.php', 'name' => get_lang('SocialNetwork'));
$interbreadcrumb[] = array('url' =>'#', 'name' => get_lang('Invitations'));
$userGroupModel = new UserGroup();
@ -64,7 +64,7 @@ if (is_array($_GET) && count($_GET) > 0) {
Display::return_message(get_lang('UserIsNotSubscribedToThisGroup'), 'warning')
);
header('Location: ' . api_get_path(WEB_CODE_PATH) . 'social/invitations.php');
header('Location: '.api_get_path(WEB_CODE_PATH).'social/invitations.php');
exit;
break;
case 'deny':
@ -74,7 +74,7 @@ if (is_array($_GET) && count($_GET) > 0) {
Display::return_message(get_lang('GroupInvitationWasDeny'))
);
header('Location: ' . api_get_path(WEB_CODE_PATH) . 'social/invitations.php');
header('Location: '.api_get_path(WEB_CODE_PATH).'social/invitations.php');
exit;
}
}
@ -130,24 +130,24 @@ if ($number_loop != 0) {
$invitationHtml .= '<div class="btn-group btn-group-sm" role="group">';
$invitationHtml .= Display::toolbarButton(
null,
api_get_path(WEB_AJAX_PATH) . 'social.ajax.php?' . http_build_query([
api_get_path(WEB_AJAX_PATH).'social.ajax.php?'.http_build_query([
'a' => 'add_friend',
'friend_id' => $sender_user_id,
'is_my_friend' => 'friend'
]),
'check',
'default',
['id' => 'btn-accept-' . $sender_user_id]
['id' => 'btn-accept-'.$sender_user_id]
);
$invitationHtml .= Display::toolbarButton(
null,
api_get_path(WEB_AJAX_PATH) . 'social.ajax.php?' . http_build_query([
api_get_path(WEB_AJAX_PATH).'social.ajax.php?'.http_build_query([
'a' => 'deny_friend',
'denied_friend_id' => $sender_user_id,
]),
'times',
'default',
['id' => 'btn-deny-' . $sender_user_id]
['id' => 'btn-deny-'.$sender_user_id]
);
$invitationHtml .= '</div>';
$invitationHtml .= '</div>';
@ -184,7 +184,7 @@ if (count($list_get_invitation_sent) > 0) {
$invitationSentHtml .= '<div class="col-md-9">';
$invitationSentHtml .= '<h4 class="title-profile"><a class="profile_link" href="profile.php?u='.$sender_user_id.'">'.$user_info['complete_name'].'</a></h4>';
$invitationSentHtml .= '<div class="content-invitation">'.$title.' : '.$content.'</div>';
$invitationSentHtml .= '<div class="date-invitation">'. get_lang('DateSend').' : '.$date.'</div>';
$invitationSentHtml .= '<div class="date-invitation">'.get_lang('DateSend').' : '.$date.'</div>';
$invitationSentHtml .= '</div>';
$invitationSentHtml .= '</div></div>';
}
@ -203,9 +203,9 @@ if (count($pending_invitations) > 0) {
);
$img = '<img class="img-responsive" src="'.$picture['file'].'" />';
$invitation['picture_uri'] = '<a href="group_view.php?id='.$invitation['id'].'">'.$img.'</a>';
$invitation['name'] = '<a href="group_view.php?id='.$invitation['id'].'">'.cut($invitation['name'],120,true).'</a>';
$invitation['name'] = '<a href="group_view.php?id='.$invitation['id'].'">'.cut($invitation['name'], 120, true).'</a>';
$invitation['description'] = cut($invitation['description'], 220, true);
$new_invitation[]=$invitation;
$new_invitation[] = $invitation;
$waitingInvitation .= '<div class="panel-invitations"><div class="row">';
$waitingInvitation .= '<div class="col-md-3">'.$invitation['picture_uri'].'</div>';
$waitingInvitation .= '<div class="col-md-9">';
@ -214,19 +214,19 @@ if (count($pending_invitations) > 0) {
$waitingInvitation .= '<div class="btn-group" role="group">';
$waitingInvitation .= Display::toolbarButton(
get_lang('AcceptInvitation'),
api_get_path(WEB_CODE_PATH) . 'social/invitations.php?' . http_build_query(['accept' => $invitation['id']]),
api_get_path(WEB_CODE_PATH).'social/invitations.php?'.http_build_query(['accept' => $invitation['id']]),
'check',
'success',
['id' => 'accept-invitation-' . $invitation['id']]
['id' => 'accept-invitation-'.$invitation['id']]
);
$waitingInvitation .= Display::toolbarButton(
get_lang('DenyInvitation'),
api_get_path(WEB_CODE_PATH) . 'social/invitations.php?' . http_build_query(['deny' => $invitation['id']]),
api_get_path(WEB_CODE_PATH).'social/invitations.php?'.http_build_query(['deny' => $invitation['id']]),
'times',
'danger',
['id' => 'deny-invitation-' . $invitation['id']]
['id' => 'deny-invitation-'.$invitation['id']]
);
$waitingInvitation .='</div>';
$waitingInvitation .= '</div>';
$waitingInvitation .= '</div></div>';
}
$socialInvitationsBlock .= Display::panel($waitingInvitation, get_lang('GroupsWaitingApproval'));

@ -5,7 +5,7 @@ use ChamiloSession as Session;
use Symfony\Component\Finder\Finder;
require_once __DIR__.'/../inc/global.inc.php';
$current_course_tool = TOOL_STUDENTPUBLICATION;
$current_course_tool = TOOL_STUDENTPUBLICATION;
api_protect_course_script(true);
@ -81,7 +81,7 @@ if ($form->validate()) {
if ($upload) {
$zip = new PclZip($_FILES['file']['tmp_name']);
// Check the zip content (real size and file extension)
$zipFileList = (array)$zip->listContent();
$zipFileList = (array) $zip->listContent();
$realSize = 0;
foreach ($zipFileList as & $this_content) {
@ -128,7 +128,7 @@ if ($form->validate()) {
foreach ($result as $item) {
$title = $item['title_clean'];
$insert_date = str_replace(array(':', '-', ' '), '_', api_get_local_time($item['sent_date_from_db']));
$title = api_replace_dangerous_char($insert_date.'_'.$item['username'].'_'.$title);
$title = api_replace_dangerous_char($insert_date.'_'.$item['username'].'_'.$title);
$finalResult[$title] = $item['id'];
}

@ -6,7 +6,7 @@ $strings['extra_field_name_help'] = "Enter one or many extra user fields name se
<br><br>
<img src='//maps.google.com/mapfiles/ms/icons/red-dot.png'> <img src='//maps.google.com/mapfiles/ms/icons/blue-dot.png'> <img src='//maps.google.com/mapfiles/ms/icons/green-dot.png'> <img src='//maps.google.com/mapfiles/ms/icons/yellow-dot.png'> <img src='//maps.google.com/mapfiles/ms/icons/purple-dot.png'>
<br><br>
Follow the link below to see the map : <a href='". api_get_path(WEB_PLUGIN_PATH) . "google_maps/src/map_coordinates.php'>" . api_get_path(WEB_PLUGIN_PATH) . "google_maps/src/map_coordinates.php</a>";
Follow the link below to see the map : <a href='". api_get_path(WEB_PLUGIN_PATH)."google_maps/src/map_coordinates.php'>".api_get_path(WEB_PLUGIN_PATH)."google_maps/src/map_coordinates.php</a>";
$strings['enable_api'] = "Enable API";
$strings['api_key'] = "Api Key";
$strings['extra_field_name'] = "Extra field name";

@ -6,7 +6,7 @@ $strings['extra_field_name_help'] = "Entrez ici le ou les nom(s) des champs extr
<br><br>
<img src='//maps.google.com/mapfiles/ms/icons/red-dot.png'> <img src='//maps.google.com/mapfiles/ms/icons/blue-dot.png'> <img src='//maps.google.com/mapfiles/ms/icons/green-dot.png'> <img src='//maps.google.com/mapfiles/ms/icons/yellow-dot.png'> <img src='//maps.google.com/mapfiles/ms/icons/purple-dot.png'>
<br><br>
Suivez le lien pour voir la carte : <a href='". api_get_path(WEB_PLUGIN_PATH) . "google_maps/src/map_coordinates.php'>" . api_get_path(WEB_PLUGIN_PATH) . "google_maps/src/map_coordinates.php</a>";
Suivez le lien pour voir la carte : <a href='". api_get_path(WEB_PLUGIN_PATH)."google_maps/src/map_coordinates.php'>".api_get_path(WEB_PLUGIN_PATH)."google_maps/src/map_coordinates.php</a>";
$strings['enable_api'] = "Enable API";
$strings['api_key'] = "Api Key";
$strings['extra_field_name'] = "Nom de champ supplémentaire";

@ -20,7 +20,7 @@ if (empty($tool)) {
Display::return_message($plugin->get_lang('NoTool'), 'error')
);
header('Location: ' . api_get_path(WEB_PLUGIN_PATH) . 'ims_lti/list.php');
header('Location: '.api_get_path(WEB_PLUGIN_PATH).'ims_lti/list.php');
exit;
}
@ -58,7 +58,7 @@ if ($form->validate()) {
Display::return_message($plugin->get_lang('ToolEdited'), 'success')
);
header('Location: ' . api_get_path(WEB_PLUGIN_PATH) . 'ims_lti/list.php');
header('Location: '.api_get_path(WEB_PLUGIN_PATH).'ims_lti/list.php');
exit;
}

@ -23,7 +23,7 @@ $thisurl = api_get_path(WEB_PLUGIN_PATH).'vchamilo/views/manage.php';
if ($id) {
$mode = 'update';
} else {
$mode = $registeronly ? 'register' : 'add' ;
$mode = $registeronly ? 'register' : 'add';
}
$vhost = (array) Virtual::getInstance($id);

Loading…
Cancel
Save