@@ -27,12 +27,12 @@ discard block |
||
| 27 | 27 | if (!empty($courseInfo)) { |
| 28 | 28 | |
| 29 | 29 | $coursePath = api_get_path(SYS_COURSE_PATH); |
| 30 | - $courseDir = $courseInfo['directory'] . '/document'; |
|
| 31 | - $baseDir = $coursePath . $courseDir; |
|
| 30 | + $courseDir = $courseInfo['directory'].'/document'; |
|
| 31 | + $baseDir = $coursePath.$courseDir; |
|
| 32 | 32 | |
| 33 | 33 | // Creates shared folder |
| 34 | 34 | |
| 35 | - if (!file_exists($baseDir . '/shared_folder')) { |
|
| 35 | + if (!file_exists($baseDir.'/shared_folder')) { |
|
| 36 | 36 | $title = get_lang('UserFolders'); |
| 37 | 37 | $folderName = '/shared_folder'; |
| 38 | 38 | //$groupId = 0; |
@@ -51,9 +51,9 @@ discard block |
||
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | // Creates user-course folder |
| 54 | - if (!file_exists($baseDir . '/shared_folder/sf_user_' . $userId)) { |
|
| 54 | + if (!file_exists($baseDir.'/shared_folder/sf_user_'.$userId)) { |
|
| 55 | 55 | $title = $userInfo['complete_name']; |
| 56 | - $folderName = '/shared_folder/sf_user_' . $userId; |
|
| 56 | + $folderName = '/shared_folder/sf_user_'.$userId; |
|
| 57 | 57 | $visibility = 1; |
| 58 | 58 | create_unexisting_directory( |
| 59 | 59 | $courseInfo, |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | $this->time = $this->utime(); |
| 32 | 32 | $this->debug = (isset($opts['debug']) && $opts['debug'] ? true : false); |
| 33 | 33 | $this->timeout = (isset($opts['timeout']) ? $opts['timeout'] : 0); |
| 34 | - $this->netVolumesSessionKey = !empty($opts['netVolumesSessionKey'])? $opts['netVolumesSessionKey'] : 'elFinderNetVolumes'; |
|
| 34 | + $this->netVolumesSessionKey = !empty($opts['netVolumesSessionKey']) ? $opts['netVolumesSessionKey'] : 'elFinderNetVolumes'; |
|
| 35 | 35 | $this->callbackWindowURL = (isset($opts['callbackWindowURL']) ? $opts['callbackWindowURL'] : ''); |
| 36 | 36 | |
| 37 | 37 | // setlocale and global locale regists to elFinder::locale |
@@ -46,20 +46,20 @@ discard block |
||
| 46 | 46 | $_reqCmd = isset($_req['cmd']) ? $_req['cmd'] : ''; |
| 47 | 47 | foreach ($opts['bind'] as $cmd => $handlers) { |
| 48 | 48 | $doRegist = (strpos($cmd, '*') !== false); |
| 49 | - if (! $doRegist) { |
|
| 49 | + if (!$doRegist) { |
|
| 50 | 50 | $_getcmd = create_function('$cmd', 'list($ret) = explode(\'.\', $cmd);return trim($ret);'); |
| 51 | 51 | $doRegist = ($_reqCmd && in_array($_reqCmd, array_map($_getcmd, explode(' ', $cmd)))); |
| 52 | 52 | } |
| 53 | 53 | if ($doRegist) { |
| 54 | - if (! is_array($handlers) || is_object($handlers[0])) { |
|
| 54 | + if (!is_array($handlers) || is_object($handlers[0])) { |
|
| 55 | 55 | $handlers = array($handlers); |
| 56 | 56 | } |
| 57 | - foreach($handlers as $handler) { |
|
| 57 | + foreach ($handlers as $handler) { |
|
| 58 | 58 | if ($handler) { |
| 59 | 59 | if (is_string($handler) && strpos($handler, '.')) { |
| 60 | 60 | list($_domain, $_name, $_method) = array_pad(explode('.', $handler), 3, ''); |
| 61 | 61 | if (strcasecmp($_domain, 'plugin') === 0) { |
| 62 | - if ($plugin = $this->getPluginInstance($_name, isset($opts['plugin'][$_name])? $opts['plugin'][$_name] : array()) |
|
| 62 | + if ($plugin = $this->getPluginInstance($_name, isset($opts['plugin'][$_name]) ? $opts['plugin'][$_name] : array()) |
|
| 63 | 63 | and method_exists($plugin, $_method)) { |
| 64 | 64 | $this->bind($cmd, array($plugin, $_method)); |
| 65 | 65 | } |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord'], |
| 55 | 55 | ['Undo', 'Redo', '-', 'SelectAll', 'Find', '-', 'RemoveFormat'], |
| 56 | 56 | ['Link', 'Unlink', 'Anchor', 'Glossary'], |
| 57 | - ['Image', 'Mapping', 'Video', 'Oembed', 'Youtube', 'Flash', 'Audio', 'leaflet', 'Smiley', 'SpecialChar', 'Asciimath',], |
|
| 57 | + ['Image', 'Mapping', 'Video', 'Oembed', 'Youtube', 'Flash', 'Audio', 'leaflet', 'Smiley', 'SpecialChar', 'Asciimath', ], |
|
| 58 | 58 | '/', |
| 59 | 59 | ['Table', '-', 'CreateDiv'], |
| 60 | 60 | ['BulletedList', 'NumberedList', 'HorizontalRule', '-', 'Outdent', 'Indent', 'Blockquote'], |
@@ -18,8 +18,8 @@ |
||
| 18 | 18 | { |
| 19 | 19 | $config['toolbarGroups'] = array( |
| 20 | 20 | '/', |
| 21 | - array('name' => 'basicstyles', 'groups' =>array('basicstyles', 'cleanup', )), |
|
| 22 | - array('name' => 'paragraph', 'groups' =>array('list', 'indent', 'blocks', 'align' )), |
|
| 21 | + array('name' => 'basicstyles', 'groups' =>array('basicstyles', 'cleanup',)), |
|
| 22 | + array('name' => 'paragraph', 'groups' =>array('list', 'indent', 'blocks', 'align')), |
|
| 23 | 23 | array('name' => 'links'), |
| 24 | 24 | array('name' => 'insert'), |
| 25 | 25 | '/', |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | ], |
| 35 | 35 | [ |
| 36 | 36 | 'name' => 'links', |
| 37 | - 'items' => [ 'Link', 'Unlink', 'Anchor'] |
|
| 37 | + 'items' => ['Link', 'Unlink', 'Anchor'] |
|
| 38 | 38 | ] |
| 39 | 39 | ]; |
| 40 | 40 | |
@@ -89,7 +89,7 @@ |
||
| 89 | 89 | return [ |
| 90 | 90 | ['Save', 'NewPage', 'Templates', '-', 'PasteFromWord'], |
| 91 | 91 | ['Undo', 'Redo'], |
| 92 | - ['Link', 'Image', 'Video', 'Flash', 'Audio', 'Table', 'Asciimath'], |
|
| 92 | + ['Link', 'Image', 'Video', 'Flash', 'Audio', 'Table', 'Asciimath'], |
|
| 93 | 93 | ['BulletedList', 'NumberedList', 'HorizontalRule'], |
| 94 | 94 | ['JustifyLeft', 'JustifyCenter', 'JustifyBlock'], |
| 95 | 95 | ['Format', 'Font', 'FontSize', 'Bold', 'Italic', 'TextColor'], |
@@ -16,13 +16,13 @@ |
||
| 16 | 16 | public function getConfig() |
| 17 | 17 | { |
| 18 | 18 | $config['toolbarGroups'] = array( |
| 19 | - array('name' => 'document', 'groups' =>array('document', 'doctools')), |
|
| 20 | - array('name' => 'clipboard', 'groups' =>array('clipboard', 'undo')), |
|
| 21 | - array('name' => 'editing', 'groups' =>array('clipboard', 'undo')), |
|
| 19 | + array('name' => 'document', 'groups' =>array('document', 'doctools')), |
|
| 20 | + array('name' => 'clipboard', 'groups' =>array('clipboard', 'undo')), |
|
| 21 | + array('name' => 'editing', 'groups' =>array('clipboard', 'undo')), |
|
| 22 | 22 | //array('name' => 'forms', 'groups' =>array('clipboard', 'undo', )), |
| 23 | 23 | '/', |
| 24 | - array('name' => 'basicstyles', 'groups' =>array('basicstyles', 'cleanup')), |
|
| 25 | - array('name' => 'paragraph', 'groups' =>array('list', 'indent', 'blocks', 'align')), |
|
| 24 | + array('name' => 'basicstyles', 'groups' =>array('basicstyles', 'cleanup')), |
|
| 25 | + array('name' => 'paragraph', 'groups' =>array('list', 'indent', 'blocks', 'align')), |
|
| 26 | 26 | array('name' => 'links'), |
| 27 | 27 | array('name' => 'insert'), |
| 28 | 28 | '/', |
@@ -128,7 +128,7 @@ |
||
| 128 | 128 | return $var ? 'true' : 'false'; // Lowercase necessary! |
| 129 | 129 | case 'integer': |
| 130 | 130 | case 'double': |
| 131 | - return (string)$var; |
|
| 131 | + return (string) $var; |
|
| 132 | 132 | case 'resource': |
| 133 | 133 | case 'string': |
| 134 | 134 | return '"'.str_replace( |
@@ -137,7 +137,7 @@ |
||
| 137 | 137 | array('\r', '\n', '\x3c', '\x3e', '\x26'), |
| 138 | 138 | addslashes($var) |
| 139 | 139 | ).'"'; |
| 140 | - case 'array': |
|
| 140 | + case 'array': |
|
| 141 | 141 | // Arrays in JSON can't be associative. If the array is empty or if it |
| 142 | 142 | // has sequential whole number keys starting with 0, it's not associative |
| 143 | 143 | // so we can go ahead and convert it as an array. |
@@ -86,13 +86,13 @@ |
||
| 86 | 86 | return $this->get($file); |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | - /** |
|
| 90 | - * Gets a file from the data/courses/MATHS/scorm directory |
|
| 91 | - * @param string $courseCode |
|
| 92 | - * @param string $file |
|
| 93 | - * |
|
| 94 | - * @return SplFileInfo |
|
| 95 | - */ |
|
| 89 | + /** |
|
| 90 | + * Gets a file from the data/courses/MATHS/scorm directory |
|
| 91 | + * @param string $courseCode |
|
| 92 | + * @param string $file |
|
| 93 | + * |
|
| 94 | + * @return SplFileInfo |
|
| 95 | + */ |
|
| 96 | 96 | public function getCourseScormDocument($courseCode, $file) |
| 97 | 97 | { |
| 98 | 98 | $file = 'courses/'.$courseCode.'/scorm/'.$file; |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | |
| 117 | 117 | /** |
| 118 | 118 | * Create folders |
| 119 | - * @param array $folderList |
|
| 119 | + * @param string[] $folderList |
|
| 120 | 120 | * @param OutputInterface $output |
| 121 | 121 | * @param string $folderPermissions |
| 122 | 122 | */ |
@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | * http://chamilo/courses/ABC/document/file.jpg |
| 201 | 201 | * @param string $content |
| 202 | 202 | * |
| 203 | - * @return string |
|
| 203 | + * @return \simplehtmldom_1_5\simple_html_dom |
|
| 204 | 204 | */ |
| 205 | 205 | public function convertRelativeToAbsoluteUrl($content) |
| 206 | 206 | { |