@@ -53,7 +53,7 @@ |
||
53 | 53 | // Create the directory |
54 | 54 | $result = $this->generate_lp_folder($_course, $this->file_name); |
55 | 55 | |
56 | - // Create the directory |
|
56 | + // Create the directory |
|
57 | 57 | $this->base_work_dir = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document'; |
58 | 58 | ///learning_path/ppt_dirname directory |
59 | 59 | $this->created_dir = $result['dir']; |
@@ -5,8 +5,8 @@ |
||
5 | 5 | */ |
6 | 6 | require_once __DIR__.'/../inc/global.inc.php'; |
7 | 7 | if (api_get_setting('allow_social_tool')=='true' && api_get_setting('allow_message_tool')=='true') { |
8 | - header('Location:inbox.php?f=social'); |
|
8 | + header('Location:inbox.php?f=social'); |
|
9 | 9 | } elseif ( api_get_setting('allow_message_tool')=='true') { |
10 | - header('Location:inbox.php'); |
|
10 | + header('Location:inbox.php'); |
|
11 | 11 | } |
12 | 12 | exit; |
@@ -7,40 +7,40 @@ |
||
7 | 7 | require_once __DIR__.'/../inc/global.inc.php'; |
8 | 8 | api_block_anonymous_users(); |
9 | 9 | if (api_get_setting('allow_message_tool')!='true') { |
10 | - api_not_allowed(); |
|
10 | + api_not_allowed(); |
|
11 | 11 | } |
12 | 12 | |
13 | 13 | if (isset($_REQUEST['f']) && $_REQUEST['f'] == 'social') { |
14 | - $this_section = SECTION_SOCIAL; |
|
15 | - $interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/social/home.php','name' => get_lang('Social')); |
|
16 | - $interbreadcrumb[]= array ('url' => 'inbox.php?f=social','name' => get_lang('Inbox')); |
|
14 | + $this_section = SECTION_SOCIAL; |
|
15 | + $interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/social/home.php','name' => get_lang('Social')); |
|
16 | + $interbreadcrumb[]= array ('url' => 'inbox.php?f=social','name' => get_lang('Inbox')); |
|
17 | 17 | } else { |
18 | - $this_section = SECTION_MYPROFILE; |
|
19 | - $interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/auth/profile.php','name' => get_lang('Profile')); |
|
18 | + $this_section = SECTION_MYPROFILE; |
|
19 | + $interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/auth/profile.php','name' => get_lang('Profile')); |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | $social_right_content = ''; |
23 | 23 | |
24 | 24 | if (isset($_GET['f']) && $_GET['f']=='social') { |
25 | - $social_parameter = '?f=social'; |
|
25 | + $social_parameter = '?f=social'; |
|
26 | 26 | } else { |
27 | - if (api_get_setting('extended_profile') == 'true') { |
|
28 | - $social_right_content .= '<div class="actions">'; |
|
27 | + if (api_get_setting('extended_profile') == 'true') { |
|
28 | + $social_right_content .= '<div class="actions">'; |
|
29 | 29 | |
30 | - if (api_get_setting('allow_social_tool') === 'true' && api_get_setting('allow_message_tool') === 'true') { |
|
31 | - $social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/social/profile.php">'. |
|
30 | + if (api_get_setting('allow_social_tool') === 'true' && api_get_setting('allow_message_tool') === 'true') { |
|
31 | + $social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/social/profile.php">'. |
|
32 | 32 | Display::return_icon('shared_profile.png', get_lang('ViewSharedProfile')).'</a>'; |
33 | - } |
|
34 | - if (api_get_setting('allow_message_tool') === 'true') { |
|
35 | - $social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php">'. |
|
33 | + } |
|
34 | + if (api_get_setting('allow_message_tool') === 'true') { |
|
35 | + $social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php">'. |
|
36 | 36 | Display::return_icon('message_new.png',get_lang('ComposeMessage')).'</a>'; |
37 | 37 | $social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php">'. |
38 | 38 | Display::return_icon('inbox.png',get_lang('Inbox')).'</a>'; |
39 | 39 | $social_right_content .= '<a href="'.api_get_path(WEB_PATH).'main/messages/outbox.php">'. |
40 | 40 | Display::return_icon('outbox.png',get_lang('Outbox')).'</a>'; |
41 | - } |
|
42 | - $social_right_content .= '</div>'; |
|
43 | - } |
|
41 | + } |
|
42 | + $social_right_content .= '</div>'; |
|
43 | + } |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | if (empty($_GET['id'])) { |
@@ -9,20 +9,20 @@ discard block |
||
9 | 9 | api_block_anonymous_users(); |
10 | 10 | |
11 | 11 | if (isset($_GET['messages_page_nr'])) { |
12 | - if (api_get_setting('allow_social_tool')=='true' && |
|
12 | + if (api_get_setting('allow_social_tool')=='true' && |
|
13 | 13 | api_get_setting('allow_message_tool')=='true' |
14 | 14 | ) { |
15 | - $social_link = ''; |
|
16 | - if ($_REQUEST['f']=='social') { |
|
17 | - $social_link = '&f=social'; |
|
18 | - } |
|
19 | - header('Location:outbox.php?pager='.Security::remove_XSS($_GET['messages_page_nr']).$social_link.''); |
|
20 | - exit; |
|
21 | - } |
|
15 | + $social_link = ''; |
|
16 | + if ($_REQUEST['f']=='social') { |
|
17 | + $social_link = '&f=social'; |
|
18 | + } |
|
19 | + header('Location:outbox.php?pager='.Security::remove_XSS($_GET['messages_page_nr']).$social_link.''); |
|
20 | + exit; |
|
21 | + } |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | if (api_get_setting('allow_message_tool') != 'true') { |
25 | - api_not_allowed(); |
|
25 | + api_not_allowed(); |
|
26 | 26 | } |
27 | 27 | //jquery thickbox already called from main/inc/header.inc.php |
28 | 28 | |
@@ -50,13 +50,13 @@ discard block |
||
50 | 50 | MAIN CODE |
51 | 51 | */ |
52 | 52 | if (isset($_GET['f']) && $_GET['f'] === 'social') { |
53 | - $this_section = SECTION_SOCIAL; |
|
54 | - $interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/social/home.php','name' => get_lang('Social')); |
|
55 | - $interbreadcrumb[]= array ('url' => '#','name' => get_lang('Outbox')); |
|
53 | + $this_section = SECTION_SOCIAL; |
|
54 | + $interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/social/home.php','name' => get_lang('Social')); |
|
55 | + $interbreadcrumb[]= array ('url' => '#','name' => get_lang('Outbox')); |
|
56 | 56 | } else { |
57 | - $this_section = SECTION_MYPROFILE; |
|
58 | - $interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/auth/profile.php','name' => get_lang('Profile')); |
|
59 | - $interbreadcrumb[]= array ('url' => '#','name' => get_lang('Outbox')); |
|
57 | + $this_section = SECTION_MYPROFILE; |
|
58 | + $interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/auth/profile.php','name' => get_lang('Profile')); |
|
59 | + $interbreadcrumb[]= array ('url' => '#','name' => get_lang('Outbox')); |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | $actions = ''; |
@@ -83,8 +83,8 @@ discard block |
||
83 | 83 | |
84 | 84 | if (isset($info_delete_outbox[0]) && trim($info_delete_outbox[0]) == 'delete') { |
85 | 85 | for ($i = 1; $i <= $count_delete_outbox; $i++) { |
86 | - MessageManager::delete_message_by_user_sender(api_get_user_id(),$info_delete_outbox[$i]); |
|
87 | - } |
|
86 | + MessageManager::delete_message_by_user_sender(api_get_user_id(),$info_delete_outbox[$i]); |
|
87 | + } |
|
88 | 88 | $message_box=get_lang('SelectedMessagesDeleted'). |
89 | 89 | '  |
90 | 90 | <br><a href="../social/index.php?#remote-tab-3">'. |
@@ -1583,7 +1583,6 @@ discard block |
||
1583 | 1583 | * @param string $course_code Course code (optional) |
1584 | 1584 | * @param int $session_id Session ID (optional) |
1585 | 1585 | * @param bool $order |
1586 | - |
|
1587 | 1586 | * @return array Array of subcategories |
1588 | 1587 | */ |
1589 | 1588 | public function get_subcategories($stud_id = null, $course_code = null, $session_id = null, $order = null) |
@@ -1862,7 +1861,6 @@ discard block |
||
1862 | 1861 | * This function, locks a category , only one who can unlock it is |
1863 | 1862 | * the platform administrator. |
1864 | 1863 | * @param int locked 1 or unlocked 0 |
1865 | - |
|
1866 | 1864 | * @return boolean|null |
1867 | 1865 | * */ |
1868 | 1866 | public function lock($locked) |
@@ -194,13 +194,13 @@ discard block |
||
194 | 194 | in exercise/exercise.php, look for note-query-exe-results marker*/ |
195 | 195 | $session_id = $this->get_session_id(); |
196 | 196 | $courseId = $this->getCourseId(); |
197 | - $exercise = new Exercise($courseId); |
|
197 | + $exercise = new Exercise($courseId); |
|
198 | 198 | $exercise->read($this->get_ref_id()); |
199 | 199 | |
200 | 200 | if (!$this->is_hp) { |
201 | 201 | |
202 | - if ($exercise->exercise_was_added_in_lp == false) { |
|
203 | - $sql = "SELECT * FROM $tblStats |
|
202 | + if ($exercise->exercise_was_added_in_lp == false) { |
|
203 | + $sql = "SELECT * FROM $tblStats |
|
204 | 204 | WHERE |
205 | 205 | exe_exo_id = ".intval($this->get_ref_id())." AND |
206 | 206 | orig_lp_id = 0 AND |
@@ -209,15 +209,15 @@ discard block |
||
209 | 209 | session_id = $session_id AND |
210 | 210 | c_id = $courseId |
211 | 211 | "; |
212 | - } else { |
|
213 | - $lpId = null; |
|
214 | - if (!empty($exercise->lpList)) { |
|
215 | - // Taking only the first LP |
|
216 | - $lpId = current($exercise->lpList); |
|
217 | - $lpId = $lpId['lp_id']; |
|
218 | - } |
|
219 | - |
|
220 | - $sql = "SELECT * FROM $tblStats |
|
212 | + } else { |
|
213 | + $lpId = null; |
|
214 | + if (!empty($exercise->lpList)) { |
|
215 | + // Taking only the first LP |
|
216 | + $lpId = current($exercise->lpList); |
|
217 | + $lpId = $lpId['lp_id']; |
|
218 | + } |
|
219 | + |
|
220 | + $sql = "SELECT * FROM $tblStats |
|
221 | 221 | WHERE |
222 | 222 | exe_exo_id = ".intval($this->get_ref_id())." AND |
223 | 223 | orig_lp_id = $lpId AND |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | session_id = $session_id AND |
226 | 226 | c_id = $courseId |
227 | 227 | "; |
228 | - } |
|
228 | + } |
|
229 | 229 | |
230 | 230 | if (!empty($stud_id) && $type != 'ranking') { |
231 | 231 | $sql .= " AND exe_user_id = $stud_id "; |
@@ -28,15 +28,15 @@ |
||
28 | 28 | switch ($_GET["cmd"]) { |
29 | 29 | case "clear_stapi": |
30 | 30 | echo "Are you sure you are willing to erease all storage api data (no backup)? <a href='cli.php?cmd=clear_stapi_confirm' >Yes</a>"; |
31 | - break; |
|
31 | + break; |
|
32 | 32 | case "clear_stapi_confirm": |
33 | 33 | Database::query("delete from ".Database::get_main_table(TABLE_TRACK_STORED_VALUES)); |
34 | - Database::query("delete from ".Database::get_main_table(TABLE_TRACK_STORED_VALUES_STACK)); |
|
35 | - echo "Done"; |
|
36 | - break; |
|
34 | + Database::query("delete from ".Database::get_main_table(TABLE_TRACK_STORED_VALUES_STACK)); |
|
35 | + echo "Done"; |
|
36 | + break; |
|
37 | 37 | default: |
38 | 38 | echo "UNKNOWN COMMAND"; |
39 | - break; |
|
39 | + break; |
|
40 | 40 | } |
41 | 41 | /** |
42 | 42 | * Footer |
@@ -297,7 +297,7 @@ discard block |
||
297 | 297 | <option value="">--</option> |
298 | 298 | <?php |
299 | 299 | echo Display :: get_alphabet_options($first_letter_user); |
300 | - ?> |
|
300 | + ?> |
|
301 | 301 | </select> |
302 | 302 | </td> |
303 | 303 | <td width="20%"> </td> |
@@ -308,8 +308,8 @@ discard block |
||
308 | 308 | <select name="firstLetterCourse" onchange="javascript:document.formulaire.form_sent.value='2'; document.formulaire.submit();"> |
309 | 309 | <option value="">--</option> |
310 | 310 | <?php |
311 | - echo Display :: get_alphabet_options($first_letter_course); |
|
312 | - ?> |
|
311 | + echo Display :: get_alphabet_options($first_letter_course); |
|
312 | + ?> |
|
313 | 313 | </select> |
314 | 314 | </td> |
315 | 315 | </tr> |
@@ -325,7 +325,7 @@ discard block |
||
325 | 325 | $userName = $officialCode.$userName; |
326 | 326 | } |
327 | 327 | echo $userName; |
328 | - ?> |
|
328 | + ?> |
|
329 | 329 | </option> |
330 | 330 | <?php } ?> |
331 | 331 | </select> |
@@ -5,8 +5,7 @@ |
||
5 | 5 | @author Julio Montoya fixing lot of little details |
6 | 6 | @todo this script is not ready for a production use that's why |
7 | 7 | I'm commenting the function delete_inactive_student |
8 | - |
|
9 | -* @package chamilo.admin |
|
8 | + * @package chamilo.admin |
|
10 | 9 | * script pour effacer les user inactif depuis x temps |
11 | 10 | */ |
12 | 11 | $cidReset = true; |