Minor: Format code

pull/4495/head
Angel Fernando Quiroz Campos 3 years ago
parent 8eac6109a4
commit 2a997289e8
  1. 2
      main/admin/skill_level.php
  2. 2
      main/auth/cas/cas_var.inc.php
  3. 4
      main/cron/import_csv.php
  4. 38
      main/inc/lib/document.lib.php
  5. 2
      main/inc/lib/extra_field.lib.php
  6. 2
      src/Chamilo/CoreBundle/Entity/Portfolio.php
  7. 2
      src/Chamilo/CoreBundle/Entity/PortfolioAttachment.php
  8. 2
      src/Chamilo/CoreBundle/Entity/PortfolioCategory.php
  9. 2
      src/Chamilo/CoreBundle/Entity/PortfolioComment.php
  10. 2
      src/Chamilo/CoreBundle/Entity/PortfolioRelTag.php

@ -59,7 +59,7 @@ if (!empty($item)) {
]);
} elseif (!empty($profileId)) {
$form->setDefaults([
'profile_id' => $profileId
'profile_id' => $profileId,
]);
}

@ -49,7 +49,7 @@ if (api_is_cas_activated()) {
}
}
phpCAS::client($version, $hostname, $port, $uri, $serviceBaseUrl);
phpCAS::client($version, $hostname, $port, $uri, $serviceBaseUrl);
if (is_array($cas) && array_key_exists('noCasServerValidation', $cas) && $cas['noCasServerValidation']) {
phpCAS::setNoCasServerValidation();

@ -3606,8 +3606,9 @@ class ImportCsv
fwrite($f, '";');
}*/
}
/**
* Get custom tpl for mail welcome
* Get custom tpl for mail welcome.
*/
private function getCustomMailTemplate(): string
{
@ -3626,6 +3627,7 @@ class ImportCsv
// If none has been found, it means we don't have a custom mail
// welcome message, so use the .dist version
$alternateName = 'mail/custom_calendar_welcome.dist.tpl';
return 'default/'.$alternateName;
}
}

@ -7015,6 +7015,25 @@ class DocumentManager
}
}
/**
* It gest extra value to define if download icon is visible or not.
*
* @param $documentId
*
* @return bool
*/
public static function getHideDownloadIcon($documentId)
{
$extraFieldValue = new ExtraFieldValue('document');
$extraValue = $extraFieldValue->get_values_by_handler_and_field_variable($documentId, 'can_be_downloaded');
$canBeDownloadedIcon = false;
if (!empty($extraValue) && isset($extraValue['value'])) {
$canBeDownloadedIcon = (bool) $extraValue['value'];
}
return $canBeDownloadedIcon;
}
/**
* Parse file information into a link.
*
@ -7471,23 +7490,4 @@ class DocumentManager
return $btn;
}
/**
* It gest extra value to define if download icon is visible or not.
*
* @param $documentId
*
* @return bool
*/
public static function getHideDownloadIcon($documentId)
{
$extraFieldValue = new ExtraFieldValue('document');
$extraValue = $extraFieldValue->get_values_by_handler_and_field_variable($documentId, 'can_be_downloaded');
$canBeDownloadedIcon = false;
if (!empty($extraValue) && isset($extraValue['value'])) {
$canBeDownloadedIcon = (bool) $extraValue['value'];
}
return $canBeDownloadedIcon;
}
}

@ -207,7 +207,7 @@ class ExtraField extends Model
'lp_view',
'course_announcement',
'message',
'document'
'document',
];
if (api_get_configuration_value('allow_scheduled_announcements')) {

@ -24,7 +24,7 @@ use Doctrine\ORM\Mapping as ORM;
* }
* )
* Add @ to the next line if api_get_configuration_value('allow_portfolio_tool') is true
* ORM\Entity(repositoryClass="Chamilo\CoreBundle\Entity\Repository\PortfolioRepository")
* @ORM\Entity(repositoryClass="Chamilo\CoreBundle\Entity\Repository\PortfolioRepository")
*/
class Portfolio
{

@ -13,7 +13,7 @@ use Doctrine\ORM\Mapping as ORM;
*
* @ORM\Table(name="portfolio_attachment")
* Add @ to the next line if api_get_configuration_value('allow_portfolio_tool') is true
* ORM\Entity(repositoryClass="Chamilo\CoreBundle\Entity\Repository\PortfolioAttachmentRepository")
* @ORM\Entity(repositoryClass="Chamilo\CoreBundle\Entity\Repository\PortfolioAttachmentRepository")
*/
class PortfolioAttachment
{

@ -20,7 +20,7 @@ use Doctrine\ORM\Mapping as ORM;
* }
* )
* Add @ to the next line if api_get_configuration_value('allow_portfolio_tool') is true
* ORM\Entity()
* @ORM\Entity()
*/
class PortfolioCategory
{

@ -18,7 +18,7 @@ use Gedmo\Mapping\Annotation as Gedmo;
* @Gedmo\Tree(type="nested")
* @ORM\Table(name="portfolio_comment")
* Add @ to the next line if api_get_configuration_value('allow_portfolio_tool') is true
* ORM\Entity(repositoryClass="Chamilo\CoreBundle\Entity\Repository\PortfolioCommentRepository")
* @ORM\Entity(repositoryClass="Chamilo\CoreBundle\Entity\Repository\PortfolioCommentRepository")
*/
class PortfolioComment
{

@ -8,7 +8,7 @@ use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Table(name="portfolio_rel_tag")
* ORM\Entity()
* @ORM\Entity()
*/
class PortfolioRelTag
{

Loading…
Cancel
Save