@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | * @since 1.0 |
| 58 | 58 | * @access public |
| 59 | 59 | */ |
| 60 | - public function __construct($elementName=null, $elementLabel=null, $attributes=null) |
|
| 60 | + public function __construct($elementName = null, $elementLabel = null, $attributes = null) |
|
| 61 | 61 | { |
| 62 | 62 | parent::__construct($elementName, $elementLabel, $attributes); |
| 63 | 63 | $this->setType('file'); |
@@ -191,11 +191,11 @@ discard block |
||
| 191 | 191 | */ |
| 192 | 192 | public function moveUploadedFile($dest, $fileName = '') |
| 193 | 193 | { |
| 194 | - if ($dest != '' && substr($dest, -1) != '/') { |
|
| 194 | + if ($dest != '' && substr($dest, -1) != '/') { |
|
| 195 | 195 | $dest .= '/'; |
| 196 | 196 | } |
| 197 | 197 | $fileName = ($fileName != '') ? $fileName : basename($this->_value['name']); |
| 198 | - return move_uploaded_file($this->_value['tmp_name'], $dest . $fileName); |
|
| 198 | + return move_uploaded_file($this->_value['tmp_name'], $dest.$fileName); |
|
| 199 | 199 | } |
| 200 | 200 | |
| 201 | 201 | /** |
@@ -245,23 +245,23 @@ discard block |
||
| 245 | 245 | if (isset($_FILES[$elementName])) { |
| 246 | 246 | return $_FILES[$elementName]; |
| 247 | 247 | } elseif (false !== ($pos = strpos($elementName, '['))) { |
| 248 | - $base = str_replace( |
|
| 248 | + $base = str_replace( |
|
| 249 | 249 | array('\\', '\''), array('\\\\', '\\\''), |
| 250 | 250 | substr($elementName, 0, $pos) |
| 251 | 251 | ); |
| 252 | - $idx = "['" . str_replace( |
|
| 252 | + $idx = "['".str_replace( |
|
| 253 | 253 | array('\\', '\'', ']', '['), array('\\\\', '\\\'', '', "']['"), |
| 254 | 254 | substr($elementName, $pos + 1, -1) |
| 255 | - ) . "']"; |
|
| 255 | + )."']"; |
|
| 256 | 256 | $props = array('name', 'type', 'size', 'tmp_name', 'error'); |
| 257 | - $code = "if (!isset(\$_FILES['{$base}']['name']{$idx})) {\n" . |
|
| 258 | - " return null;\n" . |
|
| 259 | - "} else {\n" . |
|
| 257 | + $code = "if (!isset(\$_FILES['{$base}']['name']{$idx})) {\n". |
|
| 258 | + " return null;\n". |
|
| 259 | + "} else {\n". |
|
| 260 | 260 | " \$value = array();\n"; |
| 261 | 261 | foreach ($props as $prop) { |
| 262 | 262 | $code .= " \$value['{$prop}'] = \$_FILES['{$base}']['{$prop}']{$idx};\n"; |
| 263 | 263 | } |
| 264 | - return eval($code . " return \$value;\n}\n"); |
|
| 264 | + return eval($code." return \$value;\n}\n"); |
|
| 265 | 265 | } else { |
| 266 | 266 | return null; |
| 267 | 267 | } |
@@ -1,8 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /* For licensing terms, see /license.txt */ |
| 3 | 3 | |
| 4 | -use ChamiloSession as Session; |
|
| 5 | - |
|
| 6 | 4 | /** |
| 7 | 5 | * Class ExerciseLib |
| 8 | 6 | * shows a question and its answers |
@@ -1,8 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /* For licensing terms, see /license.txt */ |
| 3 | 3 | |
| 4 | -use ChamiloSession as Session; |
|
| 5 | - |
|
| 6 | 4 | /** |
| 7 | 5 | * Class ExerciseLib |
| 8 | 6 | * shows a question and its answers |
@@ -1,8 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /* For licensing terms, see /license.txt */ |
| 3 | 3 | |
| 4 | -use ChamiloSession as Session; |
|
| 5 | - |
|
| 6 | 4 | /** |
| 7 | 5 | * Class ExerciseLib |
| 8 | 6 | * shows a question and its answers |
@@ -1,8 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /* For licensing terms, see /license.txt */ |
| 3 | 3 | |
| 4 | -use ChamiloSession as Session; |
|
| 5 | - |
|
| 6 | 4 | /** |
| 7 | 5 | * Class ExerciseLib |
| 8 | 6 | * shows a question and its answers |
@@ -4,7 +4,7 @@ discard block |
||
| 4 | 4 | use ChamiloSession as Session; |
| 5 | 5 | |
| 6 | 6 | require_once '../inc/global.inc.php'; |
| 7 | -$current_course_tool = TOOL_STUDENTPUBLICATION; |
|
| 7 | +$current_course_tool = TOOL_STUDENTPUBLICATION; |
|
| 8 | 8 | |
| 9 | 9 | api_protect_course_script(true); |
| 10 | 10 | |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | $user_id = api_get_user_id(); |
| 45 | 45 | |
| 46 | 46 | if (!empty($group_id)) { |
| 47 | - $group_properties = GroupManager :: get_group_properties($group_id); |
|
| 47 | + $group_properties = GroupManager :: get_group_properties($group_id); |
|
| 48 | 48 | $show_work = false; |
| 49 | 49 | |
| 50 | 50 | if (api_is_allowed_to_edit(false, true)) { |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | $actionsLeft .= '<a href="'.api_get_path(WEB_CODE_PATH).'work/add_document.php?'.api_get_cidreq().'&id='.$workId.'">'; |
| 162 | 162 | $actionsLeft .= Display::return_icon('new_document.png', get_lang('AddDocument'), '', ICON_SIZE_MEDIUM).'</a>'; |
| 163 | 163 | |
| 164 | - $actionsLeft .= '<a href="'.api_get_path(WEB_CODE_PATH).'work/add_user.php?'.api_get_cidreq().'&id='.$workId.'">'; |
|
| 164 | + $actionsLeft .= '<a href="'.api_get_path(WEB_CODE_PATH).'work/add_user.php?'.api_get_cidreq().'&id='.$workId.'">'; |
|
| 165 | 165 | $actionsLeft .= Display::return_icon('addworkuser.png', get_lang('AddUsers'), '', ICON_SIZE_MEDIUM).'</a>'; |
| 166 | 166 | |
| 167 | 167 | $actionsLeft .= '<a href="'.api_get_path(WEB_CODE_PATH).'work/work_list_all.php?'.api_get_cidreq().'&id='.$workId.'&action=export_pdf">'; |