Sfoglia il codice sorgente

Minor - format code

jmontoyaa 7 anni fa
parent
commit
2003a01117

+ 1 - 1
main/inc/lib/display.lib.php

@@ -2410,7 +2410,7 @@ class Display
         $style = !in_array($type, $typeList) ? 'default' : $type;
 
         if (!empty($id)) {
-            $id = " id = $id ";
+            $id = " id='$id'";
         }
 
         return '

+ 6 - 6
main/inc/lib/notebook.lib.php

@@ -107,7 +107,7 @@ class NotebookManager
         }
 
         // Database table definition
-        $t_notebook = Database::get_course_table(TABLE_NOTEBOOK);
+        $table = Database::get_course_table(TABLE_NOTEBOOK);
         $course_id = api_get_course_int_id();
 
         $sql = "SELECT
@@ -115,7 +115,7 @@ class NotebookManager
                 title				AS note_title,
                 description 		AS note_comment,
                 session_id			AS session_id
-               FROM $t_notebook
+               FROM $table
                WHERE c_id = $course_id AND notebook_id = '".intval($notebook_id)."' ";
         $result = Database::query($sql);
         if (Database::num_rows($result) != 1) {
@@ -189,11 +189,11 @@ class NotebookManager
         }
 
         // Database table definition
-        $t_notebook = Database::get_course_table(TABLE_NOTEBOOK);
+        $table = Database::get_course_table(TABLE_NOTEBOOK);
 
         $course_id = api_get_course_int_id();
 
-        $sql = "DELETE FROM $t_notebook
+        $sql = "DELETE FROM $table
                 WHERE
                     c_id = $course_id AND
                     notebook_id='".intval($notebook_id)."' AND
@@ -261,7 +261,7 @@ class NotebookManager
         }
 
         // Database table definition
-        $t_notebook = Database::get_course_table(TABLE_NOTEBOOK);
+        $table = Database::get_course_table(TABLE_NOTEBOOK);
         $order_by = " ORDER BY ".$notebookView." $sort_direction ";
 
         // Condition for the session
@@ -270,7 +270,7 @@ class NotebookManager
         $cond_extra = $notebookView == 'update_date' ? " AND update_date <> ''" : " ";
         $course_id = api_get_course_int_id();
 
-        $sql = "SELECT * FROM $t_notebook
+        $sql = "SELECT * FROM $table
                 WHERE
                     c_id = $course_id AND
                     user_id = '".api_get_user_id()."'

+ 2 - 2
main/inc/lib/skill.visualizer.lib.php

@@ -30,8 +30,8 @@ class SkillVisualizer
      */
     public function __construct($skills, $type = 'read')
     {
-        $this->skills   = $skills;
-        $this->type     = $type;
+        $this->skills = $skills;
+        $this->type = $type;
         $this->center_x = intval($this->offset_x + $this->canvas_x / 2 - $this->block_size / 2);
     }
 

+ 2 - 2
main/inc/lib/social.lib.php

@@ -1434,7 +1434,7 @@ class SocialManager extends UserManager
         $messageId,
         $fileComment = ''
     ) {
-        $tbl_message_attach = Database::get_main_table(TABLE_MESSAGE_ATTACHMENT);
+        $table = Database::get_main_table(TABLE_MESSAGE_ATTACHMENT);
 
         // create directory
         $social = '/social/';
@@ -1475,7 +1475,7 @@ class SocialManager extends UserManager
                 'message_id' => $messageId,
                 'size' => $fileAttach['size'],
             ];
-            Database::insert($tbl_message_attach, $params);
+            Database::insert($table, $params);
             $flag = true;
         }
 

+ 4 - 4
main/survey/create_new_survey.php

@@ -81,7 +81,9 @@ if ($_GET['action'] == 'edit' && isset($survey_id) && is_numeric($survey_id)) {
 
     if ($link_info) {
         $defaults['category_id'] = $link_info['category_id'];
-        if ($sql_result_array = Database::fetch_array(Database::query('SELECT weight FROM '.$table_gradebook_link.' WHERE id='.$gradebook_link_id))) {
+        if ($sql_result_array = Database::fetch_array(
+            Database::query('SELECT weight FROM '.$table_gradebook_link.' WHERE id='.$gradebook_link_id))
+        ) {
             $defaults['survey_qualify_gradebook'] = $gradebook_link_id;
             $defaults['survey_weight'] = number_format($sql_result_array['weight'], 2, '.', '');
         }
@@ -325,9 +327,7 @@ if ($form->validate()) {
 } else {
     // Displaying the header
     Display::display_header($tool_name);
-
     $form->display();
 }
 
-// Footer
-Display :: display_footer();
+Display::display_footer();

+ 8 - 4
main/survey/fillsurvey.php

@@ -6,10 +6,14 @@ use ChamiloSession as Session;
 /**
  * @package chamilo.survey
  * @author unknown, the initial survey that did not make it in 1.8 because of bad code
- * @author Patrick Cool <patrick.cool@UGent.be>, Ghent University: cleanup, refactoring and rewriting large parts of the code
- * @author Julio Montoya <gugli100@gmail.com>, Chamilo: Personality Test modification and rewriting large parts of the code as well
- * @todo check if the user already filled the survey and if this is the case then the answers have to be updated and not stored again.
- * @todo performance could be improved if not the survey_id was stored with the invitation but the survey_code
+ * @author Patrick Cool <patrick.cool@UGent.be>, Ghent University: cleanup,
+ * refactoring and rewriting large parts of the code
+ * @author Julio Montoya <gugli100@gmail.com>, Chamilo: Personality Test
+ * modification and rewriting large parts of the code as well
+ * @todo check if the user already filled the survey and if this
+ * is the case then the answers have to be updated and not stored again.
+ * @todo performance could be improved if not the survey_id was
+ * stored with the invitation but the survey_code
  */
 
 // Unsetting the course id (because it is in the URL)

+ 2 - 2
main/survey/question.php

@@ -4,8 +4,8 @@
 /**
  * @package chamilo.survey
  * @author unknown, the initial survey that did not make it in 1.8 because of bad code
- * @author Patrick Cool <patrick.cool@UGent.be>, Ghent University: cleanup, refactoring and rewriting large parts of the code
- * @version $Id: question.php 21734 2009-07-02 17:12:41Z cvargas1 $
+ * @author Patrick Cool <patrick.cool@UGent.be>, Ghent University: cleanup,
+ * refactoring and rewriting large parts of the code
  */
 
 require_once __DIR__.'/../inc/global.inc.php';

+ 2 - 2
main/survey/reporting.php

@@ -4,8 +4,8 @@
 /**
  * @package chamilo.survey
  * @author unknown, the initial survey that did not make it in 1.8 because of bad code
- * @author Patrick Cool <patrick.cool@UGent.be>, Ghent University: cleanup, refactoring and rewriting large parts of the code
- * @version $Id: reporting.php 21652 2009-06-27 17:07:35Z herodoto $
+ * @author Patrick Cool <patrick.cool@UGent.be>, Ghent University: cleanup,
+ * refactoring and rewriting large parts of the code
  *
  * @todo The question has to be more clearly indicated (same style as when filling the survey)
  */

+ 2 - 2
main/survey/survey.download.inc.php

@@ -4,7 +4,6 @@
 /**
  * @package chamilo.survey
  * @author Arnaud Ligot <arnaud@cblue.be>
- * @version $Id: $
  *
  * A small peace of code to enable user to access images included into survey
  * which are accessible by non authenticated users. This file is included
@@ -43,7 +42,8 @@ function check_download_survey($course, $invitation, $doc_url)
         exit;
     }
 
-    // Very basic security check: check if a text field from a survey/answer/option contains the name of the document requested
+    // Very basic security check: check if a text field from
+    // a survey/answer/option contains the name of the document requested
     // Fetch survey ID
     // If this is the case there will be a language choice
     $sql = "SELECT * FROM $table_survey

+ 3 - 3
main/survey/survey.lib.php

@@ -489,7 +489,6 @@ class SurveyManager
         }
 
         $gradebook_link_type = 8;
-
         $link_info = GradebookUtils::isResourceInCourseGradebook(
             $courseCode,
             $gradebook_link_type,
@@ -991,7 +990,6 @@ class SurveyManager
         }
 
         // Getting the information of the question options
-
         $result = Database::query($sqlOption);
         while ($row = Database::fetch_array($result, 'ASSOC')) {
             /** @todo this should be renamed to options instead of answers */
@@ -1364,7 +1362,7 @@ class SurveyManager
      * This function is normally only called when a survey is deleted
      *
      * @param int $survey_id the id of the survey that has to be deleted
-     * @return true
+     * @return bool
      *
      * @author Patrick Cool <patrick.cool@UGent.be>, Ghent University
      * @version January 2007
@@ -1392,6 +1390,8 @@ class SurveyManager
 
         // Deleting all the answers on this survey
         self::delete_all_survey_answers($survey_id);
+
+        return true;
     }
 
     /**

+ 4 - 2
main/ticket/assign_tickets.php

@@ -51,7 +51,8 @@ echo '<div class="row">
 echo '<div class="row"><div class="formw"><select name ="work_id" id="work_id">';
 echo '<option value="0"'.(($row['colid'] == $rs->work_id) ? "selected" : "").'>'.get_lang('PleaseSelect').'</option>';
 while ($row = Database::fetch_assoc($result_tasks)) {
-    echo '<option value="'.$row['colid'].'"'.(($row['colid'] == $rs->work_id) ? "selected" : "").'>'.$row['coltitle'].'</option>';
+    echo '<option value="'.$row['colid'].'"'.(($row['colid'] == $rs->work_id) ? "selected" : "").'>'.
+        $row['coltitle'].'</option>';
 }
 echo '</select></div><div>';
 echo '<div class="row">
@@ -60,7 +61,8 @@ echo '<div class="row">
 echo '<div class="row"><div class="formw"><select name ="forum_id" id="forum_id">';
 echo '<option value="0"'.(($row['colid'] == $rs->work_id) ? "forum_id" : "").'>'.get_lang('PleaseSelect').'</option>';
 while ($row = Database::fetch_assoc($result_forum)) {
-    echo '<option value="'.$row['colid'].'"'.(($row['colid'] == $rs->forum_id) ? "selected" : "").'>'.$row['coltitle'].'</option>';
+    echo '<option value="'.$row['colid'].'"'.(($row['colid'] == $rs->forum_id) ? "selected" : "").'>'.
+        $row['coltitle'].'</option>';
 }
 echo '</select></div><div>';
 echo '<div class="row">

+ 2 - 2
main/ticket/new_ticket.php

@@ -2,7 +2,7 @@
 /* For licensing terms, see /license.txt */
 
 /**
- * @package chamilo.plugin.ticket
+ * @package chamilo.ticket
  */
 
 $cidReset = true;
@@ -403,7 +403,7 @@ $form->addLabel('', '<span id="filepaths"><div id="filepath_1"></div></span>');
 $form->addLabel(
     '',
     '<span id="link-more-attach">
-         <span class="btn btn-success" onclick="return add_image_form()">' . get_lang('AddOneMoreFile').'</span>
+         <span class="btn btn-success" onclick="return add_image_form()">'.get_lang('AddOneMoreFile').'</span>
          </span>
          ('.sprintf(get_lang('MaximunFileSizeX'), format_file_size(api_get_setting('message_max_upload_filesize'))).')
     '

+ 2 - 1
main/tracking/course_log_events.php

@@ -9,7 +9,8 @@ require_once __DIR__.'/../inc/global.inc.php';
 $this_section = SECTION_COURSES;
 
 // Access restrictions.
-$is_allowedToTrack = api_is_platform_admin() || api_is_allowed_to_create_course() || api_is_session_admin() || api_is_drh() || api_is_course_tutor();
+$is_allowedToTrack = api_is_platform_admin() || api_is_allowed_to_create_course() ||
+    api_is_session_admin() || api_is_drh() || api_is_course_tutor();
 
 if (!$is_allowedToTrack) {
     api_not_allowed(true);

+ 12 - 11
main/tracking/course_log_groups.php

@@ -14,7 +14,8 @@ if ($from == 'myspace') {
 }
 
 // Access restrictions.
-$is_allowedToTrack = api_is_platform_admin() || api_is_allowed_to_create_course() || api_is_session_admin() || api_is_drh() || api_is_course_tutor();
+$is_allowedToTrack = api_is_platform_admin() || api_is_allowed_to_create_course() ||
+    api_is_session_admin() || api_is_drh() || api_is_course_tutor();
 
 if (!$is_allowedToTrack) {
     api_not_allowed(true);
@@ -109,16 +110,16 @@ $htmlHeadXtra[] = api_get_jqgrid_js();
 $htmlHeadXtra[] = '
 <script>
 $(function() {
-    '.Display::grid_js(
-        'group_users',
-        $url,
-        $columns,
-        $column_model,
-        $extra_params,
-        [],
-        $action_links,
-        true
-    ).'
+'.Display::grid_js(
+    'group_users',
+    $url,
+    $columns,
+    $column_model,
+    $extra_params,
+    [],
+    $action_links,
+    true
+).'
 });
 </script>';
 

+ 2 - 1
main/tracking/course_log_resources.php

@@ -19,7 +19,8 @@ if ($from == 'myspace') {
 }
 
 // Access restrictions.
-$is_allowedToTrack = api_is_platform_admin() || api_is_allowed_to_create_course() || api_is_session_admin() || api_is_drh() || api_is_course_tutor();
+$is_allowedToTrack = api_is_platform_admin() || api_is_allowed_to_create_course() ||
+    api_is_session_admin() || api_is_drh() || api_is_course_tutor();
 
 if (!$is_allowedToTrack) {
     api_not_allowed(true);

+ 2 - 1
main/tracking/course_log_tools.php

@@ -23,7 +23,8 @@ if ($from == 'myspace') {
 }
 
 // Access restrictions.
-$is_allowedToTrack = api_is_platform_admin() || api_is_allowed_to_create_course() || api_is_session_admin() || api_is_drh() || api_is_course_tutor();
+$is_allowedToTrack = api_is_platform_admin() || api_is_allowed_to_create_course() ||
+    api_is_session_admin() || api_is_drh() || api_is_course_tutor();
 
 if (!$is_allowedToTrack) {
     api_not_allowed();

+ 11 - 11
main/upload/form.document.php

@@ -11,25 +11,25 @@
  * Just display the form needed to upload a SCORM and give its settings
  */
 $nameTools = get_lang('FileUpload');
-$interbreadcrumb[] = ["url"=>"../lp/lp_controller.php?action=list", "name"=> get_lang(TOOL_DOCUMENT)];
+$interbreadcrumb[] = ["url" => "../lp/lp_controller.php?action=list", "name" => get_lang(TOOL_DOCUMENT)];
 Display::display_header($nameTools, "Doc");
-//show the title
+// Show the title
 api_display_tool_title($nameTools.$add_group_to_title);
 ?>
 
 <div id="dynamic_div" style="display:block;margin-left:40%;margin-top:10px;height:50px;">
 </div>
 <div id="upload_form_div" name="form_div" style="display:block;">
-	<form method="POST" action="upload.php" id="upload_form" enctype="multipart/form-data" onsubmit="javascript: myUpload.start('dynamic_div','progressbar_green.gif','<?php echo(get_lang('Uploading', '')); ?>','upload_form_div');">
-		<input type="hidden" name="curdirpath" value="<?php echo $path; ?>">
-		<input type="hidden" name="tool" value="<?php echo $my_tool; ?>">
-		<input type="file" name="user_file">
-		<input type="submit" name="submit" value="Upload">
-	</form>
+    <form method="POST" action="upload.php" id="upload_form"
+          enctype="multipart/form-data"
+          onsubmit="javascript: myUpload.start('dynamic_div','progressbar_green.gif','<?php echo(get_lang('Uploading', '')); ?>', 'upload_form_div');">
+        <input type="hidden" name="curdirpath" value="<?php echo $path; ?>">
+        <input type="hidden" name="tool" value="<?php echo $my_tool; ?>">
+        <input type="file" name="user_file">
+        <input type="submit" name="submit" value="Upload">
+    </form>
 </div>
 <br/>
 <?php
-/*
-        FOOTER
-*/
+
 Display::display_footer();

+ 0 - 38
main/upload/form.scorm.php

@@ -85,46 +85,8 @@ if (api_get_setting('search_enabled') == 'true') {
 if (api_is_platform_admin()) {
     $form->addElement('checkbox', 'use_max_score', null, get_lang('UseMaxScore100'));
 }
-
-/* This is a special section that has to be enabled in specific cases
- * PLEASE DO NOT REMOVE
-$list = get_zip_files_in_garbage();
-if (count($list)>0) {
-    $select_file_name = &$form->addElement(
-        'select',
-        'file_name',
-        get_lang('Or').' '.api_strtolower(get_lang('UploadLocalFileFromGarbageDir'))
-    );
-    foreach($list as $file){
-        $select_file_name->addOption($file, $file);
-    }
-    $form->addElement('submit', 'submit', get_lang('Download'));
-} else {
-    $text_empty = &$form->addElement(
-        'text',
-        'empty',
-        get_lang('Or').' '.api_strtolower(get_lang('UploadLocalFileFromGarbageDir'))
-    );
-    $defaults["empty"] = get_lang('Empty');
-    $text_empty->freeze();
-}*/
-
 $form->addButtonUpload(get_lang('Upload'));
 
-/*
-TODO: check the pens plugin is enabled before using it
-if (is_dir(api_get_path(PLUGIN_PATH)."/pens")) {
-    require_once api_get_path(PLUGIN_PATH)."/pens/chamilo_pens.php";
-    $list = ChamiloPens::findAll();
-    if (count($list) > 0) {
-        $select_pens = $form->addElement('select', 'pens_package', get_lang('Or').' '.get_lang('select a PENS package'));
-        foreach ($list as $package) {
-            $select_pens->addOption($package->getPackageName(), $package->getPackageName());
-        }
-    }
-}
-*/
-
 // the default values for the form
 $defaults = ['index_document' => 'checked="checked"', 'use_max_score' => 1];
 $form->setDefaults($defaults);

+ 7 - 1
main/upload/upload_ppt.php

@@ -32,7 +32,13 @@ if (isset($_POST['convert'])) {
                             foreach ($values as $value) {
                                 $value = trim($value);
                                 if (!empty($value)) {
-                                    add_specific_field_value($specific_field['id'], api_get_course_id(), TOOL_LEARNPATH, $o_ppt->lp_id, $value);
+                                    add_specific_field_value(
+                                        $specific_field['id'],
+                                        api_get_course_id(),
+                                        TOOL_LEARNPATH,
+                                        $o_ppt->lp_id,
+                                        $value
+                                    );
                                 }
                             }
                         }

+ 16 - 7
main/upload/upload_word.php

@@ -50,7 +50,13 @@ if (isset($_POST['convert'])) {
                             foreach ($values as $value) {
                                 $value = trim($value);
                                 if (!empty($value)) {
-                                    add_specific_field_value($specific_field['id'], api_get_course_id(), TOOL_LEARNPATH, $o_doc->lp_id, $value);
+                                    add_specific_field_value(
+                                        $specific_field['id'],
+                                        api_get_course_id(),
+                                        TOOL_LEARNPATH,
+                                        $o_doc->lp_id,
+                                        $value
+                                    );
                                 }
                             }
                         }
@@ -81,7 +87,8 @@ $interbreadcrumb[] = ["url"=>"../lp/lp_controller.php?action=list", "name"=> get
 $nameTools = get_lang("WoogieConversionPowerPoint");
 Display :: display_header($nameTools);
 
-echo '<span style="color: #5577af; font-size: 16px; font-family: Arial; margin-left: 10px;">'.get_lang("WelcomeWoogieSubtitle").'</span><br>';
+echo '<span style="color: #5577af; font-size: 16px; font-family: Arial; margin-left: 10px;">'.
+    get_lang("WelcomeWoogieSubtitle").'</span><br>';
 $message = get_lang("WelcomeWoogieConverter");
 echo '<br />';
 $s_style = "border-width: 1px;
@@ -112,11 +119,13 @@ $s_style_error = "border-width: 1px;
 
 
 echo '<div style="'.$s_style.'"><div style="float:left; margin-right:10px;">
-<img src="'.Display::returnIconPath('message_normal.gif').'" alt="'.$alt_text.'" '.$attribute_list.'  /></div><div style="margin-left: 43px">'.$message.'</div></div>';
+<img src="'.Display::returnIconPath('message_normal.gif').'" alt="'.$alt_text.'" '.$attribute_list.'  /></div>
+<div style="margin-left: 43px">'.$message.'</div></div>';
 
 if (!empty($errorMessage)) {
     echo '<div style="'.$s_style_error.'"><div style="float:left; margin-right:10px;">
-    <img src="'.Display::returnIconPath('message_error.gif').'" alt="'.$alt_text.'" '.$attribute_list.'  /></div><div style="margin-left: 43px">'.$errorMessage.'</div></div>';
+    <img src="'.Display::returnIconPath('message_error.gif').'" alt="'.$alt_text.'" '.$attribute_list.'  /></div>
+    <div style="margin-left: 43px">'.$errorMessage.'</div></div>';
 }
 
 $form = new FormValidator('update_course', 'POST', '', '', 'style="margin: 0;"');
@@ -174,9 +183,9 @@ $form->addElement('hidden', 'split_steps', 'per_page');
 $form->addElement('submit', 'convert', get_lang('ConvertToLP'), 'class="convert_button"');
 $form->addElement('hidden', 'woogie', 'true');
 $form->addProgress();
-$defaults = ['split_steps'=>'per_page', 'index_document'=>'checked="checked"'];
-$form -> setDefaults($defaults);
+$defaults = ['split_steps' => 'per_page', 'index_document' => 'checked="checked"'];
+$form->setDefaults($defaults);
 
 // display the form
-$form -> display();
+$form->display();
 Display::display_footer();

+ 8 - 13
main/user/add_users_to_session.php

@@ -201,7 +201,7 @@ if ($allowTutors == 'true') {
                     }
                 }
 
-                $xajax_response -> addAssign('ajax_list_users_single', 'innerHTML', api_utf8_encode($return));
+                $xajax_response->addAssign('ajax_list_users_single', 'innerHTML', api_utf8_encode($return));
             } else {
                 $return .= '<select id="origin_users" name="nosessionUsersList[]" multiple="multiple" size="15" style="width:360px;">';
                 while ($user = Database :: fetch_array($rs)) {
@@ -209,7 +209,7 @@ if ($allowTutors == 'true') {
                     $return .= '<option value="'.$user['user_id'].'">'.$person_name.' ('.$user['username'].')</option>';
                 }
                 $return .= '</select>';
-                $xajax_response -> addAssign('ajax_list_users_multiple', 'innerHTML', api_utf8_encode($return));
+                $xajax_response->addAssign('ajax_list_users_multiple', 'innerHTML', api_utf8_encode($return));
             }
         }
 
@@ -217,14 +217,12 @@ if ($allowTutors == 'true') {
     }
 
     $xajax->processRequests();
-
     $htmlHeadXtra[] = $xajax->getJavascript('../inc/lib/xajax/');
     $htmlHeadXtra[] = '<script>
     function add_user_to_session (code, content) {
         document.getElementById("user_to_add").value = "";
         document.getElementById("ajax_list_users_single").innerHTML = "";
         destination = document.getElementById("destination_users");
-
         for (i=0;i<destination.length;i++) {
             if(destination.options[i].text == content) {
                     return false;
@@ -261,9 +259,7 @@ if ($allowTutors == 'true') {
         $("#user_with_any_session_id").attr("checked", false);
         xajax_search_users(val,"multiple");
     }
-
     </script>';
-
     $form_sent = 0;
     $firstLetterUser = $firstLetterSession = '';
     $UserList = $SessionList = [];
@@ -288,9 +284,7 @@ if ($allowTutors == 'true') {
 
     $session_info = SessionManager::fetch($id_session);
     Display::display_header($tool_name);
-
     $nosessionUsersList = $sessionUsersList = [];
-
     $ajax_search = $add_type === 'unique' ? true : false;
 
     $order_clause = api_sort_by_first_name() ? ' ORDER BY firstname, lastname, username' : ' ORDER BY lastname, firstname, username';
@@ -473,18 +467,21 @@ if ($allowTutors == 'true') {
     }
 
     if ($add_type === 'multiple') {
-        $link_add_type_unique = '<a href="'.api_get_self().'?id_session='.$id_session.'&add='.Security::remove_XSS($_GET['add']).'&add_type=unique">'.Display::return_icon('single.gif').get_lang('SessionAddTypeUnique').'</a>';
+        $link_add_type_unique = '<a href="'.api_get_self().'?id_session='.$id_session.'&add='.Security::remove_XSS($_GET['add']).'&add_type=unique">'.
+            Display::return_icon('single.gif').get_lang('SessionAddTypeUnique').'</a>';
         $link_add_type_multiple = Display::return_icon('multiple.gif').get_lang('SessionAddTypeMultiple');
     } else {
         $link_add_type_unique = Display::return_icon('single.gif').get_lang('SessionAddTypeUnique');
-        $link_add_type_multiple = '<a href="'.api_get_self().'?id_session='.$id_session.'&add='.Security::remove_XSS($_GET['add']).'&add_type=multiple">'.Display::return_icon('multiple.gif').get_lang('SessionAddTypeMultiple').'</a>';
+        $link_add_type_multiple = '<a href="'.api_get_self().'?id_session='.$id_session.'&add='.Security::remove_XSS($_GET['add']).'&add_type=multiple">'.
+            Display::return_icon('multiple.gif').get_lang('SessionAddTypeMultiple').'</a>';
     }
     $link_add_group = '<a href="usergroups.php">'.
             Display::return_icon('multiple.gif', get_lang('RegistrationByUsersGroups')).get_lang('RegistrationByUsersGroups').'</a>'; ?>
     <div class="actions">
         <?php echo $link_add_type_unique ?>&nbsp;|&nbsp;<?php echo $link_add_type_multiple ?>&nbsp;|&nbsp;<?php echo $link_add_group; ?>
     </div>
-    <form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?page=<?php echo $page; ?>&id_session=<?php echo $id_session; ?><?php if (!empty($_GET['add'])) {
+    <form name="formulaire" method="post"
+          action="<?php echo api_get_self(); ?>?page=<?php echo $page; ?>&id_session=<?php echo $id_session; ?><?php if (!empty($_GET['add'])) {
                 echo '&add=true';
             } ?>" style="margin:0px;" <?php if ($ajax_search) {
                 echo ' onsubmit="valide();"';
@@ -523,7 +520,6 @@ if ($allowTutors == 'true') {
         <div class="span5">
             <div class="multiple_select_header">
                 <b><?php echo get_lang('UserListInPlatform') ?> :</b>
-
             <?php if ($add_type == 'multiple') {
         ?>
                 <?php echo get_lang('FirstLetterUser'); ?> :
@@ -653,7 +649,6 @@ if ($allowTutors == 'true') {
         document.forms.formulaire.submit();
     }
 
-
     function loadUsersInSelect(select)
     {
         var xhr_object = null;

+ 2 - 2
main/user/classes.php

@@ -46,8 +46,8 @@ if (!empty($usergroup_list)) {
     }
 }
 
-Display :: display_header($tool_name, 'Classes');
+Display::display_header($tool_name, 'Classes');
 
 echo $content;
 
-Display :: display_footer();
+Display::display_footer();

+ 1 - 2
main/user/resume_session.php

@@ -238,8 +238,7 @@ if ($allowTutors === 'true') {
         $result = Database::query($sql);
         $courses = Database::store_result($result);
         foreach ($courses as $course) {
-            //select the number of users
-
+            // Select the number of users
             $sql = "SELECT count(*) FROM $tbl_session_rel_user sru, $tbl_session_rel_course_rel_user srcru
                     WHERE
                         srcru.user_id = sru.user_id AND