Minor - clean code with php-cs-fixer

pull/4298/head
Christian 3 years ago
parent 19b4e31c45
commit f073aa56e5
  1. 4
      main/exercise/exercise.class.php
  2. 6
      main/exercise/question.class.php
  3. 1
      main/inc/lib/skill.lib.php
  4. 10
      main/inc/lib/tracking.lib.php
  5. 4
      main/inc/lib/usermanager.lib.php
  6. 2
      main/lp/lp_list.php
  7. 5
      main/mySpace/progress_in_session_report.php

@ -1920,8 +1920,10 @@ class Exercise
* Marks the exercise as deleted.
* If $delete argument set, completely deletes it from the database.
* Note: leaves the questions in the database as "orphan" questions
* (unless used by other tests)
* (unless used by other tests).
*
* @param bool $delete Whether to really delete the test (true) or only mark it (false = default)
*
* @return bool Whether the operation was successful or not
*
* @author Olivier Brouckaert

@ -1358,7 +1358,7 @@ abstract class Question
* @author Olivier Brouckaert
*
* @param int $exerciseId - exercise ID
* @param int $courseId The ID of the course, to avoid deleting re-used questions
* @param int $courseId The ID of the course, to avoid deleting re-used questions
*
* @return bool - true if removed, otherwise false
*/
@ -1417,10 +1417,8 @@ abstract class Question
*
* @author Olivier Brouckaert
*
* @param int $deleteFromEx Exercise ID if the question is only to be removed from one exercise
* @param int $deleteFromEx Exercise ID if the question is only to be removed from one exercise
* @param bool $deletePicture Allow for special cases where the picture would be better left alone
*
* @return bool
*/
public function delete(int $deleteFromEx = 0, bool $deletePicture = true): bool
{

@ -584,7 +584,6 @@ class SkillRelUser extends Model
$whereConditions['AND course_id = ? AND session_id is NULL'] = $courseId;
}
$result = Database::select(
'skill_id',
$this->table,

@ -2619,11 +2619,11 @@ class Tracking
/**
* Calculates the time spent on the course.
*
* @param int $user_id
* @param int $courseId
* @param int $session_id
* @param string $startDate date string
* @param string $endDate date string
* @param int $user_id
* @param int $courseId
* @param int $session_id
* @param string $startDate date string
* @param string $endDate date string
*
* @return int Time in seconds
*/

@ -5953,8 +5953,8 @@ class UserManager
* @param string $course_code The course code
* @param int $session_id
* @param int $user_id The user id
* @param string $startDate date string
* @param string $endDate date string
* @param string $startDate date string
* @param string $endDate date string
*
* @return array if there is not information return false
*/

@ -358,7 +358,7 @@ foreach ($categories as $item) {
$oddclass = 'row_odd';
}
$url_start_lp = 'lp_controller.php?'.$cidReq.'&action=view&lp_id='.$id;
$url_start_lp = 'lp_controller.php?'.$cidReq.'&action=view&lp_id='.$id;
if (api_get_configuration_value('save_titles_as_html')) {
$name = trim(Security::remove_XSS($details['lp_name']));
} else {

@ -16,7 +16,7 @@ $toolName = get_lang('ProgressInSessionReport');
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'mySpace/index.php',
'name' => get_lang('Reporting')
'name' => get_lang('Reporting'),
];
$interbreadcrumb[] = [
'url' => api_get_path(WEB_CODE_PATH).'mySpace/session.php',
@ -40,7 +40,6 @@ $actions .= Display::url(
api_get_self().'?export=xls'
);
if (api_is_platform_admin()) {
$sessionList = SessionManager::get_sessions_list();
} elseif (api_is_drh()) {
@ -126,7 +125,7 @@ if ($form->validate()) {
$endDate
);
$users[$userId][$courseCode.'_progress'] = is_numeric($progress) ? "$progress %" : '0 %';
$users[$userId][$courseCode.'_certificate'] = $infoGradeCertificate ? get_lang('Yes') : get_lang('No');;
$users[$userId][$courseCode.'_certificate'] = $infoGradeCertificate ? get_lang('Yes') : get_lang('No');
}
}
}

Loading…
Cancel
Save