@@ -41,7 +41,7 @@ |
||
41 | 41 | ) { |
42 | 42 | if (Security::check_abs_path( |
43 | 43 | $workData['file_path'], |
44 | - api_get_path(SYS_COURSE_PATH) . api_get_course_path() . '/' |
|
44 | + api_get_path(SYS_COURSE_PATH).api_get_course_path().'/' |
|
45 | 45 | ) |
46 | 46 | ) { |
47 | 47 | DocumentManager::file_send_for_download( |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | |
10 | 10 | $work_id = $_GET['id']; |
11 | 11 | require_once '../inc/global.inc.php'; |
12 | -$current_course_tool = TOOL_STUDENTPUBLICATION; |
|
12 | +$current_course_tool = TOOL_STUDENTPUBLICATION; |
|
13 | 13 | $_course = api_get_course_info(); |
14 | 14 | |
15 | 15 | // Protection |
@@ -178,10 +178,10 @@ discard block |
||
178 | 178 | if (!empty($files)) { |
179 | 179 | $fileName = api_replace_dangerous_char($work_data['title']); |
180 | 180 | // Logging |
181 | - Event::event_download($fileName .'.zip (folder)'); |
|
181 | + Event::event_download($fileName.'.zip (folder)'); |
|
182 | 182 | |
183 | 183 | //start download of created file |
184 | - $name = $fileName .'.zip'; |
|
184 | + $name = $fileName.'.zip'; |
|
185 | 185 | if (Security::check_abs_path($temp_zip_file, api_get_path(SYS_ARCHIVE_PATH))) { |
186 | 186 | DocumentManager::file_send_for_download($temp_zip_file, true, $name); |
187 | 187 | @unlink($temp_zip_file); |
@@ -74,8 +74,8 @@ discard block |
||
74 | 74 | $usersAdded[] = $myUserId; |
75 | 75 | $userInfo = api_get_user_info($myUserId); |
76 | 76 | $url = api_get_path(WEB_CODE_PATH).'work/add_user.php?action=delete&id='.$workId.'&user_id='.$myUserId; |
77 | - $link = Display::url('<em class="fa fa-trash"></em> ' . get_lang('Delete'), $url, array('class' => 'btn btn-danger btn-sm')); |
|
78 | - echo '<li class="list-group-item">' . $userInfo['complete_name_with_username'] . '<div class="pull-right">' . $link . '</div></li>'; |
|
77 | + $link = Display::url('<em class="fa fa-trash"></em> '.get_lang('Delete'), $url, array('class' => 'btn btn-danger btn-sm')); |
|
78 | + echo '<li class="list-group-item">'.$userInfo['complete_name_with_username'].'<div class="pull-right">'.$link.'</div></li>'; |
|
79 | 79 | } |
80 | 80 | echo '</ul>'; |
81 | 81 | } |
@@ -108,8 +108,8 @@ discard block |
||
108 | 108 | foreach ($userToAddList as $user) { |
109 | 109 | $userName = api_get_person_name($user['firstname'], $user['lastname']).' ('.$user['username'].') '; |
110 | 110 | $url = api_get_path(WEB_CODE_PATH).'work/add_user.php?action=add&id='.$workId.'&user_id='.$user['user_id']; |
111 | - $link = Display::url('<em class="fa fa-plus"></em> ' . get_lang('Add'), $url, array('class' => 'btn btn-primary btn-sm')); |
|
112 | - echo '<li class="list-group-item">' . $userName . '<div class="pull-right"> ' . $link . '</div></li>'; |
|
111 | + $link = Display::url('<em class="fa fa-plus"></em> '.get_lang('Add'), $url, array('class' => 'btn btn-primary btn-sm')); |
|
112 | + echo '<li class="list-group-item">'.$userName.'<div class="pull-right"> '.$link.'</div></li>'; |
|
113 | 113 | } |
114 | 114 | echo '</ul>'; |
115 | 115 | } else { |
@@ -4,7 +4,7 @@ |
||
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 |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | |
8 | 8 | // Setting the global file that gets the general configuration, the databases, the languages, ... |
9 | 9 | require_once '../inc/global.inc.php'; |
10 | -$current_course_tool = TOOL_COURSE_MAINTENANCE; |
|
10 | +$current_course_tool = TOOL_COURSE_MAINTENANCE; |
|
11 | 11 | api_protect_course_script(true); |
12 | 12 | |
13 | 13 | // Including additional libraries |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | $form->addGroup($group, '', get_lang('SameFilename')); |
121 | 121 | $form->add_progress_bar(); |
122 | 122 | $form->addButtonSave(get_lang('CopyCourse')); |
123 | - $form->setDefaults(array('copy_option' =>'select_items','same_file_name_option' => FILE_OVERWRITE)); |
|
123 | + $form->setDefaults(array('copy_option' =>'select_items', 'same_file_name_option' => FILE_OVERWRITE)); |
|
124 | 124 | |
125 | 125 | // Add Security token |
126 | 126 | $token = Security::get_token(); |
@@ -98,21 +98,21 @@ discard block |
||
98 | 98 | $cr->set_file_option($_POST['same_file_name_option']); |
99 | 99 | $cr->restore(); |
100 | 100 | Display::display_normal_message(get_lang('ImportFinished')); |
101 | - echo '<a class="btn btn-default" href="' . api_get_path(WEB_COURSE_PATH) . api_get_course_path() . '/index.php">' . get_lang('CourseHomepage') . '</a>'; |
|
101 | + echo '<a class="btn btn-default" href="'.api_get_path(WEB_COURSE_PATH).api_get_course_path().'/index.php">'.get_lang('CourseHomepage').'</a>'; |
|
102 | 102 | } else { |
103 | 103 | if (!$error) { |
104 | 104 | Display::display_warning_message(get_lang('NoResourcesInBackupFile')); |
105 | - echo '<a class="btn btn-default" href="import_backup.php?' . api_get_cidreq() . '">' . get_lang('TryAgain') . '</a>'; |
|
105 | + echo '<a class="btn btn-default" href="import_backup.php?'.api_get_cidreq().'">'.get_lang('TryAgain').'</a>'; |
|
106 | 106 | } elseif ($filename === false) { |
107 | 107 | Display::display_error_message(get_lang('ArchivesDirectoryNotWriteableContactAdmin')); |
108 | - echo '<a class="btn btn-default" href="import_backup.php?' . api_get_cidreq() . '">' . get_lang('TryAgain') . '</a>'; |
|
108 | + echo '<a class="btn btn-default" href="import_backup.php?'.api_get_cidreq().'">'.get_lang('TryAgain').'</a>'; |
|
109 | 109 | } else { |
110 | 110 | if ($filename == '') { |
111 | 111 | Display::display_error_message(get_lang('SelectBackupFile')); |
112 | - echo '<a class="btn btn-default" href="import_backup.php?' . api_get_cidreq() . '">' . get_lang('TryAgain') . '</a>'; |
|
112 | + echo '<a class="btn btn-default" href="import_backup.php?'.api_get_cidreq().'">'.get_lang('TryAgain').'</a>'; |
|
113 | 113 | } else { |
114 | 114 | Display::display_error_message(get_lang('UploadError')); |
115 | - echo '<a class="btn btn-default" href="import_backup.php?' . api_get_cidreq() . '">' . get_lang('TryAgain') . '</a>'; |
|
115 | + echo '<a class="btn btn-default" href="import_backup.php?'.api_get_cidreq().'">'.get_lang('TryAgain').'</a>'; |
|
116 | 116 | } |
117 | 117 | } |
118 | 118 | } |
@@ -142,10 +142,10 @@ discard block |
||
142 | 142 | CourseSelectForm::display_form($course, $hiddenFields); |
143 | 143 | } elseif ($filename === false) { |
144 | 144 | Display::display_error_message(get_lang('ArchivesDirectoryNotWriteableContactAdmin')); |
145 | - echo '<a class="btn btn-default" href="import_backup.php?' . api_get_cidreq() . '">' . get_lang('TryAgain') . '</a>'; |
|
145 | + echo '<a class="btn btn-default" href="import_backup.php?'.api_get_cidreq().'">'.get_lang('TryAgain').'</a>'; |
|
146 | 146 | } else { |
147 | 147 | Display::display_warning_message(get_lang('NoResourcesInBackupFile')); |
148 | - echo '<a class="btn btn-default" href="import_backup.php?' . api_get_cidreq() . '">' . get_lang('TryAgain') . '</a>'; |
|
148 | + echo '<a class="btn btn-default" href="import_backup.php?'.api_get_cidreq().'">'.get_lang('TryAgain').'</a>'; |
|
149 | 149 | } |
150 | 150 | } else { |
151 | 151 | $user = api_get_user_info(); |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | $form = new FormValidator( |
158 | 158 | 'import_backup_form', |
159 | 159 | 'post', |
160 | - api_get_path(WEB_CODE_PATH) . 'coursecopy/import_backup.php?' . api_get_cidreq(), |
|
160 | + api_get_path(WEB_CODE_PATH).'coursecopy/import_backup.php?'.api_get_cidreq(), |
|
161 | 161 | '', |
162 | 162 | array('enctype' => 'multipart/form-data') |
163 | 163 | ); |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | ); |
190 | 190 | $options['null'] = '-'; |
191 | 191 | foreach ($backups as $index => $backup) { |
192 | - $options[$backup['file']] = $backup['course_code'] . ' (' . $backup['date'] . ')'; |
|
192 | + $options[$backup['file']] = $backup['course_code'].' ('.$backup['date'].')'; |
|
193 | 193 | } |
194 | 194 | $form->addElement( |
195 | 195 | 'select', |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | 'radio', |
208 | 208 | '', |
209 | 209 | '', |
210 | - '<i>' . get_lang('NoBackupsAvailable') . '</i>', |
|
210 | + '<i>'.get_lang('NoBackupsAvailable').'</i>', |
|
211 | 211 | '', |
212 | 212 | 'disabled="true"' |
213 | 213 | ); |
@@ -7,7 +7,7 @@ |
||
7 | 7 | */ |
8 | 8 | |
9 | 9 | require_once '../inc/global.inc.php'; |
10 | -$this_section = SECTION_COURSES; |
|
10 | +$this_section = SECTION_COURSES; |
|
11 | 11 | |
12 | 12 | if (extension_loaded('xapian')) { |
13 | 13 | require '../newscorm/lp_list_search.php'; |
@@ -32,14 +32,14 @@ discard block |
||
32 | 32 | ); |
33 | 33 | $number_friends = count($friends); |
34 | 34 | $friend_html = ''; |
35 | - $friend_html .= '<div><h3>' . get_lang('SocialFriend') . '</h3></div>'; |
|
35 | + $friend_html .= '<div><h3>'.get_lang('SocialFriend').'</h3></div>'; |
|
36 | 36 | $friend_html .= '<div id="friend-container" class="social-friend-container">'; |
37 | 37 | $friend_html .= '<div id="friend-header" >'; |
38 | 38 | |
39 | 39 | if ($number_friends == 1) { |
40 | - $friend_html .= '<div style="float:left;width:80%">' . $number_friends . ' ' . get_lang('Friend') . '</div>'; |
|
40 | + $friend_html .= '<div style="float:left;width:80%">'.$number_friends.' '.get_lang('Friend').'</div>'; |
|
41 | 41 | } else { |
42 | - $friend_html .= '<div style="float:left;width:80%">' . $number_friends . ' ' . get_lang('Friends') . '</div>'; |
|
42 | + $friend_html .= '<div style="float:left;width:80%">'.$number_friends.' '.get_lang('Friends').'</div>'; |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | $friend_html .= '</div>'; // close div friend-header |
@@ -51,14 +51,14 @@ discard block |
||
51 | 51 | $friend['firstName'], |
52 | 52 | $friend['lastName'] |
53 | 53 | ); |
54 | - $friend_html .= '<div id=div_' . $friend['friend_user_id'] . ' class="image_friend_network" ><span><center>'; |
|
54 | + $friend_html .= '<div id=div_'.$friend['friend_user_id'].' class="image_friend_network" ><span><center>'; |
|
55 | 55 | |
56 | 56 | $userPicture = UserManager::getUserPicture($friend['friend_user_id']); |
57 | 57 | |
58 | - $friend_html .= '<a href="profile.php?u=' . $friend['friend_user_id'].'">'; |
|
59 | - $friend_html .= '<img src="' . $userPicture . '" id="imgfriend_' . $friend['friend_user_id'] . '" title="' . $name_user . '" />'; |
|
58 | + $friend_html .= '<a href="profile.php?u='.$friend['friend_user_id'].'">'; |
|
59 | + $friend_html .= '<img src="'.$userPicture.'" id="imgfriend_'.$friend['friend_user_id'].'" title="'.$name_user.'" />'; |
|
60 | 60 | $friend_html .= '</center></span>'; |
61 | - $friend_html .= '<center class="friend">' . $name_user . '</a></center>'; |
|
61 | + $friend_html .= '<center class="friend">'.$name_user.'</a></center>'; |
|
62 | 62 | $friend_html .= '</div>'; |
63 | 63 | } |
64 | 64 | } |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | $i = 1; |
74 | 74 | foreach ($results as $result) { |
75 | 75 | $id = $result['id']; |
76 | - $url_open = '<a href="group_view.php?id=' . $id . '">'; |
|
76 | + $url_open = '<a href="group_view.php?id='.$id.'">'; |
|
77 | 77 | $url_close = '</a>'; |
78 | 78 | $icon = ''; |
79 | 79 | $name = cut($result['name'], 20, true); |
@@ -94,11 +94,11 @@ discard block |
||
94 | 94 | $userGroup->get_all_users_by_group($id) |
95 | 95 | ); |
96 | 96 | if ($count_users_group == 1) { |
97 | - $count_users_group = $count_users_group . ' ' . get_lang( |
|
97 | + $count_users_group = $count_users_group.' '.get_lang( |
|
98 | 98 | 'Member' |
99 | 99 | ); |
100 | 100 | } else { |
101 | - $count_users_group = $count_users_group . ' ' . get_lang( |
|
101 | + $count_users_group = $count_users_group.' '.get_lang( |
|
102 | 102 | 'Members' |
103 | 103 | ); |
104 | 104 | } |
@@ -107,40 +107,40 @@ discard block |
||
107 | 107 | $result['picture_uri'], |
108 | 108 | 80 |
109 | 109 | ); |
110 | - $item_name = '<div class="box_shared_profile_group_title">' . $url_open . api_xml_http_response_encode($name) . $icon . $url_close . '</div>'; |
|
110 | + $item_name = '<div class="box_shared_profile_group_title">'.$url_open.api_xml_http_response_encode($name).$icon.$url_close.'</div>'; |
|
111 | 111 | $item_description = ''; |
112 | 112 | if (!empty($result['description'])) { |
113 | 113 | $item_description = '<div class="box_shared_profile_group_description"> |
114 | 114 | <span class="social-groups-text2">' . |
115 | - api_xml_http_response_encode(get_lang('Description')) . '</span><p class="social-groups-text4">' . |
|
116 | - cut(api_xml_http_response_encode($result['description']), 120, true ) . '</p></div>'; |
|
115 | + api_xml_http_response_encode(get_lang('Description')).'</span><p class="social-groups-text4">'. |
|
116 | + cut(api_xml_http_response_encode($result['description']), 120, true).'</p></div>'; |
|
117 | 117 | } |
118 | 118 | |
119 | 119 | $result['picture_uri'] = '<div class="box_shared_profile_group_image"> |
120 | - <img class="social-groups-image" src="' . $picture['file'] . '" /></div>'; |
|
120 | + <img class="social-groups-image" src="' . $picture['file'].'" /></div>'; |
|
121 | 121 | $item_actions = ''; |
122 | 122 | if (api_get_user_id() == $user_id) { |
123 | - $item_actions = '<div class="box_shared_profile_group_actions"><a href="group_view.php?id=' . $id . '">' . |
|
124 | - get_lang('SeeMore') . $url_close . '</div>'; |
|
123 | + $item_actions = '<div class="box_shared_profile_group_actions"><a href="group_view.php?id='.$id.'">'. |
|
124 | + get_lang('SeeMore').$url_close.'</div>'; |
|
125 | 125 | } |
126 | 126 | $grid_my_groups[] = array( |
127 | 127 | $item_name, |
128 | - $url_open . $result['picture_uri'] . $url_close, |
|
129 | - $item_description . $item_actions |
|
128 | + $url_open.$result['picture_uri'].$url_close, |
|
129 | + $item_description.$item_actions |
|
130 | 130 | ); |
131 | 131 | $i++; |
132 | 132 | } |
133 | 133 | } |
134 | 134 | if (count($grid_my_groups) > 0) { |
135 | 135 | echo '<div style="margin-top:20px">'; |
136 | - echo '<div><h3>' . get_lang('MyGroups') . '</h3></div>'; |
|
136 | + echo '<div><h3>'.get_lang('MyGroups').'</h3></div>'; |
|
137 | 137 | $count_groups = 0; |
138 | 138 | if (count($results) == 1) { |
139 | - $count_groups = count($results) . ' ' . get_lang('Group'); |
|
139 | + $count_groups = count($results).' '.get_lang('Group'); |
|
140 | 140 | } else { |
141 | - $count_groups = count($results) . ' ' . get_lang('Groups'); |
|
141 | + $count_groups = count($results).' '.get_lang('Groups'); |
|
142 | 142 | } |
143 | - echo '<div>' . $count_groups . '</div>'; |
|
143 | + echo '<div>'.$count_groups.'</div>'; |
|
144 | 144 | |
145 | 145 | Display::display_sortable_grid( |
146 | 146 | 'shared_profile_mygroups', |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | beforeSend: function(objeto) { |
41 | 41 | $("#id_response").html("<img src=\'../inc/lib/javascript/indicator.gif\' />"); }, |
42 | 42 | type: "POST", |
43 | - url: "' . api_get_path(WEB_AJAX_PATH) . 'social.ajax.php?a=deny_friend", |
|
43 | + url: "' . api_get_path(WEB_AJAX_PATH).'social.ajax.php?a=deny_friend", |
|
44 | 44 | data: "denied_friend_id="+friend_user_id, |
45 | 45 | success: function(datos) { |
46 | 46 | $("div#"+name_div_id).hide("slow"); |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | }); |
50 | 50 | } |
51 | 51 | function register_friend(element_input) { |
52 | - if(confirm("' . get_lang('AddToFriends') . '")) { |
|
52 | + if(confirm("' . get_lang('AddToFriends').'")) { |
|
53 | 53 | name_button=$(element_input).attr("id"); |
54 | 54 | name_div_id="id_"+name_button.substring(13); |
55 | 55 | user_id=name_div_id.split("_"); |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | beforeSend: function(objeto) { |
60 | 60 | $("div#dpending_"+user_friend_id).html("<img src=\'../inc/lib/javascript/indicator.gif\' />"); }, |
61 | 61 | type: "POST", |
62 | - url: "' . api_get_path(WEB_AJAX_PATH) . 'social.ajax.php?a=add_friend", |
|
62 | + url: "' . api_get_path(WEB_AJAX_PATH).'social.ajax.php?a=add_friend", |
|
63 | 63 | data: "friend_id="+user_friend_id+"&is_my_friend="+"friend", |
64 | 64 | success: function(datos) { $("div#"+name_div_id).hide("slow"); |
65 | 65 | $("form").submit() |
@@ -70,8 +70,8 @@ discard block |
||
70 | 70 | |
71 | 71 | $(document).on("ready", function () { |
72 | 72 | $("#el-finder").elfinder({ |
73 | - url: "' . api_get_path(WEB_LIBRARY_PATH) . 'elfinder/php/connector.php", |
|
74 | - lang: "' . api_get_language_isocode() . '", |
|
73 | + url: "' . api_get_path(WEB_LIBRARY_PATH).'elfinder/php/connector.php", |
|
74 | + lang: "' . api_get_language_isocode().'", |
|
75 | 75 | height: 600, |
76 | 76 | resizable: false, |
77 | 77 | rememberLastDir: false, |
@@ -85,22 +85,22 @@ discard block |
||
85 | 85 | $actions = null; |
86 | 86 | |
87 | 87 | if (isset($_GET['cidReq'])) { |
88 | - $actions = '<a href="' . api_get_path( |
|
88 | + $actions = '<a href="'.api_get_path( |
|
89 | 89 | WEB_CODE_PATH |
90 | - ) . 'document/document.php?cidReq=' . Security::remove_XSS( |
|
90 | + ).'document/document.php?cidReq='.Security::remove_XSS( |
|
91 | 91 | $_GET['cidReq'] |
92 | - ) . '&id_session=' . Security::remove_XSS( |
|
92 | + ).'&id_session='.Security::remove_XSS( |
|
93 | 93 | $_GET['id_session'] |
94 | - ) . '&gidReq=' . Security::remove_XSS( |
|
94 | + ).'&gidReq='.Security::remove_XSS( |
|
95 | 95 | $_GET['gidReq'] |
96 | - ) . '&id=' . Security::remove_XSS( |
|
96 | + ).'&id='.Security::remove_XSS( |
|
97 | 97 | $_GET['parent_id'] |
98 | - ) . '">' . Display::return_icon( |
|
98 | + ).'">'.Display::return_icon( |
|
99 | 99 | 'back.png', |
100 | - get_lang('BackTo') . ' ' . get_lang('Documents') . ' (' . get_lang( |
|
100 | + get_lang('BackTo').' '.get_lang('Documents').' ('.get_lang( |
|
101 | 101 | 'Course' |
102 | - ) . ')' |
|
103 | - ) . '</a>'; |
|
102 | + ).')' |
|
103 | + ).'</a>'; |
|
104 | 104 | } |
105 | 105 | $tpl = new Template(); |
106 | 106 | SocialManager::setSocialUserBlock($tpl, $user_id, 'myfiles'); |