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',
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'],
['PageBreak', 'ShowBlocks', 'Source'],
['Toolbarswitch'],
@ -117,7 +117,7 @@ class Survey extends Basic
'TextColor',
'BGColor',
api_get_configuration_value('translate_html') ? 'Language' : '',
'Source'
'Source',
],
['Toolbarswitch'],
];

@ -16,7 +16,7 @@ class SurveyQuestion extends Basic
*/
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();
} else {
$config['toolbar_minToolbar'] = $this->getMinimizedToolbar();
@ -25,6 +25,7 @@ class SurveyQuestion extends Basic
return $config;
}
/**
* Get the toolbar configuration when CKEditor is maximized.
*
@ -68,10 +69,10 @@ class SurveyQuestion extends Basic
'BGColor',
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'],
['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'],
];
}
@ -101,10 +102,8 @@ class SurveyQuestion extends Basic
'BGColor',
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'],
];
}
}

@ -915,7 +915,7 @@ class ResourceController extends AbstractResourceController implements CourseCon
$disposition = $response->headers->makeDisposition(
ResponseHeaderBag::DISPOSITION_ATTACHMENT,
Transliterator::transliterate($zipName)
$zipName //Transliterator::transliterate($zipName)
);
$response->headers->set('Content-Disposition', $disposition);
$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'));
}
//$fileName = $resourceFile->getOriginalName();
$fileName = $resourceNode->getSlug();
$filePath = $resourceFile->getFile()->getPathname();
$mimeType = $resourceFile->getMimeType();
@ -1117,7 +1116,6 @@ class ResourceController extends AbstractResourceController implements CourseCon
$stream = $repo->getResourceNodeFileStream($resourceNode);
//$stream = $this->fs->readStream($resourceNode);
$response = new StreamedResponse(function () use ($stream): void {
stream_copy_to_stream($stream, fopen('php://output', 'wb'));
});

Loading…
Cancel
Save