@@ -36,27 +36,27 @@ discard block |
||
36 | 36 | |
37 | 37 | if (!empty($id)) { |
38 | 38 | $display_output .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&gradebook='.$gradebook.'&id='.$my_back_id.'">'. |
39 | - Display::return_icon('back.png', get_lang('BackToWorksList'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
39 | + Display::return_icon('back.png', get_lang('BackToWorksList'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | if (api_is_allowed_to_edit(null, true) && $origin != 'learnpath') { |
43 | 43 | // Create dir |
44 | 44 | if (empty($id)) { |
45 | 45 | $display_output .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&action=create_dir&gradebook='.$gradebook.'">'; |
46 | - $display_output .= Display::return_icon('new_work.png', get_lang('CreateAssignment'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
46 | + $display_output .= Display::return_icon('new_work.png', get_lang('CreateAssignment'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
47 | 47 | } |
48 | 48 | if (empty($id)) { |
49 | 49 | // Options |
50 | 50 | $display_output .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&action=settings&gradebook='.$gradebook.'">'; |
51 | - $display_output .= Display::return_icon('settings.png', get_lang('EditToolOptions'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
51 | + $display_output .= Display::return_icon('settings.png', get_lang('EditToolOptions'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
52 | 52 | } |
53 | - $display_output .= '<a id="open-view-list" href="#">' . Display::return_icon('listwork.png', get_lang('ViewStudents'),'',ICON_SIZE_MEDIUM) . '</a>'; |
|
53 | + $display_output .= '<a id="open-view-list" href="#">'.Display::return_icon('listwork.png', get_lang('ViewStudents'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
54 | 54 | |
55 | 55 | } |
56 | 56 | |
57 | 57 | if (api_is_allowed_to_edit(null, true) && $origin != 'learnpath' && api_is_allowed_to_session_edit(false, true)) { |
58 | 58 | // Delete all files |
59 | - if (api_get_setting('permanently_remove_deleted_files') == 'true'){ |
|
59 | + if (api_get_setting('permanently_remove_deleted_files') == 'true') { |
|
60 | 60 | $message = get_lang('ConfirmYourChoiceDeleteAllfiles'); |
61 | 61 | } else { |
62 | 62 | $message = get_lang('ConfirmYourChoice'); |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | */ |
114 | 114 | function two_digits($number) |
115 | 115 | { |
116 | - $number = (int)$number; |
|
116 | + $number = (int) $number; |
|
117 | 117 | return ($number < 10) ? '0'.$number : $number; |
118 | 118 | } |
119 | 119 | |
@@ -525,10 +525,10 @@ discard block |
||
525 | 525 | |
526 | 526 | $columnModel = array( |
527 | 527 | array('name'=>'type', 'index'=>'type', 'width'=>'30', 'align'=>'center', 'sortable' => 'false'), |
528 | - array('name'=>'title', 'index'=>'title', 'width'=>'250', 'align'=>'left'), |
|
529 | - array('name'=>'expires_on', 'index'=>'expires_on', 'width'=>'80', 'align'=>'center', 'sortable'=>'false'), |
|
530 | - array('name'=>'feedback', 'index'=>'feedback', 'width'=>'80', 'align'=>'center', 'sortable'=>'false'), |
|
531 | - array('name'=>'last_upload', 'index'=>'feedback', 'width'=>'125', 'align'=>'center', 'sortable'=>'false') |
|
528 | + array('name'=>'title', 'index'=>'title', 'width'=>'250', 'align'=>'left'), |
|
529 | + array('name'=>'expires_on', 'index'=>'expires_on', 'width'=>'80', 'align'=>'center', 'sortable'=>'false'), |
|
530 | + array('name'=>'feedback', 'index'=>'feedback', 'width'=>'80', 'align'=>'center', 'sortable'=>'false'), |
|
531 | + array('name'=>'last_upload', 'index'=>'feedback', 'width'=>'125', 'align'=>'center', 'sortable'=>'false') |
|
532 | 532 | ); |
533 | 533 | |
534 | 534 | if ($courseInfo['show_score'] == 0) { |
@@ -565,10 +565,10 @@ discard block |
||
565 | 565 | { |
566 | 566 | $columnModel = array( |
567 | 567 | array('name'=>'type', 'index'=>'type', 'width'=>'35', 'align'=>'center', 'sortable' => 'false'), |
568 | - array('name'=>'title', 'index'=>'title', 'width'=>'300', 'align'=>'left', 'wrap_cell' => "true"), |
|
569 | - array('name'=>'sent_date', 'index'=>'sent_date', 'width'=>'125', 'align'=>'center'), |
|
570 | - array('name'=>'expires_on', 'index'=>'expires_on', 'width'=>'125', 'align'=>'center'), |
|
571 | - array('name'=>'amount', 'index'=>'amount', 'width'=>'110', 'align'=>'center', 'sortable' => 'false'), |
|
568 | + array('name'=>'title', 'index'=>'title', 'width'=>'300', 'align'=>'left', 'wrap_cell' => "true"), |
|
569 | + array('name'=>'sent_date', 'index'=>'sent_date', 'width'=>'125', 'align'=>'center'), |
|
570 | + array('name'=>'expires_on', 'index'=>'expires_on', 'width'=>'125', 'align'=>'center'), |
|
571 | + array('name'=>'amount', 'index'=>'amount', 'width'=>'110', 'align'=>'center', 'sortable' => 'false'), |
|
572 | 572 | array('name'=>'actions', 'index'=>'actions', 'width'=>'110', 'align'=>'left', 'sortable'=>'false') |
573 | 573 | ); |
574 | 574 | |
@@ -769,7 +769,7 @@ discard block |
||
769 | 769 | return false; |
770 | 770 | } |
771 | 771 | |
772 | - $base_work_dir = api_get_path(SYS_COURSE_PATH) .$_course['path'].'/work'; |
|
772 | + $base_work_dir = api_get_path(SYS_COURSE_PATH).$_course['path'].'/work'; |
|
773 | 773 | $work_data_url = $base_work_dir.$work_data['url']; |
774 | 774 | $check = Security::check_abs_path($work_data_url.'/', $base_work_dir.'/'); |
775 | 775 | |
@@ -853,7 +853,7 @@ discard block |
||
853 | 853 | function get_work_path($id) |
854 | 854 | { |
855 | 855 | $table = Database::get_course_table(TABLE_STUDENT_PUBLICATION); |
856 | - $course_id = api_get_course_int_id(); |
|
856 | + $course_id = api_get_course_int_id(); |
|
857 | 857 | $sql = 'SELECT url FROM '.$table.' |
858 | 858 | WHERE c_id = '.$course_id.' AND id='.intval($id); |
859 | 859 | $res = Database::query($sql); |
@@ -976,9 +976,9 @@ discard block |
||
976 | 976 | if ($handle = @opendir($directory)) { |
977 | 977 | while (false !== ($file = readdir($handle))) { |
978 | 978 | if ($file != '.' && $file != '..') { |
979 | - if (is_dir($directory. '/' . $file)) { |
|
980 | - $array_items = array_merge($array_items, directory_to_array($directory. '/' . $file)); |
|
981 | - $file = $directory . '/' . $file; |
|
979 | + if (is_dir($directory.'/'.$file)) { |
|
980 | + $array_items = array_merge($array_items, directory_to_array($directory.'/'.$file)); |
|
981 | + $file = $directory.'/'.$file; |
|
982 | 982 | $array_items[] = preg_replace("/\/\//si", '/', $file); |
983 | 983 | } |
984 | 984 | } |
@@ -1055,7 +1055,7 @@ discard block |
||
1055 | 1055 | if (is_dir($path_dir.'/'.$entry)) { |
1056 | 1056 | $count_dir++; |
1057 | 1057 | if ($recurse) { |
1058 | - $count += count_dir($path_dir . '/' . $entry, $recurse); |
|
1058 | + $count += count_dir($path_dir.'/'.$entry, $recurse); |
|
1059 | 1059 | } |
1060 | 1060 | } else { |
1061 | 1061 | $count++; |
@@ -1333,11 +1333,11 @@ discard block |
||
1333 | 1333 | $courseInfo |
1334 | 1334 | ); |
1335 | 1335 | |
1336 | - if (!in_array($direction, array('asc','desc'))) { |
|
1336 | + if (!in_array($direction, array('asc', 'desc'))) { |
|
1337 | 1337 | $direction = 'desc'; |
1338 | 1338 | } |
1339 | 1339 | if (!empty($where_condition)) { |
1340 | - $where_condition = ' AND ' . $where_condition; |
|
1340 | + $where_condition = ' AND '.$where_condition; |
|
1341 | 1341 | } |
1342 | 1342 | |
1343 | 1343 | $column = !empty($column) ? Database::escape_string($column) : 'sent_date'; |
@@ -1490,7 +1490,7 @@ discard block |
||
1490 | 1490 | $direction = 'desc'; |
1491 | 1491 | } |
1492 | 1492 | if (!empty($where_condition)) { |
1493 | - $where_condition = ' AND ' . $where_condition; |
|
1493 | + $where_condition = ' AND '.$where_condition; |
|
1494 | 1494 | } |
1495 | 1495 | |
1496 | 1496 | $column = !empty($column) ? Database::escape_string($column) : 'sent_date'; |
@@ -1549,7 +1549,7 @@ discard block |
||
1549 | 1549 | ); |
1550 | 1550 | |
1551 | 1551 | $work['amount'] = Display::label( |
1552 | - $countUniqueAttempts . '/' . |
|
1552 | + $countUniqueAttempts.'/'. |
|
1553 | 1553 | $totalUsers, |
1554 | 1554 | 'success' |
1555 | 1555 | ); |
@@ -1598,7 +1598,7 @@ discard block |
||
1598 | 1598 | array(), |
1599 | 1599 | ICON_SIZE_SMALL |
1600 | 1600 | ), |
1601 | - api_get_path(WEB_CODE_PATH) . 'work/downloadfolder.inc.php?id=' . $workId . '&' . api_get_cidreq() |
|
1601 | + api_get_path(WEB_CODE_PATH).'work/downloadfolder.inc.php?id='.$workId.'&'.api_get_cidreq() |
|
1602 | 1602 | ); |
1603 | 1603 | } else { |
1604 | 1604 | $downloadLink = Display::url( |
@@ -1682,7 +1682,7 @@ discard block |
||
1682 | 1682 | $userCondition = " AND u.user_id = $studentId "; |
1683 | 1683 | $sessionCondition = api_get_session_condition($sessionId, true, false, 'w.session_id'); |
1684 | 1684 | $workCondition = " AND w_rel.work_id = $workId"; |
1685 | - $workParentCondition = " AND w.parent_id = $workId"; |
|
1685 | + $workParentCondition = " AND w.parent_id = $workId"; |
|
1686 | 1686 | |
1687 | 1687 | $sql = "( |
1688 | 1688 | $select1 FROM $userTable u |
@@ -1789,7 +1789,7 @@ discard block |
||
1789 | 1789 | } |
1790 | 1790 | |
1791 | 1791 | if ($allowEdition && !empty($itemId)) { |
1792 | - $deleteLink = Display::url($deleteIcon, $urlDelete.'&item_id='.$itemId.'&id='.$workId); |
|
1792 | + $deleteLink = Display::url($deleteIcon, $urlDelete.'&item_id='.$itemId.'&id='.$workId); |
|
1793 | 1793 | } else { |
1794 | 1794 | $deleteLink = null; |
1795 | 1795 | } |
@@ -1872,7 +1872,7 @@ discard block |
||
1872 | 1872 | $start = intval($start); |
1873 | 1873 | $limit = intval($limit); |
1874 | 1874 | |
1875 | - if (!in_array($direction, array('asc','desc'))) { |
|
1875 | + if (!in_array($direction, array('asc', 'desc'))) { |
|
1876 | 1876 | $direction = 'desc'; |
1877 | 1877 | } |
1878 | 1878 | |
@@ -1942,7 +1942,7 @@ discard block |
||
1942 | 1942 | $work_assignment = get_work_assignment_by_id($work_id, $courseId); |
1943 | 1943 | |
1944 | 1944 | if (!empty($studentId)) { |
1945 | - $where_condition.= " AND u.user_id = ".intval($studentId); |
|
1945 | + $where_condition .= " AND u.user_id = ".intval($studentId); |
|
1946 | 1946 | } |
1947 | 1947 | |
1948 | 1948 | $sql = " $select |
@@ -1952,7 +1952,7 @@ discard block |
||
1952 | 1952 | $extra_conditions |
1953 | 1953 | $where_condition |
1954 | 1954 | $condition_session |
1955 | - AND u.status != " . INVITEE . " |
|
1955 | + AND u.status != ".INVITEE." |
|
1956 | 1956 | ORDER BY $column $direction"; |
1957 | 1957 | |
1958 | 1958 | if (!empty($start) && !empty($limit)) { |
@@ -2007,7 +2007,7 @@ discard block |
||
2007 | 2007 | $qualification_string = Display::label('-'); |
2008 | 2008 | } else { |
2009 | 2009 | $label = 'info'; |
2010 | - $relativeScore = $work['qualification']/$work_data['qualification']; |
|
2010 | + $relativeScore = $work['qualification'] / $work_data['qualification']; |
|
2011 | 2011 | if ($relativeScore < 0.5) { |
2012 | 2012 | $label = 'important'; |
2013 | 2013 | } elseif ($relativeScore < 0.75) { |
@@ -2060,10 +2060,10 @@ discard block |
||
2060 | 2060 | // If URL is present then there's a file to download keep BC. |
2061 | 2061 | if ($work['contains_file'] || !empty($work['url'])) { |
2062 | 2062 | $link_to_download = '<a href="'.$url.'download.php?id='.$item_id.'&'.api_get_cidreq().'">'. |
2063 | - Display::return_icon('save.png', get_lang('Save'),array(), ICON_SIZE_SMALL).'</a> '; |
|
2063 | + Display::return_icon('save.png', get_lang('Save'), array(), ICON_SIZE_SMALL).'</a> '; |
|
2064 | 2064 | } |
2065 | 2065 | |
2066 | - $send_to = Portfolio::share('work', $work['id'], array('style' => 'white-space:nowrap;')); |
|
2066 | + $send_to = Portfolio::share('work', $work['id'], array('style' => 'white-space:nowrap;')); |
|
2067 | 2067 | |
2068 | 2068 | $feedback = null; |
2069 | 2069 | $count = getWorkCommentCount($item_id, $course_info); |
@@ -2072,7 +2072,7 @@ discard block |
||
2072 | 2072 | $feedback .= ' '; |
2073 | 2073 | } |
2074 | 2074 | $feedback .= '<a href="'.$url.'view.php?'.api_get_cidreq().'&id='.$item_id.'" title="'.get_lang('View').'">'. |
2075 | - $count . ' ' . Display::returnFontAwesomeIcon('comments-o') . '</a> '; |
|
2075 | + $count.' '.Display::returnFontAwesomeIcon('comments-o').'</a> '; |
|
2076 | 2076 | } |
2077 | 2077 | |
2078 | 2078 | $work['qualification'] = $qualification_string.$feedback; |
@@ -2080,11 +2080,11 @@ discard block |
||
2080 | 2080 | |
2081 | 2081 | // Date. |
2082 | 2082 | $work_date = api_convert_and_format_date($work['sent_date']); |
2083 | - $date = date_to_str_ago($work['sent_date']). ' ' . $work_date; |
|
2084 | - $work['formatted_date'] = $work_date . ' - ' . $add_string; |
|
2083 | + $date = date_to_str_ago($work['sent_date']).' '.$work_date; |
|
2084 | + $work['formatted_date'] = $work_date.' - '.$add_string; |
|
2085 | 2085 | |
2086 | 2086 | $work['sent_date_from_db'] = $work['sent_date']; |
2087 | - $work['sent_date'] = '<div class="work-date" title="'.$date.'">' . $add_string . ' - ' . $work['sent_date'] . '</div>'; |
|
2087 | + $work['sent_date'] = '<div class="work-date" title="'.$date.'">'.$add_string.' - '.$work['sent_date'].'</div>'; |
|
2088 | 2088 | |
2089 | 2089 | // Actions. |
2090 | 2090 | $correction = ''; |
@@ -2102,8 +2102,8 @@ discard block |
||
2102 | 2102 | Display::return_icon('default.png', get_lang('View'), array(), ICON_SIZE_SMALL).'</a> '; |
2103 | 2103 | |
2104 | 2104 | if ($unoconv && empty($work['contains_file'])) { |
2105 | - $action .= '<a href="'.$url.'work_list_all.php?'.api_get_cidreq().'&id='.$work_id.'&action=export_to_doc&item_id='.$item_id.'" title="'.get_lang('ExportToDoc').'" >'. |
|
2106 | - Display::return_icon('export_doc.png', get_lang('ExportToDoc'),array(), ICON_SIZE_SMALL).'</a> '; |
|
2105 | + $action .= '<a href="'.$url.'work_list_all.php?'.api_get_cidreq().'&id='.$work_id.'&action=export_to_doc&item_id='.$item_id.'" title="'.get_lang('ExportToDoc').'" >'. |
|
2106 | + Display::return_icon('export_doc.png', get_lang('ExportToDoc'), array(), ICON_SIZE_SMALL).'</a> '; |
|
2107 | 2107 | } |
2108 | 2108 | $loadingText = addslashes(get_lang('Loading')); |
2109 | 2109 | $uploadedText = addslashes(get_lang('Uploaded')); |
@@ -2150,7 +2150,7 @@ discard block |
||
2150 | 2150 | |
2151 | 2151 | if ($locked) { |
2152 | 2152 | if ($qualification_exists) { |
2153 | - $action .= Display::return_icon('rate_work_na.png', get_lang('CorrectAndRate'),array(), ICON_SIZE_SMALL); |
|
2153 | + $action .= Display::return_icon('rate_work_na.png', get_lang('CorrectAndRate'), array(), ICON_SIZE_SMALL); |
|
2154 | 2154 | } else { |
2155 | 2155 | $action .= Display::return_icon('edit_na.png', get_lang('Comment'), array(), ICON_SIZE_SMALL); |
2156 | 2156 | } |
@@ -2166,26 +2166,26 @@ discard block |
||
2166 | 2166 | |
2167 | 2167 | if ($work['contains_file']) { |
2168 | 2168 | if ($locked) { |
2169 | - $action .= Display::return_icon('move_na.png', get_lang('Move'),array(), ICON_SIZE_SMALL); |
|
2169 | + $action .= Display::return_icon('move_na.png', get_lang('Move'), array(), ICON_SIZE_SMALL); |
|
2170 | 2170 | } else { |
2171 | 2171 | $action .= '<a href="'.$url.'work.php?'.api_get_cidreq().'&action=move&item_id='.$item_id.'&id='.$work['parent_id'].'" title="'.get_lang('Move').'">'. |
2172 | - Display::return_icon('move.png', get_lang('Move'),array(), ICON_SIZE_SMALL).'</a>'; |
|
2172 | + Display::return_icon('move.png', get_lang('Move'), array(), ICON_SIZE_SMALL).'</a>'; |
|
2173 | 2173 | } |
2174 | 2174 | } |
2175 | 2175 | |
2176 | 2176 | if ($work['accepted'] == '1') { |
2177 | 2177 | $action .= '<a href="'.$url.'work_list_all.php?'.api_get_cidreq().'&id='.$work_id.'&action=make_invisible&item_id='.$item_id.'" title="'.get_lang('Invisible').'" >'. |
2178 | - Display::return_icon('visible.png', get_lang('Invisible'),array(), ICON_SIZE_SMALL).'</a>'; |
|
2178 | + Display::return_icon('visible.png', get_lang('Invisible'), array(), ICON_SIZE_SMALL).'</a>'; |
|
2179 | 2179 | } else { |
2180 | 2180 | $action .= '<a href="'.$url.'work_list_all.php?'.api_get_cidreq().'&id='.$work_id.'&action=make_visible&item_id='.$item_id.'" title="'.get_lang('Visible').'" >'. |
2181 | - Display::return_icon('invisible.png', get_lang('Visible'),array(), ICON_SIZE_SMALL).'</a> '; |
|
2181 | + Display::return_icon('invisible.png', get_lang('Visible'), array(), ICON_SIZE_SMALL).'</a> '; |
|
2182 | 2182 | } |
2183 | 2183 | |
2184 | 2184 | if ($locked) { |
2185 | 2185 | $action .= Display::return_icon('delete_na.png', get_lang('Delete'), '', ICON_SIZE_SMALL); |
2186 | 2186 | } else { |
2187 | - $action .= '<a href="'.$url.'work_list_all.php?'.api_get_cidreq().'&id='.$work_id.'&action=delete&item_id='.$item_id.'" onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang('ConfirmYourChoice'),ENT_QUOTES))."'".')) return false;" title="'.get_lang('Delete').'" >'. |
|
2188 | - Display::return_icon('delete.png', get_lang('Delete'),'',ICON_SIZE_SMALL).'</a>'; |
|
2187 | + $action .= '<a href="'.$url.'work_list_all.php?'.api_get_cidreq().'&id='.$work_id.'&action=delete&item_id='.$item_id.'" onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES))."'".')) return false;" title="'.get_lang('Delete').'" >'. |
|
2188 | + Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a>'; |
|
2189 | 2189 | } |
2190 | 2190 | } elseif ($is_author && (empty($work['qualificator_id']) || $work['qualificator_id'] == 0)) { |
2191 | 2191 | $action .= '<a href="'.$url.'view.php?'.api_get_cidreq().'&id='.$item_id.'" title="'.get_lang('View').'">'. |
@@ -2196,8 +2196,8 @@ discard block |
||
2196 | 2196 | $action .= '<a href="'.$url.'edit.php?'.api_get_cidreq().'&item_id='.$item_id.'&id='.$work['parent_id'].'" title="'.get_lang('Modify').'">'. |
2197 | 2197 | Display::return_icon('edit.png', get_lang('Comment'), array(), ICON_SIZE_SMALL).'</a>'; |
2198 | 2198 | } |
2199 | - $action .= ' <a href="'.$url.'work_list.php?'.api_get_cidreq().'&action=delete&item_id='.$item_id.'&id='.$work['parent_id'].'" onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang('ConfirmYourChoice'),ENT_QUOTES))."'".')) return false;" title="'.get_lang('Delete').'" >'. |
|
2200 | - Display::return_icon('delete.png',get_lang('Delete'),'',ICON_SIZE_SMALL).'</a>'; |
|
2199 | + $action .= ' <a href="'.$url.'work_list.php?'.api_get_cidreq().'&action=delete&item_id='.$item_id.'&id='.$work['parent_id'].'" onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES))."'".')) return false;" title="'.get_lang('Delete').'" >'. |
|
2200 | + Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a>'; |
|
2201 | 2201 | } else { |
2202 | 2202 | $action .= Display::return_icon('edit_na.png', get_lang('Modify'), array(), ICON_SIZE_SMALL); |
2203 | 2203 | } |
@@ -2237,7 +2237,7 @@ discard block |
||
2237 | 2237 | $_course = api_get_course_info(); |
2238 | 2238 | $task_id = $task_data['id']; |
2239 | 2239 | $task_title = !empty($task_data['title']) ? $task_data['title'] : basename($task_data['url']); |
2240 | - $subject = '[' . api_get_setting('siteName') . '] '; |
|
2240 | + $subject = '['.api_get_setting('siteName').'] '; |
|
2241 | 2241 | |
2242 | 2242 | // The body can be as long as you wish, and any combination of text and variables |
2243 | 2243 | $content = get_lang('ReminderToSubmitPendingTask')."\n".get_lang('CourseName').' : '.$_course['name']."\n"; |
@@ -2246,7 +2246,7 @@ discard block |
||
2246 | 2246 | $mails_sent_to = array(); |
2247 | 2247 | foreach ($list_users as $user) { |
2248 | 2248 | $name_user = api_get_person_name($user[1], $user[0], null, PERSON_NAME_EMAIL_ADDRESS); |
2249 | - $dear_line = get_lang('Dear')." ".api_get_person_name($user[1], $user[0]) .", \n\n"; |
|
2249 | + $dear_line = get_lang('Dear')." ".api_get_person_name($user[1], $user[0]).", \n\n"; |
|
2250 | 2250 | $body = $dear_line.$content; |
2251 | 2251 | MessageManager::send_message($user[3], $subject, $body); |
2252 | 2252 | $mails_sent_to[] = $name_user; |
@@ -2275,22 +2275,22 @@ discard block |
||
2275 | 2275 | } else { |
2276 | 2276 | $students = CourseManager::get_student_list_from_course_code($courseCode, true, $sessionId); |
2277 | 2277 | } |
2278 | - $emailsubject = '[' . api_get_setting('siteName') . '] '.get_lang('HomeworkCreated'); |
|
2278 | + $emailsubject = '['.api_get_setting('siteName').'] '.get_lang('HomeworkCreated'); |
|
2279 | 2279 | $currentUser = api_get_user_info(api_get_user_id()); |
2280 | 2280 | if (!empty($students)) { |
2281 | - foreach($students as $student) { |
|
2281 | + foreach ($students as $student) { |
|
2282 | 2282 | $user_info = api_get_user_info($student["user_id"]); |
2283 | - if(!empty($user_info["mail"])) { |
|
2283 | + if (!empty($user_info["mail"])) { |
|
2284 | 2284 | $name_user = api_get_person_name( |
2285 | 2285 | $user_info["firstname"], |
2286 | 2286 | $user_info["lastname"], |
2287 | 2287 | null, |
2288 | 2288 | PERSON_NAME_EMAIL_ADDRESS |
2289 | 2289 | ); |
2290 | - $link = api_get_path(WEB_CODE_PATH) . 'work/work_list_all.php?' . api_get_cidreq() . '&id=' . $workId; |
|
2290 | + $link = api_get_path(WEB_CODE_PATH).'work/work_list_all.php?'.api_get_cidreq().'&id='.$workId; |
|
2291 | 2291 | $emailbody = get_lang('Dear')." ".$name_user.",\n\n"; |
2292 | 2292 | $emailbody .= get_lang('HomeworkHasBeenCreatedForTheCourse')." ".$courseCode.". "."\n\n". |
2293 | - '<a href="'. $link . '">' . get_lang('PleaseCheckHomeworkPage') . '</a>'; |
|
2293 | + '<a href="'.$link.'">'.get_lang('PleaseCheckHomeworkPage').'</a>'; |
|
2294 | 2294 | $emailbody .= "\n\n".api_get_person_name($currentUser["firstname"], $currentUser["lastname"]); |
2295 | 2295 | |
2296 | 2296 | $additionalParameters = array( |
@@ -2332,7 +2332,7 @@ discard block |
||
2332 | 2332 | $url = Database::escape_string($url); |
2333 | 2333 | $sql = "SELECT id FROM $work_table WHERE url='$url'"; |
2334 | 2334 | $result = Database::query($sql); |
2335 | - if (Database::num_rows($result)> 0) { |
|
2335 | + if (Database::num_rows($result) > 0) { |
|
2336 | 2336 | $row = Database::fetch_row($result); |
2337 | 2337 | if (empty($row)) { |
2338 | 2338 | return false; |
@@ -2453,7 +2453,7 @@ discard block |
||
2453 | 2453 | } |
2454 | 2454 | |
2455 | 2455 | if (!empty($studentId)) { |
2456 | - $sql_users.= " AND u.user_id = ".intval($studentId); |
|
2456 | + $sql_users .= " AND u.user_id = ".intval($studentId); |
|
2457 | 2457 | } |
2458 | 2458 | |
2459 | 2459 | $group_id = api_get_group_id(); |
@@ -2463,7 +2463,7 @@ discard block |
||
2463 | 2463 | $groupInfo = GroupManager::get_group_properties($group_id); |
2464 | 2464 | $group_user_list = GroupManager::get_subscribed_users($groupInfo['iid']); |
2465 | 2465 | if (!empty($group_user_list)) { |
2466 | - foreach($group_user_list as $group_user) { |
|
2466 | + foreach ($group_user_list as $group_user) { |
|
2467 | 2467 | $new_group_user_list[] = $group_user['user_id']; |
2468 | 2468 | } |
2469 | 2469 | } |
@@ -2885,7 +2885,7 @@ discard block |
||
2885 | 2885 | function getWorkComments($work) |
2886 | 2886 | { |
2887 | 2887 | $commentTable = Database::get_course_table(TABLE_STUDENT_PUBLICATION_ASSIGNMENT_COMMENT); |
2888 | - $userTable= Database::get_main_table(TABLE_MAIN_USER); |
|
2888 | + $userTable = Database::get_main_table(TABLE_MAIN_USER); |
|
2889 | 2889 | |
2890 | 2890 | $courseId = intval($work['c_id']); |
2891 | 2891 | $workId = intval($work['id']); |
@@ -3567,7 +3567,7 @@ discard block |
||
3567 | 3567 | null, |
3568 | 3568 | PERSON_NAME_EMAIL_ADDRESS |
3569 | 3569 | ); |
3570 | - $subject = "[" . api_get_setting('siteName') . "] ".get_lang('SendMailBody')."\n ".get_lang('CourseName').": ".$courseInfo['name']." "; |
|
3570 | + $subject = "[".api_get_setting('siteName')."] ".get_lang('SendMailBody')."\n ".get_lang('CourseName').": ".$courseInfo['name']." "; |
|
3571 | 3571 | foreach ($user_list as $user_data) { |
3572 | 3572 | $to_user_id = $user_data['user_id']; |
3573 | 3573 | $user_info = api_get_user_info($to_user_id); |
@@ -3644,7 +3644,7 @@ discard block |
||
3644 | 3644 | |
3645 | 3645 | $title = $values['title']; |
3646 | 3646 | $description = $values['description']; |
3647 | - $contains_file = isset($values['contains_file']) && !empty($values['contains_file']) ? intval($values['contains_file']): 0; |
|
3647 | + $contains_file = isset($values['contains_file']) && !empty($values['contains_file']) ? intval($values['contains_file']) : 0; |
|
3648 | 3648 | |
3649 | 3649 | $saveWork = true; |
3650 | 3650 | $filename = null; |
@@ -4304,7 +4304,7 @@ discard block |
||
4304 | 4304 | $htmlHeadXtra[] = ' |
4305 | 4305 | <script> |
4306 | 4306 | $(function() { |
4307 | - ' . $extra['jquery_ready_content'] . ' |
|
4307 | + ' . $extra['jquery_ready_content'].' |
|
4308 | 4308 | }); |
4309 | 4309 | </script>'; |
4310 | 4310 | |
@@ -4372,8 +4372,8 @@ discard block |
||
4372 | 4372 | $number_of_setting = Database::num_rows($result); |
4373 | 4373 | |
4374 | 4374 | if ($number_of_setting == 1) { |
4375 | - $query = "UPDATE " . $table_course_setting . " SET |
|
4376 | - value='" . Database::escape_string($studentDeleteOwnPublication) . "' |
|
4375 | + $query = "UPDATE ".$table_course_setting." SET |
|
4376 | + value='" . Database::escape_string($studentDeleteOwnPublication)."' |
|
4377 | 4377 | WHERE variable = 'student_delete_own_publication' AND c_id = $courseId"; |
4378 | 4378 | Database::query($query); |
4379 | 4379 | } else { |
@@ -4412,9 +4412,9 @@ discard block |
||
4412 | 4412 | $work_table = Database :: get_course_table(TABLE_STUDENT_PUBLICATION); |
4413 | 4413 | $item_id = intval($item_id); |
4414 | 4414 | $course_id = $course_info['real_id']; |
4415 | - $sql = "UPDATE " . $work_table . " |
|
4415 | + $sql = "UPDATE ".$work_table." |
|
4416 | 4416 | SET accepted = 0 |
4417 | - WHERE c_id = $course_id AND id = '" . $item_id . "'"; |
|
4417 | + WHERE c_id = $course_id AND id = '".$item_id."'"; |
|
4418 | 4418 | Database::query($sql); |
4419 | 4419 | api_item_property_update( |
4420 | 4420 | $course_info, |
@@ -4566,7 +4566,7 @@ discard block |
||
4566 | 4566 | $courseCode, |
4567 | 4567 | $sessionId, |
4568 | 4568 | $limitString, |
4569 | - $orderBy , |
|
4569 | + $orderBy, |
|
4570 | 4570 | STUDENT, |
4571 | 4571 | $getCount |
4572 | 4572 | ); |
@@ -4902,8 +4902,8 @@ discard block |
||
4902 | 4902 | if (!empty($sessionId)) { |
4903 | 4903 | $sessionInfo = api_get_session_info($sessionId); |
4904 | 4904 | if (!empty($sessionInfo)) { |
4905 | - $header .= ' - ' . $sessionInfo['name']; |
|
4906 | - $header .= '<br />' . $sessionInfo['description']; |
|
4905 | + $header .= ' - '.$sessionInfo['name']; |
|
4906 | + $header .= '<br />'.$sessionInfo['description']; |
|
4907 | 4907 | $teachers = SessionManager::getCoachesByCourseSessionToString( |
4908 | 4908 | $sessionId, |
4909 | 4909 | $courseInfo['real_id'] |
@@ -4919,12 +4919,12 @@ discard block |
||
4919 | 4919 | $expiresOn = null; |
4920 | 4920 | |
4921 | 4921 | if (!empty($assignment) && isset($assignment['expires_on'])) { |
4922 | - $content .= '<br /><strong>' . get_lang('ExpirationDate') . '</strong>: ' . api_get_local_time($assignment['expires_on']); |
|
4922 | + $content .= '<br /><strong>'.get_lang('ExpirationDate').'</strong>: '.api_get_local_time($assignment['expires_on']); |
|
4923 | 4923 | $expiresOn = api_get_local_time($assignment['expires_on']); |
4924 | 4924 | } |
4925 | 4925 | |
4926 | 4926 | if (!empty($workData['description'])) { |
4927 | - $content .= '<br /><strong>' . get_lang('Description') . '</strong>: ' . $workData['description']; |
|
4927 | + $content .= '<br /><strong>'.get_lang('Description').'</strong>: '.$workData['description']; |
|
4928 | 4928 | } |
4929 | 4929 | |
4930 | 4930 | $workList = get_work_user_list(null, null, null, null, $workId); |
@@ -4945,7 +4945,7 @@ discard block |
||
4945 | 4945 | ); |
4946 | 4946 | |
4947 | 4947 | $column = 0; |
4948 | - foreach($headers as $header) { |
|
4948 | + foreach ($headers as $header) { |
|
4949 | 4949 | $table->setHeaderContents(0, $column, $header); |
4950 | 4950 | $column++; |
4951 | 4951 | } |
@@ -4993,7 +4993,7 @@ discard block |
||
4993 | 4993 | |
4994 | 4994 | if (!empty($content)) { |
4995 | 4995 | $params = array( |
4996 | - 'filename' => $workData['title'] . '_' . api_get_local_time(), |
|
4996 | + 'filename' => $workData['title'].'_'.api_get_local_time(), |
|
4997 | 4997 | 'pdf_title' => api_replace_dangerous_char($workData['title']), |
4998 | 4998 | 'course_code' => $courseInfo['code'], |
4999 | 4999 | 'add_signatures' => false |
@@ -5024,7 +5024,7 @@ discard block |
||
5024 | 5024 | $tempZipFile = api_get_path(SYS_ARCHIVE_PATH).api_get_unique_id().".zip"; |
5025 | 5025 | $coursePath = api_get_path(SYS_COURSE_PATH).$courseInfo['path'].'/work/'; |
5026 | 5026 | |
5027 | - $zip = new PclZip($tempZipFile); |
|
5027 | + $zip = new PclZip($tempZipFile); |
|
5028 | 5028 | |
5029 | 5029 | $workPerUser = getWorkPerUser($userId); |
5030 | 5030 |
@@ -87,52 +87,52 @@ discard block |
||
87 | 87 | if (isset($_GET['details'])) { |
88 | 88 | if ($origin === 'user_course') { |
89 | 89 | if (empty($cidReq)) { |
90 | - $interbreadcrumb[] = array ( |
|
91 | - "url" => api_get_path(WEB_COURSE_PATH) . $courseInfo['directory'], |
|
90 | + $interbreadcrumb[] = array( |
|
91 | + "url" => api_get_path(WEB_COURSE_PATH).$courseInfo['directory'], |
|
92 | 92 | 'name' => $courseInfo['title'] |
93 | 93 | ); |
94 | 94 | } |
95 | - $interbreadcrumb[] = array ( |
|
96 | - "url" => "../user/user.php?cidReq=" . $course_code, |
|
95 | + $interbreadcrumb[] = array( |
|
96 | + "url" => "../user/user.php?cidReq=".$course_code, |
|
97 | 97 | "name" => get_lang("Users") |
98 | 98 | ); |
99 | 99 | } else { |
100 | 100 | if ($origin === 'tracking_course') { |
101 | - $interbreadcrumb[] = array ( |
|
102 | - "url" => "../tracking/courseLog.php?cidReq=".$course_code.'&id_session=' . api_get_session_id(), |
|
101 | + $interbreadcrumb[] = array( |
|
102 | + "url" => "../tracking/courseLog.php?cidReq=".$course_code.'&id_session='.api_get_session_id(), |
|
103 | 103 | "name" => get_lang("Tracking") |
104 | 104 | ); |
105 | 105 | } else { |
106 | 106 | if ($origin === 'resume_session') { |
107 | - $interbreadcrumb[] = array ( |
|
107 | + $interbreadcrumb[] = array( |
|
108 | 108 | 'url' => "../session/session_list.php", |
109 | 109 | "name" => get_lang('SessionList') |
110 | 110 | ); |
111 | - $interbreadcrumb[] = array ( |
|
112 | - 'url' => "../session/resume_session.php?id_session=" . $sessionId, |
|
111 | + $interbreadcrumb[] = array( |
|
112 | + 'url' => "../session/resume_session.php?id_session=".$sessionId, |
|
113 | 113 | "name" => get_lang('SessionOverview') |
114 | 114 | ); |
115 | 115 | } else { |
116 | - $interbreadcrumb[] = array ( |
|
117 | - "url" => api_is_student_boss()?"#":"index.php", |
|
116 | + $interbreadcrumb[] = array( |
|
117 | + "url" => api_is_student_boss() ? "#" : "index.php", |
|
118 | 118 | "name" => get_lang('MySpace') |
119 | 119 | ); |
120 | 120 | if (isset($_GET['id_coach']) && intval($_GET['id_coach']) != 0) { |
121 | - $interbreadcrumb[] = array ( |
|
122 | - "url" => "student.php?id_coach=" . Security :: remove_XSS($_GET['id_coach']), |
|
121 | + $interbreadcrumb[] = array( |
|
122 | + "url" => "student.php?id_coach=".Security :: remove_XSS($_GET['id_coach']), |
|
123 | 123 | "name" => get_lang("CoachStudents") |
124 | 124 | ); |
125 | - $interbreadcrumb[] = array ( |
|
126 | - "url" => "myStudents.php?student=" . $student_id. '&id_coach=' . Security :: remove_XSS($_GET['id_coach']), |
|
125 | + $interbreadcrumb[] = array( |
|
126 | + "url" => "myStudents.php?student=".$student_id.'&id_coach='.Security :: remove_XSS($_GET['id_coach']), |
|
127 | 127 | "name" => get_lang("StudentDetails") |
128 | 128 | ); |
129 | 129 | } else { |
130 | - $interbreadcrumb[] = array ( |
|
130 | + $interbreadcrumb[] = array( |
|
131 | 131 | "url" => "student.php", |
132 | 132 | "name" => get_lang("MyStudents") |
133 | 133 | ); |
134 | - $interbreadcrumb[] = array ( |
|
135 | - "url" => "myStudents.php?student=" . $student_id, |
|
134 | + $interbreadcrumb[] = array( |
|
135 | + "url" => "myStudents.php?student=".$student_id, |
|
136 | 136 | "name" => get_lang("StudentDetails") |
137 | 137 | ); |
138 | 138 | } |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | $nameTools = get_lang("DetailsStudentInCourse"); |
143 | 143 | } else { |
144 | 144 | if ($origin == 'resume_session') { |
145 | - $interbreadcrumb[] = array ( |
|
145 | + $interbreadcrumb[] = array( |
|
146 | 146 | 'url' => "../session/session_list.php", |
147 | 147 | "name" => get_lang('SessionList') |
148 | 148 | ); |
@@ -153,19 +153,19 @@ discard block |
||
153 | 153 | ); |
154 | 154 | } |
155 | 155 | } else { |
156 | - $interbreadcrumb[] = array ( |
|
157 | - "url" => api_is_student_boss()?"#":"index.php", |
|
156 | + $interbreadcrumb[] = array( |
|
157 | + "url" => api_is_student_boss() ? "#" : "index.php", |
|
158 | 158 | "name" => get_lang('MySpace') |
159 | 159 | ); |
160 | 160 | if (isset($_GET['id_coach']) && intval($_GET['id_coach']) != 0) { |
161 | 161 | if ($sessionId) { |
162 | 162 | $interbreadcrumb[] = array( |
163 | - "url" => "student.php?id_coach=" . Security :: remove_XSS($_GET['id_coach']) . "&id_session=" . $sessionId, |
|
163 | + "url" => "student.php?id_coach=".Security :: remove_XSS($_GET['id_coach'])."&id_session=".$sessionId, |
|
164 | 164 | "name" => get_lang("CoachStudents") |
165 | 165 | ); |
166 | 166 | } else { |
167 | 167 | $interbreadcrumb[] = array( |
168 | - "url" => "student.php?id_coach=" . Security :: remove_XSS($_GET['id_coach']), |
|
168 | + "url" => "student.php?id_coach=".Security :: remove_XSS($_GET['id_coach']), |
|
169 | 169 | "name" => get_lang("CoachStudents") |
170 | 170 | ); |
171 | 171 | } |
@@ -350,28 +350,28 @@ discard block |
||
350 | 350 | // Actions bar |
351 | 351 | echo '<div class="actions">'; |
352 | 352 | echo '<a href="javascript: window.history.go(-1);">'. |
353 | - Display::return_icon('back.png', get_lang('Back'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
353 | + Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
354 | 354 | |
355 | 355 | echo '<a href="javascript: void(0);" onclick="javascript: window.print();">'. |
356 | - Display::return_icon('printer.png', get_lang('Print'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
356 | + Display::return_icon('printer.png', get_lang('Print'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
357 | 357 | |
358 | - echo '<a href="' . api_get_self() . '?' . Security :: remove_XSS($_SERVER['QUERY_STRING']) . '&export=csv">'. |
|
359 | - Display::return_icon('export_csv.png', get_lang('ExportAsCSV'),'',ICON_SIZE_MEDIUM).'</a> '; |
|
358 | + echo '<a href="'.api_get_self().'?'.Security :: remove_XSS($_SERVER['QUERY_STRING']).'&export=csv">'. |
|
359 | + Display::return_icon('export_csv.png', get_lang('ExportAsCSV'), '', ICON_SIZE_MEDIUM).'</a> '; |
|
360 | 360 | |
361 | - echo '<a href="' . api_get_self() . '?' . Security :: remove_XSS($_SERVER['QUERY_STRING']) . '&export=xls">'. |
|
362 | - Display::return_icon('export_excel.png', get_lang('ExportAsXLS'),'',ICON_SIZE_MEDIUM).'</a> '; |
|
361 | + echo '<a href="'.api_get_self().'?'.Security :: remove_XSS($_SERVER['QUERY_STRING']).'&export=xls">'. |
|
362 | + Display::return_icon('export_excel.png', get_lang('ExportAsXLS'), '', ICON_SIZE_MEDIUM).'</a> '; |
|
363 | 363 | |
364 | 364 | if (!empty ($user_info['email'])) { |
365 | 365 | $send_mail = '<a href="mailto:'.$user_info['email'].'">'. |
366 | - Display :: return_icon('mail_send.png', get_lang('SendMail'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
366 | + Display :: return_icon('mail_send.png', get_lang('SendMail'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
367 | 367 | } else { |
368 | - $send_mail = Display :: return_icon('mail_send_na.png', get_lang('SendMail'),'',ICON_SIZE_MEDIUM); |
|
368 | + $send_mail = Display :: return_icon('mail_send_na.png', get_lang('SendMail'), '', ICON_SIZE_MEDIUM); |
|
369 | 369 | } |
370 | 370 | echo $send_mail; |
371 | 371 | if (!empty($student_id) && !empty($course_code)) { |
372 | 372 | // Only show link to connection details if course and student were defined in the URL |
373 | - echo '<a href="access_details.php?student=' . $student_id . '&course=' . $course_code . '&origin=' . $origin. '&cidReq='.$course_code.'&id_session='.$sessionId.'">'. |
|
374 | - Display :: return_icon('statistics.png', get_lang('AccessDetails'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
373 | + echo '<a href="access_details.php?student='.$student_id.'&course='.$course_code.'&origin='.$origin.'&cidReq='.$course_code.'&id_session='.$sessionId.'">'. |
|
374 | + Display :: return_icon('statistics.png', get_lang('AccessDetails'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
375 | 375 | } |
376 | 376 | if (api_can_login_as($student_id)) { |
377 | 377 | echo '<a href="'.api_get_path(WEB_CODE_PATH).'admin/user_list.php?action=login_as&user_id='.$student_id.'&sec_token='.$token.'">'. |
@@ -381,7 +381,7 @@ discard block |
||
381 | 381 | if (api_is_platform_admin(false, true) || api_is_student_boss()) { |
382 | 382 | echo Display::url( |
383 | 383 | Display::return_icon('skill-badges.png', get_lang('AssignSkill'), null, ICON_SIZE_MEDIUM), |
384 | - api_get_path(WEB_CODE_PATH) . 'badge/assign.php?' . http_build_query(['user' => $student_id]) |
|
384 | + api_get_path(WEB_CODE_PATH).'badge/assign.php?'.http_build_query(['user' => $student_id]) |
|
385 | 385 | ); |
386 | 386 | } |
387 | 387 | |
@@ -442,7 +442,7 @@ discard block |
||
442 | 442 | $csv_content[] = array( |
443 | 443 | get_lang('Information') |
444 | 444 | ); |
445 | - $csv_content[] = array ( |
|
445 | + $csv_content[] = array( |
|
446 | 446 | get_lang('Name'), |
447 | 447 | get_lang('Email'), |
448 | 448 | get_lang('Tel') |
@@ -470,7 +470,7 @@ discard block |
||
470 | 470 | strip_tags($first_connection_date), |
471 | 471 | strip_tags($last_connection_date), |
472 | 472 | $time_spent_on_the_course, |
473 | - $avg_student_progress . '%', |
|
473 | + $avg_student_progress.'%', |
|
474 | 474 | $avg_student_score |
475 | 475 | ); |
476 | 476 | |
@@ -500,19 +500,19 @@ discard block |
||
500 | 500 | </thead> |
501 | 501 | <tbody> |
502 | 502 | <tr> |
503 | - <td><?php echo get_lang('Name') . ' : '.$user_info['complete_name']; ?></td> |
|
503 | + <td><?php echo get_lang('Name').' : '.$user_info['complete_name']; ?></td> |
|
504 | 504 | </tr> |
505 | 505 | <tr> |
506 | - <td><?php echo get_lang('Email') . ' : '; |
|
506 | + <td><?php echo get_lang('Email').' : '; |
|
507 | 507 | if (!empty ($user_info['email'])) { |
508 | - echo '<a href="mailto:' . $user_info['email'] . '">' . $user_info['email'] . '</a>'; |
|
508 | + echo '<a href="mailto:'.$user_info['email'].'">'.$user_info['email'].'</a>'; |
|
509 | 509 | } else { |
510 | 510 | echo get_lang('NoEmail'); |
511 | 511 | } ?> |
512 | 512 | </td> |
513 | 513 | </tr> |
514 | 514 | <tr> |
515 | - <td> <?php echo get_lang('Tel') . ' : '; |
|
515 | + <td> <?php echo get_lang('Tel').' : '; |
|
516 | 516 | if (!empty ($user_info['phone'])) { |
517 | 517 | echo $user_info['phone']; |
518 | 518 | } else { |
@@ -522,7 +522,7 @@ discard block |
||
522 | 522 | </td> |
523 | 523 | </tr> |
524 | 524 | <tr> |
525 | - <td> <?php echo get_lang('OfficialCode') . ' : '; |
|
525 | + <td> <?php echo get_lang('OfficialCode').' : '; |
|
526 | 526 | if (!empty ($user_info['official_code'])) { |
527 | 527 | echo $user_info['official_code']; |
528 | 528 | } else { |
@@ -532,7 +532,7 @@ discard block |
||
532 | 532 | </td> |
533 | 533 | </tr> |
534 | 534 | <tr> |
535 | - <td><?php echo get_lang('OnLine') . ' : '.$online; ?> </td> |
|
535 | + <td><?php echo get_lang('OnLine').' : '.$online; ?> </td> |
|
536 | 536 | </tr> |
537 | 537 | <?php |
538 | 538 | |
@@ -546,7 +546,7 @@ discard block |
||
546 | 546 | if ($timezone !== null) { |
547 | 547 | ?> |
548 | 548 | <tr> |
549 | - <td> <?php echo get_lang('Timezone') . ' : '.$timezone; ?> </td> |
|
549 | + <td> <?php echo get_lang('Timezone').' : '.$timezone; ?> </td> |
|
550 | 550 | </tr> |
551 | 551 | <?php |
552 | 552 | } |
@@ -698,9 +698,9 @@ discard block |
||
698 | 698 | } |
699 | 699 | |
700 | 700 | if (!empty($access_start_date) && !empty($access_end_date)) { |
701 | - $date_session = get_lang('From') . ' ' . $access_start_date . ' ' . get_lang('Until') . ' ' . $access_end_date; |
|
701 | + $date_session = get_lang('From').' '.$access_start_date.' '.get_lang('Until').' '.$access_end_date; |
|
702 | 702 | } |
703 | - $title = Display::return_icon('session.png', get_lang('Session'), array(), ICON_SIZE_SMALL).' '.$session_name.($date_session?' ('.$date_session.')':''); |
|
703 | + $title = Display::return_icon('session.png', get_lang('Session'), array(), ICON_SIZE_SMALL).' '.$session_name.($date_session ? ' ('.$date_session.')' : ''); |
|
704 | 704 | } |
705 | 705 | |
706 | 706 | // Courses |
@@ -762,16 +762,16 @@ discard block |
||
762 | 762 | $scoretotal = array(); |
763 | 763 | if (isset($cats) && isset($cats[0])) { |
764 | 764 | if (!empty($sId)) { |
765 | - $scoretotal= $cats[0]->calc_score($student_id, null, $courseCodeItem, $sId); |
|
765 | + $scoretotal = $cats[0]->calc_score($student_id, null, $courseCodeItem, $sId); |
|
766 | 766 | } else { |
767 | - $scoretotal= $cats[0]->calc_score($student_id, null, $courseCodeItem); |
|
767 | + $scoretotal = $cats[0]->calc_score($student_id, null, $courseCodeItem); |
|
768 | 768 | } |
769 | 769 | } |
770 | 770 | |
771 | 771 | $scoretotal_display = '0/0 (0%)'; |
772 | 772 | if (!empty($scoretotal) && !empty($scoretotal[1])) { |
773 | 773 | $scoretotal_display = |
774 | - round($scoretotal[0], 1 ).'/'. |
|
774 | + round($scoretotal[0], 1).'/'. |
|
775 | 775 | round($scoretotal[1], 1). |
776 | 776 | ' ('.round(($scoretotal[0] / $scoretotal[1]) * 100, 2).' %)'; |
777 | 777 | } |
@@ -802,9 +802,9 @@ discard block |
||
802 | 802 | ); |
803 | 803 | |
804 | 804 | echo '<tr> |
805 | - <td ><a href="' .$courseInfoItem['course_public_url'] .'?id_session=' . $sId . '">'. |
|
805 | + <td ><a href="' .$courseInfoItem['course_public_url'].'?id_session='.$sId.'">'. |
|
806 | 806 | $courseInfoItem['title'].'</a></td> |
807 | - <td >'.$time_spent_on_course .'</td> |
|
807 | + <td >'.$time_spent_on_course.'</td> |
|
808 | 808 | <td >'.$progress.'</td> |
809 | 809 | <td >'.$score.'</td> |
810 | 810 | <td >'.$attendances_faults_avg.'</td> |
@@ -880,7 +880,7 @@ discard block |
||
880 | 880 | <table class="table table-striped table-hover"> |
881 | 881 | <thead> |
882 | 882 | <tr> |
883 | - <th><?php echo get_lang('LearningPath');?></th> |
|
883 | + <th><?php echo get_lang('LearningPath'); ?></th> |
|
884 | 884 | <th> |
885 | 885 | <?php |
886 | 886 | echo get_lang('Time').' '; |
@@ -983,7 +983,7 @@ discard block |
||
983 | 983 | if (!empty($start_time)) { |
984 | 984 | $start_time = api_convert_and_format_date($start_time, DATE_TIME_FORMAT_LONG); |
985 | 985 | } else { |
986 | - $start_time = '-'; |
|
986 | + $start_time = '-'; |
|
987 | 987 | } |
988 | 988 | |
989 | 989 | if (!empty($total_time)) { |
@@ -1020,8 +1020,8 @@ discard block |
||
1020 | 1020 | $csv_content[] = array( |
1021 | 1021 | api_html_entity_decode(stripslashes($lp_name), ENT_QUOTES, $charset), |
1022 | 1022 | api_time_to_hms($total_time), |
1023 | - $score . '%', |
|
1024 | - $score_latest . '%', |
|
1023 | + $score.'%', |
|
1024 | + $score_latest.'%', |
|
1025 | 1025 | $progress.'%', |
1026 | 1026 | $start_time |
1027 | 1027 | ); |
@@ -1059,7 +1059,7 @@ discard block |
||
1059 | 1059 | if ($any_result === true) { |
1060 | 1060 | $from = ''; |
1061 | 1061 | if ($from_myspace) { |
1062 | - $from ='&from=myspace'; |
|
1062 | + $from = '&from=myspace'; |
|
1063 | 1063 | } |
1064 | 1064 | $link = Display::url( |
1065 | 1065 | Display::return_icon('2rightarrow.png', get_lang('Details')), |
@@ -1072,14 +1072,14 @@ discard block |
||
1072 | 1072 | echo '<td>'; |
1073 | 1073 | if ($any_result === true) { |
1074 | 1074 | echo '<a href="myStudents.php?action=reset_lp&sec_token='.$token.'&cidReq='.$course_code.'&course='.$course_code.'&details='.Security::remove_XSS($_GET['details']).'&origin='.$origin.'&lp_id='.$learnpath->getId().'&student='.$user_info['user_id'].'&details=true&id_session='.$sessionId.'">'; |
1075 | - echo Display::return_icon('clean.png', get_lang('Clean'),'',ICON_SIZE_SMALL).'</a>'; |
|
1075 | + echo Display::return_icon('clean.png', get_lang('Clean'), '', ICON_SIZE_SMALL).'</a>'; |
|
1076 | 1076 | echo '</a>'; |
1077 | 1077 | } |
1078 | 1078 | echo '</td>'; |
1079 | 1079 | echo '</tr>'; |
1080 | 1080 | } |
1081 | 1081 | $data_learnpath[$i][] = $lp_name; |
1082 | - $data_learnpath[$i][] = $progress . '%'; |
|
1082 | + $data_learnpath[$i][] = $progress.'%'; |
|
1083 | 1083 | } |
1084 | 1084 | ?> |
1085 | 1085 | </tbody> |
@@ -1095,7 +1095,7 @@ discard block |
||
1095 | 1095 | <thead> |
1096 | 1096 | <tr> |
1097 | 1097 | <th><?php echo get_lang('Exercises'); ?></th> |
1098 | - <th><?php echo get_lang('LearningPath');?></th> |
|
1098 | + <th><?php echo get_lang('LearningPath'); ?></th> |
|
1099 | 1099 | <th><?php echo get_lang('AvgCourseScore').' '.Display :: return_icon('info3.gif', get_lang('AverageScore'), array('align' => 'absmiddle', 'hspace' => '3px')) ?></th> |
1100 | 1100 | <th><?php echo get_lang('Attempts'); ?></th> |
1101 | 1101 | <th><?php echo get_lang('LatestAttempt'); ?></th> |
@@ -1121,7 +1121,7 @@ discard block |
||
1121 | 1121 | 'quiz.session_id' |
1122 | 1122 | ); |
1123 | 1123 | |
1124 | - $sql = "SELECT quiz.title, id FROM " . $t_quiz . " AS quiz |
|
1124 | + $sql = "SELECT quiz.title, id FROM ".$t_quiz." AS quiz |
|
1125 | 1125 | WHERE |
1126 | 1126 | quiz.c_id = ".$courseInfo['real_id']." AND |
1127 | 1127 | active IN (0, 1) |
@@ -1186,7 +1186,7 @@ discard block |
||
1186 | 1186 | echo '<td>'; |
1187 | 1187 | |
1188 | 1188 | if ($count_attempts > 0) { |
1189 | - echo $score_percentage . '%'; |
|
1189 | + echo $score_percentage.'%'; |
|
1190 | 1190 | } else { |
1191 | 1191 | echo '-'; |
1192 | 1192 | $score_percentage = 0; |
@@ -1196,7 +1196,7 @@ discard block |
||
1196 | 1196 | echo '<td>'.$count_attempts.'</td>'; |
1197 | 1197 | echo '<td>'; |
1198 | 1198 | |
1199 | - $sql = 'SELECT exe_id FROM ' . $tbl_stats_exercices . ' |
|
1199 | + $sql = 'SELECT exe_id FROM '.$tbl_stats_exercices.' |
|
1200 | 1200 | WHERE |
1201 | 1201 | exe_exo_id = "'.$exercise_id.'" AND |
1202 | 1202 | exe_user_id ="'.$student_id.'" AND |
@@ -1209,7 +1209,7 @@ discard block |
||
1209 | 1209 | if (Database :: num_rows($result_last_attempt) > 0) { |
1210 | 1210 | $id_last_attempt = Database :: result($result_last_attempt, 0, 0); |
1211 | 1211 | if ($count_attempts > 0) |
1212 | - echo '<a href="../exercise/exercise_show.php?id=' . $id_last_attempt . '&cidReq='.$course_code.'&session_id='.$sessionId.'&student='.$student_id.'&origin='.(empty($origin)?'tracking':$origin).'"> |
|
1212 | + echo '<a href="../exercise/exercise_show.php?id='.$id_last_attempt.'&cidReq='.$course_code.'&session_id='.$sessionId.'&student='.$student_id.'&origin='.(empty($origin) ? 'tracking' : $origin).'"> |
|
1213 | 1213 | '.Display::return_icon('quiz.png').' |
1214 | 1214 | </a>'; |
1215 | 1215 | } |
@@ -1217,11 +1217,11 @@ discard block |
||
1217 | 1217 | |
1218 | 1218 | echo '<td>'; |
1219 | 1219 | $all_attempt_url = "../exercise/exercise_report.php?exerciseId=$exercise_id&cidReq=$course_code&filter_by_user=$student_id&id_session=$sessionId"; |
1220 | - echo Display::url(Display::return_icon('test_results.png', get_lang('AllAttempts'), array(), ICON_SIZE_SMALL), $all_attempt_url ); |
|
1220 | + echo Display::url(Display::return_icon('test_results.png', get_lang('AllAttempts'), array(), ICON_SIZE_SMALL), $all_attempt_url); |
|
1221 | 1221 | |
1222 | 1222 | echo '</td></tr>'; |
1223 | 1223 | $data_exercices[$i][] = $exercices['title']; |
1224 | - $data_exercices[$i][] = $score_percentage . '%'; |
|
1224 | + $data_exercices[$i][] = $score_percentage.'%'; |
|
1225 | 1225 | $data_exercices[$i][] = $count_attempts; |
1226 | 1226 | |
1227 | 1227 | $csv_content[] = array( |
@@ -1249,7 +1249,7 @@ discard block |
||
1249 | 1249 | $survey_list = SurveyManager::get_surveys($course_code, $sessionId); |
1250 | 1250 | |
1251 | 1251 | $survey_data = array(); |
1252 | - foreach($survey_list as $survey) { |
|
1252 | + foreach ($survey_list as $survey) { |
|
1253 | 1253 | $user_list = SurveyManager::get_people_who_filled_survey($survey['survey_id'], false, $courseInfo['real_id']); |
1254 | 1254 | $survey_done = Display::return_icon("accept_na.png", get_lang('NoAnswer'), array(), ICON_SIZE_SMALL); |
1255 | 1255 | if (in_array($student_id, $user_list)) { |
@@ -1274,7 +1274,7 @@ discard block |
||
1274 | 1274 | $column = 0; |
1275 | 1275 | $table->setCellContents($row, $column, $data); |
1276 | 1276 | $class = 'class="row_odd"'; |
1277 | - if($row % 2) { |
|
1277 | + if ($row % 2) { |
|
1278 | 1278 | $class = 'class="row_even"'; |
1279 | 1279 | } |
1280 | 1280 | $table->setRowAttributes($row, $class, true); |
@@ -1293,12 +1293,12 @@ discard block |
||
1293 | 1293 | <table class="table table-striped table-hover"> |
1294 | 1294 | <thead> |
1295 | 1295 | <tr> |
1296 | - <th>' . get_lang('Tasks') . '</th> |
|
1297 | - <th class="text-center">' . get_lang('DocumentNumber') . '</th> |
|
1298 | - <th class="text-center">' . get_lang('Note') . '</th> |
|
1299 | - <th class="text-center">' . get_lang('HandedOut') . '</th> |
|
1300 | - <th class="text-center">' . get_lang('HandOutDateLimit') . '</th> |
|
1301 | - <th class="text-center">' . get_lang('ConsideredWorkingTime') . '</th> |
|
1296 | + <th>' . get_lang('Tasks').'</th> |
|
1297 | + <th class="text-center">' . get_lang('DocumentNumber').'</th> |
|
1298 | + <th class="text-center">' . get_lang('Note').'</th> |
|
1299 | + <th class="text-center">' . get_lang('HandedOut').'</th> |
|
1300 | + <th class="text-center">' . get_lang('HandOutDateLimit').'</th> |
|
1301 | + <th class="text-center">' . get_lang('ConsideredWorkingTime').'</th> |
|
1302 | 1302 | </tr> |
1303 | 1303 | </thead> |
1304 | 1304 | <tbody> |
@@ -1308,14 +1308,14 @@ discard block |
||
1308 | 1308 | $work = $work['work']; |
1309 | 1309 | foreach ($work->user_results as $key => $results) { |
1310 | 1310 | echo '<tr>'; |
1311 | - echo '<td>' . $work->title . '</td>'; |
|
1311 | + echo '<td>'.$work->title.'</td>'; |
|
1312 | 1312 | $documentNumber = $key + 1; |
1313 | - echo '<td class="text-center"><a href="' . api_get_path(WEB_CODE_PATH) . 'work/view.php?cidReq=' . $course_code . '&id_session=' . $sessionId .'&id=' . $results['id'] . '">(' . $documentNumber . ')</a></td>'; |
|
1313 | + echo '<td class="text-center"><a href="'.api_get_path(WEB_CODE_PATH).'work/view.php?cidReq='.$course_code.'&id_session='.$sessionId.'&id='.$results['id'].'">('.$documentNumber.')</a></td>'; |
|
1314 | 1314 | $qualification = !empty($results['qualification']) ? $results['qualification'] : '-'; |
1315 | - echo '<td class="text-center">' . $qualification. '</td>'; |
|
1316 | - echo '<td class="text-center">' . $results['formatted_date']. '</td>'; |
|
1315 | + echo '<td class="text-center">'.$qualification.'</td>'; |
|
1316 | + echo '<td class="text-center">'.$results['formatted_date'].'</td>'; |
|
1317 | 1317 | $assignment = get_work_assignment_by_id($work->id, $courseInfo['real_id']); |
1318 | - echo '<td class="text-center">' . api_convert_and_format_date($assignment['expires_on']) . '</td>'; |
|
1318 | + echo '<td class="text-center">'.api_convert_and_format_date($assignment['expires_on']).'</td>'; |
|
1319 | 1319 | |
1320 | 1320 | $fieldValue = new ExtraFieldValue('work'); |
1321 | 1321 | $resultExtra = $fieldValue->getAllValuesForAnItem( |
@@ -1327,7 +1327,7 @@ discard block |
||
1327 | 1327 | $field = $field['value']; |
1328 | 1328 | |
1329 | 1329 | if (api_get_configuration_value('considered_working_time') == $field->getField()->getVariable()) { |
1330 | - echo '<td class="text-center">' . $field->getValue() . '</td>'; |
|
1330 | + echo '<td class="text-center">'.$field->getValue().'</td>'; |
|
1331 | 1331 | } |
1332 | 1332 | } |
1333 | 1333 |