Minor - format code

1.10.x
jmontoyaa 9 years ago
parent db2cdc7393
commit be534d0c4d
  1. 6
      main/dashboard/dashboard_controller.php
  2. 3
      main/dashboard/index.php
  3. 26
      main/dropbox/dropbox_functions.inc.php
  4. 1
      main/dropbox/dropbox_init.inc.php
  5. 4
      main/help/faq.php
  6. 5
      main/help/help.php
  7. 2
      main/inc/lib/webservices/MessagesWebService.class.php
  8. 1
      main/inc/lib/webservices/WebService.class.php
  9. 3
      main/link/link_goto.php
  10. 4
      main/messages/inbox.php
  11. 15
      main/mySpace/coaches.php
  12. 3
      main/mySpace/current_courses.php
  13. 8
      main/mySpace/progression.php
  14. 1
      main/mySpace/user_edit.php
  15. 2
      main/mySpace/users.php
  16. 12
      main/social/my_skills_report.php

@ -2,9 +2,11 @@
/* For licensing terms, see /license.txt */
/**
* Controller script. Prepares the common background variables to give to the scripts corresponding to
* Controller script. Prepares the common background
* variables to give to the scripts corresponding to
* the requested action
* This file contains class used like controller, it should be included inside a dispatcher file (e.g: index.php)
* This file contains class used like controller,
* it should be included inside a dispatcher file (e.g: index.php)
* @author Christian Fasanando <christian1827@gmail.com>
*
* @package chamilo.dashboard

@ -1,7 +1,8 @@
<?php
/* For licensing terms, see /license.txt */
/**
* Template (front controller in MVC pattern) used for distpaching to the controllers depend on the current action
* Template (front controller in MVC pattern) used for distpaching to
* the controllers depend on the current action
* @author Christian Fasanando <christian1827@gmail.com>
* @package chamilo.dashboard
*/

@ -222,7 +222,10 @@ function store_move($id, $target, $part)
$dropbox_cnf = getDropboxConf();
$course_id = api_get_course_int_id();
if ((isset($id) AND $id != '') AND (isset($target) AND $target != '') AND (isset($part) AND $part != '')) {
if ((isset($id) AND $id != '') AND
(isset($target) AND $target != '') AND
(isset($part) AND $part != '')
) {
if ($part == 'received') {
$sql = "UPDATE ".$dropbox_cnf["tbl_post"]."
@ -250,7 +253,8 @@ function store_move($id, $target, $part)
}
/**
* This functions displays all teh possible actions that can be performed on multiple files. This is the dropdown list that
* This functions displays all teh possible actions that can be
* performed on multiple files. This is the dropdown list that
* appears below the sortable table of the sent / or received files.
*
* @return html value for the dropdown list
@ -660,8 +664,9 @@ function display_add_form($dropbox_unid, $viewReceivedCategory, $viewSentCategor
/*
* Show groups
*/
if (($dropbox_person -> isCourseTutor || $dropbox_person -> isCourseAdmin)
&& dropbox_cnf('allowGroup') || dropbox_cnf('allowStudentToStudent')) {
if (($dropbox_person->isCourseTutor || $dropbox_person->isCourseAdmin)
&& dropbox_cnf('allowGroup') || dropbox_cnf('allowStudentToStudent')
) {
$complete_group_list_for_dropbox = GroupManager::get_group_list(null, dropbox_cnf('courseId'));
if (count($complete_group_list_for_dropbox) > 0) {
@ -842,7 +847,6 @@ function removeMoreIfMailing($file_id)
}
}
/**
* Function that finds a given config setting
*
@ -956,7 +960,11 @@ function store_add_dropbox()
// separate functions: store_new_dropbox, store_new_mailing, store_just_upload
if ($dropbox_overwrite) {
$dropbox_person = new Dropbox_Person($_user['user_id'], api_is_course_admin(), api_is_course_tutor());
$dropbox_person = new Dropbox_Person(
$_user['user_id'],
api_is_course_admin(),
api_is_course_tutor()
);
foreach ($dropbox_person->sentWork as $w) {
if ($w->title == $dropbox_filename) {
@ -1320,7 +1328,8 @@ function generate_html_overview($files, $dont_show_columns = array(), $make_link
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University
* @version march 2006
*/
function get_total_number_feedback($file_id = '') {
function get_total_number_feedback($file_id = '')
{
$dropbox_cnf = getDropboxConf();
$course_id = api_get_course_int_id();
$sql = "SELECT COUNT(feedback_id) AS total, file_id
@ -1340,7 +1349,8 @@ function get_total_number_feedback($file_id = '') {
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University
* @version march 2006
*/
function check_number_feedback($key, $array) {
function check_number_feedback($key, $array)
{
if (is_array($array)) {
if (array_key_exists($key, $array)) {
return $array[$key];

@ -235,7 +235,6 @@ if (dropbox_cnf('allowOverwrite')) {
function checkfile(str)
{
ind = str.lastIndexOf('/'); //unix separator
if (ind == -1) ind = str.lastIndexOf('\\\'); //windows separator
filename = str.substring(ind+1, str.length);

@ -6,9 +6,7 @@
*
* @package chamilo.help
*/
/**
* Code
*/
require_once '../inc/global.inc.php';
$help_name = isset($_GET['open']) ? Security::remove_XSS($_GET['open']) : null;

@ -6,10 +6,9 @@
*
* @package chamilo.help
*/
/**
* Code
*/
require_once '../inc/global.inc.php';
$help_name = isset($_GET['open']) ? Security::remove_XSS($_GET['open']) : null;
if (empty($help_name)) {
api_not_allowed(true);

@ -8,7 +8,6 @@
*/
class MessagesWebService extends WebService
{
const SERVICE_NAME = 'MsgREST';
/**
@ -125,5 +124,4 @@ class MessagesWebService extends WebService
return $messages;
}
}

@ -8,7 +8,6 @@
*/
abstract class WebService
{
protected $apiKey;
/**

@ -15,9 +15,6 @@
* @author Thomas Depraetere, Hugues Peeters, Christophe Gesch<EFBFBD> - original versions
* @package chamilo.link
*/
/* INIT SECTION */
require_once '../inc/global.inc.php';
$this_section = SECTION_COURSES;

@ -109,7 +109,9 @@ if (isset($_GET['f']) && $_GET['f'] == 'social') {
$social_parameter = '';
if (isset($_GET['f']) && $_GET['f'] == 'social' || api_get_setting('allow_social_tool') == 'true') {
if ((isset($_GET['f']) && $_GET['f'] == 'social') ||
api_get_setting('allow_social_tool') == 'true'
) {
$social_parameter = '?f=social';
} else {
$actions = null;

@ -1,12 +1,11 @@
<?php
/* For licensing terms, see /license.txt */
/*
* Coaches reporting
* @package chamilo.reporting
*/
/**
* Code
*/
ob_start();
$cidReset = true;
@ -114,7 +113,9 @@ if (Database::num_rows($result_coachs) > 0) {
$id_coach = $coachs["id_coach"];
if (isset($_GET["id_student"])) {
$sql_infos_coach = "SELECT lastname, firstname FROM $tbl_user WHERE user_id='$id_coach'";
$sql_infos_coach = "SELECT lastname, firstname
FROM $tbl_user
WHERE user_id='$id_coach'";
$result_coachs_infos = Database::query($sql_infos_coach);
$lastname = Database::result($result_coachs_infos, 0, "lastname");
$firstname = Database::result($result_coachs_infos, 0, "firstname");
@ -123,7 +124,9 @@ if (Database::num_rows($result_coachs) > 0) {
$firstname = $coachs["firstname"];
}
$sql_connection_time = "SELECT login_date, logout_date FROM $tbl_track_login WHERE login_user_id ='$id_coach' AND logout_date <> 'null'";
$sql_connection_time = "SELECT login_date, logout_date
FROM $tbl_track_login
WHERE login_user_id ='$id_coach' AND logout_date <> 'null'";
$result_connection_time = Database::query($sql_connection_time);
$nb_seconds = 0;
@ -173,7 +176,7 @@ if (Database::num_rows($result_coachs) > 0) {
<td>'.$firstname.'</td><td>'.$lastname.'</td><td>'.$s_connection_time.'</td>
<td>
<a href="course.php?type=coach&user_id='.$id_coach.'">
'.Display::return_icon('2rightarrow.png', get_lang('Details')).'
'.Display::return_icon('2rightarrow.png', get_lang('Details')).'
</a>
</td>
<td>

@ -55,7 +55,8 @@ if (!empty($my_courses)) {
}
$t_lp = Database :: get_course_table(TABLE_LP_MAIN);
$sql_lp = "SELECT lp.name, lp.id FROM $t_lp lp WHERE c_id = $course_id AND lp.session_id = 0";
$sql_lp = "SELECT lp.name, lp.id FROM $t_lp lp
WHERE c_id = $course_id AND lp.session_id = 0";
$rs_lp = Database::query($sql_lp);
$t_lpi = Database :: get_course_table(TABLE_LP_ITEM);
$t_news = Database :: get_course_table(TABLE_ANNOUNCEMENT);

@ -5,9 +5,7 @@
* @package chamilo.reporting
* Created on 28 juil. 2006 by Elixir Interactive http://www.elixir-interactive.com
*/
/**
* Init
*/
// TODO: This file seems to be unfinished and unused.
require_once '../inc/global.inc.php';
@ -67,8 +65,4 @@ if (Database::num_rows($result_course) > 0) {
echo get_lang('NoCourse');
}
/*
FOOTER
*/
Display :: display_footer();

@ -4,6 +4,7 @@
// including necessary libraries
$language_file = array('admin', 'registration');
$cidReset = true;
require_once '../inc/global.inc.php';
$libpath = api_get_path(LIBRARY_PATH);
require_once $libpath.'fileManage.lib.php';

@ -200,8 +200,6 @@ if (api_is_drh()) {
$actionsRight = Display::url(Display::return_icon('printer.png', get_lang('Print'), array(), ICON_SIZE_MEDIUM), 'javascript: void(0);', array('onclick'=>'javascript: window.print();'));
$actionsRight .= Display::url(Display::return_icon('export_csv.png', get_lang('ExportAsCSV'), array(), ICON_SIZE_MEDIUM), api_get_self().'?export=csv&keyword='.$keyword);
$toolbar = Display::toolbarAction('toolbar-user', $content = array( 0 => $actionsLeft, 1 => $actionsRight ));
$table = new SortableTable(

@ -33,8 +33,10 @@ $tpl->assign('allowDrhSkillsManagement', api_get_setting('allow_hr_skills_manage
if ($isStudent) {
$sql = "SELECT s.name, sru.acquired_skill_at, c.title, c.directory
FROM $skillTable s
INNER JOIN $skillRelUserTable sru ON s.id = sru.skill_id
INNER JOIN $courseTable c ON sru.course_id = c.id
INNER JOIN $skillRelUserTable sru
ON s.id = sru.skill_id
INNER JOIN $courseTable c
ON sru.course_id = c.id
WHERE sru.user_id = $userId";
$result = Database::query($sql);
@ -76,8 +78,10 @@ if ($isStudent) {
if ($selectedStudent > 0) {
$sql = "SELECT s.name, sru.acquired_skill_at, c.title, c.directory
FROM $skillTable s
INNER JOIN $skillRelUserTable sru ON s.id = sru.skill_id
INNER JOIN $courseTable c ON sru.course_id = c.id
INNER JOIN $skillRelUserTable sru
ON s.id = sru.skill_id
INNER JOIN $courseTable c
ON sru.course_id = c.id
WHERE sru.user_id = $selectedStudent
";

Loading…
Cancel
Save