Minor - format code

pull/3124/head
Julio Montoya 5 years ago
parent fb81ba6b64
commit aa4c592bfd
  1. 4
      src/CoreBundle/Component/Editor/CkEditor/Toolbar/Survey.php
  2. 11
      src/CoreBundle/Component/Editor/CkEditor/Toolbar/SurveyQuestion.php
  3. 4
      src/CoreBundle/Controller/ResourceController.php

@ -69,7 +69,7 @@ class Survey extends Basic
'BGColor', 'BGColor',
api_get_configuration_value('translate_html') ? 'Language' : '', api_get_configuration_value('translate_html') ? 'Language' : '',
], ],
[api_get_setting('allow_spellcheck') == 'true' ? 'Scayt' : ''], ['true' == api_get_setting('allow_spellcheck') ? 'Scayt' : ''],
['Styles', 'Format', 'Font', 'FontSize'], ['Styles', 'Format', 'Font', 'FontSize'],
['PageBreak', 'ShowBlocks', 'Source'], ['PageBreak', 'ShowBlocks', 'Source'],
['Toolbarswitch'], ['Toolbarswitch'],
@ -117,7 +117,7 @@ class Survey extends Basic
'TextColor', 'TextColor',
'BGColor', 'BGColor',
api_get_configuration_value('translate_html') ? 'Language' : '', api_get_configuration_value('translate_html') ? 'Language' : '',
'Source' 'Source',
], ],
['Toolbarswitch'], ['Toolbarswitch'],
]; ];

@ -16,7 +16,7 @@ class SurveyQuestion extends Basic
*/ */
public function getConfig() public function getConfig()
{ {
if (api_get_setting('more_buttons_maximized_mode') != 'true') { if ('true' != api_get_setting('more_buttons_maximized_mode')) {
$config['toolbar'] = $this->getNormalToolbar(); $config['toolbar'] = $this->getNormalToolbar();
} else { } else {
$config['toolbar_minToolbar'] = $this->getMinimizedToolbar(); $config['toolbar_minToolbar'] = $this->getMinimizedToolbar();
@ -25,6 +25,7 @@ class SurveyQuestion extends Basic
return $config; return $config;
} }
/** /**
* Get the toolbar configuration when CKEditor is maximized. * Get the toolbar configuration when CKEditor is maximized.
* *
@ -68,10 +69,10 @@ class SurveyQuestion extends Basic
'BGColor', 'BGColor',
api_get_configuration_value('translate_html') ? 'Language' : '', api_get_configuration_value('translate_html') ? 'Language' : '',
], ],
[api_get_setting('allow_spellcheck') == 'true' ? 'Scayt' : ''], ['true' == api_get_setting('allow_spellcheck') ? 'Scayt' : ''],
['Styles', 'Format', 'Font', 'FontSize'], ['Styles', 'Format', 'Font', 'FontSize'],
['PageBreak', 'ShowBlocks'], ['PageBreak', 'ShowBlocks'],
api_get_setting('enabled_wiris') == 'true' ? ['ckeditor_wiris_formulaEditor', 'ckeditor_wiris_CAS'] : [''], 'true' == api_get_setting('enabled_wiris') ? ['ckeditor_wiris_formulaEditor', 'ckeditor_wiris_CAS'] : [''],
['Toolbarswitch', 'Source'], ['Toolbarswitch', 'Source'],
]; ];
} }
@ -101,10 +102,8 @@ class SurveyQuestion extends Basic
'BGColor', 'BGColor',
api_get_configuration_value('translate_html') ? 'Language' : '', api_get_configuration_value('translate_html') ? 'Language' : '',
], ],
api_get_setting('enabled_wiris') == 'true' ? ['ckeditor_wiris_formulaEditor', 'ckeditor_wiris_CAS'] : [''], 'true' == api_get_setting('enabled_wiris') ? ['ckeditor_wiris_formulaEditor', 'ckeditor_wiris_CAS'] : [''],
['Toolbarswitch', 'Source'], ['Toolbarswitch', 'Source'],
]; ];
} }
} }

@ -915,7 +915,7 @@ class ResourceController extends AbstractResourceController implements CourseCon
$disposition = $response->headers->makeDisposition( $disposition = $response->headers->makeDisposition(
ResponseHeaderBag::DISPOSITION_ATTACHMENT, ResponseHeaderBag::DISPOSITION_ATTACHMENT,
Transliterator::transliterate($zipName) $zipName //Transliterator::transliterate($zipName)
); );
$response->headers->set('Content-Disposition', $disposition); $response->headers->set('Content-Disposition', $disposition);
$response->headers->set('Content-Type', 'application/octet-stream'); $response->headers->set('Content-Type', 'application/octet-stream');
@ -1079,7 +1079,6 @@ class ResourceController extends AbstractResourceController implements CourseCon
throw new NotFoundHttpException($this->trans('File not found for resource')); throw new NotFoundHttpException($this->trans('File not found for resource'));
} }
//$fileName = $resourceFile->getOriginalName();
$fileName = $resourceNode->getSlug(); $fileName = $resourceNode->getSlug();
$filePath = $resourceFile->getFile()->getPathname(); $filePath = $resourceFile->getFile()->getPathname();
$mimeType = $resourceFile->getMimeType(); $mimeType = $resourceFile->getMimeType();
@ -1117,7 +1116,6 @@ class ResourceController extends AbstractResourceController implements CourseCon
$stream = $repo->getResourceNodeFileStream($resourceNode); $stream = $repo->getResourceNodeFileStream($resourceNode);
//$stream = $this->fs->readStream($resourceNode);
$response = new StreamedResponse(function () use ($stream): void { $response = new StreamedResponse(function () use ($stream): void {
stream_copy_to_stream($stream, fopen('php://output', 'wb')); stream_copy_to_stream($stream, fopen('php://output', 'wb'));
}); });

Loading…
Cancel
Save