@@ -26,7 +26,7 @@ |
||
26 | 26 | parent::__construct('1.1', 'Valery Fremaux'); |
27 | 27 | } |
28 | 28 | |
29 | - function pix_url($pixname, $size = 16) { |
|
29 | + function pix_url($pixname, $size = 16) { |
|
30 | 30 | global $_configuration; |
31 | 31 | |
32 | 32 | if (file_exists($_configuration['root_sys'].'/plugin/customplugin/pix/'.$pixname.'.png')){ |
@@ -29,13 +29,13 @@ |
||
29 | 29 | function pix_url($pixname, $size = 16) { |
30 | 30 | global $_configuration; |
31 | 31 | |
32 | - if (file_exists($_configuration['root_sys'].'/plugin/customplugin/pix/'.$pixname.'.png')){ |
|
32 | + if (file_exists($_configuration['root_sys'].'/plugin/customplugin/pix/'.$pixname.'.png')) { |
|
33 | 33 | return $_configuration['root_web'].'/plugin/customplugin/pix/'.$pixname.'.png'; |
34 | 34 | } |
35 | - if (file_exists($_configuration['root_sys'].'/plugin/customplugin/pix/'.$pixname.'.jpg')){ |
|
35 | + if (file_exists($_configuration['root_sys'].'/plugin/customplugin/pix/'.$pixname.'.jpg')) { |
|
36 | 36 | return $_configuration['root_web'].'/plugin/customplugin/pix/'.$pixname.'.jpg'; |
37 | 37 | } |
38 | - if (file_exists($_configuration['root_sys'].'/plugin/customplugin/pix/'.$pixname.'.gif')){ |
|
38 | + if (file_exists($_configuration['root_sys'].'/plugin/customplugin/pix/'.$pixname.'.gif')) { |
|
39 | 39 | return $_configuration['root_web'].'/plugin/customplugin/pix/'.$pixname.'.gif'; |
40 | 40 | } |
41 | 41 | return $_configuration['root_web'].'/main/img/icons/'.$size.'/'.$pixname.'.png'; |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | |
17 | 17 | $listAction = api_get_self(); |
18 | 18 | |
19 | -$action = ''; |
|
19 | +$action = ''; |
|
20 | 20 | if (isset($_GET['action']) && in_array($_GET['action'], ['add', 'edit', 'delete', 'add_level'])) { |
21 | 21 | $action = $_GET['action']; |
22 | 22 | } |
@@ -49,8 +49,8 @@ discard block |
||
49 | 49 | } |
50 | 50 | $formToDisplay = $form->returnForm(); |
51 | 51 | |
52 | -$interbreadcrumb[] = array ('url' => 'index.php', 'name' => get_lang('PlatformAdmin')); |
|
53 | -$interbreadcrumb[] = array ('url' => api_get_self(), 'name' => get_lang('SkillProfile')); |
|
52 | +$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin')); |
|
53 | +$interbreadcrumb[] = array('url' => api_get_self(), 'name' => get_lang('SkillProfile')); |
|
54 | 54 | |
55 | 55 | $tpl = new Template($action); |
56 | 56 | switch ($action) { |
@@ -5,10 +5,10 @@ |
||
5 | 5 | * @author Angel Fernando Quiroz Campos <[email protected]> |
6 | 6 | * @package chamilo.plugin.tour |
7 | 7 | */ |
8 | -require_once __DIR__ . '/config.php'; |
|
8 | +require_once __DIR__.'/config.php'; |
|
9 | 9 | |
10 | -$pluginPath = api_get_path(SYS_PLUGIN_PATH) . 'tour/'; |
|
11 | -$pluginWebPath = api_get_path(WEB_PLUGIN_PATH) . 'tour/'; |
|
10 | +$pluginPath = api_get_path(SYS_PLUGIN_PATH).'tour/'; |
|
11 | +$pluginWebPath = api_get_path(WEB_PLUGIN_PATH).'tour/'; |
|
12 | 12 | |
13 | 13 | $userId = api_get_user_id(); |
14 | 14 |
@@ -129,8 +129,8 @@ |
||
129 | 129 | */ |
130 | 130 | public function getTourConfig() |
131 | 131 | { |
132 | - $pluginPath = api_get_path(SYS_PLUGIN_PATH) . 'tour/'; |
|
133 | - $jsonContent = file_get_contents($pluginPath . 'config/tour.json'); |
|
132 | + $pluginPath = api_get_path(SYS_PLUGIN_PATH).'tour/'; |
|
133 | + $jsonContent = file_get_contents($pluginPath.'config/tour.json'); |
|
134 | 134 | $jsonData = json_decode($jsonContent, true); |
135 | 135 | |
136 | 136 | return $jsonData; |
@@ -9,7 +9,7 @@ |
||
9 | 9 | |
10 | 10 | define('TABLE_TOUR_LOG', 'plugin_tour_log'); |
11 | 11 | |
12 | -require_once api_get_path(SYS_PATH) . 'main/inc/global.inc.php'; |
|
13 | -require_once api_get_path(LIBRARY_PATH) . 'plugin.class.php'; |
|
14 | -require_once api_get_path(SYS_PLUGIN_PATH) . 'tour/src/tour_plugin.class.php'; |
|
12 | +require_once api_get_path(SYS_PATH).'main/inc/global.inc.php'; |
|
13 | +require_once api_get_path(LIBRARY_PATH).'plugin.class.php'; |
|
14 | +require_once api_get_path(SYS_PLUGIN_PATH).'tour/src/tour_plugin.class.php'; |
|
15 | 15 | // Edit the config/tour.json file to add more pages or more elements to the guide |
@@ -6,8 +6,8 @@ |
||
6 | 6 | * @package chamilo.plugin.tour |
7 | 7 | */ |
8 | 8 | require_once __DIR__.'/../../../main/inc/global.inc.php'; |
9 | -require_once api_get_path(LIBRARY_PATH) . 'plugin.class.php'; |
|
10 | -require_once api_get_path(SYS_PLUGIN_PATH) . 'tour/src/tour_plugin.class.php'; |
|
9 | +require_once api_get_path(LIBRARY_PATH).'plugin.class.php'; |
|
10 | +require_once api_get_path(SYS_PLUGIN_PATH).'tour/src/tour_plugin.class.php'; |
|
11 | 11 | |
12 | 12 | if (!api_is_anonymous()) { |
13 | 13 | $currentPageClass = isset($_GET['page_class']) ? $_GET['page_class'] : ''; |
@@ -129,27 +129,27 @@ |
||
129 | 129 | |
130 | 130 | // pixlr |
131 | 131 | // max size 1 Mb ?? |
132 | -$title = urlencode(utf8_encode(get_lang('NewImage')));//TODO:check |
|
132 | +$title = urlencode(utf8_encode(get_lang('NewImage'))); //TODO:check |
|
133 | 133 | // |
134 | 134 | $image = Display::returnIconPath('canvas1024x768.png'); |
135 | 135 | // |
136 | 136 | $pixlr_code_translation_table = array('' => 'en', 'pt' => 'pt-Pt', 'sr' => 'sr_latn'); |
137 | -$langpixlr = api_get_language_isocode(); |
|
137 | +$langpixlr = api_get_language_isocode(); |
|
138 | 138 | $langpixlr = isset($pixlr_code_translation_table[$langpixlr]) ? $pixlredit_code_translation_table[$langpixlr] : $langpixlr; |
139 | -$loc=$langpixlr;// deprecated ?? TODO:check pixlr read user browser |
|
140 | - |
|
141 | -$exit_path=api_get_path(WEB_CODE_PATH).'document/exit_pixlr.php'; |
|
142 | -$_SESSION['exit_pixlr']=$document_data['path']; |
|
143 | -$referrer="Chamilo"; |
|
144 | -$target_path=api_get_path(WEB_CODE_PATH).'document/save_pixlr.php'; |
|
145 | -$target=$target_path; |
|
146 | -$locktarget="true"; |
|
147 | -$locktitle="false"; |
|
148 | - |
|
149 | -if ($_SERVER['HTTP_HOST']=="localhost") { |
|
150 | - $path_and_file= api_get_path(SYS_PATH).'/crossdomain.xml'; |
|
139 | +$loc = $langpixlr; // deprecated ?? TODO:check pixlr read user browser |
|
140 | + |
|
141 | +$exit_path = api_get_path(WEB_CODE_PATH).'document/exit_pixlr.php'; |
|
142 | +$_SESSION['exit_pixlr'] = $document_data['path']; |
|
143 | +$referrer = "Chamilo"; |
|
144 | +$target_path = api_get_path(WEB_CODE_PATH).'document/save_pixlr.php'; |
|
145 | +$target = $target_path; |
|
146 | +$locktarget = "true"; |
|
147 | +$locktitle = "false"; |
|
148 | + |
|
149 | +if ($_SERVER['HTTP_HOST'] == "localhost") { |
|
150 | + $path_and_file = api_get_path(SYS_PATH).'/crossdomain.xml'; |
|
151 | 151 | if (!file_exists($path_and_file)) { |
152 | - $crossdomain='<?xml version="1.0"?> |
|
152 | + $crossdomain = '<?xml version="1.0"?> |
|
153 | 153 | <!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd"> |
154 | 154 | <cross-domain-policy> |
155 | 155 | <allow-access-from domain="cdn.pixlr.com" /> |
@@ -52,26 +52,26 @@ discard block |
||
52 | 52 | // Please, do not modify this dirname formatting |
53 | 53 | |
54 | 54 | if (strstr($dir, '..')) { |
55 | - $dir = '/'; |
|
55 | + $dir = '/'; |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | if ($dir[0] == '.') { |
59 | - $dir = substr($dir, 1); |
|
59 | + $dir = substr($dir, 1); |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | if ($dir[0] != '/') { |
63 | - $dir = '/'.$dir; |
|
63 | + $dir = '/'.$dir; |
|
64 | 64 | } |
65 | 65 | |
66 | 66 | if ($dir[strlen($dir) - 1] != '/') { |
67 | - $dir .= '/'; |
|
67 | + $dir .= '/'; |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | $filepath = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document'.$dir; |
71 | 71 | |
72 | 72 | if (!is_dir($filepath)) { |
73 | - $filepath = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document/'; |
|
74 | - $dir = '/'; |
|
73 | + $filepath = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document/'; |
|
74 | + $dir = '/'; |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | $groupId = api_get_group_id(); |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | } |
100 | 100 | |
101 | 101 | if (!($is_allowed_to_edit || $groupRights || |
102 | - DocumentManager::is_my_shared_folder($_user['user_id'], Security::remove_XSS($dir), api_get_session_id())) |
|
102 | + DocumentManager::is_my_shared_folder($_user['user_id'], Security::remove_XSS($dir), api_get_session_id())) |
|
103 | 103 | ) { |
104 | 104 | api_not_allowed(true); |
105 | 105 | } |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | |
117 | 117 | // Interbreadcrumb for the current directory root path |
118 | 118 | if (empty($document_data['parents'])) { |
119 | - $interbreadcrumb[] = array('url' => '#', 'name' => $document_data['title']); |
|
119 | + $interbreadcrumb[] = array('url' => '#', 'name' => $document_data['title']); |
|
120 | 120 | } else { |
121 | 121 | foreach ($document_data['parents'] as $document_sub_data) { |
122 | 122 | $interbreadcrumb[] = array('url' => $document_sub_data['document_url'], 'name' => $document_sub_data['title']); |
@@ -149,17 +149,17 @@ discard block |
||
149 | 149 | $locktitle="false"; |
150 | 150 | |
151 | 151 | if ($_SERVER['HTTP_HOST']=="localhost") { |
152 | - $path_and_file= api_get_path(SYS_PATH).'/crossdomain.xml'; |
|
153 | - if (!file_exists($path_and_file)) { |
|
154 | - $crossdomain='<?xml version="1.0"?> |
|
152 | + $path_and_file= api_get_path(SYS_PATH).'/crossdomain.xml'; |
|
153 | + if (!file_exists($path_and_file)) { |
|
154 | + $crossdomain='<?xml version="1.0"?> |
|
155 | 155 | <!DOCTYPE cross-domain-policy SYSTEM "http://www.adobe.com/xml/dtds/cross-domain-policy.dtd"> |
156 | 156 | <cross-domain-policy> |
157 | 157 | <allow-access-from domain="cdn.pixlr.com" /> |
158 | 158 | <site-control permitted-cross-domain-policies="master-only"/> |
159 | 159 | <allow-http-request-headers-from domain="cnd.pixlr.com" headers="*" secure="true"/> |
160 | 160 | </cross-domain-policy>';//more open domain="*" |
161 | - @file_put_contents($path_and_file, $crossdomain); |
|
162 | - } |
|
161 | + @file_put_contents($path_and_file, $crossdomain); |
|
162 | + } |
|
163 | 163 | $credentials = "true"; |
164 | 164 | } else { |
165 | 165 | $credentials = "false"; |
@@ -219,7 +219,7 @@ |
||
219 | 219 | */ |
220 | 220 | public function getEntityIdentifier() |
221 | 221 | { |
222 | - return 'GenjFaqBundle:Question:' . $this->getId(); |
|
222 | + return 'GenjFaqBundle:Question:'.$this->getId(); |
|
223 | 223 | } |
224 | 224 | |
225 | 225 | /** |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | * |
94 | 94 | * @param string $rank |
95 | 95 | * |
96 | - * @return Question |
|
96 | + * @return Category |
|
97 | 97 | */ |
98 | 98 | public function setRank($rank) |
99 | 99 | { |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | /** |
202 | 202 | * Get questions |
203 | 203 | * |
204 | - * @return \Doctrine\Common\Collections\Collection |
|
204 | + * @return Question[] |
|
205 | 205 | */ |
206 | 206 | public function getQuestions() |
207 | 207 | { |