@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | break; |
| 217 | 217 | } |
| 218 | 218 | |
| 219 | - $fileName = ExtraField::FIELD_TYPE_FILE_IMAGE . "_{$params['item_id']}.png"; |
|
| 219 | + $fileName = ExtraField::FIELD_TYPE_FILE_IMAGE."_{$params['item_id']}.png"; |
|
| 220 | 220 | |
| 221 | 221 | if (!file_exists($fileDir)) { |
| 222 | 222 | mkdir($fileDir, $dirPermissions, true); |
@@ -226,15 +226,15 @@ discard block |
||
| 226 | 226 | |
| 227 | 227 | //Crop the image to adjust 16:9 ratio |
| 228 | 228 | $crop = new Image($value['tmp_name']); |
| 229 | - $crop->crop($params['extra_' . $field_variable . '_crop_result']); |
|
| 229 | + $crop->crop($params['extra_'.$field_variable.'_crop_result']); |
|
| 230 | 230 | |
| 231 | 231 | $imageExtraField = new Image($value['tmp_name']); |
| 232 | 232 | $imageExtraField->resize(400); |
| 233 | - $imageExtraField->send_image($fileDir . $fileName, -1, 'png'); |
|
| 233 | + $imageExtraField->send_image($fileDir.$fileName, -1, 'png'); |
|
| 234 | 234 | $newParams = array( |
| 235 | 235 | 'item_id' => $params['item_id'], |
| 236 | 236 | 'field_id' => $extraFieldInfo['id'], |
| 237 | - 'value' => $fileDirStored . $fileName, |
|
| 237 | + 'value' => $fileDirStored.$fileName, |
|
| 238 | 238 | 'comment' => $comment |
| 239 | 239 | ); |
| 240 | 240 | |
@@ -260,18 +260,18 @@ discard block |
||
| 260 | 260 | } |
| 261 | 261 | |
| 262 | 262 | $cleanedName = api_replace_dangerous_char($value['name']); |
| 263 | - $fileName = ExtraField::FIELD_TYPE_FILE . "_{$params['item_id']}_$cleanedName"; |
|
| 263 | + $fileName = ExtraField::FIELD_TYPE_FILE."_{$params['item_id']}_$cleanedName"; |
|
| 264 | 264 | if (!file_exists($fileDir)) { |
| 265 | 265 | mkdir($fileDir, $dirPermissions, true); |
| 266 | 266 | } |
| 267 | 267 | |
| 268 | 268 | if ($value['error'] == 0) { |
| 269 | - moveUploadedFile($value, $fileDir . $fileName); |
|
| 269 | + moveUploadedFile($value, $fileDir.$fileName); |
|
| 270 | 270 | |
| 271 | 271 | $new_params = array( |
| 272 | 272 | 'item_id' => $params['item_id'], |
| 273 | 273 | 'field_id' => $extraFieldInfo['id'], |
| 274 | - 'value' => $fileDirStored . $fileName |
|
| 274 | + 'value' => $fileDirStored.$fileName |
|
| 275 | 275 | ); |
| 276 | 276 | |
| 277 | 277 | if ($this->type !== 'session' && $this->type !== 'course') { |
@@ -411,7 +411,7 @@ discard block |
||
| 411 | 411 | */ |
| 412 | 412 | if (false) { |
| 413 | 413 | global $app; |
| 414 | - switch($this->type) { |
|
| 414 | + switch ($this->type) { |
|
| 415 | 415 | case 'question': |
| 416 | 416 | $extraFieldValue = new ChamiloLMS\Entity\QuestionFieldValues(); |
| 417 | 417 | $extraFieldValue->setUserId(api_get_user_id()); |
@@ -473,7 +473,7 @@ discard block |
||
| 473 | 473 | */ |
| 474 | 474 | if (false) { |
| 475 | 475 | global $app; |
| 476 | - switch($this->type) { |
|
| 476 | + switch ($this->type) { |
|
| 477 | 477 | case 'question': |
| 478 | 478 | $extraFieldValue = $app['orm.ems']['db_write']->getRepository('ChamiloLMS\Entity\QuestionFieldValues')->find($field_values['id']); |
| 479 | 479 | $extraFieldValue->setUserId(api_get_user_id()); |