@@ -3122,8 +3122,9 @@ |
||
3122 | 3122 | global $DaysShort, $course_path; |
3123 | 3123 | //Handle leap year |
3124 | 3124 | $numberofdays = array (0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31); |
3125 | - if (($year % 400 == 0) or ($year % 4 == 0 and $year % 100 <> 0)) |
|
3126 | - $numberofdays[2] = 29; |
|
3125 | + if (($year % 400 == 0) or ($year % 4 == 0 and $year % 100 <> 0)) { |
|
3126 | + $numberofdays[2] = 29; |
|
3127 | + } |
|
3127 | 3128 | //Get the first day of the month |
3128 | 3129 | $dayone = getdate(mktime(0, 0, 0, $month, 1, $year)); |
3129 | 3130 | //Start the week on monday |
@@ -1499,12 +1499,12 @@ discard block |
||
1499 | 1499 | } |
1500 | 1500 | |
1501 | 1501 | if (empty($session_id)) { |
1502 | - $sessionCondition = " |
|
1502 | + $sessionCondition = " |
|
1503 | 1503 | ( |
1504 | 1504 | agenda.session_id = 0 AND (ip.session_id IS NULL OR ip.session_id = 0) |
1505 | 1505 | ) "; |
1506 | 1506 | } else { |
1507 | - $sessionCondition = " |
|
1507 | + $sessionCondition = " |
|
1508 | 1508 | ( |
1509 | 1509 | agenda.session_id = $session_id AND |
1510 | 1510 | ip.session_id = $session_id |
@@ -1543,13 +1543,13 @@ discard block |
||
1543 | 1543 | } |
1544 | 1544 | |
1545 | 1545 | if (empty($session_id)) { |
1546 | - $sessionCondition = " |
|
1546 | + $sessionCondition = " |
|
1547 | 1547 | ( |
1548 | 1548 | agenda.session_id = 0 AND |
1549 | 1549 | (ip.session_id IS NULL OR ip.session_id = 0) |
1550 | 1550 | ) "; |
1551 | 1551 | } else { |
1552 | - $sessionCondition = " |
|
1552 | + $sessionCondition = " |
|
1553 | 1553 | ( |
1554 | 1554 | agenda.session_id = $session_id AND |
1555 | 1555 | ip.session_id = $session_id |
@@ -1601,7 +1601,7 @@ discard block |
||
1601 | 1601 | while ($row = Database::fetch_array($result, 'ASSOC')) { |
1602 | 1602 | $event = array(); |
1603 | 1603 | $event['id'] = 'course_'.$row['id']; |
1604 | - $event['unique_id'] = $row['iid']; |
|
1604 | + $event['unique_id'] = $row['iid']; |
|
1605 | 1605 | // To avoid doubles |
1606 | 1606 | if (in_array($event['unique_id'], $eventsAdded)) { |
1607 | 1607 | continue; |
@@ -2151,7 +2151,7 @@ discard block |
||
2151 | 2151 | ); |
2152 | 2152 | |
2153 | 2153 | $form->addLabel('', |
2154 | - '<span id="link-more-attach"><a href="javascript://" onclick="return add_image_form()">'.get_lang('AddOneMoreFile').'</a></span> ('.sprintf(get_lang('MaximunFileSizeX'),format_file_size(api_get_setting('message_max_upload_filesize'))).')'); |
|
2154 | + '<span id="link-more-attach"><a href="javascript://" onclick="return add_image_form()">'.get_lang('AddOneMoreFile').'</a></span> ('.sprintf(get_lang('MaximunFileSizeX'), format_file_size(api_get_setting('message_max_upload_filesize'))).')'); |
|
2155 | 2155 | |
2156 | 2156 | |
2157 | 2157 | //if ($showAttachmentForm) { |
@@ -2729,8 +2729,8 @@ discard block |
||
2729 | 2729 | |
2730 | 2730 | $startDateTime = api_get_local_time($start->format('Y-m-d H:i:s'), $currentTimeZone, $start->format('e')); |
2731 | 2731 | $endDateTime = api_get_local_time($end->format('Y-m-d H:i'), $currentTimeZone, $end->format('e')); |
2732 | - $title = api_convert_encoding((string)$event->summary, $charset, 'UTF-8'); |
|
2733 | - $description = api_convert_encoding((string)$event->description, $charset, 'UTF-8'); |
|
2732 | + $title = api_convert_encoding((string) $event->summary, $charset, 'UTF-8'); |
|
2733 | + $description = api_convert_encoding((string) $event->description, $charset, 'UTF-8'); |
|
2734 | 2734 | |
2735 | 2735 | $id = $this->addEvent( |
2736 | 2736 | $startDateTime, |
@@ -2872,7 +2872,7 @@ discard block |
||
2872 | 2872 | ORDER BY start_date "; |
2873 | 2873 | } else { |
2874 | 2874 | // if the user is not an administrator of that course |
2875 | - if (is_array($group_memberships) && count($group_memberships)>0) { |
|
2875 | + if (is_array($group_memberships) && count($group_memberships) > 0) { |
|
2876 | 2876 | $sqlquery = "SELECT agenda.*, ip.visibility, ip.to_group_id, ip.insert_user_id, ip.ref |
2877 | 2877 | FROM ".$TABLEAGENDA." agenda, |
2878 | 2878 | ".$TABLE_ITEMPROPERTY." ip |
@@ -2902,14 +2902,14 @@ discard block |
||
2902 | 2902 | $agendaday = -1; |
2903 | 2903 | if ($item['start_date'] != '0000-00-00 00:00:00') { |
2904 | 2904 | $item['start_date'] = api_get_local_time($item['start_date']); |
2905 | - $item['start_date_tms'] = api_strtotime($item['start_date']); |
|
2905 | + $item['start_date_tms'] = api_strtotime($item['start_date']); |
|
2906 | 2906 | $agendaday = date("j", $item['start_date_tms']); |
2907 | 2907 | } |
2908 | 2908 | if ($item['end_date'] != '0000-00-00 00:00:00') { |
2909 | 2909 | $item['end_date'] = api_get_local_time($item['end_date']); |
2910 | 2910 | } |
2911 | 2911 | |
2912 | - $url = api_get_path(WEB_CODE_PATH)."calendar/agenda.php?cidReq=".urlencode($array_course_info["code"])."&day=$agendaday&month=$month&year=$year#$agendaday"; |
|
2912 | + $url = api_get_path(WEB_CODE_PATH)."calendar/agenda.php?cidReq=".urlencode($array_course_info["code"])."&day=$agendaday&month=$month&year=$year#$agendaday"; |
|
2913 | 2913 | |
2914 | 2914 | $item['url'] = $url; |
2915 | 2915 | $item['course_name'] = $array_course_info['title']; |
@@ -2921,9 +2921,9 @@ discard block |
||
2921 | 2921 | } |
2922 | 2922 | |
2923 | 2923 | // sorting by hour for every day |
2924 | - $agendaitems = array (); |
|
2924 | + $agendaitems = array(); |
|
2925 | 2925 | while (list ($agendaday, $tmpitems) = each($items)) { |
2926 | - if(!isset($agendaitems[$agendaday])) { |
|
2926 | + if (!isset($agendaitems[$agendaday])) { |
|
2927 | 2927 | $agendaitems[$agendaday] = ''; |
2928 | 2928 | } |
2929 | 2929 | sort($tmpitems); |
@@ -3097,9 +3097,9 @@ discard block |
||
3097 | 3097 | $end_year = $start_end_day_of_week['end']['year']; |
3098 | 3098 | // in sql statements you have to use year-month-day for date calculations |
3099 | 3099 | $start_filter = $start_year."-".$start_month."-".$start_day." 00:00:00"; |
3100 | - $start_filter = api_get_utc_datetime($start_filter); |
|
3100 | + $start_filter = api_get_utc_datetime($start_filter); |
|
3101 | 3101 | $end_filter = $end_year."-".$end_month."-".$end_day." 23:59:59"; |
3102 | - $end_filter = api_get_utc_datetime($end_filter); |
|
3102 | + $end_filter = api_get_utc_datetime($end_filter); |
|
3103 | 3103 | $sql = " SELECT * FROM ".$tbl_personal_agenda." WHERE user='".$user_id."' AND date>='".$start_filter."' AND date<='".$end_filter."'"; |
3104 | 3104 | } |
3105 | 3105 | // 3. creating the SQL statement for getting the personal agenda items in DAY view |
@@ -3107,18 +3107,18 @@ discard block |
||
3107 | 3107 | // we are in day view |
3108 | 3108 | // we could use mysql date() function but this is only available from 4.1 and higher |
3109 | 3109 | $start_filter = $year."-".$month."-".$day." 00:00:00"; |
3110 | - $start_filter = api_get_utc_datetime($start_filter); |
|
3110 | + $start_filter = api_get_utc_datetime($start_filter); |
|
3111 | 3111 | $end_filter = $year."-".$month."-".$day." 23:59:59"; |
3112 | - $end_filter = api_get_utc_datetime($end_filter); |
|
3112 | + $end_filter = api_get_utc_datetime($end_filter); |
|
3113 | 3113 | $sql = " SELECT * FROM ".$tbl_personal_agenda." WHERE user='".$user_id."' AND date>='".$start_filter."' AND date<='".$end_filter."'"; |
3114 | 3114 | } |
3115 | 3115 | |
3116 | 3116 | $result = Database::query($sql); |
3117 | 3117 | while ($item = Database::fetch_array($result, 'ASSOC')) { |
3118 | 3118 | |
3119 | - $time_minute = api_convert_and_format_date($item['date'], TIME_NO_SEC_FORMAT); |
|
3120 | - $item['date'] = api_get_local_time($item['date']); |
|
3121 | - $item['start_date_tms'] = api_strtotime($item['date']); |
|
3119 | + $time_minute = api_convert_and_format_date($item['date'], TIME_NO_SEC_FORMAT); |
|
3120 | + $item['date'] = api_get_local_time($item['date']); |
|
3121 | + $item['start_date_tms'] = api_strtotime($item['date']); |
|
3122 | 3122 | $item['content'] = $item['text']; |
3123 | 3123 | |
3124 | 3124 | // we break the date field in the database into a date and a time part |
@@ -3138,7 +3138,7 @@ discard block |
||
3138 | 3138 | $second = $agendatime[2]; |
3139 | 3139 | |
3140 | 3140 | if ($type == 'month_view') { |
3141 | - $item['calendar_type'] = 'personal'; |
|
3141 | + $item['calendar_type'] = 'personal'; |
|
3142 | 3142 | $item['start_date'] = $item['date']; |
3143 | 3143 | $agendaitems[$day][] = $item; |
3144 | 3144 | continue; |
@@ -3163,7 +3163,7 @@ discard block |
||
3163 | 3163 | // this is the array construction for the DAY view |
3164 | 3164 | $halfhour = 2 * $agendatime['0']; |
3165 | 3165 | if ($agendatime['1'] >= '30') { |
3166 | - $halfhour = $halfhour +1; |
|
3166 | + $halfhour = $halfhour + 1; |
|
3167 | 3167 | } |
3168 | 3168 | |
3169 | 3169 | //Display events by list |
@@ -3187,22 +3187,22 @@ discard block |
||
3187 | 3187 | { |
3188 | 3188 | global $DaysShort, $course_path; |
3189 | 3189 | //Handle leap year |
3190 | - $numberofdays = array (0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31); |
|
3190 | + $numberofdays = array(0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31); |
|
3191 | 3191 | if (($year % 400 == 0) or ($year % 4 == 0 and $year % 100 <> 0)) |
3192 | 3192 | $numberofdays[2] = 29; |
3193 | 3193 | //Get the first day of the month |
3194 | 3194 | $dayone = getdate(mktime(0, 0, 0, $month, 1, $year)); |
3195 | 3195 | //Start the week on monday |
3196 | 3196 | $startdayofweek = $dayone['wday'] <> 0 ? ($dayone['wday'] - 1) : 6; |
3197 | - $g_cc = (isset($_GET['courseCode'])?$_GET['courseCode']:''); |
|
3197 | + $g_cc = (isset($_GET['courseCode']) ? $_GET['courseCode'] : ''); |
|
3198 | 3198 | |
3199 | - $next_month = ($month == 1 ? 12 : $month -1); |
|
3200 | - $prev_month = ($month == 12 ? 1 : $month +1); |
|
3199 | + $next_month = ($month == 1 ? 12 : $month - 1); |
|
3200 | + $prev_month = ($month == 12 ? 1 : $month + 1); |
|
3201 | 3201 | |
3202 | - $next_year = ($month == 1 ? $year -1 : $year); |
|
3203 | - $prev_year = ($month == 12 ? $year +1 : $year); |
|
3202 | + $next_year = ($month == 1 ? $year - 1 : $year); |
|
3203 | + $prev_year = ($month == 12 ? $year + 1 : $year); |
|
3204 | 3204 | |
3205 | - if ($show_content) { |
|
3205 | + if ($show_content) { |
|
3206 | 3206 | $back_url = Display::url(get_lang('Previous'), api_get_self()."?coursePath=".urlencode($course_path)."&courseCode=".Security::remove_XSS($g_cc)."&action=view&view=month&month=".$next_month."&year=".$next_year); |
3207 | 3207 | $next_url = Display::url(get_lang('Next'), api_get_self()."?coursePath=".urlencode($course_path)."&courseCode=".Security::remove_XSS($g_cc)."&action=view&view=month&month=".$prev_month."&year=".$prev_year); |
3208 | 3208 | } else { |
@@ -3219,7 +3219,7 @@ discard block |
||
3219 | 3219 | $html .= '</div>'; |
3220 | 3220 | $html .= '<table id="agenda_list2" class="table table-bordered">'; |
3221 | 3221 | $html .= '<tr>'; |
3222 | - for ($ii = 1; $ii < 8; $ii ++) { |
|
3222 | + for ($ii = 1; $ii < 8; $ii++) { |
|
3223 | 3223 | $html .= '<td class="weekdays">'.$DaysShort[$ii % 7].'</td>'; |
3224 | 3224 | } |
3225 | 3225 | $html .= '</tr>'; |
@@ -3228,7 +3228,7 @@ discard block |
||
3228 | 3228 | $today = getdate(); |
3229 | 3229 | while ($curday <= $numberofdays[$month]) { |
3230 | 3230 | $html .= "<tr>"; |
3231 | - for ($ii = 0; $ii < 7; $ii ++) { |
|
3231 | + for ($ii = 0; $ii < 7; $ii++) { |
|
3232 | 3232 | if (($curday == -1) && ($ii == $startdayofweek)) { |
3233 | 3233 | $curday = 1; |
3234 | 3234 | } |
@@ -3242,21 +3242,21 @@ discard block |
||
3242 | 3242 | $html .= "<td ".$class.">".$dayheader; |
3243 | 3243 | |
3244 | 3244 | if (!empty($agendaitems[$curday])) { |
3245 | - $items = $agendaitems[$curday]; |
|
3246 | - $items = msort($items, 'start_date_tms'); |
|
3245 | + $items = $agendaitems[$curday]; |
|
3246 | + $items = msort($items, 'start_date_tms'); |
|
3247 | 3247 | |
3248 | - foreach($items as $value) { |
|
3248 | + foreach ($items as $value) { |
|
3249 | 3249 | $value['title'] = Security::remove_XSS($value['title']); |
3250 | 3250 | $start_time = api_format_date($value['start_date'], TIME_NO_SEC_FORMAT); |
3251 | 3251 | $end_time = ''; |
3252 | 3252 | |
3253 | 3253 | if (!empty($value['end_date']) && $value['end_date'] != '0000-00-00 00:00:00') { |
3254 | - $end_time = '- <i>'.api_format_date($value['end_date'], DATE_TIME_FORMAT_LONG).'</i>'; |
|
3254 | + $end_time = '- <i>'.api_format_date($value['end_date'], DATE_TIME_FORMAT_LONG).'</i>'; |
|
3255 | 3255 | } |
3256 | 3256 | $complete_time = '<i>'.api_format_date($value['start_date'], DATE_TIME_FORMAT_LONG).'</i> '.$end_time; |
3257 | 3257 | $time = '<i>'.$start_time.'</i>'; |
3258 | 3258 | |
3259 | - switch($value['calendar_type']) { |
|
3259 | + switch ($value['calendar_type']) { |
|
3260 | 3260 | case 'personal': |
3261 | 3261 | $bg_color = '#D0E7F4'; |
3262 | 3262 | $icon = Display::return_icon('user.png', get_lang('MyAgenda'), array(), ICON_SIZE_SMALL); |
@@ -3308,7 +3308,7 @@ discard block |
||
3308 | 3308 | } |
3309 | 3309 | } |
3310 | 3310 | $html .= "</td>"; |
3311 | - $curday ++; |
|
3311 | + $curday++; |
|
3312 | 3312 | } else { |
3313 | 3313 | $html .= "<td></td>"; |
3314 | 3314 | } |
@@ -3329,18 +3329,18 @@ discard block |
||
3329 | 3329 | * where datestart and dateend are in yyyyMMddhhmmss format. |
3330 | 3330 | * @TODO Implement really personal events (from user DB) and global events (from main DB) |
3331 | 3331 | */ |
3332 | - public static function get_personal_agenda_items_between_dates($user_id, $date_start='', $date_end='') |
|
3332 | + public static function get_personal_agenda_items_between_dates($user_id, $date_start = '', $date_end = '') |
|
3333 | 3333 | { |
3334 | - $items = array (); |
|
3334 | + $items = array(); |
|
3335 | 3335 | if ($user_id != strval(intval($user_id))) { return $items; } |
3336 | - if (empty($date_start)) { $date_start = date('Y-m-d H:i:s');} |
|
3337 | - if (empty($date_end)) { $date_end = date('Y-m-d H:i:s',mktime(0, 0, 0, date("m"), date("d"), date("Y")+1));} |
|
3336 | + if (empty($date_start)) { $date_start = date('Y-m-d H:i:s'); } |
|
3337 | + if (empty($date_end)) { $date_end = date('Y-m-d H:i:s', mktime(0, 0, 0, date("m"), date("d"), date("Y") + 1)); } |
|
3338 | 3338 | $expr = '/\d{4}-\d{2}-\d{2}\ \d{2}:\d{2}:\d{2}/'; |
3339 | - if(!preg_match($expr,$date_start)) { return $items; } |
|
3340 | - if(!preg_match($expr,$date_end)) { return $items; } |
|
3339 | + if (!preg_match($expr, $date_start)) { return $items; } |
|
3340 | + if (!preg_match($expr, $date_end)) { return $items; } |
|
3341 | 3341 | |
3342 | 3342 | // get agenda-items for every course |
3343 | - $courses = api_get_user_courses($user_id,false); |
|
3343 | + $courses = api_get_user_courses($user_id, false); |
|
3344 | 3344 | foreach ($courses as $id => $course) { |
3345 | 3345 | $c = api_get_course_info_by_id($course['real_id']); |
3346 | 3346 | //databases of the courses |
@@ -3364,9 +3364,9 @@ discard block |
||
3364 | 3364 | " ORDER BY start_date "; |
3365 | 3365 | } else { |
3366 | 3366 | // if the user is not an administrator of that course, then... |
3367 | - if (is_array($group_memberships) && count($group_memberships)>0) |
|
3367 | + if (is_array($group_memberships) && count($group_memberships) > 0) |
|
3368 | 3368 | { |
3369 | - $sqlquery = "SELECT " . |
|
3369 | + $sqlquery = "SELECT ". |
|
3370 | 3370 | "DISTINCT agenda.*, ip.visibility, ip.to_group_id, ip.insert_user_id, ip.ref ". |
3371 | 3371 | " FROM ".$t_a." agenda, ". |
3372 | 3372 | $t_ip." ip ". |
@@ -3394,13 +3394,13 @@ discard block |
||
3394 | 3394 | |
3395 | 3395 | $result = Database::query($sqlquery); |
3396 | 3396 | while ($item = Database::fetch_array($result)) { |
3397 | - $agendaday = date("j",strtotime($item['start_date'])); |
|
3398 | - $month = date("n",strtotime($item['start_date'])); |
|
3399 | - $year = date("Y",strtotime($item['start_date'])); |
|
3397 | + $agendaday = date("j", strtotime($item['start_date'])); |
|
3398 | + $month = date("n", strtotime($item['start_date'])); |
|
3399 | + $year = date("Y", strtotime($item['start_date'])); |
|
3400 | 3400 | $URL = api_get_path(WEB_PATH)."main/calendar/agenda.php?cidReq=".urlencode($course["code"])."&day=$agendaday&month=$month&year=$year#$agendaday"; |
3401 | - list($year,$month,$day,$hour,$min,$sec) = split('[-: ]',$item['start_date']); |
|
3401 | + list($year, $month, $day, $hour, $min, $sec) = split('[-: ]', $item['start_date']); |
|
3402 | 3402 | $start_date = $year.$month.$day.$hour.$min; |
3403 | - list($year,$month,$day,$hour,$min,$sec) = split('[-: ]',$item['end_date']); |
|
3403 | + list($year, $month, $day, $hour, $min, $sec) = split('[-: ]', $item['end_date']); |
|
3404 | 3404 | $end_date = $year.$month.$day.$hour.$min; |
3405 | 3405 | |
3406 | 3406 | $items[] = array( |
@@ -3429,7 +3429,7 @@ discard block |
||
3429 | 3429 | $user = api_get_user_id(); |
3430 | 3430 | $sql = " SELECT * FROM ".$tbl_personal_agenda." WHERE id=".$id." AND user = ".$user; |
3431 | 3431 | $result = Database::query($sql); |
3432 | - if(Database::num_rows($result)==1) { |
|
3432 | + if (Database::num_rows($result) == 1) { |
|
3433 | 3433 | $item = Database::fetch_array($result); |
3434 | 3434 | } else { |
3435 | 3435 | $item = null; |
@@ -3451,9 +3451,9 @@ discard block |
||
3451 | 3451 | // step 2: we which day this is (0=sunday, 1=monday, ...) |
3452 | 3452 | $number_day_in_week = date('w', $random_day_in_week); |
3453 | 3453 | // step 3: we calculate the timestamp of the monday of the week we are in |
3454 | - $start_timestamp = $random_day_in_week - (($number_day_in_week -1) * 24 * 60 * 60); |
|
3454 | + $start_timestamp = $random_day_in_week - (($number_day_in_week - 1) * 24 * 60 * 60); |
|
3455 | 3455 | // step 4: we calculate the timestamp of the sunday of the week we are in |
3456 | - $end_timestamp = $random_day_in_week + ((7 - $number_day_in_week +1) * 24 * 60 * 60) - 3600; |
|
3456 | + $end_timestamp = $random_day_in_week + ((7 - $number_day_in_week + 1) * 24 * 60 * 60) - 3600; |
|
3457 | 3457 | // step 5: calculating the start_day, end_day, start_month, end_month, start_year, end_year |
3458 | 3458 | $start_day = date('j', $start_timestamp); |
3459 | 3459 | $start_month = date('n', $start_timestamp); |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | $count = intval($count); |
80 | 80 | $from = intval($from); |
81 | 81 | |
82 | - $sql .= " ORDER BY $column $direction"; |
|
82 | + $sql .= " ORDER BY $column $direction"; |
|
83 | 83 | $sql .= " LIMIT $count, $from "; |
84 | 84 | |
85 | 85 | $result = Database::query($sql); |
@@ -93,8 +93,8 @@ discard block |
||
93 | 93 | static function deactivate_zombies($ceiling) |
94 | 94 | { |
95 | 95 | $zombies = self::list_zombies($ceiling); |
96 | - $ids = array(); |
|
97 | - foreach($zombies as $zombie) { |
|
96 | + $ids = array(); |
|
97 | + foreach ($zombies as $zombie) { |
|
98 | 98 | $ids[] = $zombie['user_id']; |
99 | 99 | } |
100 | 100 | UserManager::deactivate_users($ids); |
@@ -248,17 +248,17 @@ discard block |
||
248 | 248 | } |
249 | 249 | } |
250 | 250 | |
251 | - if (trim($home_top_temp) == '' && api_is_platform_admin()) { |
|
252 | - $home_top_temp = '<div class="welcome-mascot">' . get_lang('PortalHomepageDefaultIntroduction') . '</div>'; |
|
253 | - } else { |
|
254 | - $home_top_temp = '<div class="welcome-home-top-temp">' . $home_top_temp . '</div>'; |
|
255 | - } |
|
256 | - $open = str_replace('{rel_path}', api_get_path(REL_PATH), $home_top_temp); |
|
257 | - $html = api_to_system_encoding($open, api_detect_encoding(strip_tags($open))); |
|
258 | - } |
|
259 | - |
|
260 | - return $html; |
|
261 | - } |
|
251 | + if (trim($home_top_temp) == '' && api_is_platform_admin()) { |
|
252 | + $home_top_temp = '<div class="welcome-mascot">' . get_lang('PortalHomepageDefaultIntroduction') . '</div>'; |
|
253 | + } else { |
|
254 | + $home_top_temp = '<div class="welcome-home-top-temp">' . $home_top_temp . '</div>'; |
|
255 | + } |
|
256 | + $open = str_replace('{rel_path}', api_get_path(REL_PATH), $home_top_temp); |
|
257 | + $html = api_to_system_encoding($open, api_detect_encoding(strip_tags($open))); |
|
258 | + } |
|
259 | + |
|
260 | + return $html; |
|
261 | + } |
|
262 | 262 | |
263 | 263 | function return_notice() |
264 | 264 | { |
@@ -509,7 +509,7 @@ discard block |
||
509 | 509 | $thereIsSubCat = true; |
510 | 510 | } elseif (api_get_setting('show_empty_course_categories') == 'true') { |
511 | 511 | /* End changed code to eliminate the (0 courses) after empty categories. */ |
512 | - $htmlListCat .= '<li>'; |
|
512 | + $htmlListCat .= '<li>'; |
|
513 | 513 | $htmlListCat .= $catLine['name']; |
514 | 514 | $htmlListCat .= "</li>"; |
515 | 515 | $thereIsSubCat = true; |
@@ -639,11 +639,11 @@ discard block |
||
639 | 639 | } |
640 | 640 | |
641 | 641 | /** |
642 | - * retrieves all the courses that the user has already subscribed to |
|
643 | - * @author Patrick Cool <[email protected]>, Ghent University, Belgium |
|
644 | - * @param int $user_id: the id of the user |
|
645 | - * @return array an array containing all the information of the courses of the given user |
|
646 | - */ |
|
642 | + * retrieves all the courses that the user has already subscribed to |
|
643 | + * @author Patrick Cool <[email protected]>, Ghent University, Belgium |
|
644 | + * @param int $user_id: the id of the user |
|
645 | + * @return array an array containing all the information of the courses of the given user |
|
646 | + */ |
|
647 | 647 | public function get_courses_of_user($user_id) |
648 | 648 | { |
649 | 649 | $table_course = Database::get_main_table(TABLE_MAIN_COURSE); |
@@ -338,7 +338,7 @@ |
||
338 | 338 | |
339 | 339 | if (empty($certificatesItem) && empty($searchItem)) { |
340 | 340 | return null; |
341 | - }else{ |
|
341 | + } else{ |
|
342 | 342 | $content.= $certificatesItem; |
343 | 343 | $content.= $searchItem; |
344 | 344 | } |
@@ -682,6 +682,7 @@ discard block |
||
682 | 682 | * retrieves all the courses that the user has already subscribed to |
683 | 683 | * @author Patrick Cool <[email protected]>, Ghent University, Belgium |
684 | 684 | * @param int $user_id: the id of the user |
685 | + * @param integer $user_id |
|
685 | 686 | * @return array an array containing all the information of the courses of the given user |
686 | 687 | */ |
687 | 688 | public function get_courses_of_user($user_id) |
@@ -732,8 +733,8 @@ discard block |
||
732 | 733 | |
733 | 734 | /** |
734 | 735 | * @todo use the template system |
735 | - * @param $title |
|
736 | - * @param $content |
|
736 | + * @param string|null $title |
|
737 | + * @param string $content |
|
737 | 738 | * @param string $id |
738 | 739 | * @param array $params |
739 | 740 | * @param string $idAccordion |
@@ -1704,8 +1705,8 @@ discard block |
||
1704 | 1705 | |
1705 | 1706 | /** |
1706 | 1707 | * Return HTML code for personal user course category |
1707 | - * @param $id |
|
1708 | - * @param $title |
|
1708 | + * @param integer $id |
|
1709 | + * @param string $title |
|
1709 | 1710 | * @return string |
1710 | 1711 | */ |
1711 | 1712 | private static function getHtmlForUserCategory($id, $title) |
@@ -1726,7 +1727,7 @@ discard block |
||
1726 | 1727 | /** |
1727 | 1728 | * return HTML code for course display in session view |
1728 | 1729 | * @param array $courseInfo |
1729 | - * @param $userCategoryId |
|
1730 | + * @param integer $userCategoryId |
|
1730 | 1731 | * @param bool $displayButton |
1731 | 1732 | * @param $loadDirs |
1732 | 1733 | * @return string |
@@ -72,9 +72,9 @@ discard block |
||
72 | 72 | ); |
73 | 73 | |
74 | 74 | foreach ($exercises as $exercise_item) { |
75 | - $exercise_item['course_code'] = $course_code; |
|
76 | - $exercise_item['session_id'] = $session_id; |
|
77 | - $exercise_item['tms'] = api_strtotime($exercise_item['end_time'], 'UTC'); |
|
75 | + $exercise_item['course_code'] = $course_code; |
|
76 | + $exercise_item['session_id'] = $session_id; |
|
77 | + $exercise_item['tms'] = api_strtotime($exercise_item['end_time'], 'UTC'); |
|
78 | 78 | |
79 | 79 | $exercise_list[] = $exercise_item; |
80 | 80 | } |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | } |
197 | 197 | } |
198 | 198 | |
199 | - if ($show_menu && ($show_create_link || $show_course_link )) { |
|
199 | + if ($show_menu && ($show_create_link || $show_course_link)) { |
|
200 | 200 | $show_menu = true; |
201 | 201 | } else { |
202 | 202 | $show_menu = false; |
@@ -208,14 +208,14 @@ discard block |
||
208 | 208 | if ($show_menu) { |
209 | 209 | $html .= '<ul class="nav nav-pills nav-stacked">'; |
210 | 210 | if ($show_create_link) { |
211 | - $html .= '<li class="add-course"><a href="' . api_get_path(WEB_CODE_PATH) . 'create_course/add_course.php">'.Display::return_icon('new-course.png', get_lang('CourseCreate')).(api_get_setting('course_validation') == 'true' ? get_lang('CreateCourseRequest') : get_lang('CourseCreate')).'</a></li>'; |
|
211 | + $html .= '<li class="add-course"><a href="'.api_get_path(WEB_CODE_PATH).'create_course/add_course.php">'.Display::return_icon('new-course.png', get_lang('CourseCreate')).(api_get_setting('course_validation') == 'true' ? get_lang('CreateCourseRequest') : get_lang('CourseCreate')).'</a></li>'; |
|
212 | 212 | } |
213 | 213 | |
214 | 214 | if ($show_course_link) { |
215 | 215 | if (!api_is_drh() && !api_is_session_admin()) { |
216 | - $html .= '<li class="list-course"><a href="'. api_get_path(WEB_CODE_PATH) . 'auth/courses.php">'. Display::return_icon('catalog-course.png', get_lang('CourseCatalog')) .get_lang('CourseCatalog').'</a></li>'; |
|
216 | + $html .= '<li class="list-course"><a href="'.api_get_path(WEB_CODE_PATH).'auth/courses.php">'.Display::return_icon('catalog-course.png', get_lang('CourseCatalog')).get_lang('CourseCatalog').'</a></li>'; |
|
217 | 217 | } else { |
218 | - $html .= '<li><a href="' . api_get_path(WEB_CODE_PATH) . 'dashboard/index.php">'.get_lang('Dashboard').'</a></li>'; |
|
218 | + $html .= '<li><a href="'.api_get_path(WEB_CODE_PATH).'dashboard/index.php">'.get_lang('Dashboard').'</a></li>'; |
|
219 | 219 | } |
220 | 220 | } |
221 | 221 | $html .= '</ul>'; |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | $html = ''; |
240 | 240 | |
241 | 241 | if (!empty($_GET['include']) && preg_match('/^[a-zA-Z0-9_-]*\.html$/', $_GET['include'])) { |
242 | - $open = @(string)file_get_contents($this->home.$_GET['include']); |
|
242 | + $open = @(string) file_get_contents($this->home.$_GET['include']); |
|
243 | 243 | $html = api_to_system_encoding($open, api_detect_encoding(strip_tags($open))); |
244 | 244 | } else { |
245 | 245 | // Hiding home top when user not connected. |
@@ -269,15 +269,15 @@ discard block |
||
269 | 269 | $home_top_temp = file_get_contents($this->home.'home_top.html'); |
270 | 270 | } else { |
271 | 271 | if (file_exists($this->default_home.'home_top.html')) { |
272 | - $home_top_temp = file_get_contents($this->default_home . 'home_top.html'); |
|
272 | + $home_top_temp = file_get_contents($this->default_home.'home_top.html'); |
|
273 | 273 | } |
274 | 274 | } |
275 | 275 | } |
276 | 276 | |
277 | 277 | if (trim($home_top_temp) == '' && api_is_platform_admin()) { |
278 | - $home_top_temp = '<div class="welcome-mascot">' . get_lang('PortalHomepageDefaultIntroduction') . '</div>'; |
|
278 | + $home_top_temp = '<div class="welcome-mascot">'.get_lang('PortalHomepageDefaultIntroduction').'</div>'; |
|
279 | 279 | } else { |
280 | - $home_top_temp = '<div class="welcome-home-top-temp">' . $home_top_temp . '</div>'; |
|
280 | + $home_top_temp = '<div class="welcome-home-top-temp">'.$home_top_temp.'</div>'; |
|
281 | 281 | } |
282 | 282 | $open = str_replace('{rel_path}', api_get_path(REL_PATH), $home_top_temp); |
283 | 283 | $html = api_to_system_encoding($open, api_detect_encoding(strip_tags($open))); |
@@ -292,9 +292,9 @@ discard block |
||
292 | 292 | |
293 | 293 | $html = ''; |
294 | 294 | // Notice |
295 | - $home_notice = @(string)file_get_contents($this->home.'home_notice_'.$user_selected_language.'.html'); |
|
295 | + $home_notice = @(string) file_get_contents($this->home.'home_notice_'.$user_selected_language.'.html'); |
|
296 | 296 | if (empty($home_notice)) { |
297 | - $home_notice = @(string)file_get_contents($this->home.'home_notice.html'); |
|
297 | + $home_notice = @(string) file_get_contents($this->home.'home_notice.html'); |
|
298 | 298 | } |
299 | 299 | |
300 | 300 | if (!empty($home_notice)) { |
@@ -325,7 +325,7 @@ discard block |
||
325 | 325 | } |
326 | 326 | |
327 | 327 | $html = null; |
328 | - $home_menu = @(string)file_get_contents($this->home.'home_menu_'.$user_selected_language.'.html'); |
|
328 | + $home_menu = @(string) file_get_contents($this->home.'home_menu_'.$user_selected_language.'.html'); |
|
329 | 329 | if (!empty($home_menu)) { |
330 | 330 | $home_menu_content = '<ul class="nav nav-pills nav-stacked">'; |
331 | 331 | $home_menu_content .= api_to_system_encoding($home_menu, api_detect_encoding(strip_tags($home_menu))); |
@@ -358,9 +358,9 @@ discard block |
||
358 | 358 | if (!api_is_anonymous()) { |
359 | 359 | $certificatesItem = Display::tag( |
360 | 360 | 'li', |
361 | - Display::url(Display::return_icon('graduation.png',get_lang('MyCertificates'),null,ICON_SIZE_SMALL). |
|
361 | + Display::url(Display::return_icon('graduation.png', get_lang('MyCertificates'), null, ICON_SIZE_SMALL). |
|
362 | 362 | get_lang('MyCertificates'), |
363 | - api_get_path(WEB_CODE_PATH) . "gradebook/my_certificates.php" |
|
363 | + api_get_path(WEB_CODE_PATH)."gradebook/my_certificates.php" |
|
364 | 364 | ) |
365 | 365 | ); |
366 | 366 | } |
@@ -370,29 +370,29 @@ discard block |
||
370 | 370 | if (api_get_setting('allow_public_certificates') == 'true') { |
371 | 371 | $searchItem = Display::tag( |
372 | 372 | 'li', |
373 | - Display::url(Display::return_icon('search_graduation.png',get_lang('Search'),null,ICON_SIZE_SMALL). |
|
373 | + Display::url(Display::return_icon('search_graduation.png', get_lang('Search'), null, ICON_SIZE_SMALL). |
|
374 | 374 | get_lang('Search'), |
375 | - api_get_path(WEB_CODE_PATH) . "gradebook/search.php" |
|
375 | + api_get_path(WEB_CODE_PATH)."gradebook/search.php" |
|
376 | 376 | ) |
377 | 377 | ); |
378 | 378 | } |
379 | 379 | |
380 | 380 | if (empty($certificatesItem) && empty($searchItem)) { |
381 | 381 | return null; |
382 | - }else{ |
|
383 | - $content.= $certificatesItem; |
|
384 | - $content.= $searchItem; |
|
382 | + } else { |
|
383 | + $content .= $certificatesItem; |
|
384 | + $content .= $searchItem; |
|
385 | 385 | } |
386 | 386 | |
387 | 387 | if (api_get_setting('allow_skills_tool') == 'true') { |
388 | 388 | |
389 | - $content .= Display::tag('li', Display::url(Display::return_icon('skill-badges.png',get_lang('MySkills'),null,ICON_SIZE_SMALL).get_lang('MySkills'), api_get_path(WEB_CODE_PATH).'social/my_skills_report.php')); |
|
389 | + $content .= Display::tag('li', Display::url(Display::return_icon('skill-badges.png', get_lang('MySkills'), null, ICON_SIZE_SMALL).get_lang('MySkills'), api_get_path(WEB_CODE_PATH).'social/my_skills_report.php')); |
|
390 | 390 | $allowSkillsManagement = api_get_setting('allow_hr_skills_management') == 'true'; |
391 | 391 | if (($allowSkillsManagement && api_is_drh()) || api_is_platform_admin()) { |
392 | 392 | $content .= Display::tag('li', |
393 | 393 | Display::url(Display::return_icon('edit-skill.png', get_lang('MySkills'), null, |
394 | - ICON_SIZE_SMALL) . get_lang('ManageSkills'), |
|
395 | - api_get_path(WEB_CODE_PATH) . 'admin/skills_wheel.php')); |
|
394 | + ICON_SIZE_SMALL).get_lang('ManageSkills'), |
|
395 | + api_get_path(WEB_CODE_PATH).'admin/skills_wheel.php')); |
|
396 | 396 | } |
397 | 397 | } |
398 | 398 | $content .= '</ul>'; |
@@ -444,7 +444,7 @@ discard block |
||
444 | 444 | |
445 | 445 | // Get list of courses in category $category. |
446 | 446 | $sql_get_course_list = "SELECT * FROM $main_course_table cours |
447 | - WHERE category_code = '" . $category . "' |
|
447 | + WHERE category_code = '".$category."' |
|
448 | 448 | ORDER BY title, UPPER(visual_code)"; |
449 | 449 | |
450 | 450 | // Showing only the courses of the current access_url_id. |
@@ -491,7 +491,7 @@ discard block |
||
491 | 491 | FROM $main_category_table t1 |
492 | 492 | LEFT JOIN $main_category_table t2 ON t1.code=t2.parent_id |
493 | 493 | LEFT JOIN $main_course_table t3 ON (t3.category_code = t1.code $platform_visible_courses) |
494 | - WHERE t1.parent_id ". (empty ($category) ? "IS NULL" : "='$category'")." |
|
494 | + WHERE t1.parent_id ".(empty ($category) ? "IS NULL" : "='$category'")." |
|
495 | 495 | GROUP BY t1.name,t1.code,t1.parent_id,t1.children_count |
496 | 496 | ORDER BY t1.tree_pos, t1.name"; |
497 | 497 | |
@@ -567,10 +567,10 @@ discard block |
||
567 | 567 | } |
568 | 568 | $result .= $htmlTitre; |
569 | 569 | if ($thereIsSubCat) { |
570 | - $result .= $htmlListCat; |
|
570 | + $result .= $htmlListCat; |
|
571 | 571 | } |
572 | 572 | while ($categoryName = Database::fetch_array($resCats)) { |
573 | - $result .= '<h3>' . $categoryName['name'] . "</h3>\n"; |
|
573 | + $result .= '<h3>'.$categoryName['name']."</h3>\n"; |
|
574 | 574 | } |
575 | 575 | $numrows = Database::num_rows($sql_result_courses); |
576 | 576 | $courses_list_string = ''; |
@@ -668,12 +668,12 @@ discard block |
||
668 | 668 | if ($courses_shown > 0) { |
669 | 669 | // Only display the list of courses and categories if there was more than |
670 | 670 | // 0 courses visible to the world (we're in the anonymous list here). |
671 | - $result .= $courses_list_string; |
|
671 | + $result .= $courses_list_string; |
|
672 | 672 | } |
673 | 673 | if ($category != '') { |
674 | - $result .= '<p><a href="'.api_get_self().'"> ' . |
|
674 | + $result .= '<p><a href="'.api_get_self().'"> '. |
|
675 | 675 | Display :: return_icon('back.png', get_lang('BackToHomePage')). |
676 | - get_lang('BackToHomePage') . '</a></p>'; |
|
676 | + get_lang('BackToHomePage').'</a></p>'; |
|
677 | 677 | } |
678 | 678 | return $result; |
679 | 679 | } |
@@ -750,14 +750,14 @@ discard block |
||
750 | 750 | ) { |
751 | 751 | if (!empty($idAccordion)) { |
752 | 752 | $html = null; |
753 | - $html .= '<div class="panel-group" id="'.$idAccordion.'" role="tablist" aria-multiselectable="true">' . PHP_EOL; |
|
754 | - $html .= '<div class="panel panel-default" id="'.$id.'">' . PHP_EOL; |
|
755 | - $html .= '<div class="panel-heading" role="tab"><h4 class="panel-title">' . PHP_EOL; |
|
756 | - $html .= '<a role="button" data-toggle="collapse" data-parent="#'.$idAccordion.'" href="#'.$idCollapse.'" aria-expanded="true" aria-controls="'.$idCollapse.'">'.$title.'</a>' . PHP_EOL; |
|
757 | - $html .= '</h4></div>' . PHP_EOL; |
|
758 | - $html .= '<div id="'.$idCollapse.'" class="panel-collapse collapse in" role="tabpanel">' . PHP_EOL; |
|
759 | - $html .= '<div class="panel-body">'.$content.'</div>' . PHP_EOL; |
|
760 | - $html .= '</div></div></div>' . PHP_EOL; |
|
753 | + $html .= '<div class="panel-group" id="'.$idAccordion.'" role="tablist" aria-multiselectable="true">'.PHP_EOL; |
|
754 | + $html .= '<div class="panel panel-default" id="'.$id.'">'.PHP_EOL; |
|
755 | + $html .= '<div class="panel-heading" role="tab"><h4 class="panel-title">'.PHP_EOL; |
|
756 | + $html .= '<a role="button" data-toggle="collapse" data-parent="#'.$idAccordion.'" href="#'.$idCollapse.'" aria-expanded="true" aria-controls="'.$idCollapse.'">'.$title.'</a>'.PHP_EOL; |
|
757 | + $html .= '</h4></div>'.PHP_EOL; |
|
758 | + $html .= '<div id="'.$idCollapse.'" class="panel-collapse collapse in" role="tabpanel">'.PHP_EOL; |
|
759 | + $html .= '<div class="panel-body">'.$content.'</div>'.PHP_EOL; |
|
760 | + $html .= '</div></div></div>'.PHP_EOL; |
|
761 | 761 | |
762 | 762 | } else { |
763 | 763 | if (!empty($id)) { |
@@ -766,9 +766,9 @@ discard block |
||
766 | 766 | $params['class'] = 'panel panel-default'; |
767 | 767 | $html = null; |
768 | 768 | if (!empty($title)) { |
769 | - $html .= '<div class="panel-heading">'.$title.'</div>' . PHP_EOL; |
|
769 | + $html .= '<div class="panel-heading">'.$title.'</div>'.PHP_EOL; |
|
770 | 770 | } |
771 | - $html.= '<div class="panel-body">'.$content.'</div>' . PHP_EOL; |
|
771 | + $html .= '<div class="panel-body">'.$content.'</div>'.PHP_EOL; |
|
772 | 772 | $html = Display::div($html, $params); |
773 | 773 | } |
774 | 774 | return $html; |
@@ -814,7 +814,7 @@ discard block |
||
814 | 814 | $usergroup_list = $usergroup->get_usergroup_by_user(api_get_user_id()); |
815 | 815 | $classes = ''; |
816 | 816 | if (!empty($usergroup_list)) { |
817 | - foreach($usergroup_list as $group_id) { |
|
817 | + foreach ($usergroup_list as $group_id) { |
|
818 | 818 | $data = $usergroup->get($group_id); |
819 | 819 | $data['name'] = Display::url($data['name'], api_get_path(WEB_CODE_PATH).'user/classes.php?id='.$data['id']); |
820 | 820 | $classes .= Display::tag('li', $data['name']); |
@@ -823,7 +823,7 @@ discard block |
||
823 | 823 | if (api_is_platform_admin()) { |
824 | 824 | $classes .= Display::tag( |
825 | 825 | 'li', |
826 | - Display::url(get_lang('AddClasses') ,api_get_path(WEB_CODE_PATH).'admin/usergroups.php?action=add') |
|
826 | + Display::url(get_lang('AddClasses'), api_get_path(WEB_CODE_PATH).'admin/usergroups.php?action=add') |
|
827 | 827 | ); |
828 | 828 | } |
829 | 829 | if (!empty($classes)) { |
@@ -845,11 +845,11 @@ discard block |
||
845 | 845 | $content = null; |
846 | 846 | |
847 | 847 | if (api_get_setting('allow_social_tool') == 'true') { |
848 | - $content .= '<a style="text-align:center" href="' . api_get_path(WEB_PATH) . 'main/social/home.php"> |
|
849 | - <img class="img-circle" src="' . $userPicture . '" ></a>'; |
|
848 | + $content .= '<a style="text-align:center" href="'.api_get_path(WEB_PATH).'main/social/home.php"> |
|
849 | + <img class="img-circle" src="' . $userPicture.'" ></a>'; |
|
850 | 850 | } else { |
851 | - $content .= '<a style="text-align:center" href="' . api_get_path(WEB_PATH) . 'main/auth/profile.php"> |
|
852 | - <img class="img-circle" title="' . get_lang('EditProfile') . '" src="' . $userPicture. '" ></a>'; |
|
851 | + $content .= '<a style="text-align:center" href="'.api_get_path(WEB_PATH).'main/auth/profile.php"> |
|
852 | + <img class="img-circle" title="' . get_lang('EditProfile').'" src="'.$userPicture.'" ></a>'; |
|
853 | 853 | } |
854 | 854 | |
855 | 855 | $html = self::show_right_block( |
@@ -901,12 +901,12 @@ discard block |
||
901 | 901 | if (api_get_setting('allow_social_tool') == 'true') { |
902 | 902 | $link = '?f=social'; |
903 | 903 | } |
904 | - $profile_content .= '<li class="inbox-message-social"><a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php'.$link.'">'.Display::return_icon('inbox.png',get_lang('Inbox'),null,ICON_SIZE_SMALL).get_lang('Inbox').$cant_msg.' </a></li>'; |
|
905 | - $profile_content .= '<li class="new-message-social"><a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php'.$link.'">'.Display::return_icon('new-message.png',get_lang('Compose'),null,ICON_SIZE_SMALL).get_lang('Compose').' </a></li>'; |
|
904 | + $profile_content .= '<li class="inbox-message-social"><a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php'.$link.'">'.Display::return_icon('inbox.png', get_lang('Inbox'), null, ICON_SIZE_SMALL).get_lang('Inbox').$cant_msg.' </a></li>'; |
|
905 | + $profile_content .= '<li class="new-message-social"><a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php'.$link.'">'.Display::return_icon('new-message.png', get_lang('Compose'), null, ICON_SIZE_SMALL).get_lang('Compose').' </a></li>'; |
|
906 | 906 | |
907 | 907 | if (api_get_setting('allow_social_tool') == 'true') { |
908 | 908 | $total_invitations = Display::badge($total_invitations); |
909 | - $profile_content .= '<li class="invitations-social"><a href="'.api_get_path(WEB_PATH).'main/social/invitations.php">'.Display::return_icon('invitations.png',get_lang('PendingInvitations'),null,ICON_SIZE_SMALL).get_lang('PendingInvitations').$total_invitations.'</a></li>'; |
|
909 | + $profile_content .= '<li class="invitations-social"><a href="'.api_get_path(WEB_PATH).'main/social/invitations.php">'.Display::return_icon('invitations.png', get_lang('PendingInvitations'), null, ICON_SIZE_SMALL).get_lang('PendingInvitations').$total_invitations.'</a></li>'; |
|
910 | 910 | } |
911 | 911 | |
912 | 912 | if (isset($_configuration['allow_my_files_link_in_homepage']) && $_configuration['allow_my_files_link_in_homepage']) { |
@@ -922,7 +922,7 @@ discard block |
||
922 | 922 | |
923 | 923 | $editProfileUrl = Display::getProfileEditionLink($user_id); |
924 | 924 | |
925 | - $profile_content .= '<li class="profile-social"><a href="' . $editProfileUrl . '">'. |
|
925 | + $profile_content .= '<li class="profile-social"><a href="'.$editProfileUrl.'">'. |
|
926 | 926 | Display::return_icon( |
927 | 927 | 'edit-profile.png', |
928 | 928 | get_lang('EditProfile'), |
@@ -1025,17 +1025,17 @@ discard block |
||
1025 | 1025 | if ($show_create_link) { |
1026 | 1026 | $my_account_content .= '<li class="add-course"><a href="main/create_course/add_course.php">'; |
1027 | 1027 | if (api_get_setting('course_validation') == 'true' && !api_is_platform_admin()) { |
1028 | - $my_account_content .= Display::return_icon('new-course.png',get_lang('CreateCourseRequest'),null,ICON_SIZE_SMALL); |
|
1028 | + $my_account_content .= Display::return_icon('new-course.png', get_lang('CreateCourseRequest'), null, ICON_SIZE_SMALL); |
|
1029 | 1029 | $my_account_content .= get_lang('CreateCourseRequest'); |
1030 | 1030 | } else { |
1031 | - $my_account_content .= Display::return_icon('new-course.png',get_lang('CourseCreate'),null,ICON_SIZE_SMALL); |
|
1031 | + $my_account_content .= Display::return_icon('new-course.png', get_lang('CourseCreate'), null, ICON_SIZE_SMALL); |
|
1032 | 1032 | $my_account_content .= get_lang('CourseCreate'); |
1033 | 1033 | } |
1034 | 1034 | $my_account_content .= '</a></li>'; |
1035 | 1035 | |
1036 | 1036 | if (SessionManager::allowToManageSessions()) { |
1037 | 1037 | $my_account_content .= '<li class="add-course"><a href="main/session/session_add.php">'; |
1038 | - $my_account_content .= Display::return_icon('session.png',get_lang('AddSession'),null,ICON_SIZE_SMALL); |
|
1038 | + $my_account_content .= Display::return_icon('session.png', get_lang('AddSession'), null, ICON_SIZE_SMALL); |
|
1039 | 1039 | $my_account_content .= get_lang('AddSession'); |
1040 | 1040 | $my_account_content .= '</a></li>'; |
1041 | 1041 | } |
@@ -1043,21 +1043,21 @@ discard block |
||
1043 | 1043 | |
1044 | 1044 | //Sort courses |
1045 | 1045 | $url = api_get_path(WEB_CODE_PATH).'auth/courses.php?action=sortmycourses'; |
1046 | - $img_order= Display::return_icon('order-course.png',get_lang('SortMyCourses'),null,ICON_SIZE_SMALL); |
|
1046 | + $img_order = Display::return_icon('order-course.png', get_lang('SortMyCourses'), null, ICON_SIZE_SMALL); |
|
1047 | 1047 | $my_account_content .= '<li class="order-course">'.Display::url($img_order.get_lang('SortMyCourses'), $url, array('class' => 'sort course')).'</li>'; |
1048 | 1048 | |
1049 | 1049 | // Session history |
1050 | 1050 | if (isset($_GET['history']) && intval($_GET['history']) == 1) { |
1051 | - $my_account_content .= '<li class="history-course"><a href="user_portal.php">'.Display::return_icon('history-course.png',get_lang('DisplayTrainingList'),null,ICON_SIZE_SMALL).get_lang('DisplayTrainingList').'</a></li>'; |
|
1051 | + $my_account_content .= '<li class="history-course"><a href="user_portal.php">'.Display::return_icon('history-course.png', get_lang('DisplayTrainingList'), null, ICON_SIZE_SMALL).get_lang('DisplayTrainingList').'</a></li>'; |
|
1052 | 1052 | } else { |
1053 | - $my_account_content .= '<li class="history-course"><a href="user_portal.php?history=1" >'.Display::return_icon('history-course.png',get_lang('HistoryTrainingSessions'),null,ICON_SIZE_SMALL).get_lang('HistoryTrainingSessions').'</a></li>'; |
|
1053 | + $my_account_content .= '<li class="history-course"><a href="user_portal.php?history=1" >'.Display::return_icon('history-course.png', get_lang('HistoryTrainingSessions'), null, ICON_SIZE_SMALL).get_lang('HistoryTrainingSessions').'</a></li>'; |
|
1054 | 1054 | } |
1055 | 1055 | |
1056 | 1056 | // Course catalog |
1057 | 1057 | |
1058 | 1058 | if ($show_course_link) { |
1059 | 1059 | if (!api_is_drh()) { |
1060 | - $my_account_content .= '<li class="list-course"><a href="main/auth/courses.php" >'.Display::return_icon('catalog-course.png',get_lang('CourseCatalog'),null,ICON_SIZE_SMALL).get_lang('CourseCatalog').'</a></li>'; |
|
1060 | + $my_account_content .= '<li class="list-course"><a href="main/auth/courses.php" >'.Display::return_icon('catalog-course.png', get_lang('CourseCatalog'), null, ICON_SIZE_SMALL).get_lang('CourseCatalog').'</a></li>'; |
|
1061 | 1061 | } else { |
1062 | 1062 | $my_account_content .= '<li><a href="main/dashboard/index.php">'.get_lang('Dashboard').'</a></li>'; |
1063 | 1063 | } |
@@ -1273,7 +1273,7 @@ discard block |
||
1273 | 1273 | |
1274 | 1274 | $actions = null; |
1275 | 1275 | if (api_is_platform_admin()) { |
1276 | - $actions = api_get_path(WEB_CODE_PATH) .'session/resume_session.php?id_session='.$session_id; |
|
1276 | + $actions = api_get_path(WEB_CODE_PATH).'session/resume_session.php?id_session='.$session_id; |
|
1277 | 1277 | } |
1278 | 1278 | |
1279 | 1279 | $coachId = $session_box['id_coach']; |
@@ -1284,12 +1284,12 @@ discard block |
||
1284 | 1284 | $params['title'] = $session_box['title']; |
1285 | 1285 | //$params['subtitle'] = $extra_info; |
1286 | 1286 | $params['id_coach'] = $coachId; |
1287 | - $params['coach_url'] = api_get_path(WEB_AJAX_PATH) . 'user_manager.ajax.php?a=get_user_popup&user_id=' . $coachId; |
|
1287 | + $params['coach_url'] = api_get_path(WEB_AJAX_PATH).'user_manager.ajax.php?a=get_user_popup&user_id='.$coachId; |
|
1288 | 1288 | $params['coach_name'] = !empty($session_box['coach']) ? $session_box['coach'] : null; |
1289 | - $params['coach_avatar'] =UserManager::getUserPicture($coachId, USER_IMAGE_SIZE_SMALL); |
|
1290 | - $params['date'] = $session_box['dates']; |
|
1289 | + $params['coach_avatar'] = UserManager::getUserPicture($coachId, USER_IMAGE_SIZE_SMALL); |
|
1290 | + $params['date'] = $session_box['dates']; |
|
1291 | 1291 | $params['image'] = isset($imageField['value']) ? $imageField['value'] : null; |
1292 | - $params['duration'] = isset($session_box['duration']) ? ' ' . $session_box['duration'] : null; |
|
1292 | + $params['duration'] = isset($session_box['duration']) ? ' '.$session_box['duration'] : null; |
|
1293 | 1293 | $params['edit_actions'] = $actions; |
1294 | 1294 | $params['show_description'] = $session_box['show_description']; |
1295 | 1295 | $params['description'] = $session_box['description']; |
@@ -1397,7 +1397,7 @@ discard block |
||
1397 | 1397 | //$sessionParams['show_link_to_session'] = !api_is_drh() && $sessionTitleLink; |
1398 | 1398 | $sessionParams['course_list_session_style'] = $coursesListSessionStyle; |
1399 | 1399 | $sessionParams['title'] = $session_box['title']; |
1400 | - $sessionParams['subtitle'] = (!empty($session_box['coach']) ? $session_box['coach'] . ' | ': '') . $session_box['dates']; |
|
1400 | + $sessionParams['subtitle'] = (!empty($session_box['coach']) ? $session_box['coach'].' | ' : '').$session_box['dates']; |
|
1401 | 1401 | $sessionParams['show_actions'] = api_is_platform_admin(); |
1402 | 1402 | $sessionParams['courses'] = $html_courses_session; |
1403 | 1403 | $sessionParams['show_simple_session_info'] = false; |
@@ -1447,14 +1447,14 @@ discard block |
||
1447 | 1447 | !empty($session_category_start_date) && |
1448 | 1448 | $session_category_start_date != '0000-00-00' |
1449 | 1449 | ) { |
1450 | - $categoryParams['subtitle'] = get_lang('From') . ' ' . $session_category_start_date; |
|
1450 | + $categoryParams['subtitle'] = get_lang('From').' '.$session_category_start_date; |
|
1451 | 1451 | } |
1452 | 1452 | |
1453 | 1453 | if ( |
1454 | 1454 | !empty($session_category_end_date) && |
1455 | 1455 | $session_category_end_date != '0000-00-00' |
1456 | 1456 | ) { |
1457 | - $categoryParams['subtitle'] = get_lang('Until') . ' ' . $session_category_end_date; |
|
1457 | + $categoryParams['subtitle'] = get_lang('Until').' '.$session_category_end_date; |
|
1458 | 1458 | } |
1459 | 1459 | } |
1460 | 1460 | |
@@ -1479,10 +1479,10 @@ discard block |
||
1479 | 1479 | |
1480 | 1480 | $this->tpl->assign('all_courses', $allCoursesInSessions); |
1481 | 1481 | $this->tpl->assign('session', $listSession); |
1482 | - $this->tpl->assign('show_tutor', (api_get_setting('show_session_coach')==='true' ? true : false)); |
|
1482 | + $this->tpl->assign('show_tutor', (api_get_setting('show_session_coach') === 'true' ? true : false)); |
|
1483 | 1483 | $this->tpl->assign('gamification_mode', $gamificationModeIsActive); |
1484 | 1484 | |
1485 | - if (api_get_configuration_value('view_grid_courses')){ |
|
1485 | + if (api_get_configuration_value('view_grid_courses')) { |
|
1486 | 1486 | $sessions_with_no_category = $this->tpl->fetch( |
1487 | 1487 | $this->tpl->get_template('/user_portal/grid_session.tpl') |
1488 | 1488 | ); |
@@ -1494,7 +1494,7 @@ discard block |
||
1494 | 1494 | } |
1495 | 1495 | |
1496 | 1496 | return [ |
1497 | - 'html' => $specialCourseList . $sessions_with_category.$sessions_with_no_category.$listCourse, |
|
1497 | + 'html' => $specialCourseList.$sessions_with_category.$sessions_with_no_category.$listCourse, |
|
1498 | 1498 | 'session_count' => $sessionCount, |
1499 | 1499 | 'course_count' => $courseCount |
1500 | 1500 | ]; |
@@ -1641,7 +1641,7 @@ discard block |
||
1641 | 1641 | $htmlCategory .= '<div class="panel panel-default">'; |
1642 | 1642 | } |
1643 | 1643 | $htmlCategory .= '<div class="panel-body">'; |
1644 | - $coursesInfo = $listCourse['course']; |
|
1644 | + $coursesInfo = $listCourse['course']; |
|
1645 | 1645 | |
1646 | 1646 | $htmlCategory .= self::getHtmlForCourse( |
1647 | 1647 | $coursesInfo, |
@@ -1658,7 +1658,7 @@ discard block |
||
1658 | 1658 | $listCategorySession['catSessionName'] |
1659 | 1659 | ); |
1660 | 1660 | // list of session |
1661 | - $htmlSession = ''; // start |
|
1661 | + $htmlSession = ''; // start |
|
1662 | 1662 | foreach ($listCategorySession['sessionList'] as $k => $listSession) { |
1663 | 1663 | // add session |
1664 | 1664 | $htmlSession .= '<div class="session-view-row">'; |
@@ -1675,8 +1675,8 @@ discard block |
||
1675 | 1675 | $htmlSessionCategory .= $htmlSession; |
1676 | 1676 | } |
1677 | 1677 | $htmlSessionCategory .= '</div>'; // end session cat block |
1678 | - $htmlCategory .= $htmlSessionCategory .'</div></div>' ; |
|
1679 | - $htmlCategory .= ''; // end course block |
|
1678 | + $htmlCategory .= $htmlSessionCategory.'</div></div>'; |
|
1679 | + $htmlCategory .= ''; // end course block |
|
1680 | 1680 | } |
1681 | 1681 | $userCategoryHtml .= $htmlCategory; |
1682 | 1682 | } |
@@ -1703,11 +1703,11 @@ discard block |
||
1703 | 1703 | } |
1704 | 1704 | } |
1705 | 1705 | $htmlCategory .= ''; |
1706 | - $userCategoryHtml .= $htmlCategory; // end user cat block |
|
1706 | + $userCategoryHtml .= $htmlCategory; // end user cat block |
|
1707 | 1707 | if ($userCategoryId != 0) { |
1708 | 1708 | $userCategoryHtml .= '</div>'; |
1709 | 1709 | } |
1710 | - $html .= $userCategoryHtml; // |
|
1710 | + $html .= $userCategoryHtml; // |
|
1711 | 1711 | } |
1712 | 1712 | $html .= '</div>'; |
1713 | 1713 | |
@@ -1848,11 +1848,11 @@ discard block |
||
1848 | 1848 | $html = ''; |
1849 | 1849 | |
1850 | 1850 | if ($categorySessionId == 0) { |
1851 | - $class1 = 'session-view-lvl-2'; // session |
|
1852 | - $class2 = 'session-view-lvl-4'; // got to course in session link |
|
1851 | + $class1 = 'session-view-lvl-2'; // session |
|
1852 | + $class2 = 'session-view-lvl-4'; // got to course in session link |
|
1853 | 1853 | } else { |
1854 | - $class1 = 'session-view-lvl-3'; // session |
|
1855 | - $class2 = 'session-view-lvl-5'; // got to course in session link |
|
1854 | + $class1 = 'session-view-lvl-3'; // session |
|
1855 | + $class2 = 'session-view-lvl-5'; // got to course in session link |
|
1856 | 1856 | } |
1857 | 1857 | |
1858 | 1858 | $icon = Display::return_icon( |
@@ -1880,7 +1880,7 @@ discard block |
||
1880 | 1880 | if ($listA['userCatTitle'] == $listB['userCatTitle']) { |
1881 | 1881 | if ($listA['title'] == $listB['title']) { |
1882 | 1882 | return 0; |
1883 | - } else if($listA['title'] > $listB['title']) { |
|
1883 | + } else if ($listA['title'] > $listB['title']) { |
|
1884 | 1884 | return 1; |
1885 | 1885 | } else { |
1886 | 1886 | return -1; |
@@ -1901,7 +1901,7 @@ discard block |
||
1901 | 1901 | { |
1902 | 1902 | if ($listA['title'] == $listB['title']) { |
1903 | 1903 | return 0; |
1904 | - } else if($listA['title'] > $listB['title']) { |
|
1904 | + } else if ($listA['title'] > $listB['title']) { |
|
1905 | 1905 | return 1; |
1906 | 1906 | } else { |
1907 | 1907 | return -1; |
@@ -73,8 +73,9 @@ |
||
73 | 73 | //$form->addElement('submit','submit',get_lang('Filter')); |
74 | 74 | $form->addButtonFilter(get_lang('Filter')); |
75 | 75 | |
76 | -if (!empty($_REQUEST['course_code'])) |
|
76 | +if (!empty($_REQUEST['course_code'])) { |
|
77 | 77 | $selected_course = $_REQUEST['course_code']; |
78 | +} |
|
78 | 79 | if (!empty($selected_course)) { |
79 | 80 | $selected_course = api_get_course_info($selected_course); |
80 | 81 | $course_list = array($selected_course); |
@@ -16,34 +16,34 @@ discard block |
||
16 | 16 | $is_allowedToTrack = $is_courseAdmin || $is_platformAdmin || $is_courseCoach || $is_sessionAdmin; |
17 | 17 | |
18 | 18 | if (!$is_allowedToTrack) { |
19 | - Display :: display_header(null); |
|
20 | - api_not_allowed(); |
|
21 | - Display :: display_footer(); |
|
19 | + Display :: display_header(null); |
|
20 | + api_not_allowed(); |
|
21 | + Display :: display_footer(); |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | $export_to_csv = false; |
25 | 25 | if (isset($_GET['export'])) { |
26 | - $export_to_csv = true; |
|
26 | + $export_to_csv = true; |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | if (api_is_platform_admin() ) { |
30 | - $global = true; |
|
30 | + $global = true; |
|
31 | 31 | } else { |
32 | - $global = false; |
|
32 | + $global = false; |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | if ($global) { |
36 | - $temp_course_list = CourseManager :: get_courses_list(); |
|
37 | - foreach($temp_course_list as $temp_course_item) { |
|
38 | - $course_item = CourseManager ::get_course_information($temp_course_item['code']); |
|
36 | + $temp_course_list = CourseManager :: get_courses_list(); |
|
37 | + foreach($temp_course_list as $temp_course_item) { |
|
38 | + $course_item = CourseManager ::get_course_information($temp_course_item['code']); |
|
39 | 39 | $course_list[] = array( |
40 | 40 | 'code' => $course_item['code'], |
41 | 41 | 'title' => $course_item['title'], |
42 | 42 | ); |
43 | - } |
|
43 | + } |
|
44 | 44 | } else { |
45 | 45 | $current_course['code'] = $_course['id']; |
46 | - $course_list = array($current_course); |
|
46 | + $course_list = array($current_course); |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | $new_course_select = array(); |
@@ -54,20 +54,20 @@ discard block |
||
54 | 54 | $form = new FormValidator('search_simple', 'POST', '', '', null, false); |
55 | 55 | $form->addElement('select','course_code',get_lang('Course'), $new_course_select); |
56 | 56 | if ($global) { |
57 | - $form->addElement('hidden','view','admin'); |
|
57 | + $form->addElement('hidden','view','admin'); |
|
58 | 58 | } else { |
59 | - //Get exam lists |
|
59 | + //Get exam lists |
|
60 | 60 | $course_id = api_get_course_int_id(); |
61 | - $t_quiz = Database::get_course_table(TABLE_QUIZ_TEST); |
|
62 | - $sqlExercices = "SELECT quiz.title,id FROM ".$t_quiz." AS quiz |
|
61 | + $t_quiz = Database::get_course_table(TABLE_QUIZ_TEST); |
|
62 | + $sqlExercices = "SELECT quiz.title,id FROM ".$t_quiz." AS quiz |
|
63 | 63 | WHERE c_id = $course_id AND active='1' |
64 | 64 | ORDER BY quiz.title ASC"; |
65 | - $resultExercices = Database::query($sqlExercices); |
|
66 | - $exercise_list[0] = get_lang('All'); |
|
67 | - while($a_exercices = Database::fetch_array($resultExercices)) { |
|
68 | - $exercise_list[$a_exercices['id']] = $a_exercices['title']; |
|
69 | - } |
|
70 | - $form->addElement('select', 'exercise_id', get_lang('Exercise'), $exercise_list); |
|
65 | + $resultExercices = Database::query($sqlExercices); |
|
66 | + $exercise_list[0] = get_lang('All'); |
|
67 | + while($a_exercices = Database::fetch_array($resultExercices)) { |
|
68 | + $exercise_list[$a_exercices['id']] = $a_exercices['title']; |
|
69 | + } |
|
70 | + $form->addElement('select', 'exercise_id', get_lang('Exercise'), $exercise_list); |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | //$form->addElement('submit','submit',get_lang('Filter')); |
@@ -81,9 +81,9 @@ discard block |
||
81 | 81 | } |
82 | 82 | |
83 | 83 | if (!$export_to_csv) { |
84 | - Display :: display_header(get_lang('Reporting')); |
|
85 | - echo '<div class="actions" style ="font-size:10pt;">'; |
|
86 | - if ($global) { |
|
84 | + Display :: display_header(get_lang('Reporting')); |
|
85 | + echo '<div class="actions" style ="font-size:10pt;">'; |
|
86 | + if ($global) { |
|
87 | 87 | |
88 | 88 | echo '<div style="float:right"> <a href="'.api_get_self().'?export=1&score='.$filter_score.'&exercise_id='.$exercise_id.'"> |
89 | 89 | '.Display::return_icon('csv.gif').' |
@@ -93,81 +93,81 @@ discard block |
||
93 | 93 | '.get_lang('Print').'</a> |
94 | 94 | </div>'; |
95 | 95 | |
96 | - $menu_items[] = '<a href="'.api_get_path(WEB_CODE_PATH).'mySpace/?view=teacher">'.get_lang('TeacherInterface').'</a>'; |
|
96 | + $menu_items[] = '<a href="'.api_get_path(WEB_CODE_PATH).'mySpace/?view=teacher">'.get_lang('TeacherInterface').'</a>'; |
|
97 | 97 | if (api_is_platform_admin()) { |
98 | - $menu_items[] = '<a href="'.api_get_path(WEB_CODE_PATH).'mySpace/?view=admin">'.get_lang('AdminInterface').'</a>'; |
|
98 | + $menu_items[] = '<a href="'.api_get_path(WEB_CODE_PATH).'mySpace/?view=admin">'.get_lang('AdminInterface').'</a>'; |
|
99 | 99 | } else { |
100 | 100 | $menu_items[] = '<a href="'.api_get_path(WEB_CODE_PATH).'mySpace/?view=coach">'.get_lang('AdminInterface').'</a>'; |
101 | 101 | } |
102 | - $menu_items[] = get_lang('ExamTracking'); |
|
103 | - $nb_menu_items = count($menu_items); |
|
104 | - if($nb_menu_items>1) { |
|
105 | - foreach($menu_items as $key=> $item) { |
|
106 | - echo $item; |
|
107 | - if($key!=$nb_menu_items-1) { |
|
108 | - echo ' | '; |
|
109 | - } |
|
110 | - } |
|
111 | - echo '<br />'; |
|
112 | - } |
|
113 | - } else { |
|
114 | - echo '<a href="courseLog.php?'.api_get_cidreq().'&studentlist=true">'.get_lang('StudentsTracking').'</a> | |
|
102 | + $menu_items[] = get_lang('ExamTracking'); |
|
103 | + $nb_menu_items = count($menu_items); |
|
104 | + if($nb_menu_items>1) { |
|
105 | + foreach($menu_items as $key=> $item) { |
|
106 | + echo $item; |
|
107 | + if($key!=$nb_menu_items-1) { |
|
108 | + echo ' | '; |
|
109 | + } |
|
110 | + } |
|
111 | + echo '<br />'; |
|
112 | + } |
|
113 | + } else { |
|
114 | + echo '<a href="courseLog.php?'.api_get_cidreq().'&studentlist=true">'.get_lang('StudentsTracking').'</a> | |
|
115 | 115 | <a href="courseLog.php?'.api_get_cidreq().'&studentlist=false">'.get_lang('CourseTracking').'</a> | '; |
116 | 116 | echo '<a href="courseLog.php?'.api_get_cidreq().'&studentlist=resources">'.get_lang('ResourcesTracking').'</a>'; |
117 | - echo ' | '.get_lang('ExamTracking').''; |
|
117 | + echo ' | '.get_lang('ExamTracking').''; |
|
118 | 118 | echo '<a href="'.api_get_self().'?export=1&score='.$filter_score.'&exercise_id='.$exercise_id.'"> |
119 | 119 | '.Display::return_icon('excel.gif').' |
120 | 120 | '.get_lang('ExportAsXLS').'</a><br /><br />'; |
121 | 121 | |
122 | - } |
|
122 | + } |
|
123 | 123 | echo '</div>'; |
124 | - echo '<br /><br />'; |
|
125 | - $form->display(); |
|
124 | + echo '<br /><br />'; |
|
125 | + $form->display(); |
|
126 | 126 | } |
127 | 127 | $main_result = array(); |
128 | 128 | $session_id = 0; |
129 | 129 | $user_list = array(); |
130 | 130 | // Getting course list |
131 | 131 | foreach ($course_list as $current_course ) { |
132 | - $course_info = api_get_course_info($current_course['code']); |
|
133 | - $_course = $course_info; |
|
134 | - |
|
135 | - // Getting LP list |
|
136 | - $list = new LearnpathList('', $current_course['code'], $session_id); |
|
137 | - $lp_list = $list->get_flat_list(); |
|
138 | - |
|
139 | - // Looping LPs |
|
140 | - $lps = array(); |
|
141 | - foreach ($lp_list as $lp_id =>$lp) { |
|
142 | - $exercise_list = Event::get_all_exercises_from_lp($lp_id, $course_info['real_id']); |
|
143 | - $attempt_result = array(); |
|
144 | - // Looping Chamilo Exercises in LP |
|
145 | - foreach ($exercise_list as $exercise) { |
|
146 | - $exercise_stats = Event::get_all_exercise_event_from_lp( |
|
147 | - $exercise['path'], |
|
148 | - $course_info['real_id'], |
|
149 | - $session_id |
|
150 | - ); |
|
151 | - // Looping Exercise Attempts |
|
152 | - foreach ($exercise_stats as $stats) { |
|
153 | - $attempt_result[$exercise['id']]['users'][$stats['exe_user_id']][$stats['exe_id']] = $stats; |
|
154 | - $user_list[$stats['exe_user_id']] = $stats['exe_user_id']; |
|
155 | - } |
|
156 | - $exercise_list_name[$exercise['id']] = $exercise['title']; |
|
157 | - } |
|
158 | - $lps[$lp_id] = array('lp_name' =>$lp['lp_name'], 'exercises' =>$attempt_result); |
|
159 | - $lp_list_name[$lp_id] = $lp['lp_name']; |
|
160 | - } |
|
161 | - $main_result[$current_course['code']] = $lps; |
|
132 | + $course_info = api_get_course_info($current_course['code']); |
|
133 | + $_course = $course_info; |
|
134 | + |
|
135 | + // Getting LP list |
|
136 | + $list = new LearnpathList('', $current_course['code'], $session_id); |
|
137 | + $lp_list = $list->get_flat_list(); |
|
138 | + |
|
139 | + // Looping LPs |
|
140 | + $lps = array(); |
|
141 | + foreach ($lp_list as $lp_id =>$lp) { |
|
142 | + $exercise_list = Event::get_all_exercises_from_lp($lp_id, $course_info['real_id']); |
|
143 | + $attempt_result = array(); |
|
144 | + // Looping Chamilo Exercises in LP |
|
145 | + foreach ($exercise_list as $exercise) { |
|
146 | + $exercise_stats = Event::get_all_exercise_event_from_lp( |
|
147 | + $exercise['path'], |
|
148 | + $course_info['real_id'], |
|
149 | + $session_id |
|
150 | + ); |
|
151 | + // Looping Exercise Attempts |
|
152 | + foreach ($exercise_stats as $stats) { |
|
153 | + $attempt_result[$exercise['id']]['users'][$stats['exe_user_id']][$stats['exe_id']] = $stats; |
|
154 | + $user_list[$stats['exe_user_id']] = $stats['exe_user_id']; |
|
155 | + } |
|
156 | + $exercise_list_name[$exercise['id']] = $exercise['title']; |
|
157 | + } |
|
158 | + $lps[$lp_id] = array('lp_name' =>$lp['lp_name'], 'exercises' =>$attempt_result); |
|
159 | + $lp_list_name[$lp_id] = $lp['lp_name']; |
|
160 | + } |
|
161 | + $main_result[$current_course['code']] = $lps; |
|
162 | 162 | } |
163 | 163 | |
164 | 164 | if (!empty($user_list)) { |
165 | 165 | foreach($user_list as $user_id) { |
166 | 166 | $user_data = api_get_user_info($user_id); |
167 | - $user_list_name[$user_id] = api_get_person_name( |
|
168 | - $user_data['firstname'], |
|
169 | - $user_data['lastname'] |
|
170 | - ); |
|
167 | + $user_list_name[$user_id] = api_get_person_name( |
|
168 | + $user_data['firstname'], |
|
169 | + $user_data['lastname'] |
|
170 | + ); |
|
171 | 171 | } |
172 | 172 | } |
173 | 173 | $export_array = array(); |
@@ -207,15 +207,15 @@ discard block |
||
207 | 207 | $html_result .= Display::tag('td', $result); |
208 | 208 | |
209 | 209 | $html_result .= '</tr>'; |
210 | - $export_array[] = array( |
|
211 | - $course_code, |
|
212 | - $lp_list_name[$lp_id], |
|
213 | - $exercise_list_name[$exercise_id], |
|
214 | - $user_list_name[$user_id], |
|
215 | - $attempt, |
|
216 | - api_get_local_time($attempt_data['exe_date']), |
|
217 | - $result, |
|
218 | - ); |
|
210 | + $export_array[] = array( |
|
211 | + $course_code, |
|
212 | + $lp_list_name[$lp_id], |
|
213 | + $exercise_list_name[$exercise_id], |
|
214 | + $user_list_name[$user_id], |
|
215 | + $attempt, |
|
216 | + api_get_local_time($attempt_data['exe_date']), |
|
217 | + $result, |
|
218 | + ); |
|
219 | 219 | $attempt++; |
220 | 220 | } |
221 | 221 | } |
@@ -226,30 +226,30 @@ discard block |
||
226 | 226 | } |
227 | 227 | |
228 | 228 | if (!$export_to_csv) { |
229 | - echo $html_result; |
|
229 | + echo $html_result; |
|
230 | 230 | } |
231 | 231 | $filename = 'learning_path_results-'.date('Y-m-d-h:i:s').'.xls'; |
232 | 232 | if ($export_to_csv) { |
233 | 233 | export_complete_report_csv($filename, $export_array); |
234 | - exit; |
|
234 | + exit; |
|
235 | 235 | } |
236 | 236 | |
237 | 237 | function export_complete_report_csv($filename, $array) |
238 | 238 | { |
239 | - $header[] = array( |
|
240 | - get_lang('Course'), |
|
241 | - get_lang('LearningPath'), |
|
242 | - get_lang('Exercise'), |
|
243 | - get_lang('User'), |
|
244 | - get_lang('Attempt'), |
|
245 | - get_lang('Date'), |
|
246 | - get_lang('Results'), |
|
247 | - ); |
|
248 | - if (!empty($array)) { |
|
249 | - $array = array_merge($header, $array); |
|
250 | - Export :: arrayToCsv($array, $filename); |
|
251 | - } |
|
252 | - exit; |
|
239 | + $header[] = array( |
|
240 | + get_lang('Course'), |
|
241 | + get_lang('LearningPath'), |
|
242 | + get_lang('Exercise'), |
|
243 | + get_lang('User'), |
|
244 | + get_lang('Attempt'), |
|
245 | + get_lang('Date'), |
|
246 | + get_lang('Results'), |
|
247 | + ); |
|
248 | + if (!empty($array)) { |
|
249 | + $array = array_merge($header, $array); |
|
250 | + Export :: arrayToCsv($array, $filename); |
|
251 | + } |
|
252 | + exit; |
|
253 | 253 | |
254 | 254 | } |
255 | 255 | Display :: display_footer(); |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | $export_to_csv = true; |
27 | 27 | } |
28 | 28 | |
29 | -if (api_is_platform_admin() ) { |
|
29 | +if (api_is_platform_admin()) { |
|
30 | 30 | $global = true; |
31 | 31 | } else { |
32 | 32 | $global = false; |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | |
35 | 35 | if ($global) { |
36 | 36 | $temp_course_list = CourseManager :: get_courses_list(); |
37 | - foreach($temp_course_list as $temp_course_item) { |
|
37 | + foreach ($temp_course_list as $temp_course_item) { |
|
38 | 38 | $course_item = CourseManager ::get_course_information($temp_course_item['code']); |
39 | 39 | $course_list[] = array( |
40 | 40 | 'code' => $course_item['code'], |
@@ -47,14 +47,14 @@ discard block |
||
47 | 47 | } |
48 | 48 | |
49 | 49 | $new_course_select = array(); |
50 | -foreach($course_list as $data) { |
|
50 | +foreach ($course_list as $data) { |
|
51 | 51 | $new_course_select[$data['code']] = $data['title']; |
52 | 52 | } |
53 | 53 | |
54 | 54 | $form = new FormValidator('search_simple', 'POST', '', '', null, false); |
55 | -$form->addElement('select','course_code',get_lang('Course'), $new_course_select); |
|
55 | +$form->addElement('select', 'course_code', get_lang('Course'), $new_course_select); |
|
56 | 56 | if ($global) { |
57 | - $form->addElement('hidden','view','admin'); |
|
57 | + $form->addElement('hidden', 'view', 'admin'); |
|
58 | 58 | } else { |
59 | 59 | //Get exam lists |
60 | 60 | $course_id = api_get_course_int_id(); |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | ORDER BY quiz.title ASC"; |
65 | 65 | $resultExercices = Database::query($sqlExercices); |
66 | 66 | $exercise_list[0] = get_lang('All'); |
67 | - while($a_exercices = Database::fetch_array($resultExercices)) { |
|
67 | + while ($a_exercices = Database::fetch_array($resultExercices)) { |
|
68 | 68 | $exercise_list[$a_exercices['id']] = $a_exercices['title']; |
69 | 69 | } |
70 | 70 | $form->addElement('select', 'exercise_id', get_lang('Exercise'), $exercise_list); |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | |
88 | 88 | echo '<div style="float:right"> <a href="'.api_get_self().'?export=1&score='.$filter_score.'&exercise_id='.$exercise_id.'"> |
89 | 89 | '.Display::return_icon('csv.gif').' |
90 | - '.get_lang('ExportAsCSV').'</a>' . |
|
90 | + '.get_lang('ExportAsCSV').'</a>'. |
|
91 | 91 | '<a href="javascript: void(0);" onclick="javascript: window.print()"> |
92 | 92 | '.Display::return_icon('printmgr.gif').' |
93 | 93 | '.get_lang('Print').'</a> |
@@ -101,10 +101,10 @@ discard block |
||
101 | 101 | } |
102 | 102 | $menu_items[] = get_lang('ExamTracking'); |
103 | 103 | $nb_menu_items = count($menu_items); |
104 | - if($nb_menu_items>1) { |
|
105 | - foreach($menu_items as $key=> $item) { |
|
104 | + if ($nb_menu_items > 1) { |
|
105 | + foreach ($menu_items as $key=> $item) { |
|
106 | 106 | echo $item; |
107 | - if($key!=$nb_menu_items-1) { |
|
107 | + if ($key != $nb_menu_items - 1) { |
|
108 | 108 | echo ' | '; |
109 | 109 | } |
110 | 110 | } |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | $session_id = 0; |
129 | 129 | $user_list = array(); |
130 | 130 | // Getting course list |
131 | -foreach ($course_list as $current_course ) { |
|
131 | +foreach ($course_list as $current_course) { |
|
132 | 132 | $course_info = api_get_course_info($current_course['code']); |
133 | 133 | $_course = $course_info; |
134 | 134 | |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | } |
163 | 163 | |
164 | 164 | if (!empty($user_list)) { |
165 | - foreach($user_list as $user_id) { |
|
165 | + foreach ($user_list as $user_id) { |
|
166 | 166 | $user_data = api_get_user_info($user_id); |
167 | 167 | $user_list_name[$user_id] = api_get_person_name( |
168 | 168 | $user_data['firstname'], |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | ); |
171 | 171 | } |
172 | 172 | } |
173 | -$export_array = array(); |
|
173 | +$export_array = array(); |
|
174 | 174 | if (!empty($main_result)) { |
175 | 175 | |
176 | 176 | $html_result .= '<table class="data_table">'; |
@@ -193,9 +193,9 @@ discard block |
||
193 | 193 | |
194 | 194 | foreach ($exercises as $exercise_id => $exercise_data) { |
195 | 195 | $users = $exercise_data['users']; |
196 | - foreach($users as $user_id => $attempts) { |
|
196 | + foreach ($users as $user_id => $attempts) { |
|
197 | 197 | $attempt = 1; |
198 | - foreach($attempts as $exe_id => $attempt_data) { |
|
198 | + foreach ($attempts as $exe_id => $attempt_data) { |
|
199 | 199 | $html_result .= '<tr colspan="">'; |
200 | 200 | $html_result .= Display::tag('td', $course_code); |
201 | 201 | $html_result .= Display::tag('td', $lp_list_name[$lp_id]); |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | } |
223 | 223 | } |
224 | 224 | } |
225 | - $html_result .='</table>'; |
|
225 | + $html_result .= '</table>'; |
|
226 | 226 | } |
227 | 227 | |
228 | 228 | if (!$export_to_csv) { |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | |
24 | 24 | $nameTools = get_lang('ToolName'); |
25 | 25 | |
26 | -$interbreadcrumb[]= array ("url"=>"courseLog.php", "name"=> "Statistics"); |
|
26 | +$interbreadcrumb[] = array("url"=>"courseLog.php", "name"=> "Statistics"); |
|
27 | 27 | |
28 | 28 | $htmlHeadXtra[] = "<style type='text/css'> |
29 | 29 | /*<![CDATA[*/ |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | td {border-bottom: thin dashed gray;} |
41 | 41 | /*]]>*/ |
42 | 42 | </style>"; |
43 | -Display::display_header($nameTools,"Tracking"); |
|
43 | +Display::display_header($nameTools, "Tracking"); |
|
44 | 44 | ?> |
45 | 45 | |
46 | 46 | <h3> |
@@ -59,16 +59,16 @@ discard block |
||
59 | 59 | // Defining the months of the year to allow translation of the months |
60 | 60 | $MonthsShort = api_get_months_short(); |
61 | 61 | |
62 | -$tool=$_REQUEST['tool']; |
|
63 | -$period=$_REQUEST['period']; |
|
64 | -$reqdate=$_REQUEST['reqdate']; |
|
62 | +$tool = $_REQUEST['tool']; |
|
63 | +$period = $_REQUEST['period']; |
|
64 | +$reqdate = $_REQUEST['reqdate']; |
|
65 | 65 | ?> |
66 | 66 | <table width="100%" cellpadding="2" cellspacing="0" border="0"> |
67 | 67 | <?php |
68 | 68 | $TABLETRACK_ACCESS = Database::get_main_table(TABLE_STATISTIC_TRACK_E_ACCESS); |
69 | 69 | $courseId = api_get_course_int_id(); |
70 | 70 | //stats for the current course |
71 | - if(isset($_cid)) { |
|
71 | + if (isset($_cid)) { |
|
72 | 72 | // to see stats of one course user must be courseAdmin of this course |
73 | 73 | $is_allowedToTrack = $is_courseAdmin; |
74 | 74 | $courseCodeEqualcidIfNeeded = "AND c_id = '$courseId'"; |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | $is_allowedToTrack = $is_platformAdmin; |
79 | 79 | $courseCodeEqualcidIfNeeded = ""; |
80 | 80 | } |
81 | - if( $is_allowedToTrack) { |
|
81 | + if ($is_allowedToTrack) { |
|
82 | 82 | // list of all tools |
83 | 83 | if (!isset($tool)) { |
84 | 84 | $sql = "SELECT access_tool, count( access_tool ) |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | echo "<tr> |
91 | 91 | <td> |
92 | 92 | "; |
93 | - if(isset($_cid)) echo "<b>$_cid : </b>"; |
|
93 | + if (isset($_cid)) echo "<b>$_cid : </b>"; |
|
94 | 94 | echo " <b>".get_lang('ToolList')."</b> |
95 | 95 | </td> |
96 | 96 | </tr> |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | </tr>"; |
109 | 109 | if (is_array($results)) |
110 | 110 | { |
111 | - for($j = 0 ; $j < count($results) ; $j++) |
|
111 | + for ($j = 0; $j < count($results); $j++) |
|
112 | 112 | { |
113 | 113 | echo "<tr>"; |
114 | 114 | echo "<td><a href='toolaccess_details.php?tool=".urlencode($results[$j][0])."'>".get_lang($results[$j][0])."</a></td>"; |
@@ -131,12 +131,12 @@ discard block |
||
131 | 131 | $encodedTool = urlencode($tool); |
132 | 132 | $tool = urldecode($tool); |
133 | 133 | |
134 | - if( !isset($reqdate) ) |
|
134 | + if (!isset($reqdate)) |
|
135 | 135 | $reqdate = time(); |
136 | 136 | echo "<tr> |
137 | 137 | <td> |
138 | 138 | "; |
139 | - if(isset($_cid)) echo "<b>$_cid : </b>"; |
|
139 | + if (isset($_cid)) echo "<b>$_cid : </b>"; |
|
140 | 140 | echo " <b>".get_lang($tool)."</b> |
141 | 141 | </td> |
142 | 142 | </tr> |
@@ -145,22 +145,22 @@ discard block |
||
145 | 145 | /* ------ display ------ */ |
146 | 146 | // displayed period |
147 | 147 | echo "<tr><td>"; |
148 | - switch($period) |
|
148 | + switch ($period) |
|
149 | 149 | { |
150 | 150 | case "month" : |
151 | - echo $MonthsLong[date("n", $reqdate)-1].date(" Y", $reqdate); |
|
151 | + echo $MonthsLong[date("n", $reqdate) - 1].date(" Y", $reqdate); |
|
152 | 152 | break; |
153 | 153 | case "week" : |
154 | - $weeklowreqdate = ($reqdate-(86400*date("w" , $reqdate))); |
|
155 | - $weekhighreqdate = ($reqdate+(86400*(6-date("w" , $reqdate)) )); |
|
156 | - echo "<b>".$langFrom."</b> ".date("d " , $weeklowreqdate).$MonthsLong[date("n", $weeklowreqdate)-1].date(" Y" , $weeklowreqdate); |
|
157 | - echo " <b>".$langTo."</b> ".date("d " , $weekhighreqdate ).$MonthsLong[date("n", $weekhighreqdate)-1].date(" Y" , $weekhighreqdate); |
|
154 | + $weeklowreqdate = ($reqdate - (86400 * date("w", $reqdate))); |
|
155 | + $weekhighreqdate = ($reqdate + (86400 * (6 - date("w", $reqdate)))); |
|
156 | + echo "<b>".$langFrom."</b> ".date("d ", $weeklowreqdate).$MonthsLong[date("n", $weeklowreqdate) - 1].date(" Y", $weeklowreqdate); |
|
157 | + echo " <b>".$langTo."</b> ".date("d ", $weekhighreqdate).$MonthsLong[date("n", $weekhighreqdate) - 1].date(" Y", $weekhighreqdate); |
|
158 | 158 | break; |
159 | 159 | // default == day |
160 | 160 | default : |
161 | 161 | $period = "day"; |
162 | 162 | case "day" : |
163 | - echo $DaysLong[date("w" , $reqdate)].date(" d " , $reqdate).$MonthsLong[date("n", $reqdate)-1].date(" Y" , $reqdate); |
|
163 | + echo $DaysLong[date("w", $reqdate)].date(" d ", $reqdate).$MonthsLong[date("n", $reqdate) - 1].date(" Y", $reqdate); |
|
164 | 164 | break; |
165 | 165 | } |
166 | 166 | echo "</tr></td>"; |
@@ -174,13 +174,13 @@ discard block |
||
174 | 174 | || |
175 | 175 | |
176 | 176 | "; |
177 | - switch($period) |
|
177 | + switch ($period) |
|
178 | 178 | { |
179 | 179 | case "month" : |
180 | 180 | // previous and next date must be evaluated |
181 | 181 | // 30 days should be a good approximation |
182 | - $previousReqDate = mktime(1,1,1,date("m",$reqdate)-1,1,date("Y",$reqdate)); |
|
183 | - $nextReqDate = mktime(1,1,1,date("m",$reqdate)+1,1,date("Y",$reqdate)); |
|
182 | + $previousReqDate = mktime(1, 1, 1, date("m", $reqdate) - 1, 1, date("Y", $reqdate)); |
|
183 | + $nextReqDate = mktime(1, 1, 1, date("m", $reqdate) + 1, 1, date("Y", $reqdate)); |
|
184 | 184 | echo " |
185 | 185 | [<a href='".api_get_self()."?tool=$encodedTool&period=month&reqdate=$previousReqDate' class='specialLink'>$langPreviousMonth</a>] |
186 | 186 | [<a href='".api_get_self()."?tool=$encodedTool&period=month&reqdate=$nextReqDate' class='specialLink'>$langNextMonth</a>] |
@@ -188,8 +188,8 @@ discard block |
||
188 | 188 | break; |
189 | 189 | case "week" : |
190 | 190 | // previous and next date must be evaluated |
191 | - $previousReqDate = $reqdate - 7*86400; |
|
192 | - $nextReqDate = $reqdate + 7*86400; |
|
191 | + $previousReqDate = $reqdate - 7 * 86400; |
|
192 | + $nextReqDate = $reqdate + 7 * 86400; |
|
193 | 193 | echo " |
194 | 194 | [<a href='".api_get_self()."?tool=$encodedTool&period=week&reqdate=$previousReqDate' class='specialLink'>$langPreviousWeek</a>] |
195 | 195 | [<a href='".api_get_self()."?tool=$encodedTool&period=week&reqdate=$nextReqDate' class='specialLink'>$langNextWeek</a>] |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | </tr> |
214 | 214 | "; |
215 | 215 | // display information about this period |
216 | - switch($period) |
|
216 | + switch ($period) |
|
217 | 217 | { |
218 | 218 | // all days |
219 | 219 | case "month" : |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | ORDER BY access_date ASC"; |
227 | 227 | |
228 | 228 | $days_array = StatsUtils::daysTab($sql); |
229 | - StatsUtils::makeHitsTable($days_array,$langDay); |
|
229 | + StatsUtils::makeHitsTable($days_array, $langDay); |
|
230 | 230 | break; |
231 | 231 | // all days |
232 | 232 | case "week" : |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | ORDER BY access_date ASC"; |
240 | 240 | |
241 | 241 | $days_array = StatsUtils::daysTab($sql); |
242 | - StatsUtils::makeHitsTable($days_array,$langDay); |
|
242 | + StatsUtils::makeHitsTable($days_array, $langDay); |
|
243 | 243 | break; |
244 | 244 | // all hours |
245 | 245 | case "day" : |
@@ -251,8 +251,8 @@ discard block |
||
251 | 251 | AND YEAR(access_date) = YEAR(FROM_UNIXTIME('$reqdate')) |
252 | 252 | ORDER BY access_date ASC"; |
253 | 253 | |
254 | - $hours_array = StatsUtils::hoursTab($sql,$reqdate); |
|
255 | - StatsUtils::makeHitsTable($hours_array,$langHour); |
|
254 | + $hours_array = StatsUtils::hoursTab($sql, $reqdate); |
|
255 | + StatsUtils::makeHitsTable($hours_array, $langHour); |
|
256 | 256 | break; |
257 | 257 | } |
258 | 258 | } |
@@ -90,7 +90,9 @@ discard block |
||
90 | 90 | echo "<tr> |
91 | 91 | <td> |
92 | 92 | "; |
93 | - if(isset($_cid)) echo "<b>$_cid : </b>"; |
|
93 | + if(isset($_cid)) { |
|
94 | + echo "<b>$_cid : </b>"; |
|
95 | + } |
|
94 | 96 | echo " <b>".get_lang('ToolList')."</b> |
95 | 97 | </td> |
96 | 98 | </tr> |
@@ -116,27 +118,28 @@ discard block |
||
116 | 118 | echo"</tr>"; |
117 | 119 | } |
118 | 120 | |
119 | - } |
|
120 | - else |
|
121 | + } else |
|
121 | 122 | { |
122 | 123 | echo "<tr>"; |
123 | 124 | echo "<td colspan='2'><center>".get_lang('NoResult')."</center></td>"; |
124 | 125 | echo"</tr>"; |
125 | 126 | } |
126 | 127 | echo "</table></td></tr>"; |
127 | - } |
|
128 | - else |
|
128 | + } else |
|
129 | 129 | { |
130 | 130 | // this can prevent bug if there is special chars in $tool |
131 | 131 | $encodedTool = urlencode($tool); |
132 | 132 | $tool = urldecode($tool); |
133 | 133 | |
134 | - if( !isset($reqdate) ) |
|
135 | - $reqdate = time(); |
|
134 | + if( !isset($reqdate) ) { |
|
135 | + $reqdate = time(); |
|
136 | + } |
|
136 | 137 | echo "<tr> |
137 | 138 | <td> |
138 | 139 | "; |
139 | - if(isset($_cid)) echo "<b>$_cid : </b>"; |
|
140 | + if(isset($_cid)) { |
|
141 | + echo "<b>$_cid : </b>"; |
|
142 | + } |
|
140 | 143 | echo " <b>".get_lang($tool)."</b> |
141 | 144 | </td> |
142 | 145 | </tr> |
@@ -75,13 +75,13 @@ discard block |
||
75 | 75 | // check if uid is tutor of this group |
76 | 76 | $courseId = api_get_course_int_id(); |
77 | 77 | |
78 | - if (( $is_allowedToTrack || $is_allowedToTrackEverybodyInCourse)) { |
|
78 | + if (($is_allowedToTrack || $is_allowedToTrackEverybodyInCourse)) { |
|
79 | 79 | if ($is_allowedToTrackEverybodyInCourse) { |
80 | 80 | $sql = "SELECT u.firstname,u.lastname, u.email |
81 | 81 | FROM $TABLECOURSUSER cu , $TABLEUSER u |
82 | 82 | WHERE |
83 | 83 | cu.user_id = u.user_id AND |
84 | - cu.relation_type<>" . COURSE_RELATION_TYPE_RRHH . " AND |
|
84 | + cu.relation_type<>".COURSE_RELATION_TYPE_RRHH." AND |
|
85 | 85 | cu.c_id = '$courseId' AND |
86 | 86 | u.user_id = '$uInfo'"; |
87 | 87 | } else { |
@@ -97,21 +97,21 @@ discard block |
||
97 | 97 | $res[2] == "" ? $res2 = get_lang('NoEmail') : $res2 = Display::encrypted_mailto_link($res[2]); |
98 | 98 | |
99 | 99 | echo "<tr><td>"; |
100 | - echo $informationsAbout . " : <br>"; |
|
100 | + echo $informationsAbout." : <br>"; |
|
101 | 101 | echo "<ul>\n" |
102 | - . "<li>" . get_lang('FirstName') . " : " . $res[0] . "</li>\n" |
|
103 | - . "<li>" . get_lang('LastName') . " : " . $res[1] . "</li>\n" |
|
104 | - . "<li>" . get_lang('Email') . " : " . $res2 . "</li>\n" |
|
102 | + . "<li>".get_lang('FirstName')." : ".$res[0]."</li>\n" |
|
103 | + . "<li>".get_lang('LastName')." : ".$res[1]."</li>\n" |
|
104 | + . "<li>".get_lang('Email')." : ".$res2."</li>\n" |
|
105 | 105 | . "</ul>"; |
106 | 106 | echo "</td></tr>"; |
107 | 107 | /* * ***** MENU ******* */ |
108 | 108 | echo "<tr> |
109 | 109 | <td> |
110 | - [<a href='userLog.php?uInfo=$uInfo&view=$view'>" . get_lang('Back') . "</a>] |
|
110 | + [<a href='userLog.php?uInfo=$uInfo&view=$view'>".get_lang('Back')."</a>] |
|
111 | 111 | "; |
112 | 112 | echo " || |
113 | - [<a href='" . api_get_self() . "?uInfo=$uInfo&view=$view&period=week&reqdate=$reqdate' class='specialLink'>" . get_lang('PeriodWeek') . "</a>] |
|
114 | - [<a href='" . api_get_self() . "?uInfo=$uInfo&view=$view&period=month&reqdate=$reqdate' class='specialLink'>" . get_lang('PeriodMonth') . "</a>] |
|
113 | + [<a href='" . api_get_self()."?uInfo=$uInfo&view=$view&period=week&reqdate=$reqdate' class='specialLink'>".get_lang('PeriodWeek')."</a>] |
|
114 | + [<a href='" . api_get_self()."?uInfo=$uInfo&view=$view&period=month&reqdate=$reqdate' class='specialLink'>".get_lang('PeriodMonth')."</a>] |
|
115 | 115 | || |
116 | 116 | "; |
117 | 117 | switch ($period) { |
@@ -120,8 +120,8 @@ discard block |
||
120 | 120 | $previousReqDate = $reqdate - 7 * 86400; |
121 | 121 | $nextReqDate = $reqdate + 7 * 86400; |
122 | 122 | echo " |
123 | - [<a href='" . api_get_self() . "?uInfo=$uInfo&view=$view&period=week&reqdate=$previousReqDate' class='specialLink'>" . get_lang('PreviousWeek') . "</a>] |
|
124 | - [<a href='" . api_get_self() . "?uInfo=$uInfo&view=$view&period=week&reqdate=$nextReqDate' class='specialLink'>" . get_lang('NextWeek') . "</a>] |
|
123 | + [<a href='" . api_get_self()."?uInfo=$uInfo&view=$view&period=week&reqdate=$previousReqDate' class='specialLink'>".get_lang('PreviousWeek')."</a>] |
|
124 | + [<a href='" . api_get_self()."?uInfo=$uInfo&view=$view&period=week&reqdate=$nextReqDate' class='specialLink'>".get_lang('NextWeek')."</a>] |
|
125 | 125 | "; |
126 | 126 | break; |
127 | 127 | default : |
@@ -132,8 +132,8 @@ discard block |
||
132 | 132 | $previousReqDate = mktime(1, 1, 1, date("m", $reqdate) - 1, 1, date("Y", $reqdate)); |
133 | 133 | $nextReqDate = mktime(1, 1, 1, date("m", $reqdate) + 1, 1, date("Y", $reqdate)); |
134 | 134 | echo " |
135 | - [<a href='" . api_get_self() . "?uInfo=$uInfo&view=$view&period=month&reqdate=$previousReqDate' class='specialLink'>" . get_lang('PreviousMonth') . "</a>] |
|
136 | - [<a href='" . api_get_self() . "?uInfo=$uInfo&view=$view&period=month&reqdate=$nextReqDate' class='specialLink'>" . get_lang('NextMonth') . "</a>] |
|
135 | + [<a href='" . api_get_self()."?uInfo=$uInfo&view=$view&period=month&reqdate=$previousReqDate' class='specialLink'>".get_lang('PreviousMonth')."</a>] |
|
136 | + [<a href='" . api_get_self()."?uInfo=$uInfo&view=$view&period=month&reqdate=$nextReqDate' class='specialLink'>".get_lang('NextMonth')."</a>] |
|
137 | 137 | "; |
138 | 138 | break; |
139 | 139 | } |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | AND YEAR(access_date) = YEAR(FROM_UNIXTIME('$reqdate')) |
154 | 154 | GROUP BY DAYOFMONTH(access_date) |
155 | 155 | ORDER BY access_date ASC"; |
156 | - $displayedDate = $MonthsLong[date("n", $reqdate) - 1] . date(" Y", $reqdate); |
|
156 | + $displayedDate = $MonthsLong[date("n", $reqdate) - 1].date(" Y", $reqdate); |
|
157 | 157 | break; |
158 | 158 | case "week" : |
159 | 159 | $sql = "SELECT access_date |
@@ -165,24 +165,24 @@ discard block |
||
165 | 165 | GROUP BY DAYOFMONTH(access_date) |
166 | 166 | ORDER BY access_date ASC"; |
167 | 167 | $weeklowreqdate = ($reqdate - (86400 * date("w", $reqdate))); |
168 | - $weekhighreqdate = ($reqdate + (86400 * (6 - date("w", $reqdate)) )); |
|
169 | - $displayedDate = get_lang('From') . " " . date("d ", $weeklowreqdate) . $MonthsLong[date("n", $weeklowreqdate) - 1] . date(" Y", $weeklowreqdate) |
|
170 | - . " " . get_lang('To') . " " . date("d ", $weekhighreqdate) . $MonthsLong[date("n", $weekhighreqdate) - 1] . date(" Y", $weekhighreqdate); |
|
168 | + $weekhighreqdate = ($reqdate + (86400 * (6 - date("w", $reqdate)))); |
|
169 | + $displayedDate = get_lang('From')." ".date("d ", $weeklowreqdate).$MonthsLong[date("n", $weeklowreqdate) - 1].date(" Y", $weeklowreqdate) |
|
170 | + . " ".get_lang('To')." ".date("d ", $weekhighreqdate).$MonthsLong[date("n", $weekhighreqdate) - 1].date(" Y", $weekhighreqdate); |
|
171 | 171 | break; |
172 | 172 | } |
173 | 173 | echo "<tr><td>"; |
174 | 174 | $results = StatsUtils::getManyResults1Col($sql); |
175 | 175 | /* * * display of the displayed period ** */ |
176 | 176 | echo "<table width='100%' cellpadding='2' cellspacing='1' border='0' align=center>"; |
177 | - echo "<td bgcolor='#E6E6E6'>" . $displayedDate . "</td>"; |
|
177 | + echo "<td bgcolor='#E6E6E6'>".$displayedDate."</td>"; |
|
178 | 178 | if (is_array($results)) { |
179 | 179 | for ($j = 0; $j < sizeof($results); $j++) { |
180 | 180 | $beautifulDateTime = api_convert_and_format_date($results[$j], null, date_default_timezone_get()); |
181 | 181 | echo "<tr>"; |
182 | - echo "<td style='padding-left : 40px;' valign='top'>" . $beautifulDateTime . "</td>"; |
|
182 | + echo "<td style='padding-left : 40px;' valign='top'>".$beautifulDateTime."</td>"; |
|
183 | 183 | echo"</tr>"; |
184 | 184 | // $limit is used to select only results between $results[$j] (current login) and next one |
185 | - if ($j == ( sizeof($results) - 1 )) |
|
185 | + if ($j == (sizeof($results) - 1)) |
|
186 | 186 | $limit = date("Y-m-d H:i:s", $nextReqDate); |
187 | 187 | else |
188 | 188 | $limit = $results[$j + 1]; |
@@ -192,8 +192,8 @@ discard block |
||
192 | 192 | FROM $TABLETRACK_ACCESS |
193 | 193 | WHERE access_user_id = $uInfo |
194 | 194 | AND access_tool IS NOT NULL |
195 | - AND access_date > '" . $results[$j] . "' |
|
196 | - AND access_date < '" . $limit . "' |
|
195 | + AND access_date > '".$results[$j]."' |
|
196 | + AND access_date < '" . $limit."' |
|
197 | 197 | AND c_id = $courseId |
198 | 198 | GROUP BY access_tool |
199 | 199 | ORDER BY access_tool ASC"; |
@@ -204,8 +204,8 @@ discard block |
||
204 | 204 | echo "<table width='50%' cellpadding='0' cellspacing='0' border='0'>\n"; |
205 | 205 | for ($k = 0; $k < count($results2); $k++) { |
206 | 206 | echo "<tr>\n"; |
207 | - echo "<td width='70%' style='padding-left : 60px;'>" . get_lang($results2[$k][0]) . "</td>\n"; |
|
208 | - echo "<td width='30%' align='right' style='padding-right : 40px'>" . $results2[$k][1] . " " . get_lang('Visits') . "</td>\n"; |
|
207 | + echo "<td width='70%' style='padding-left : 60px;'>".get_lang($results2[$k][0])."</td>\n"; |
|
208 | + echo "<td width='30%' align='right' style='padding-right : 40px'>".$results2[$k][1]." ".get_lang('Visits')."</td>\n"; |
|
209 | 209 | echo "</tr>"; |
210 | 210 | } |
211 | 211 | echo "</table>\n"; |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | } |
216 | 216 | } else { |
217 | 217 | echo "<tr>"; |
218 | - echo "<td colspan='2' bgcolor='#eeeeee'>" . get_lang('NoResult') . "</td>"; |
|
218 | + echo "<td colspan='2' bgcolor='#eeeeee'>".get_lang('NoResult')."</td>"; |
|
219 | 219 | echo "</tr>"; |
220 | 220 | } |
221 | 221 | echo "</table>"; |
@@ -182,10 +182,11 @@ |
||
182 | 182 | echo "<td style='padding-left : 40px;' valign='top'>" . $beautifulDateTime . "</td>"; |
183 | 183 | echo"</tr>"; |
184 | 184 | // $limit is used to select only results between $results[$j] (current login) and next one |
185 | - if ($j == ( sizeof($results) - 1 )) |
|
186 | - $limit = date("Y-m-d H:i:s", $nextReqDate); |
|
187 | - else |
|
188 | - $limit = $results[$j + 1]; |
|
185 | + if ($j == ( sizeof($results) - 1 )) { |
|
186 | + $limit = date("Y-m-d H:i:s", $nextReqDate); |
|
187 | + } else { |
|
188 | + $limit = $results[$j + 1]; |
|
189 | + } |
|
189 | 190 | // select all access to tool between displayed date and next displayed date or now() if |
190 | 191 | // displayed date is the last login date |
191 | 192 | $sql = "SELECT access_tool, count(access_tool) |
@@ -16,7 +16,6 @@ |
||
16 | 16 | * @author Patrick Cool |
17 | 17 | * @author René Haentjens, added CSV file import (October 2004) |
18 | 18 | * @package chamilo.link |
19 | - |
|
20 | 19 | */ |
21 | 20 | |
22 | 21 | // Including libraries |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | |
99 | 99 | $action_links = ' |
100 | 100 | function action_formatter(cellvalue, options, rowObject) { |
101 | - return \'<a href="course_log_tools.php?id_session=0&cidReq='.$course_code.'&gidReq=\'+options.rowId+\'">'.Display::return_icon('2rightarrow.png',get_lang('Edit'),'',ICON_SIZE_SMALL).'</a>'. |
|
101 | + return \'<a href="course_log_tools.php?id_session=0&cidReq='.$course_code.'&gidReq=\'+options.rowId+\'">'.Display::return_icon('2rightarrow.png', get_lang('Edit'), '', ICON_SIZE_SMALL).'</a>'. |
|
102 | 102 | '\'; |
103 | 103 | }'; |
104 | 104 | |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | $htmlHeadXtra[] = ' |
109 | 109 | <script> |
110 | 110 | $(function() { |
111 | - '.Display::grid_js('group_users',$url, $columns, $column_model, $extra_params, array(), $action_links, true).' |
|
111 | + '.Display::grid_js('group_users', $url, $columns, $column_model, $extra_params, array(), $action_links, true).' |
|
112 | 112 | }); |
113 | 113 | </script>'; |
114 | 114 |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | |
79 | 79 | // getting all the students of the course |
80 | 80 | if (empty($session_id)) { |
81 | - // Registered students in a course outside session. |
|
81 | + // Registered students in a course outside session. |
|
82 | 82 | $a_students = CourseManager:: get_student_list_from_course_code( |
83 | 83 | api_get_course_id(), |
84 | 84 | false, |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | api_get_group_id() |
90 | 90 | ); |
91 | 91 | } else { |
92 | - // Registered students in session. |
|
92 | + // Registered students in session. |
|
93 | 93 | $a_students = CourseManager:: get_student_list_from_course_code( |
94 | 94 | api_get_course_id(), |
95 | 95 | true, |
@@ -65,8 +65,8 @@ discard block |
||
65 | 65 | |
66 | 66 | // Breadcrumbs. |
67 | 67 | if (isset($_GET['origin']) && $_GET['origin'] == 'resume_session') { |
68 | - $interbreadcrumb[] = array('url' => '../admin/index.php','name' => get_lang('PlatformAdmin')); |
|
69 | - $interbreadcrumb[] = array('url' => '../session/session_list.php','name' => get_lang('SessionList')); |
|
68 | + $interbreadcrumb[] = array('url' => '../admin/index.php', 'name' => get_lang('PlatformAdmin')); |
|
69 | + $interbreadcrumb[] = array('url' => '../session/session_list.php', 'name' => get_lang('SessionList')); |
|
70 | 70 | $interbreadcrumb[] = array('url' => '../session/resume_session.php?id_session='.api_get_session_id(), 'name' => get_lang('SessionOverview')); |
71 | 71 | } |
72 | 72 | |
@@ -134,10 +134,10 @@ discard block |
||
134 | 134 | |
135 | 135 | echo '<span style="float:right; padding-top:0px;">'; |
136 | 136 | echo '<a href="javascript: void(0);" onclick="javascript: window.print();">'. |
137 | - Display::return_icon('printer.png', get_lang('Print'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
137 | + Display::return_icon('printer.png', get_lang('Print'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
138 | 138 | |
139 | 139 | echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&id_session='.api_get_session_id().'&export=csv"> |
140 | - '.Display::return_icon('export_csv.png', get_lang('ExportAsCSV'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
140 | + '.Display::return_icon('export_csv.png', get_lang('ExportAsCSV'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
141 | 141 | |
142 | 142 | echo '</span>'; |
143 | 143 | echo '</div>'; |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | $quiz_avg_score = round(($quiz_avg_score / $studentCount), 2).'%'; |
251 | 251 | $url = api_get_path( |
252 | 252 | WEB_CODE_PATH |
253 | - ) . 'exercise/overview.php?exerciseId='.$quiz['id'].$course_path_params; |
|
253 | + ).'exercise/overview.php?exerciseId='.$quiz['id'].$course_path_params; |
|
254 | 254 | |
255 | 255 | echo '<tr><td>'.Display::url( |
256 | 256 | $quiz['title'], |
@@ -111,7 +111,7 @@ |
||
111 | 111 | get_lang('HideColumn'), |
112 | 112 | array('align' => 'absmiddle', 'hspace' => '3px'), |
113 | 113 | ICON_SIZE_SMALL |
114 | - ) . "</div>' |
|
114 | + ) . "</div>' |
|
115 | 115 | ); |
116 | 116 | } |
117 | 117 | ); |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | get_lang('HideColumn'), |
112 | 112 | array('align' => 'absmiddle', 'hspace' => '3px'), |
113 | 113 | ICON_SIZE_SMALL |
114 | - ) . "</div>' |
|
114 | + )."</div>' |
|
115 | 115 | ); |
116 | 116 | } |
117 | 117 | ); |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | $TABLETRACK_LINKS = Database::get_main_table(TABLE_STATISTIC_TRACK_E_LINKS); |
147 | 147 | $TABLETRACK_DOWNLOADS = Database::get_main_table(TABLE_STATISTIC_TRACK_E_DOWNLOADS); |
148 | 148 | $TABLETRACK_ACCESS_2 = Database::get_main_table(TABLE_STATISTIC_TRACK_E_ACCESS); |
149 | -$TABLETRACK_EXERCISES = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES); |
|
149 | +$TABLETRACK_EXERCISES = Database::get_main_table(TABLE_STATISTIC_TRACK_E_EXERCISES); |
|
150 | 150 | $TABLECOURSUSER = Database::get_main_table(TABLE_MAIN_COURSE_USER); |
151 | 151 | $TABLECOURSE = Database::get_main_table(TABLE_MAIN_COURSE); |
152 | 152 | $table_user = Database::get_main_table(TABLE_MAIN_USER); |
@@ -156,8 +156,8 @@ discard block |
||
156 | 156 | |
157 | 157 | // Breadcrumbs. |
158 | 158 | if (isset($_GET['origin']) && $_GET['origin'] == 'resume_session') { |
159 | - $interbreadcrumb[] = array('url' => '../admin/index.php','name' => get_lang('PlatformAdmin')); |
|
160 | - $interbreadcrumb[] = array('url' => '../session/session_list.php','name' => get_lang('SessionList')); |
|
159 | + $interbreadcrumb[] = array('url' => '../admin/index.php', 'name' => get_lang('PlatformAdmin')); |
|
160 | + $interbreadcrumb[] = array('url' => '../session/session_list.php', 'name' => get_lang('SessionList')); |
|
161 | 161 | $interbreadcrumb[] = array('url' => '../session/resume_session.php?id_session='.$sessionId, 'name' => get_lang('SessionOverview')); |
162 | 162 | } |
163 | 163 | |
@@ -228,21 +228,21 @@ discard block |
||
228 | 228 | if (!empty($sessionId)) { |
229 | 229 | $actionsLeft .= Display::url( |
230 | 230 | Display::return_icon('attendance_list.png', get_lang('Logins'), '', ICON_SIZE_MEDIUM), |
231 | - api_get_path(WEB_CODE_PATH) . 'attendance/index.php?' . api_get_cidreq() . '&action=calendar_logins' |
|
231 | + api_get_path(WEB_CODE_PATH).'attendance/index.php?'.api_get_cidreq().'&action=calendar_logins' |
|
232 | 232 | ); |
233 | 233 | } |
234 | 234 | |
235 | 235 | $actionsRight = '<div class="pull-right">'; |
236 | 236 | $actionsRight .= '<a href="javascript: void(0);" onclick="javascript: window.print();">'. |
237 | - Display::return_icon('printer.png', get_lang('Print'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
237 | + Display::return_icon('printer.png', get_lang('Print'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
238 | 238 | |
239 | 239 | $addional_param = ''; |
240 | 240 | if (isset($_GET['additional_profile_field'])) { |
241 | - $addional_param ='additional_profile_field='.intval($_GET['additional_profile_field']); |
|
241 | + $addional_param = 'additional_profile_field='.intval($_GET['additional_profile_field']); |
|
242 | 242 | } |
243 | 243 | $users_tracking_per_page = ''; |
244 | 244 | if (isset($_GET['users_tracking_per_page'])) { |
245 | - $users_tracking_per_page= '&users_tracking_per_page='.intval($_GET['users_tracking_per_page']); |
|
245 | + $users_tracking_per_page = '&users_tracking_per_page='.intval($_GET['users_tracking_per_page']); |
|
246 | 246 | } |
247 | 247 | $actionsRight .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&export=csv&'.$addional_param.$users_tracking_per_page.'"> |
248 | 248 | '.Display::return_icon('export_csv.png', get_lang('ExportAsCSV'), '', ICON_SIZE_MEDIUM).'</a>'; |
@@ -266,7 +266,7 @@ discard block |
||
266 | 266 | $course_name = get_lang('Course').' '.$courseInfo['name']; |
267 | 267 | if ($session_id) { |
268 | 268 | $titleSession = Display::return_icon('session.png', get_lang('Session'), array(), ICON_SIZE_SMALL).' '.api_get_session_name($session_id); |
269 | - $titleCourse = Display::return_icon('course.png', get_lang('Course'), array(), ICON_SIZE_SMALL).' '.$course_name; |
|
269 | + $titleCourse = Display::return_icon('course.png', get_lang('Course'), array(), ICON_SIZE_SMALL).' '.$course_name; |
|
270 | 270 | } else { |
271 | 271 | $titleSession = Display::return_icon('course.png', get_lang('Course'), array(), ICON_SIZE_SMALL).' '.$courseInfo['name']; |
272 | 272 | } |
@@ -306,7 +306,7 @@ discard block |
||
306 | 306 | $html .= '<ul class="session-list">'; |
307 | 307 | foreach ($sessionList as $session) { |
308 | 308 | $url = api_get_path(WEB_CODE_PATH).'mySpace/course.php?session_id='.$session['id'].'&cidReq='.$courseInfo['code']; |
309 | - $html .= Display::tag('li', $iconCourse . ' ' . Display::url($session['name'], $url)); |
|
309 | + $html .= Display::tag('li', $iconCourse.' '.Display::url($session['name'], $url)); |
|
310 | 310 | } |
311 | 311 | $html .= '</ul>'; |
312 | 312 | } |
@@ -321,12 +321,12 @@ discard block |
||
321 | 321 | $form = new FormValidator( |
322 | 322 | 'reminder_form', |
323 | 323 | 'get', |
324 | - api_get_path(WEB_CODE_PATH).'announcements/announcements.php?' . api_get_cidreq(), |
|
324 | + api_get_path(WEB_CODE_PATH).'announcements/announcements.php?'.api_get_cidreq(), |
|
325 | 325 | null, |
326 | 326 | ['style' => 'margin-bottom: 10px'], |
327 | 327 | FormValidator::LAYOUT_INLINE |
328 | 328 | ); |
329 | - $options = array ( |
|
329 | + $options = array( |
|
330 | 330 | 2 => sprintf($getLangXDays, 2), |
331 | 331 | 3 => sprintf($getLangXDays, 3), |
332 | 332 | 4 => sprintf($getLangXDays, 4), |
@@ -339,7 +339,7 @@ discard block |
||
339 | 339 | ); |
340 | 340 | $el = $form->addSelect( |
341 | 341 | 'since', |
342 | - Display::returnFontAwesomeIcon('warning') . get_lang('RemindInactivesLearnersSince'), |
|
342 | + Display::returnFontAwesomeIcon('warning').get_lang('RemindInactivesLearnersSince'), |
|
343 | 343 | $options, |
344 | 344 | ['class' => 'col-sm-3'] |
345 | 345 | ); |