@@ -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( |
@@ -327,7 +327,7 @@ |
||
327 | 327 | { |
328 | 328 | return strpos(basename($path), '.') === 0 // if file/folder begins with '.' (dot) |
329 | 329 | ? !($attr == 'read' || $attr == 'write') // set read+write to false, other (locked+hidden) set to true |
330 | - : null; // else elFinder decide it itself |
|
330 | + : null; // else elFinder decide it itself |
|
331 | 331 | } |
332 | 332 | |
333 | 333 | /** |
@@ -196,7 +196,7 @@ |
||
196 | 196 | $users = \GroupManager::getStudentsAndTutors($groupId); |
197 | 197 | $newUserList = array(); |
198 | 198 | if (!empty($users)) { |
199 | - foreach($users as $user) { |
|
199 | + foreach ($users as $user) { |
|
200 | 200 | $newUserList[] = $user['user_id']; |
201 | 201 | } |
202 | 202 | $this->unsubcribeUsersToItem( |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | foreach ($from as $subVertex) { |
53 | 53 | $vertexId = $subVertex->getId(); |
54 | 54 | $sessionInfo = api_get_session_info($vertexId); |
55 | - $sessionInfo['admin_link'] = '<a href="' . \SessionManager::getAdminPath($vertexId) . '">' . $sessionInfo['name'] . '</a>'; |
|
55 | + $sessionInfo['admin_link'] = '<a href="'.\SessionManager::getAdminPath($vertexId).'">'.$sessionInfo['name'].'</a>'; |
|
56 | 56 | $result['requirements'][] = $sessionInfo; |
57 | 57 | } |
58 | 58 | |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | foreach ($to as $subVertex) { |
61 | 61 | $vertexId = $subVertex->getId(); |
62 | 62 | $sessionInfo = api_get_session_info($vertexId); |
63 | - $sessionInfo['admin_link'] = '<a href="' . \SessionManager::getAdminPath($vertexId) . '">' . $sessionInfo['name'] . '</a>'; |
|
63 | + $sessionInfo['admin_link'] = '<a href="'.\SessionManager::getAdminPath($vertexId).'">'.$sessionInfo['name'].'</a>'; |
|
64 | 64 | $result['dependencies'][] = $sessionInfo; |
65 | 65 | } |
66 | 66 | } |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | $data = $hook->getEventData(); |
30 | 30 | |
31 | 31 | $drupalDomain = CreateDrupalUser::create()->get('drupal_domain'); |
32 | - $drupalDomain = rtrim($drupalDomain, '/') . '/'; |
|
32 | + $drupalDomain = rtrim($drupalDomain, '/').'/'; |
|
33 | 33 | |
34 | 34 | if ($data['type'] === HOOK_EVENT_TYPE_POST) { |
35 | 35 | $return = $data['return']; |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | ); |
51 | 51 | |
52 | 52 | $options = array( |
53 | - 'location' => $drupalDomain . 'sites/all/modules/chamilo/soap.php?wsdl', |
|
53 | + 'location' => $drupalDomain.'sites/all/modules/chamilo/soap.php?wsdl', |
|
54 | 54 | 'uri' => $drupalDomain |
55 | 55 | ); |
56 | 56 |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | |
35 | 35 | $form = new FormValidator('form'); |
36 | 36 | |
37 | - $renderer =& $form->defaultRenderer(); |
|
37 | + $renderer = & $form->defaultRenderer(); |
|
38 | 38 | $renderer->setFormTemplate('<form{attributes}><table border="0" cellpadding="5" cellspacing="0" width="100%">{content}</table></form>'); |
39 | 39 | $renderersetCustomElementTemplate->setCustomElementTemplate('<tr><td>{element}</td></tr>'); |
40 | 40 | |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | $form2 = new FormValidator('form'); |
55 | 55 | |
56 | 56 | if (!empty($option2) && !empty($urlOption2)) { |
57 | - $renderer =& $form2->defaultRenderer(); |
|
57 | + $renderer = & $form2->defaultRenderer(); |
|
58 | 58 | $renderer->setHeaderTemplate(''); |
59 | 59 | $renderer->setFormTemplate('<form{attributes}><table border="0" cellpadding="5" cellspacing="0" width="100%">{content}</table></form>'); |
60 | 60 | $renderer->setCustomElementTemplate('<tr><td>{element}</td></tr>'); |
@@ -24,13 +24,13 @@ |
||
24 | 24 | */ |
25 | 25 | |
26 | 26 | //the plugin title |
27 | -$plugin_info['title']='PENS'; |
|
27 | +$plugin_info['title'] = 'PENS'; |
|
28 | 28 | //the comments that go with the plugin |
29 | -$plugin_info['comment']="PENS implementation for Chamilo"; |
|
29 | +$plugin_info['comment'] = "PENS implementation for Chamilo"; |
|
30 | 30 | //the locations where this plugin can be shown |
31 | -$plugin_info['location']=array(); |
|
31 | +$plugin_info['location'] = array(); |
|
32 | 32 | //the plugin version |
33 | -$plugin_info['version']='1.1'; |
|
33 | +$plugin_info['version'] = '1.1'; |
|
34 | 34 | //the plugin author |
35 | -$plugin_info['author']='Guillaume Viguier-Just, Yannick Warnier'; |
|
35 | +$plugin_info['author'] = 'Guillaume Viguier-Just, Yannick Warnier'; |
|
36 | 36 | $plugin_info = PENSPlugin::create()->get_info(); |
37 | 37 | \ No newline at end of file |
@@ -25,8 +25,8 @@ discard block |
||
25 | 25 | * @licence http://www.gnu.org/licenses/gpl.txt |
26 | 26 | */ |
27 | 27 | |
28 | -require_once __DIR__ . '/../../main/inc/global.inc.php'; |
|
29 | -require_once __DIR__ . '/lib/pens.php'; |
|
28 | +require_once __DIR__.'/../../main/inc/global.inc.php'; |
|
29 | +require_once __DIR__.'/lib/pens.php'; |
|
30 | 30 | |
31 | 31 | /** |
32 | 32 | * ChamiloPens |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | * @param PENSRequest Request |
115 | 115 | */ |
116 | 116 | public function __construct($request) { |
117 | - if($request instanceof PENSRequest) { |
|
117 | + if ($request instanceof PENSRequest) { |
|
118 | 118 | $this->_id = 0; |
119 | 119 | $this->_pens_version = $request->getPensVersion(); |
120 | 120 | $this->_package_type = $request->getPackageType(); |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | $this->_client = $request->getClient(); |
125 | 125 | $this->_vendor_data = $request->getVendorData(); |
126 | 126 | $this->_package_name = $request->getFilename(); |
127 | - } else if(is_array($request)) { |
|
127 | + } else if (is_array($request)) { |
|
128 | 128 | $this->_id = $request['id']; |
129 | 129 | $this->_pens_version = $request['pens_version']; |
130 | 130 | $this->_package_type = $request['package_type']; |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | $this->_vendor_data = $request['vendor_data']; |
136 | 136 | $this->_package_name = $request['package_name']; |
137 | 137 | $this->_created_at = new DateTime($request['created_at'], new DateTimeZone('UTC')); |
138 | - if(!empty($request['updated_at'])) { |
|
138 | + if (!empty($request['updated_at'])) { |
|
139 | 139 | $this->_updated_at = new DateTime($request['updated_at'], new DateTimeZone('UTC')); |
140 | 140 | } |
141 | 141 | } |
@@ -151,16 +151,16 @@ discard block |
||
151 | 151 | $clean_vendor_data = Database::escape_string($this->_vendor_data); |
152 | 152 | $created_at = api_get_utc_datetime(); |
153 | 153 | $table = Database::get_main_table(ChamiloPens::TABLE_NAME); |
154 | - $sql_query = "INSERT INTO $table (pens_version, package_type, package_type_version, package_format, package_id, client, vendor_data, package_name, created_at) VALUES (" . |
|
155 | - "'". $this->_pens_version. "', " . |
|
156 | - "'".$this->_package_type. "', " . |
|
157 | - "'".$clean_package_type_version. "', " . |
|
158 | - "'".$this->_package_format. "', " . |
|
159 | - "'".$clean_package_id. "', " . |
|
160 | - "'".$clean_client."', " . |
|
161 | - "'".$clean_vendor_data."', " . |
|
162 | - "'".$this->_package_name."', " . |
|
163 | - "'".$created_at."') ON DUPLICATE KEY UPDATE " . |
|
154 | + $sql_query = "INSERT INTO $table (pens_version, package_type, package_type_version, package_format, package_id, client, vendor_data, package_name, created_at) VALUES (". |
|
155 | + "'".$this->_pens_version."', ". |
|
156 | + "'".$this->_package_type."', ". |
|
157 | + "'".$clean_package_type_version."', ". |
|
158 | + "'".$this->_package_format."', ". |
|
159 | + "'".$clean_package_id."', ". |
|
160 | + "'".$clean_client."', ". |
|
161 | + "'".$clean_vendor_data."', ". |
|
162 | + "'".$this->_package_name."', ". |
|
163 | + "'".$created_at."') ON DUPLICATE KEY UPDATE ". |
|
164 | 164 | "pens_version = VALUES(pens_version), ". |
165 | 165 | "package_type = VALUES(package_type), ". |
166 | 166 | "package_type_version = VALUES(package_type_version), ". |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | $sql_query = "SELECT * FROM $table WHERE package_id = '".$package_id."';"; |
183 | 183 | $results = Database::query($sql_query); |
184 | 184 | $number = Database::num_rows($results); |
185 | - if($number == 1) { |
|
185 | + if ($number == 1) { |
|
186 | 186 | $obj = Database::fetch_assoc($results); |
187 | 187 | return new ChamiloPens($obj); |
188 | 188 | } else { |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | $sql_query = "SELECT * FROM $table ORDER BY created_at;"; |
201 | 201 | $results = Database::query($sql_query); |
202 | 202 | $return = array(); |
203 | - while($assoc = Database::fetch_assoc($results)) { |
|
203 | + while ($assoc = Database::fetch_assoc($results)) { |
|
204 | 204 | $return[] = new ChamiloPens($assoc); |
205 | 205 | } |
206 | 206 | return $return; |