@@ -5,8 +5,8 @@ |
||
5 | 5 | */ |
6 | 6 | require_once '../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; |
@@ -4,9 +4,9 @@ |
||
4 | 4 | * @package chamilo.messages |
5 | 5 | */ |
6 | 6 | require_once '../inc/global.inc.php'; |
7 | -if (api_get_setting('allow_social_tool')=='true' && api_get_setting('allow_message_tool')=='true') { |
|
7 | +if (api_get_setting('allow_social_tool') == 'true' && api_get_setting('allow_message_tool') == 'true') { |
|
8 | 8 | header('Location:inbox.php?f=social'); |
9 | -} elseif ( api_get_setting('allow_message_tool')=='true') { |
|
9 | +} elseif (api_get_setting('allow_message_tool') == 'true') { |
|
10 | 10 | header('Location:inbox.php'); |
11 | 11 | } |
12 | 12 | exit; |
@@ -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 | |
@@ -54,13 +54,13 @@ discard block |
||
54 | 54 | MAIN CODE |
55 | 55 | */ |
56 | 56 | if (isset($_GET['f']) && $_GET['f']=='social') { |
57 | - $this_section = SECTION_SOCIAL; |
|
58 | - $interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/social/home.php','name' => get_lang('Social')); |
|
59 | - $interbreadcrumb[]= array ('url' => '#','name' => get_lang('Outbox')); |
|
57 | + $this_section = SECTION_SOCIAL; |
|
58 | + $interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/social/home.php','name' => get_lang('Social')); |
|
59 | + $interbreadcrumb[]= array ('url' => '#','name' => get_lang('Outbox')); |
|
60 | 60 | } else { |
61 | - $this_section = SECTION_MYPROFILE; |
|
62 | - $interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/auth/profile.php','name' => get_lang('Profile')); |
|
63 | - $interbreadcrumb[]= array ('url' => '#','name' => get_lang('Outbox')); |
|
61 | + $this_section = SECTION_MYPROFILE; |
|
62 | + $interbreadcrumb[]= array ('url' => api_get_path(WEB_PATH).'main/auth/profile.php','name' => get_lang('Profile')); |
|
63 | + $interbreadcrumb[]= array ('url' => '#','name' => get_lang('Outbox')); |
|
64 | 64 | } |
65 | 65 | |
66 | 66 | $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">'. |
@@ -9,11 +9,11 @@ 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' && |
|
13 | - api_get_setting('allow_message_tool')=='true' |
|
12 | + if (api_get_setting('allow_social_tool') == 'true' && |
|
13 | + api_get_setting('allow_message_tool') == 'true' |
|
14 | 14 | ) { |
15 | 15 | $social_link = ''; |
16 | - if ($_REQUEST['f']=='social') { |
|
16 | + if ($_REQUEST['f'] == 'social') { |
|
17 | 17 | $social_link = '&f=social'; |
18 | 18 | } |
19 | 19 | header('Location:outbox.php?pager='.Security::remove_XSS($_GET['messages_page_nr']).$social_link.''); |
@@ -51,46 +51,46 @@ discard block |
||
51 | 51 | */ |
52 | 52 | if (isset($_GET['f']) && $_GET['f'] === 'social') { |
53 | 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')); |
|
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 | 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')); |
|
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 = ''; |
63 | 63 | if (api_get_setting('extended_profile') == 'true') { |
64 | 64 | if (api_get_setting('allow_social_tool') == 'true' && api_get_setting('allow_message_tool') == 'true') { |
65 | - $actions .= '<a href="'.api_get_path(WEB_PATH).'main/social/profile.php">'. |
|
65 | + $actions .= '<a href="'.api_get_path(WEB_PATH).'main/social/profile.php">'. |
|
66 | 66 | Display::return_icon('shared_profile.png', get_lang('ViewSharedProfile')).'</a>'; |
67 | 67 | } |
68 | 68 | if (api_get_setting('allow_message_tool') == 'true') { |
69 | 69 | //echo '<a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php">'.Display::return_icon('inbox.png').' '.get_lang('Messages').'</a>'; |
70 | - $actions .= '<a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php">'. |
|
71 | - Display::return_icon('message_new.png',get_lang('ComposeMessage')).'</a>'; |
|
72 | - $actions .= '<a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php">'. |
|
73 | - Display::return_icon('inbox.png',get_lang('Inbox')).'</a>'; |
|
74 | - $actions .= '<a href="'.api_get_path(WEB_PATH).'main/messages/outbox.php">'. |
|
75 | - Display::return_icon('outbox.png',get_lang('Outbox')).'</a>'; |
|
70 | + $actions .= '<a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php">'. |
|
71 | + Display::return_icon('message_new.png', get_lang('ComposeMessage')).'</a>'; |
|
72 | + $actions .= '<a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php">'. |
|
73 | + Display::return_icon('inbox.png', get_lang('Inbox')).'</a>'; |
|
74 | + $actions .= '<a href="'.api_get_path(WEB_PATH).'main/messages/outbox.php">'. |
|
75 | + Display::return_icon('outbox.png', get_lang('Outbox')).'</a>'; |
|
76 | 76 | } |
77 | 77 | } |
78 | 78 | |
79 | 79 | |
80 | -$info_delete_outbox =array(); |
|
81 | -$info_delete_outbox = isset($_GET['form_delete_outbox']) ? explode(',',$_GET['form_delete_outbox']) : ''; |
|
80 | +$info_delete_outbox = array(); |
|
81 | +$info_delete_outbox = isset($_GET['form_delete_outbox']) ? explode(',', $_GET['form_delete_outbox']) : ''; |
|
82 | 82 | $count_delete_outbox = count($info_delete_outbox) - 1; |
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]); |
|
86 | + MessageManager::delete_message_by_user_sender(api_get_user_id(), $info_delete_outbox[$i]); |
|
87 | 87 | } |
88 | - $message_box=get_lang('SelectedMessagesDeleted'). |
|
88 | + $message_box = get_lang('SelectedMessagesDeleted'). |
|
89 | 89 | '  |
90 | 90 | <br><a href="../social/index.php?#remote-tab-3">'. |
91 | 91 | get_lang('BackToOutbox'). |
92 | 92 | '</a>'; |
93 | - Display::display_normal_message(api_xml_http_response_encode($message_box),false); |
|
93 | + Display::display_normal_message(api_xml_http_response_encode($message_box), false); |
|
94 | 94 | exit; |
95 | 95 | } |
96 | 96 | |
@@ -117,23 +117,23 @@ discard block |
||
117 | 117 | } |
118 | 118 | //MAIN CONTENT |
119 | 119 | if ($action == 'delete') { |
120 | - $delete_list_id=array(); |
|
120 | + $delete_list_id = array(); |
|
121 | 121 | if (isset($_POST['out'])) { |
122 | - $delete_list_id=$_POST['out']; |
|
122 | + $delete_list_id = $_POST['out']; |
|
123 | 123 | } |
124 | 124 | if (isset($_POST['id'])) { |
125 | - $delete_list_id=$_POST['id']; |
|
125 | + $delete_list_id = $_POST['id']; |
|
126 | 126 | } |
127 | 127 | for ($i = 0; $i < count($delete_list_id); $i++) { |
128 | 128 | MessageManager::delete_message_by_user_sender(api_get_user_id(), $delete_list_id[$i]); |
129 | 129 | } |
130 | - $delete_list_id=array(); |
|
130 | + $delete_list_id = array(); |
|
131 | 131 | $social_right_content .= MessageManager::outbox_display($keyword); |
132 | 132 | } elseif ($action == 'deleteone') { |
133 | 133 | $delete_list_id = array(); |
134 | 134 | $id = Security::remove_XSS($_GET['id']); |
135 | 135 | MessageManager::delete_message_by_user_sender(api_get_user_id(), $id); |
136 | - $delete_list_id=array(); |
|
136 | + $delete_list_id = array(); |
|
137 | 137 | $social_right_content .= MessageManager::outbox_display($keyword); |
138 | 138 | } else { |
139 | 139 | $social_right_content .= MessageManager::outbox_display($keyword); |
@@ -636,11 +636,11 @@ |
||
636 | 636 | } |
637 | 637 | $formToDisplay = $form->returnForm(); |
638 | 638 | } else { |
639 | - if (!empty($sessionId)) { |
|
640 | - $sessionInfo = api_get_session_info($sessionId); |
|
641 | - $startDate = $sessionInfo['access_start_date']; |
|
642 | - $endDate = $sessionInfo['access_end_date']; |
|
643 | - } |
|
639 | + if (!empty($sessionId)) { |
|
640 | + $sessionInfo = api_get_session_info($sessionId); |
|
641 | + $startDate = $sessionInfo['access_start_date']; |
|
642 | + $endDate = $sessionInfo['access_end_date']; |
|
643 | + } |
|
644 | 644 | } |
645 | 645 | |
646 | 646 | $attendance = new Attendance(); |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | $attendance->set_attendance_qualify_title($_POST['attendance_qualify_title']); |
60 | 60 | $attendance->set_attendance_weight($_POST['attendance_weight']); |
61 | 61 | $link_to_gradebook = false; |
62 | - if ( isset($_POST['attendance_qualify_gradebook']) && $_POST['attendance_qualify_gradebook'] == 1 ) { |
|
62 | + if (isset($_POST['attendance_qualify_gradebook']) && $_POST['attendance_qualify_gradebook'] == 1) { |
|
63 | 63 | $link_to_gradebook = true; |
64 | 64 | } |
65 | 65 | $attendance->category_id = $_POST['category_id']; |
@@ -539,17 +539,17 @@ discard block |
||
539 | 539 | } |
540 | 540 | } |
541 | 541 | $max_cols_per_page = 12; //10 dates + 2 name and number |
542 | - $max_dates_per_page = $max_dates_per_page_original = $max_cols_per_page - 2;//10 |
|
542 | + $max_dates_per_page = $max_dates_per_page_original = $max_cols_per_page - 2; //10 |
|
543 | 543 | $rows = count($data_table); |
544 | 544 | |
545 | 545 | if ($cols > $max_cols_per_page) { |
546 | - $number_tables = round(($cols-2)/$max_dates_per_page); |
|
546 | + $number_tables = round(($cols - 2) / $max_dates_per_page); |
|
547 | 547 | $headers = $data_table[0]; |
548 | 548 | $all = array(); |
549 | 549 | $tables = array(); |
550 | 550 | $changed = 1; |
551 | 551 | |
552 | - for ($i= 0; $i <= $rows; $i++) { |
|
552 | + for ($i = 0; $i <= $rows; $i++) { |
|
553 | 553 | $row = isset($data_table[$i]) ? $data_table[$i] : null; |
554 | 554 | $key = 1; |
555 | 555 | $max_dates_per_page = 10; |
@@ -560,7 +560,7 @@ discard block |
||
560 | 560 | foreach ($item as $value) { |
561 | 561 | if ($count_j >= $max_dates_per_page) { |
562 | 562 | $key++; |
563 | - $max_dates_per_page = $max_dates_per_page_original*$key; |
|
563 | + $max_dates_per_page = $max_dates_per_page_original * $key; |
|
564 | 564 | //magic hack |
565 | 565 | $tables[$key][$i][] = $tables[1][$i][0]; |
566 | 566 | $tables[$key][$i][] = $tables[1][$i][1]; |
@@ -617,8 +617,8 @@ discard block |
||
617 | 617 | $form = new FormValidator( |
618 | 618 | 'search', |
619 | 619 | 'post', |
620 | - api_get_self() . '?' . api_get_cidreq( |
|
621 | - ) . '&action=calendar_logins' |
|
620 | + api_get_self().'?'.api_get_cidreq( |
|
621 | + ).'&action=calendar_logins' |
|
622 | 622 | ); |
623 | 623 | $form->addDateRangePicker('range', get_lang('DateRange')); |
624 | 624 | $form->addButton('submit', get_lang('Submit')); |
@@ -4,7 +4,7 @@ |
||
4 | 4 | // See AttendanceController::calendarLogins function |
5 | 5 | echo '<div class="actions">'; |
6 | 6 | echo '<a href="index.php?'.api_get_cidreq().'&action=calendar_list">'. |
7 | - Display::return_icon('back.png',get_lang('AttendanceCalendar'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
7 | + Display::return_icon('back.png', get_lang('AttendanceCalendar'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
8 | 8 | echo '</div>'; |
9 | 9 | |
10 | 10 | echo $form; |
@@ -14,15 +14,15 @@ discard block |
||
14 | 14 | echo '<div class="actions">'; |
15 | 15 | if ($action == 'calendar_add') { |
16 | 16 | echo '<a href="index.php?'.api_get_cidreq().'&action=calendar_list&attendance_id='.$attendance_id.'">'. |
17 | - Display::return_icon('back.png',get_lang('AttendanceCalendar'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
17 | + Display::return_icon('back.png', get_lang('AttendanceCalendar'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
18 | 18 | } else { |
19 | 19 | echo '<a href="index.php?'.api_get_cidreq().'&action=attendance_sheet_list&attendance_id='.$attendance_id.'">'. |
20 | - Display::return_icon('back.png',get_lang('AttendanceSheet'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
20 | + Display::return_icon('back.png', get_lang('AttendanceSheet'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
21 | 21 | if (api_is_allowed_to_edit()) { |
22 | 22 | echo '<a href="index.php?'.api_get_cidreq().'&action=calendar_add&attendance_id='.$attendance_id.'">'. |
23 | - Display::return_icon('add.png',get_lang('AddDateAndTime'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
23 | + Display::return_icon('add.png', get_lang('AddDateAndTime'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
24 | 24 | echo '<a onclick="javascript:if(!confirm(\''.get_lang('AreYouSureToDeleteAllDates').'\')) return false;" href="index.php?'.api_get_cidreq().'&action=calendar_all_delete&attendance_id='.$attendance_id.'">'. |
25 | - Display::return_icon('clean.png',get_lang('CleanCalendar'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
25 | + Display::return_icon('clean.png', get_lang('CleanCalendar'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
26 | 26 | } |
27 | 27 | } |
28 | 28 | echo '</div>'; |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | $form = new FormValidator( |
59 | 59 | 'attendance_calendar_add', |
60 | 60 | 'POST', |
61 | - 'index.php?action=calendar_add&attendance_id='.$attendance_id.'&' . api_get_cidreq(), |
|
61 | + 'index.php?action=calendar_add&attendance_id='.$attendance_id.'&'.api_get_cidreq(), |
|
62 | 62 | '' |
63 | 63 | ); |
64 | 64 | $form->addElement('header', get_lang('AddADateTime')); |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | 'weekly' => get_lang('RepeatWeekly'), |
96 | 96 | 'monthlyByDate' => get_lang('RepeatMonthlyByDate') |
97 | 97 | ); |
98 | - $form->addElement('select', 'repeat_type', get_lang('RepeatType') , $a_repeat_type); |
|
98 | + $form->addElement('select', 'repeat_type', get_lang('RepeatType'), $a_repeat_type); |
|
99 | 99 | |
100 | 100 | $form->addElement('date_picker', 'end_date_time', get_lang('RepeatEnd'), array('form_name'=>'attendance_calendar_add')); |
101 | 101 | $defaults['end_date_time'] = date('Y-m-d'); |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | $form = new FormValidator( |
132 | 132 | 'attendance_calendar_edit', |
133 | 133 | 'POST', |
134 | - 'index.php?action=calendar_edit&attendance_id=' . $attendance_id . '&calendar_id=' . $calendar_id . '&' . api_get_cidreq(), |
|
134 | + 'index.php?action=calendar_edit&attendance_id='.$attendance_id.'&calendar_id='.$calendar_id.'&'.api_get_cidreq(), |
|
135 | 135 | '' |
136 | 136 | ); |
137 | 137 | $form->addDateTimePicker('date_time', array(get_lang('Date')), array('form_name'=>'attendance_calendar_edit'), 5); |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | get_lang('DateTime'), |
148 | 148 | null, |
149 | 149 | ICON_SIZE_MEDIUM |
150 | - ).' '.substr($calendar['date_time'], 0, strlen($calendar['date_time'])- 3) .' '; |
|
150 | + ).' '.substr($calendar['date_time'], 0, strlen($calendar['date_time']) - 3).' '; |
|
151 | 151 | |
152 | 152 | if (isset($calendar['groups']) && !empty($calendar['groups'])) { |
153 | 153 | foreach ($calendar['groups'] as $group) { |
@@ -91,7 +91,7 @@ |
||
91 | 91 | $content .= '<div class="courseadminview-activity-3col"><span class="viewcaption">'.get_lang('SessionData').'</span> |
92 | 92 | <table width="100%">'; |
93 | 93 | $content .= CourseHome::show_session_data($session_id); |
94 | - $content .= '</table></div>'; |
|
94 | + $content .= '</table></div>'; |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | $content .= '<div class="Authoringview">'; |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | // Show message to confirm that a tool it to be hidden from available tools |
38 | 38 | // visibility 0,1->2 |
39 | 39 | if (!empty($_GET['askDelete'])) { |
40 | - $content .='<div id="toolhide">'.get_lang('DelLk').'<br /> |
|
40 | + $content .= '<div id="toolhide">'.get_lang('DelLk').'<br /> |
|
41 | 41 | <a href="'.api_get_self().'">'.get_lang('No').'</a> | |
42 | 42 | <a href="'.api_get_self().'?delete=yes&id='.$id.'">'.get_lang('Yes').'</a> |
43 | 43 | </div>'; |
@@ -55,14 +55,14 @@ discard block |
||
55 | 55 | |
56 | 56 | // Start of tools for CourseAdmins (teachers/tutors) |
57 | 57 | if (api_is_allowed_to_edit(null, true) && !api_is_coach()) { |
58 | - $content .= '<div class="courseadminview" style="border:0px; margin-top: 0px;padding:5px;"> |
|
58 | + $content .= '<div class="courseadminview" style="border:0px; margin-top: 0px;padding:5px;"> |
|
59 | 59 | <div class="normal-message" id="id_normal_message" style="display:none">'; |
60 | - $content .= '<img src="'.api_get_path(WEB_PATH).'main/inc/lib/javascript/indicator.gif"/> '; |
|
61 | - $content .= get_lang('PleaseStandBy'); |
|
60 | + $content .= '<img src="'.api_get_path(WEB_PATH).'main/inc/lib/javascript/indicator.gif"/> '; |
|
61 | + $content .= get_lang('PleaseStandBy'); |
|
62 | 62 | |
63 | - $content .= '</div> |
|
63 | + $content .= '</div> |
|
64 | 64 | <div class="confirmation-message" id="id_confirmation_message" style="display:none"></div></div>'; |
65 | - $content .= '<div id="activity-3col">'; |
|
65 | + $content .= '<div id="activity-3col">'; |
|
66 | 66 | |
67 | 67 | if (api_get_setting('show_session_data') == 'true' && $session_id > 0) { |
68 | 68 | $content .= '<div class="courseadminview-activity-3col"><span class="viewcaption">'.get_lang('SessionData').'</span> |
@@ -90,10 +90,10 @@ discard block |
||
90 | 90 | $content .= '<div class="courseadminview-activity-3col"><span class="viewcaption">'.get_lang('SessionData').'</span> |
91 | 91 | <table width="100%">'; |
92 | 92 | $content .= CourseHome::show_session_data($session_id); |
93 | - $content .= '</table></div>'; |
|
93 | + $content .= '</table></div>'; |
|
94 | 94 | } |
95 | 95 | |
96 | - $content .= '<div class="Authoringview">'; |
|
96 | + $content .= '<div class="Authoringview">'; |
|
97 | 97 | $my_list = CourseHome::get_tools_category(TOOL_STUDENT_VIEW); |
98 | 98 | $content .= CourseHome::show_tools_category($my_list); |
99 | 99 | $content .= '</div>'; |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | $order_tool_list = array(); |
107 | 107 | foreach ($my_list as $key => $new_tool) { |
108 | 108 | $tool_name = CourseHome::translate_tool_name($new_tool); |
109 | - $order_tool_list [$key]= $tool_name; |
|
109 | + $order_tool_list [$key] = $tool_name; |
|
110 | 110 | } |
111 | 111 | natsort($order_tool_list); |
112 | 112 | $my_temp_tool_array = array(); |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | $return_skills = array(); |
40 | 40 | foreach ($skills as $skill) { |
41 | 41 | $skill['caption'] = $skill['name']; |
42 | - $skill['value'] = $skill['id']; |
|
42 | + $skill['value'] = $skill['id']; |
|
43 | 43 | $return_skills[] = $skill; |
44 | 44 | } |
45 | 45 | echo json_encode($return_skills); |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | if (!empty($gradebooks)) { |
52 | 52 | foreach ($gradebooks as $gradebook) { |
53 | 53 | if ($gradebook['parent_id'] == 0 && !empty($gradebook['certif_min_score']) && !empty($gradebook['document_id'])) { |
54 | - $gradebook_list[] = $gradebook; |
|
54 | + $gradebook_list[] = $gradebook; |
|
55 | 55 | //$gradebook['name'] = $gradebook['name']; |
56 | 56 | //$gradebook_list[] = $gradebook; |
57 | 57 | } else { |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | $return = array(); |
68 | 68 | foreach ($gradebooks as $item) { |
69 | 69 | $item['caption'] = $item['name']; |
70 | - $item['value'] = $item['id']; |
|
70 | + $item['value'] = $item['id']; |
|
71 | 71 | $return[] = $item; |
72 | 72 | } |
73 | 73 | echo json_encode($return); |
@@ -92,13 +92,13 @@ discard block |
||
92 | 92 | } |
93 | 93 | break; |
94 | 94 | case 'get_skills_by_profile': |
95 | - $skill_rel_profile = new SkillRelProfile(); |
|
95 | + $skill_rel_profile = new SkillRelProfile(); |
|
96 | 96 | $profile_id = isset($_REQUEST['profile_id']) ? $_REQUEST['profile_id'] : null; |
97 | 97 | $skills = $skill_rel_profile->get_skills_by_profile($profile_id); |
98 | 98 | echo json_encode($skills); |
99 | 99 | break; |
100 | 100 | case 'get_saved_profiles': |
101 | - $skill_profile = new SkillProfile(); |
|
101 | + $skill_profile = new SkillProfile(); |
|
102 | 102 | $profiles = $skill_profile->get_all(); |
103 | 103 | Display::display_no_header(); |
104 | 104 | Display::$global_template->assign('profiles', $profiles); |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | $success = false; |
188 | 188 | } |
189 | 189 | |
190 | - $result = array ( |
|
190 | + $result = array( |
|
191 | 191 | 'success' => $success, |
192 | 192 | 'data' => $return |
193 | 193 | ); |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | $skills = $skill->get_direct_parents($id); |
199 | 199 | $return = array(); |
200 | 200 | foreach ($skills as $skill) { |
201 | - $return [$skill['data']['id']] = array ( |
|
201 | + $return [$skill['data']['id']] = array( |
|
202 | 202 | 'id' => $skill['data']['id'], |
203 | 203 | 'parent_id' => $skill['data']['parent_id'], |
204 | 204 | 'name' => $skill['data']['name'] |
@@ -207,8 +207,8 @@ discard block |
||
207 | 207 | echo json_encode($return); |
208 | 208 | break; |
209 | 209 | case 'profile_matches': |
210 | - $skill_rel_user = new SkillRelUser(); |
|
211 | - $skills = (!empty($_REQUEST['skill_id'])?$_REQUEST['skill_id']:array()); |
|
210 | + $skill_rel_user = new SkillRelUser(); |
|
211 | + $skills = (!empty($_REQUEST['skill_id']) ? $_REQUEST['skill_id'] : array()); |
|
212 | 212 | |
213 | 213 | $total_skills_to_search = $skills; |
214 | 214 | $users = $skill_rel_user->get_user_by_skills($skills); |
@@ -55,7 +55,7 @@ |
||
55 | 55 | //$gradebook['name'] = $gradebook['name']; |
56 | 56 | //$gradebook_list[] = $gradebook; |
57 | 57 | } else { |
58 | - // $gradebook['name'] = $gradebook_list[$gradebook['parent_id']]['name'].' > '.$gradebook['name']; |
|
58 | + // $gradebook['name'] = $gradebook_list[$gradebook['parent_id']]['name'].' > '.$gradebook['name']; |
|
59 | 59 | //$gradebook_list[] = $gradebook; |
60 | 60 | } |
61 | 61 | } |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | */ |
9 | 9 | |
10 | 10 | require_once '../global.inc.php'; |
11 | -require_once api_get_path(SYS_CODE_PATH) . 'forum/forumfunction.inc.php'; |
|
11 | +require_once api_get_path(SYS_CODE_PATH).'forum/forumfunction.inc.php'; |
|
12 | 12 | |
13 | 13 | // First, protect this script |
14 | 14 | api_protect_course_script(false); |
@@ -63,13 +63,13 @@ discard block |
||
63 | 63 | break; |
64 | 64 | } |
65 | 65 | // If pass all previous control, user can edit post |
66 | - $courseId = isset($_REQUEST['c_id'])? intval($_REQUEST['c_id']) : api_get_course_int_id(); |
|
66 | + $courseId = isset($_REQUEST['c_id']) ? intval($_REQUEST['c_id']) : api_get_course_int_id(); |
|
67 | 67 | $json['courseId'] = $courseId; |
68 | - $forumId = isset($_REQUEST['forum'])? intval($_REQUEST['forum']) : null; |
|
68 | + $forumId = isset($_REQUEST['forum']) ? intval($_REQUEST['forum']) : null; |
|
69 | 69 | $json['forum'] = $forumId; |
70 | - $threadId = isset($_REQUEST['thread'])? intval($_REQUEST['thread']) : null; |
|
70 | + $threadId = isset($_REQUEST['thread']) ? intval($_REQUEST['thread']) : null; |
|
71 | 71 | $json['thread'] = $threadId; |
72 | - $postId = isset($_REQUEST['postId'])? intval($_REQUEST['postId']) : null; |
|
72 | + $postId = isset($_REQUEST['postId']) ? intval($_REQUEST['postId']) : null; |
|
73 | 73 | $json['postId'] = $postId; |
74 | 74 | |
75 | 75 | if (!empty($courseId) && |
@@ -23,7 +23,7 @@ |
||
23 | 23 | // set URL and other appropriate options |
24 | 24 | $defaults = array( |
25 | 25 | CURLOPT_URL => $url, |
26 | - CURLOPT_FOLLOWLOCATION => true, // follow redirects accept youtube.com |
|
26 | + CURLOPT_FOLLOWLOCATION => true, // follow redirects accept youtube.com |
|
27 | 27 | CURLOPT_HEADER => 0, |
28 | 28 | CURLOPT_RETURNTRANSFER => true, |
29 | 29 | CURLOPT_TIMEOUT => 4 |