Minor: Format code

pull/4737/head
Angel Fernando Quiroz Campos 2 years ago
parent 6c301e0460
commit aa417d2645
  1. 3
      main/admin/add_users_to_usergroup.php
  2. 2
      main/gradebook/gradebook_display_certificate.php
  3. 8
      main/gradebook/lib/fe/gradebooktable.class.php
  4. 7
      main/inc/ajax/document.ajax.php
  5. 6
      main/inc/lib/myspace.lib.php
  6. 2
      main/mySpace/access_details_session.php

@ -323,7 +323,8 @@ function formatCompleteName(array $userInfo, bool $orderListByOfficialCode): str
{ {
if ($orderListByOfficialCode) { if ($orderListByOfficialCode) {
$officialCode = !empty($userInfo['official_code']) ? $userInfo['official_code'].' - ' : '? - '; $officialCode = !empty($userInfo['official_code']) ? $userInfo['official_code'].' - ' : '? - ';
return $officialCode.$userInfo['complete_name_with_username'];
return $officialCode.$userInfo['complete_name_with_username'];
} }
$officialCode = !empty($userInfo['official_code']) ? ' - '.$userInfo['official_code'] : null; $officialCode = !empty($userInfo['official_code']) ? ' - '.$userInfo['official_code'] : null;

@ -173,7 +173,7 @@ switch ($action) {
} }
break; break;
case 'download_certificates_report': case 'download_certificates_report':
$exportData = array_map(function($learner) { $exportData = array_map(function ($learner) {
return [ return [
$learner['user_id'], $learner['user_id'],
$learner['username'], $learner['username'],

@ -117,7 +117,7 @@ class GradebookTable extends SortableTable
} }
if ($showWeight) { if ($showWeight) {
$this->set_header($column++, get_lang('Weight'), false, $styleTextRight100, $styleTextRight100); $this->set_header($column++, get_lang('Weight'), false, $styleTextRight100, $styleTextRight100);
} }
if (!$this->teacherView) { if (!$this->teacherView) {
$this->set_header($column++, get_lang('Result'), false, $styleTextRight, $styleTextRight); $this->set_header($column++, get_lang('Result'), false, $styleTextRight, $styleTextRight);
@ -126,13 +126,13 @@ class GradebookTable extends SortableTable
if (empty($model)) { if (empty($model)) {
if (in_array(1, $this->loadStats)) { if (in_array(1, $this->loadStats)) {
$this->set_header($column++, get_lang('Ranking'), false, $styleTextRight100, $styleTextRight100); $this->set_header($column++, get_lang('Ranking'), false, $styleTextRight100, $styleTextRight100);
} }
if (in_array(2, $this->loadStats)) { if (in_array(2, $this->loadStats)) {
$this->set_header($column++, get_lang('BestScore'), false, $styleTextRight120, $styleTextRight120); $this->set_header($column++, get_lang('BestScore'), false, $styleTextRight120, $styleTextRight120);
} }
if (in_array(3, $this->loadStats)) { if (in_array(3, $this->loadStats)) {
$this->set_header($column++, get_lang('Average'), false, $styleTextRight100, $styleTextRight100); $this->set_header($column++, get_lang('Average'), false, $styleTextRight100, $styleTextRight100);
} }
} }
if ($this->teacherView) { if ($this->teacherView) {

@ -74,7 +74,6 @@ switch ($action) {
]); ]);
exit; exit;
} else { } else {
// User access same as upload.php // User access same as upload.php
$is_allowed_to_edit = api_is_allowed_to_edit(null, true); $is_allowed_to_edit = api_is_allowed_to_edit(null, true);
@ -93,7 +92,11 @@ switch ($action) {
$groupInfo = GroupManager::get_group_properties(api_get_group_id()); $groupInfo = GroupManager::get_group_properties(api_get_group_id());
// Only course admin or group members allowed // Only course admin or group members allowed
if ($is_allowed_to_edit || GroupManager::is_user_in_group(api_get_user_id(), $groupInfo)) { if ($is_allowed_to_edit || GroupManager::is_user_in_group(api_get_user_id(), $groupInfo)) {
if (!GroupManager::allowUploadEditDocument(api_get_user_id(), api_get_course_int_id(), $groupInfo)) { if (!GroupManager::allowUploadEditDocument(
api_get_user_id(),
api_get_course_int_id(),
$groupInfo
)) {
exit; exit;
} }
} else { } else {

@ -3618,10 +3618,10 @@ class MySpace
api_get_person_name(api_get_setting('administratorName'), api_get_setting('administratorSurname'))."\n". api_get_person_name(api_get_setting('administratorName'), api_get_setting('administratorSurname'))."\n".
get_lang('Manager')." ".api_get_setting('siteName')."\nT. ". get_lang('Manager')." ".api_get_setting('siteName')."\nT. ".
api_get_setting('administratorTelephone')."\n".get_lang('Email')." : ".api_get_setting('emailAdministrator'); api_get_setting('administratorTelephone')."\n".get_lang('Email')." : ".api_get_setting('emailAdministrator');
$emailbody = nl2br($emailbody); $emailbody = nl2br($emailbody);
MessageManager::send_message_simple($user['id'], $emailsubject, $emailbody, 0, false, false, array(), false); MessageManager::send_message_simple($user['id'], $emailsubject, $emailbody, 0, false, false, [], false);
$userInfo = api_get_user_info($user['id']); $userInfo = api_get_user_info($user['id']);
if (($user['added_at_platform'] == 1 && $user['added_at_session'] == 1) || $user['added_at_session'] == 1) { if (($user['added_at_platform'] == 1 && $user['added_at_session'] == 1) || $user['added_at_session'] == 1) {

@ -588,7 +588,7 @@ if ($formByDay->validate()) {
$formByDay->setDefaults(['from' => $startDate, 'to' => $endDate]); $formByDay->setDefaults(['from' => $startDate, 'to' => $endDate]);
Display::display_header(''); Display::display_header('');
echo Display::page_header(get_lang('CertificateOfAchievement'),get_lang('CertificateOfAchievementHelp')); echo Display::page_header(get_lang('CertificateOfAchievement'), get_lang('CertificateOfAchievementHelp'));
echo Display::page_subheader( echo Display::page_subheader(
get_lang('User').': '.$userInfo['complete_name'] get_lang('User').': '.$userInfo['complete_name']
); );

Loading…
Cancel
Save