@@ -35,27 +35,27 @@ discard block |
||
35 | 35 | |
36 | 36 | if (!empty($id)) { |
37 | 37 | $display_output .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&origin='.$origin.'&gradebook='.$gradebook.'&id='.$my_back_id.'">'. |
38 | - Display::return_icon('back.png', get_lang('BackToWorksList'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
38 | + Display::return_icon('back.png', get_lang('BackToWorksList'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | if (api_is_allowed_to_edit(null, true) && $origin != 'learnpath') { |
42 | 42 | // Create dir |
43 | 43 | if (empty($id)) { |
44 | 44 | $display_output .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&action=create_dir&origin='.$origin.'&gradebook='.$gradebook.'">'; |
45 | - $display_output .= Display::return_icon('new_work.png', get_lang('CreateAssignment'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
45 | + $display_output .= Display::return_icon('new_work.png', get_lang('CreateAssignment'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
46 | 46 | } |
47 | 47 | if (empty($id)) { |
48 | 48 | // Options |
49 | 49 | $display_output .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&action=settings&origin='.$origin.'&gradebook='.$gradebook.'">'; |
50 | - $display_output .= Display::return_icon('settings.png', get_lang('EditToolOptions'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
50 | + $display_output .= Display::return_icon('settings.png', get_lang('EditToolOptions'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
51 | 51 | } |
52 | - $display_output .= '<a id="open-view-list" href="#">' . Display::return_icon('listwork.png', get_lang('ViewStudents'),'',ICON_SIZE_MEDIUM) . '</a>'; |
|
52 | + $display_output .= '<a id="open-view-list" href="#">'.Display::return_icon('listwork.png', get_lang('ViewStudents'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
53 | 53 | |
54 | 54 | } |
55 | 55 | |
56 | 56 | if (api_is_allowed_to_edit(null, true) && $origin != 'learnpath' && api_is_allowed_to_session_edit(false, true)) { |
57 | 57 | // Delete all files |
58 | - if (api_get_setting('permanently_remove_deleted_files') == 'true'){ |
|
58 | + if (api_get_setting('permanently_remove_deleted_files') == 'true') { |
|
59 | 59 | $message = get_lang('ConfirmYourChoiceDeleteAllfiles'); |
60 | 60 | } else { |
61 | 61 | $message = get_lang('ConfirmYourChoice'); |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | */ |
113 | 113 | function two_digits($number) |
114 | 114 | { |
115 | - $number = (int)$number; |
|
115 | + $number = (int) $number; |
|
116 | 116 | return ($number < 10) ? '0'.$number : $number; |
117 | 117 | } |
118 | 118 | |
@@ -547,11 +547,11 @@ discard block |
||
547 | 547 | ); |
548 | 548 | |
549 | 549 | $columnModel = array( |
550 | - array('name'=>'type', 'index'=>'type', 'width'=>'30', 'align'=>'center', 'sortable' => 'false'), |
|
551 | - array('name'=>'title', 'index'=>'title', 'width'=>'250', 'align'=>'left'), |
|
552 | - array('name'=>'expires_on', 'index'=>'expires_on', 'width'=>'80', 'align'=>'center', 'sortable'=>'false'), |
|
553 | - array('name'=>'feedback', 'index'=>'feedback', 'width'=>'80', 'align'=>'center'), |
|
554 | - array('name'=>'last_upload', 'index'=>'feedback', 'width'=>'125', 'align'=>'center'), |
|
550 | + array('name'=>'type', 'index'=>'type', 'width'=>'30', 'align'=>'center', 'sortable' => 'false'), |
|
551 | + array('name'=>'title', 'index'=>'title', 'width'=>'250', 'align'=>'left'), |
|
552 | + array('name'=>'expires_on', 'index'=>'expires_on', 'width'=>'80', 'align'=>'center', 'sortable'=>'false'), |
|
553 | + array('name'=>'feedback', 'index'=>'feedback', 'width'=>'80', 'align'=>'center'), |
|
554 | + array('name'=>'last_upload', 'index'=>'feedback', 'width'=>'125', 'align'=>'center'), |
|
555 | 555 | ); |
556 | 556 | |
557 | 557 | if ($courseInfo['show_score'] == 0) { |
@@ -588,10 +588,10 @@ discard block |
||
588 | 588 | { |
589 | 589 | $columnModel = array( |
590 | 590 | array('name'=>'type', 'index'=>'type', 'width'=>'35', 'align'=>'center', 'sortable' => 'false'), |
591 | - array('name'=>'title', 'index'=>'title', 'width'=>'300', 'align'=>'left', 'wrap_cell' => "true"), |
|
592 | - array('name'=>'sent_date', 'index'=>'sent_date', 'width'=>'125', 'align'=>'center'), |
|
593 | - array('name'=>'expires_on', 'index'=>'expires_on', 'width'=>'125', 'align'=>'center'), |
|
594 | - array('name'=>'amount', 'index'=>'end_on', 'width'=>'110', 'align'=>'center'), |
|
591 | + array('name'=>'title', 'index'=>'title', 'width'=>'300', 'align'=>'left', 'wrap_cell' => "true"), |
|
592 | + array('name'=>'sent_date', 'index'=>'sent_date', 'width'=>'125', 'align'=>'center'), |
|
593 | + array('name'=>'expires_on', 'index'=>'expires_on', 'width'=>'125', 'align'=>'center'), |
|
594 | + array('name'=>'amount', 'index'=>'end_on', 'width'=>'110', 'align'=>'center'), |
|
595 | 595 | array('name'=>'actions', 'index'=>'actions', 'width'=>'110', 'align'=>'left', 'sortable'=>'false') |
596 | 596 | ); |
597 | 597 | |
@@ -793,7 +793,7 @@ discard block |
||
793 | 793 | return false; |
794 | 794 | } |
795 | 795 | |
796 | - $base_work_dir = api_get_path(SYS_COURSE_PATH) .$_course['path'].'/work'; |
|
796 | + $base_work_dir = api_get_path(SYS_COURSE_PATH).$_course['path'].'/work'; |
|
797 | 797 | $work_data_url = $base_work_dir.$work_data['url']; |
798 | 798 | $check = Security::check_abs_path($work_data_url.'/', $base_work_dir.'/'); |
799 | 799 | |
@@ -863,7 +863,7 @@ discard block |
||
863 | 863 | function get_work_path($id) |
864 | 864 | { |
865 | 865 | $table = Database::get_course_table(TABLE_STUDENT_PUBLICATION); |
866 | - $course_id = api_get_course_int_id(); |
|
866 | + $course_id = api_get_course_int_id(); |
|
867 | 867 | $sql = 'SELECT url FROM '.$table.' |
868 | 868 | WHERE c_id = '.$course_id.' AND id='.intval($id); |
869 | 869 | $res = Database::query($sql); |
@@ -984,9 +984,9 @@ discard block |
||
984 | 984 | if ($handle = @opendir($directory)) { |
985 | 985 | while (false !== ($file = readdir($handle))) { |
986 | 986 | if ($file != '.' && $file != '..') { |
987 | - if (is_dir($directory. '/' . $file)) { |
|
988 | - $array_items = array_merge($array_items, directory_to_array($directory. '/' . $file)); |
|
989 | - $file = $directory . '/' . $file; |
|
987 | + if (is_dir($directory.'/'.$file)) { |
|
988 | + $array_items = array_merge($array_items, directory_to_array($directory.'/'.$file)); |
|
989 | + $file = $directory.'/'.$file; |
|
990 | 990 | $array_items[] = preg_replace("/\/\//si", '/', $file); |
991 | 991 | } |
992 | 992 | } |
@@ -1018,7 +1018,7 @@ discard block |
||
1018 | 1018 | |
1019 | 1019 | $work_table = Database :: get_course_table(TABLE_STUDENT_PUBLICATION); |
1020 | 1020 | |
1021 | - for($i = 0; $i < count($only_dir); $i++) { |
|
1021 | + for ($i = 0; $i < count($only_dir); $i++) { |
|
1022 | 1022 | $url = $only_dir[$i]; |
1023 | 1023 | |
1024 | 1024 | $params = [ |
@@ -1058,7 +1058,7 @@ discard block |
||
1058 | 1058 | if (is_dir($path_dir.'/'.$entry)) { |
1059 | 1059 | $count_dir++; |
1060 | 1060 | if ($recurse) { |
1061 | - $count += count_dir($path_dir . '/' . $entry, $recurse); |
|
1061 | + $count += count_dir($path_dir.'/'.$entry, $recurse); |
|
1062 | 1062 | } |
1063 | 1063 | } else { |
1064 | 1064 | $count++; |
@@ -1323,11 +1323,11 @@ discard block |
||
1323 | 1323 | $courseInfo |
1324 | 1324 | ); |
1325 | 1325 | |
1326 | - if (!in_array($direction, array('asc','desc'))) { |
|
1326 | + if (!in_array($direction, array('asc', 'desc'))) { |
|
1327 | 1327 | $direction = 'desc'; |
1328 | 1328 | } |
1329 | 1329 | if (!empty($where_condition)) { |
1330 | - $where_condition = ' AND ' . $where_condition; |
|
1330 | + $where_condition = ' AND '.$where_condition; |
|
1331 | 1331 | } |
1332 | 1332 | |
1333 | 1333 | $column = !empty($column) ? Database::escape_string($column) : 'sent_date'; |
@@ -1470,7 +1470,7 @@ discard block |
||
1470 | 1470 | $direction = 'desc'; |
1471 | 1471 | } |
1472 | 1472 | if (!empty($where_condition)) { |
1473 | - $where_condition = ' AND ' . $where_condition; |
|
1473 | + $where_condition = ' AND '.$where_condition; |
|
1474 | 1474 | } |
1475 | 1475 | |
1476 | 1476 | $column = !empty($column) ? Database::escape_string($column) : 'sent_date'; |
@@ -1527,7 +1527,7 @@ discard block |
||
1527 | 1527 | ); |
1528 | 1528 | |
1529 | 1529 | $work['amount'] = Display::label( |
1530 | - $countUniqueAttempts . '/' . |
|
1530 | + $countUniqueAttempts.'/'. |
|
1531 | 1531 | $totalUsers, |
1532 | 1532 | 'success' |
1533 | 1533 | ); |
@@ -1576,7 +1576,7 @@ discard block |
||
1576 | 1576 | array(), |
1577 | 1577 | ICON_SIZE_SMALL |
1578 | 1578 | ), |
1579 | - api_get_path(WEB_CODE_PATH) . 'work/downloadfolder.inc.php?id=' . $workId . '&' . api_get_cidreq() |
|
1579 | + api_get_path(WEB_CODE_PATH).'work/downloadfolder.inc.php?id='.$workId.'&'.api_get_cidreq() |
|
1580 | 1580 | ); |
1581 | 1581 | } else { |
1582 | 1582 | $downloadLink = Display::url( |
@@ -1660,7 +1660,7 @@ discard block |
||
1660 | 1660 | $userCondition = " AND u.user_id = $studentId "; |
1661 | 1661 | $sessionCondition = " AND w.session_id = $sessionId "; |
1662 | 1662 | $workCondition = " AND w_rel.work_id = $workId"; |
1663 | - $workParentCondition = " AND w.parent_id = $workId"; |
|
1663 | + $workParentCondition = " AND w.parent_id = $workId"; |
|
1664 | 1664 | |
1665 | 1665 | $sql = "( |
1666 | 1666 | $select1 FROM $userTable u |
@@ -1768,7 +1768,7 @@ discard block |
||
1768 | 1768 | } |
1769 | 1769 | |
1770 | 1770 | if ($allowEdition && !empty($itemId)) { |
1771 | - $deleteLink = Display::url($deleteIcon, $urlDelete.'&item_id='.$itemId.'&id='.$workId); |
|
1771 | + $deleteLink = Display::url($deleteIcon, $urlDelete.'&item_id='.$itemId.'&id='.$workId); |
|
1772 | 1772 | } else { |
1773 | 1773 | $deleteLink = null; |
1774 | 1774 | } |
@@ -1849,7 +1849,7 @@ discard block |
||
1849 | 1849 | $start = intval($start); |
1850 | 1850 | $limit = intval($limit); |
1851 | 1851 | |
1852 | - if (!in_array($direction, array('asc','desc'))) { |
|
1852 | + if (!in_array($direction, array('asc', 'desc'))) { |
|
1853 | 1853 | $direction = 'desc'; |
1854 | 1854 | } |
1855 | 1855 | |
@@ -1917,13 +1917,13 @@ discard block |
||
1917 | 1917 | $work_assignment = get_work_assignment_by_id($work_id); |
1918 | 1918 | |
1919 | 1919 | if (!empty($studentId)) { |
1920 | - $where_condition.= " AND u.user_id = ".intval($studentId); |
|
1920 | + $where_condition .= " AND u.user_id = ".intval($studentId); |
|
1921 | 1921 | } |
1922 | 1922 | |
1923 | 1923 | $sql = " $select |
1924 | 1924 | FROM $work_condition $user_condition |
1925 | 1925 | WHERE $extra_conditions $where_condition $condition_session |
1926 | - AND u.status != " . INVITEE . " |
|
1926 | + AND u.status != ".INVITEE." |
|
1927 | 1927 | ORDER BY $column $direction"; |
1928 | 1928 | |
1929 | 1929 | if (!empty($start) && !empty($limit)) { |
@@ -1980,7 +1980,7 @@ discard block |
||
1980 | 1980 | $qualification_string = Display::label('-'); |
1981 | 1981 | } else { |
1982 | 1982 | $label = 'info'; |
1983 | - $relativeScore = $work['qualification']/$work_data['qualification']; |
|
1983 | + $relativeScore = $work['qualification'] / $work_data['qualification']; |
|
1984 | 1984 | if ($relativeScore < 0.5) { |
1985 | 1985 | $label = 'important'; |
1986 | 1986 | } elseif ($relativeScore < 0.75) { |
@@ -2036,10 +2036,10 @@ discard block |
||
2036 | 2036 | // If URL is present then there's a file to download keep BC. |
2037 | 2037 | if ($work['contains_file'] || !empty($work['url'])) { |
2038 | 2038 | $link_to_download = '<a href="'.$url.'download.php?id='.$item_id.'&'.api_get_cidreq().'">'. |
2039 | - Display::return_icon('save.png', get_lang('Save'),array(), ICON_SIZE_SMALL).'</a> '; |
|
2039 | + Display::return_icon('save.png', get_lang('Save'), array(), ICON_SIZE_SMALL).'</a> '; |
|
2040 | 2040 | } |
2041 | 2041 | |
2042 | - $send_to = Portfolio::share('work', $work['id'], array('style' => 'white-space:nowrap;')); |
|
2042 | + $send_to = Portfolio::share('work', $work['id'], array('style' => 'white-space:nowrap;')); |
|
2043 | 2043 | |
2044 | 2044 | $feedback = null; |
2045 | 2045 | $count = getWorkCommentCount($item_id, $course_info); |
@@ -2058,7 +2058,7 @@ discard block |
||
2058 | 2058 | $work_date = api_convert_and_format_date($work['sent_date']); |
2059 | 2059 | |
2060 | 2060 | $work['sent_date_from_db'] = $work['sent_date']; |
2061 | - $work['sent_date'] = '<div class="date-time">' . date_to_str_ago(api_get_local_time($work['sent_date'])) . ' ' . $add_string . ' ' . $work_date . '</div>'; |
|
2061 | + $work['sent_date'] = '<div class="date-time">'.date_to_str_ago(api_get_local_time($work['sent_date'])).' '.$add_string.' '.$work_date.'</div>'; |
|
2062 | 2062 | |
2063 | 2063 | // Actions. |
2064 | 2064 | $correction = ''; |
@@ -2076,8 +2076,8 @@ discard block |
||
2076 | 2076 | Display::return_icon('default.png', get_lang('View'), array(), ICON_SIZE_SMALL).'</a> '; |
2077 | 2077 | |
2078 | 2078 | if ($unoconv && empty($work['contains_file'])) { |
2079 | - $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').'" >'. |
|
2080 | - Display::return_icon('export_doc.png', get_lang('ExportToDoc'),array(), ICON_SIZE_SMALL).'</a> '; |
|
2079 | + $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').'" >'. |
|
2080 | + Display::return_icon('export_doc.png', get_lang('ExportToDoc'), array(), ICON_SIZE_SMALL).'</a> '; |
|
2081 | 2081 | } |
2082 | 2082 | |
2083 | 2083 | $correction = ' |
@@ -2120,9 +2120,9 @@ discard block |
||
2120 | 2120 | |
2121 | 2121 | if ($locked) { |
2122 | 2122 | if ($qualification_exists) { |
2123 | - $action .= Display::return_icon('rate_work_na.png', get_lang('CorrectAndRate'),array(), ICON_SIZE_SMALL); |
|
2123 | + $action .= Display::return_icon('rate_work_na.png', get_lang('CorrectAndRate'), array(), ICON_SIZE_SMALL); |
|
2124 | 2124 | } else { |
2125 | - $action .= Display::return_icon('edit_na.png', get_lang('Comment'),array(), ICON_SIZE_SMALL); |
|
2125 | + $action .= Display::return_icon('edit_na.png', get_lang('Comment'), array(), ICON_SIZE_SMALL); |
|
2126 | 2126 | } |
2127 | 2127 | } else { |
2128 | 2128 | if ($qualification_exists) { |
@@ -2136,45 +2136,45 @@ discard block |
||
2136 | 2136 | |
2137 | 2137 | if ($work['contains_file']) { |
2138 | 2138 | if ($locked) { |
2139 | - $action .= Display::return_icon('move_na.png', get_lang('Move'),array(), ICON_SIZE_SMALL); |
|
2139 | + $action .= Display::return_icon('move_na.png', get_lang('Move'), array(), ICON_SIZE_SMALL); |
|
2140 | 2140 | } else { |
2141 | 2141 | $action .= '<a href="'.$url.'work.php?'.api_get_cidreq().'&action=move&item_id='.$item_id.'&id='.$work['parent_id'].'" title="'.get_lang('Move').'">'. |
2142 | - Display::return_icon('move.png', get_lang('Move'),array(), ICON_SIZE_SMALL).'</a>'; |
|
2142 | + Display::return_icon('move.png', get_lang('Move'), array(), ICON_SIZE_SMALL).'</a>'; |
|
2143 | 2143 | } |
2144 | 2144 | } |
2145 | 2145 | |
2146 | 2146 | if ($work['accepted'] == '1') { |
2147 | 2147 | $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').'" >'. |
2148 | - Display::return_icon('visible.png', get_lang('Invisible'),array(), ICON_SIZE_SMALL).'</a>'; |
|
2148 | + Display::return_icon('visible.png', get_lang('Invisible'), array(), ICON_SIZE_SMALL).'</a>'; |
|
2149 | 2149 | } else { |
2150 | 2150 | $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').'" >'. |
2151 | - Display::return_icon('invisible.png', get_lang('Visible'),array(), ICON_SIZE_SMALL).'</a> '; |
|
2151 | + Display::return_icon('invisible.png', get_lang('Visible'), array(), ICON_SIZE_SMALL).'</a> '; |
|
2152 | 2152 | } |
2153 | 2153 | |
2154 | 2154 | if ($locked) { |
2155 | 2155 | $action .= Display::return_icon('delete_na.png', get_lang('Delete'), '', ICON_SIZE_SMALL); |
2156 | 2156 | } else { |
2157 | - $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').'" >'. |
|
2158 | - Display::return_icon('delete.png', get_lang('Delete'),'',ICON_SIZE_SMALL).'</a>'; |
|
2157 | + $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').'" >'. |
|
2158 | + Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a>'; |
|
2159 | 2159 | } |
2160 | 2160 | } elseif ($is_author && (empty($work['qualificator_id']) || $work['qualificator_id'] == 0)) { |
2161 | 2161 | $action .= '<a href="'.$url.'view.php?'.api_get_cidreq().'&id='.$item_id.'" title="'.get_lang('View').'">'. |
2162 | - Display::return_icon('default.png', get_lang('View'),array(), ICON_SIZE_SMALL).'</a>'; |
|
2162 | + Display::return_icon('default.png', get_lang('View'), array(), ICON_SIZE_SMALL).'</a>'; |
|
2163 | 2163 | |
2164 | 2164 | if (api_get_course_setting('student_delete_own_publication') == 1) { |
2165 | 2165 | if (api_is_allowed_to_session_edit(false, true)) { |
2166 | 2166 | $action .= '<a href="'.$url.'edit.php?'.api_get_cidreq().'&item_id='.$item_id.'&id='.$work['parent_id'].'" title="'.get_lang('Modify').'">'. |
2167 | - Display::return_icon('edit.png', get_lang('Comment'),array(), ICON_SIZE_SMALL).'</a>'; |
|
2167 | + Display::return_icon('edit.png', get_lang('Comment'), array(), ICON_SIZE_SMALL).'</a>'; |
|
2168 | 2168 | } |
2169 | - $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').'" >'. |
|
2170 | - Display::return_icon('delete.png',get_lang('Delete'),'',ICON_SIZE_SMALL).'</a>'; |
|
2169 | + $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').'" >'. |
|
2170 | + Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a>'; |
|
2171 | 2171 | } else { |
2172 | - $action .= Display::return_icon('edit_na.png', get_lang('Modify'),array(), ICON_SIZE_SMALL); |
|
2172 | + $action .= Display::return_icon('edit_na.png', get_lang('Modify'), array(), ICON_SIZE_SMALL); |
|
2173 | 2173 | } |
2174 | 2174 | } else { |
2175 | 2175 | $action .= '<a href="'.$url.'view.php?'.api_get_cidreq().'&id='.$item_id.'" title="'.get_lang('View').'">'. |
2176 | - Display::return_icon('default.png', get_lang('View'),array(), ICON_SIZE_SMALL).'</a>'; |
|
2177 | - $action .= Display::return_icon('edit_na.png', get_lang('Modify'),array(), ICON_SIZE_SMALL); |
|
2176 | + Display::return_icon('default.png', get_lang('View'), array(), ICON_SIZE_SMALL).'</a>'; |
|
2177 | + $action .= Display::return_icon('edit_na.png', get_lang('Modify'), array(), ICON_SIZE_SMALL); |
|
2178 | 2178 | } |
2179 | 2179 | |
2180 | 2180 | // Status. |
@@ -2207,7 +2207,7 @@ discard block |
||
2207 | 2207 | $_course = api_get_course_info(); |
2208 | 2208 | $task_id = $task_data['id']; |
2209 | 2209 | $task_title = !empty($task_data['title']) ? $task_data['title'] : basename($task_data['url']); |
2210 | - $subject = '[' . api_get_setting('siteName') . '] '; |
|
2210 | + $subject = '['.api_get_setting('siteName').'] '; |
|
2211 | 2211 | |
2212 | 2212 | // The body can be as long as you wish, and any combination of text and variables |
2213 | 2213 | $content = get_lang('ReminderToSubmitPendingTask')."\n".get_lang('CourseName').' : '.$_course['name']."\n"; |
@@ -2218,7 +2218,7 @@ discard block |
||
2218 | 2218 | $mails_sent_to = array(); |
2219 | 2219 | foreach ($list_users as $user) { |
2220 | 2220 | $name_user = api_get_person_name($user[1], $user[0], null, PERSON_NAME_EMAIL_ADDRESS); |
2221 | - $dear_line = get_lang('Dear')." ".api_get_person_name($user[1], $user[0]) .", \n\n"; |
|
2221 | + $dear_line = get_lang('Dear')." ".api_get_person_name($user[1], $user[0]).", \n\n"; |
|
2222 | 2222 | $body = $dear_line.$content; |
2223 | 2223 | MessageManager::send_message($user[3], $subject, $body); |
2224 | 2224 | $mails_sent_to[] = $name_user; |
@@ -2247,22 +2247,22 @@ discard block |
||
2247 | 2247 | } else { |
2248 | 2248 | $students = CourseManager::get_student_list_from_course_code($courseCode, true, $sessionId); |
2249 | 2249 | } |
2250 | - $emailsubject = '[' . api_get_setting('siteName') . '] '.get_lang('HomeworkCreated'); |
|
2250 | + $emailsubject = '['.api_get_setting('siteName').'] '.get_lang('HomeworkCreated'); |
|
2251 | 2251 | $currentUser = api_get_user_info(api_get_user_id()); |
2252 | 2252 | if (!empty($students)) { |
2253 | - foreach($students as $student) { |
|
2253 | + foreach ($students as $student) { |
|
2254 | 2254 | $user_info = api_get_user_info($student["user_id"]); |
2255 | - if(!empty($user_info["mail"])) { |
|
2255 | + if (!empty($user_info["mail"])) { |
|
2256 | 2256 | $name_user = api_get_person_name( |
2257 | 2257 | $user_info["firstname"], |
2258 | 2258 | $user_info["lastname"], |
2259 | 2259 | null, |
2260 | 2260 | PERSON_NAME_EMAIL_ADDRESS |
2261 | 2261 | ); |
2262 | - $link = api_get_path(WEB_CODE_PATH) . 'work/work_list_all.php?' . api_get_cidreq() . '&id=' . $workId; |
|
2262 | + $link = api_get_path(WEB_CODE_PATH).'work/work_list_all.php?'.api_get_cidreq().'&id='.$workId; |
|
2263 | 2263 | $emailbody = get_lang('Dear')." ".$name_user.",\n\n"; |
2264 | 2264 | $emailbody .= get_lang('HomeworkHasBeenCreatedForTheCourse')." ".$courseCode.". "."\n\n". |
2265 | - '<a href="'. $link . '">' . get_lang('PleaseCheckHomeworkPage') . '</a>'; |
|
2265 | + '<a href="'.$link.'">'.get_lang('PleaseCheckHomeworkPage').'</a>'; |
|
2266 | 2266 | $emailbody .= "\n\n".api_get_person_name($currentUser["firstname"], $currentUser["lastname"]); |
2267 | 2267 | |
2268 | 2268 | $additionalParameters = array( |
@@ -2304,7 +2304,7 @@ discard block |
||
2304 | 2304 | $url = Database::escape_string($url); |
2305 | 2305 | $sql = "SELECT id FROM $work_table WHERE url='$url'"; |
2306 | 2306 | $result = Database::query($sql); |
2307 | - if (Database::num_rows($result)> 0) { |
|
2307 | + if (Database::num_rows($result) > 0) { |
|
2308 | 2308 | $row = Database::fetch_row($result); |
2309 | 2309 | if (empty($row)) { |
2310 | 2310 | return false; |
@@ -2326,7 +2326,7 @@ discard block |
||
2326 | 2326 | { |
2327 | 2327 | $output = '<select name="'.$name.'" id="'.$name.'">'; |
2328 | 2328 | foreach ($values as $key => $value) { |
2329 | - $output .= '<option value="'.$key.'" '.(($checked==$key) ? 'selected="selected"' : '').'>'.$value.'</option>'; |
|
2329 | + $output .= '<option value="'.$key.'" '.(($checked == $key) ? 'selected="selected"' : '').'>'.$value.'</option>'; |
|
2330 | 2330 | } |
2331 | 2331 | $output .= '</select>'; |
2332 | 2332 | return $output; |
@@ -2340,9 +2340,9 @@ discard block |
||
2340 | 2340 | */ |
2341 | 2341 | function make_checkbox($name, $checked = '', $label = null) |
2342 | 2342 | { |
2343 | - $check = '<input id ="'.$name.'" type="checkbox" value="1" name="'.$name.'" '.((!empty($checked))?'checked="checked"':'').'/>'; |
|
2343 | + $check = '<input id ="'.$name.'" type="checkbox" value="1" name="'.$name.'" '.((!empty($checked)) ? 'checked="checked"' : '').'/>'; |
|
2344 | 2344 | if (!empty($label)) { |
2345 | - $check .="<label for ='$name'>$label</label>"; |
|
2345 | + $check .= "<label for ='$name'>$label</label>"; |
|
2346 | 2346 | } |
2347 | 2347 | return $check; |
2348 | 2348 | } |
@@ -2496,7 +2496,7 @@ discard block |
||
2496 | 2496 | } |
2497 | 2497 | |
2498 | 2498 | if (!empty($studentId)) { |
2499 | - $sql_users.= " AND u.user_id = ".intval($studentId); |
|
2499 | + $sql_users .= " AND u.user_id = ".intval($studentId); |
|
2500 | 2500 | } |
2501 | 2501 | |
2502 | 2502 | $group_id = api_get_group_id(); |
@@ -2506,7 +2506,7 @@ discard block |
||
2506 | 2506 | if ($group_id) { |
2507 | 2507 | $group_user_list = GroupManager::get_subscribed_users($group_id); |
2508 | 2508 | if (!empty($group_user_list)) { |
2509 | - foreach($group_user_list as $group_user) { |
|
2509 | + foreach ($group_user_list as $group_user) { |
|
2510 | 2510 | $new_group_user_list[] = $group_user['user_id']; |
2511 | 2511 | } |
2512 | 2512 | } |
@@ -2927,7 +2927,7 @@ discard block |
||
2927 | 2927 | function getWorkComments($work) |
2928 | 2928 | { |
2929 | 2929 | $commentTable = Database::get_course_table(TABLE_STUDENT_PUBLICATION_ASSIGNMENT_COMMENT); |
2930 | - $userTable= Database::get_main_table(TABLE_MAIN_USER); |
|
2930 | + $userTable = Database::get_main_table(TABLE_MAIN_USER); |
|
2931 | 2931 | |
2932 | 2932 | $courseId = intval($work['c_id']); |
2933 | 2933 | $workId = intval($work['id']); |
@@ -3610,7 +3610,7 @@ discard block |
||
3610 | 3610 | null, |
3611 | 3611 | PERSON_NAME_EMAIL_ADDRESS |
3612 | 3612 | ); |
3613 | - $subject = "[" . api_get_setting('siteName') . "] ".get_lang('SendMailBody')."\n ".get_lang('CourseName').": ".$courseInfo['name']." "; |
|
3613 | + $subject = "[".api_get_setting('siteName')."] ".get_lang('SendMailBody')."\n ".get_lang('CourseName').": ".$courseInfo['name']." "; |
|
3614 | 3614 | foreach ($user_list as $user_data) { |
3615 | 3615 | $to_user_id = $user_data['user_id']; |
3616 | 3616 | $user_info = api_get_user_info($to_user_id); |
@@ -3659,7 +3659,7 @@ discard block |
||
3659 | 3659 | |
3660 | 3660 | $title = $values['title']; |
3661 | 3661 | $description = $values['description']; |
3662 | - $contains_file = isset($values['contains_file']) && !empty($values['contains_file']) ? intval($values['contains_file']): 0; |
|
3662 | + $contains_file = isset($values['contains_file']) && !empty($values['contains_file']) ? intval($values['contains_file']) : 0; |
|
3663 | 3663 | |
3664 | 3664 | $saveWork = true; |
3665 | 3665 | $message = null; |
@@ -4026,8 +4026,8 @@ discard block |
||
4026 | 4026 | LINK_STUDENTPUBLICATION, |
4027 | 4027 | $workId, |
4028 | 4028 | $params['new_dir'], |
4029 | - (float)$params['weight'], |
|
4030 | - (float)$params['qualification'], |
|
4029 | + (float) $params['weight'], |
|
4030 | + (float) $params['qualification'], |
|
4031 | 4031 | $params['description'], |
4032 | 4032 | 1, |
4033 | 4033 | api_get_session_id() |
@@ -4287,15 +4287,15 @@ discard block |
||
4287 | 4287 | // changing the tool setting: is a student allowed to delete his/her own document |
4288 | 4288 | |
4289 | 4289 | // counting the number of occurrences of this setting (if 0 => add, if 1 => update) |
4290 | - $query = "SELECT * FROM " . $table_course_setting . " |
|
4290 | + $query = "SELECT * FROM ".$table_course_setting." |
|
4291 | 4291 | WHERE c_id = $courseId AND variable = 'student_delete_own_publication'"; |
4292 | 4292 | |
4293 | 4293 | $result = Database::query($query); |
4294 | 4294 | $number_of_setting = Database::num_rows($result); |
4295 | 4295 | |
4296 | 4296 | if ($number_of_setting == 1) { |
4297 | - $query = "UPDATE " . $table_course_setting . " SET |
|
4298 | - value='" . Database::escape_string($studentDeleteOwnPublication) . "' |
|
4297 | + $query = "UPDATE ".$table_course_setting." SET |
|
4298 | + value='" . Database::escape_string($studentDeleteOwnPublication)."' |
|
4299 | 4299 | WHERE variable = 'student_delete_own_publication' AND c_id = $courseId"; |
4300 | 4300 | Database::query($query); |
4301 | 4301 | } else { |
@@ -4334,9 +4334,9 @@ discard block |
||
4334 | 4334 | $work_table = Database :: get_course_table(TABLE_STUDENT_PUBLICATION); |
4335 | 4335 | $item_id = intval($item_id); |
4336 | 4336 | $course_id = $course_info['real_id']; |
4337 | - $sql = "UPDATE " . $work_table . " |
|
4337 | + $sql = "UPDATE ".$work_table." |
|
4338 | 4338 | SET accepted = 0 |
4339 | - WHERE c_id = $course_id AND id = '" . $item_id . "'"; |
|
4339 | + WHERE c_id = $course_id AND id = '".$item_id."'"; |
|
4340 | 4340 | Database::query($sql); |
4341 | 4341 | api_item_property_update( |
4342 | 4342 | $course_info, |
@@ -4480,7 +4480,7 @@ discard block |
||
4480 | 4480 | $courseCode, |
4481 | 4481 | $sessionId, |
4482 | 4482 | $limitString, |
4483 | - $orderBy , |
|
4483 | + $orderBy, |
|
4484 | 4484 | STUDENT, |
4485 | 4485 | $getCount |
4486 | 4486 | ); |
@@ -4817,8 +4817,8 @@ discard block |
||
4817 | 4817 | if (!empty($sessionId)) { |
4818 | 4818 | $sessionInfo = api_get_session_info($sessionId); |
4819 | 4819 | if (!empty($sessionInfo)) { |
4820 | - $header .= ' - ' . $sessionInfo['name']; |
|
4821 | - $header .= '<br />' . $sessionInfo['description']; |
|
4820 | + $header .= ' - '.$sessionInfo['name']; |
|
4821 | + $header .= '<br />'.$sessionInfo['description']; |
|
4822 | 4822 | $teachers = SessionManager::getCoachesByCourseSessionToString( |
4823 | 4823 | $sessionId, |
4824 | 4824 | $courseInfo['real_id'] |
@@ -4834,12 +4834,12 @@ discard block |
||
4834 | 4834 | $expiresOn = null; |
4835 | 4835 | |
4836 | 4836 | if (!empty($assignment) && isset($assignment['expires_on'])) { |
4837 | - $content .= '<br /><strong>' . get_lang('ExpirationDate') . '</strong>: ' . api_get_local_time($assignment['expires_on']); |
|
4837 | + $content .= '<br /><strong>'.get_lang('ExpirationDate').'</strong>: '.api_get_local_time($assignment['expires_on']); |
|
4838 | 4838 | $expiresOn = api_get_local_time($assignment['expires_on']); |
4839 | 4839 | } |
4840 | 4840 | |
4841 | 4841 | if (!empty($workData['description'])) { |
4842 | - $content .= '<br /><strong>' . get_lang('Description') . '</strong>: ' . $workData['description']; |
|
4842 | + $content .= '<br /><strong>'.get_lang('Description').'</strong>: '.$workData['description']; |
|
4843 | 4843 | } |
4844 | 4844 | |
4845 | 4845 | $workList = get_work_user_list(null, null, null, null, $workId); |
@@ -4860,7 +4860,7 @@ discard block |
||
4860 | 4860 | ); |
4861 | 4861 | |
4862 | 4862 | $column = 0; |
4863 | - foreach($headers as $header) { |
|
4863 | + foreach ($headers as $header) { |
|
4864 | 4864 | $table->setHeaderContents(0, $column, $header); |
4865 | 4865 | $column++; |
4866 | 4866 | } |
@@ -4908,7 +4908,7 @@ discard block |
||
4908 | 4908 | |
4909 | 4909 | if (!empty($content)) { |
4910 | 4910 | $params = array( |
4911 | - 'filename' => $workData['title'] . '_' . api_get_local_time(), |
|
4911 | + 'filename' => $workData['title'].'_'.api_get_local_time(), |
|
4912 | 4912 | 'pdf_title' => api_replace_dangerous_char($workData['title']), |
4913 | 4913 | 'course_code' => $courseInfo['code'], |
4914 | 4914 | 'add_signatures' => false |
@@ -4939,7 +4939,7 @@ discard block |
||
4939 | 4939 | $tempZipFile = api_get_path(SYS_ARCHIVE_PATH).api_get_unique_id().".zip"; |
4940 | 4940 | $coursePath = api_get_path(SYS_COURSE_PATH).$courseInfo['path'].'/work/'; |
4941 | 4941 | |
4942 | - $zip = new PclZip($tempZipFile); |
|
4942 | + $zip = new PclZip($tempZipFile); |
|
4943 | 4943 | |
4944 | 4944 | $workPerUser = getWorkPerUser($userId); |
4945 | 4945 |
@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | /* For licensing terms, see /license.txt */ |
3 | 3 | |
4 | 4 | //require_once '../inc/global.inc.php'; |
5 | -$current_course_tool = TOOL_STUDENTPUBLICATION; |
|
5 | +$current_course_tool = TOOL_STUDENTPUBLICATION; |
|
6 | 6 | |
7 | 7 | api_protect_course_script(true); |
8 | 8 | |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | $htmlHeadXtra[] = api_get_jqgrid_js(); |
37 | 37 | |
38 | 38 | if (!empty($group_id)) { |
39 | - $group_properties = GroupManager :: get_group_properties($group_id); |
|
39 | + $group_properties = GroupManager :: get_group_properties($group_id); |
|
40 | 40 | $show_work = false; |
41 | 41 | |
42 | 42 | if (api_is_allowed_to_edit(false, true)) { |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | |
72 | 72 | echo '<div class="actions">'; |
73 | 73 | echo '<a href="'.api_get_path(WEB_CODE_PATH).'work/work.php?'.api_get_cidreq().'>'. |
74 | - Display::return_icon('back.png', get_lang('BackToWorksList'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
74 | + Display::return_icon('back.png', get_lang('BackToWorksList'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
75 | 75 | echo '</div>'; |
76 | 76 | |
77 | 77 | if (!empty($my_folder_data['description'])) { |
@@ -93,27 +93,27 @@ discard block |
||
93 | 93 | get_lang('Actions') |
94 | 94 | ); |
95 | 95 | $column_model = array( |
96 | - array('name'=>'type', 'index'=>'file', 'width'=>'12', 'align'=>'left', 'search' => 'false', 'sortable' => 'false'), |
|
97 | - array('name'=>'firstname', 'index'=>'firstname', 'width'=>'35', 'align'=>'left', 'search' => 'true'), |
|
98 | - array('name'=>'lastname', 'index'=>'lastname', 'width'=>'35', 'align'=>'left', 'search' => 'true'), |
|
99 | - array('name'=>'title', 'index'=>'title', 'width'=>'40', 'align'=>'left', 'search' => 'false', 'wrap_cell' => 'true'), |
|
100 | - array('name'=>'qualification', 'index'=>'qualification', 'width'=>'20', 'align'=>'left', 'search' => 'true'), |
|
101 | - array('name'=>'sent_date', 'index'=>'sent_date', 'width'=>'50', 'align'=>'left', 'search' => 'true', 'wrap_cell' => 'true'), |
|
102 | - array('name'=>'qualificator_id','index'=>'qualificator_id', 'width'=>'30', 'align'=>'left', 'search' => 'true'), |
|
103 | - array('name'=>'actions', 'index'=>'actions', 'width'=>'40', 'align'=>'left', 'search' => 'false', 'sortable'=>'false') |
|
96 | + array('name'=>'type', 'index'=>'file', 'width'=>'12', 'align'=>'left', 'search' => 'false', 'sortable' => 'false'), |
|
97 | + array('name'=>'firstname', 'index'=>'firstname', 'width'=>'35', 'align'=>'left', 'search' => 'true'), |
|
98 | + array('name'=>'lastname', 'index'=>'lastname', 'width'=>'35', 'align'=>'left', 'search' => 'true'), |
|
99 | + array('name'=>'title', 'index'=>'title', 'width'=>'40', 'align'=>'left', 'search' => 'false', 'wrap_cell' => 'true'), |
|
100 | + array('name'=>'qualification', 'index'=>'qualification', 'width'=>'20', 'align'=>'left', 'search' => 'true'), |
|
101 | + array('name'=>'sent_date', 'index'=>'sent_date', 'width'=>'50', 'align'=>'left', 'search' => 'true', 'wrap_cell' => 'true'), |
|
102 | + array('name'=>'qualificator_id', 'index'=>'qualificator_id', 'width'=>'30', 'align'=>'left', 'search' => 'true'), |
|
103 | + array('name'=>'actions', 'index'=>'actions', 'width'=>'40', 'align'=>'left', 'search' => 'false', 'sortable'=>'false') |
|
104 | 104 | ); |
105 | 105 | } else { |
106 | 106 | $type = 'complex'; |
107 | - $columns = array( |
|
108 | - get_lang('Type'), get_lang('FirstName'), get_lang('LastName'), get_lang('Title'), get_lang('Date'), get_lang('Actions') |
|
107 | + $columns = array( |
|
108 | + get_lang('Type'), get_lang('FirstName'), get_lang('LastName'), get_lang('Title'), get_lang('Date'), get_lang('Actions') |
|
109 | 109 | ); |
110 | 110 | $column_model = array( |
111 | - array('name'=>'type', 'index'=>'file', 'width'=>'12', 'align'=>'left', 'search' => 'false', 'sortable' => 'false'), |
|
112 | - array('name'=>'firstname', 'index'=>'firstname', 'width'=>'35', 'align'=>'left', 'search' => 'true'), |
|
113 | - array('name'=>'lastname', 'index'=>'lastname', 'width'=>'35', 'align'=>'left', 'search' => 'true'), |
|
114 | - array('name'=>'title', 'index'=>'title', 'width'=>'40', 'align'=>'left', 'search' => 'false', 'wrap_cell' => "true"), |
|
115 | - array('name'=>'sent_date', 'index'=>'sent_date', 'width'=>'50', 'align'=>'left', 'search' => 'true', 'wrap_cell' => 'true'), |
|
116 | - array('name'=>'actions', 'index'=>'actions', 'width'=>'40', 'align'=>'left', 'search' => 'false', 'sortable'=>'false') |
|
111 | + array('name'=>'type', 'index'=>'file', 'width'=>'12', 'align'=>'left', 'search' => 'false', 'sortable' => 'false'), |
|
112 | + array('name'=>'firstname', 'index'=>'firstname', 'width'=>'35', 'align'=>'left', 'search' => 'true'), |
|
113 | + array('name'=>'lastname', 'index'=>'lastname', 'width'=>'35', 'align'=>'left', 'search' => 'true'), |
|
114 | + array('name'=>'title', 'index'=>'title', 'width'=>'40', 'align'=>'left', 'search' => 'false', 'wrap_cell' => "true"), |
|
115 | + array('name'=>'sent_date', 'index'=>'sent_date', 'width'=>'50', 'align'=>'left', 'search' => 'true', 'wrap_cell' => 'true'), |
|
116 | + array('name'=>'actions', 'index'=>'actions', 'width'=>'40', 'align'=>'left', 'search' => 'false', 'sortable'=>'false') |
|
117 | 117 | ); |
118 | 118 | } |
119 | 119 |
@@ -215,8 +215,8 @@ discard block |
||
215 | 215 | // We are sure that the extra field exists. |
216 | 216 | foreach ($extra_fields as $extras) { |
217 | 217 | if (isset($user[$extras[1]])) { |
218 | - $key = $extras[1]; |
|
219 | - $value = $user[$extras[1]]; |
|
218 | + $key = $extras[1]; |
|
219 | + $value = $user[$extras[1]]; |
|
220 | 220 | UserManager::update_extra_field_value($user_id, $key, $value); |
221 | 221 | } |
222 | 222 | } |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | global $current_tag; |
254 | 254 | switch ($data) { |
255 | 255 | case 'Contact': |
256 | - $user = array (); |
|
256 | + $user = array(); |
|
257 | 257 | break; |
258 | 258 | default: |
259 | 259 | $current_tag = $data; |
@@ -350,7 +350,7 @@ discard block |
||
350 | 350 | |
351 | 351 | if (in_array($ext_import_file, $allowed_file_mimetype)) { |
352 | 352 | if (strcmp($file_type, 'csv') === 0 && $ext_import_file == $allowed_file_mimetype[0]) { |
353 | - $users = parse_csv_data($_FILES['import_file']['tmp_name']); |
|
353 | + $users = parse_csv_data($_FILES['import_file']['tmp_name']); |
|
354 | 354 | $errors = validate_data($users); |
355 | 355 | $error_kind_file = false; |
356 | 356 | } elseif (strcmp($file_type, 'xml') === 0 && $ext_import_file == $allowed_file_mimetype[1]) { |
@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | /* For licensing terms, see /license.txt */ |
3 | 3 | |
4 | 4 | require_once '../inc/global.inc.php'; |
5 | -$current_course_tool = TOOL_STUDENTPUBLICATION; |
|
5 | +$current_course_tool = TOOL_STUDENTPUBLICATION; |
|
6 | 6 | |
7 | 7 | require_once 'work.lib.php'; |
8 | 8 | |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | $userInfo = api_get_user_info($work['user_id']); |
53 | 53 | $interbreadcrumb[] = array('url' => $url_dir, 'name' => $my_folder_data['title']); |
54 | 54 | $interbreadcrumb[] = array('url' => '#', 'name' => $userInfo['complete_name']); |
55 | - $interbreadcrumb[] = array('url' => '#','name' => $work['title']); |
|
55 | + $interbreadcrumb[] = array('url' => '#', 'name' => $work['title']); |
|
56 | 56 | |
57 | 57 | if (($courseInfo['show_score'] == 0 && |
58 | 58 | $work['active'] == 1 && |
@@ -4,7 +4,7 @@ discard block |
||
4 | 4 | use ChamiloSession as Session; |
5 | 5 | |
6 | 6 | require_once '../inc/global.inc.php'; |
7 | -$current_course_tool = TOOL_STUDENTPUBLICATION; |
|
7 | +$current_course_tool = TOOL_STUDENTPUBLICATION; |
|
8 | 8 | |
9 | 9 | api_protect_course_script(true); |
10 | 10 | |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | $url = api_get_path(WEB_CODE_PATH).'work/upload.php?'.api_get_cidreq().'&id='.$workId.'&origin='.$origin; |
66 | 66 | $actionsRight = Display::toolbarButton(get_lang('UploadMyAssignment'), $url, 'upload', 'success'); |
67 | 67 | } |
68 | -echo Display::toolbarAction('toolbar-work', array(0 => $actionsLeft . $actionsRight)); |
|
68 | +echo Display::toolbarAction('toolbar-work', array(0 => $actionsLeft.$actionsRight)); |
|
69 | 69 | |
70 | 70 | if (!empty($my_folder_data['title'])) { |
71 | 71 | echo Display::page_subheader($my_folder_data['title']); |
@@ -117,10 +117,10 @@ discard block |
||
117 | 117 | ); |
118 | 118 | |
119 | 119 | $column_model = array( |
120 | - array('name'=>'type', 'index'=>'file', 'width'=>'5', 'align'=>'left', 'search' => 'false', 'sortable' => 'false'), |
|
121 | - array('name'=>'title', 'index'=>'title', 'width'=>'40', 'align'=>'left', 'search' => 'false', 'wrap_cell' => 'true'), |
|
120 | + array('name'=>'type', 'index'=>'file', 'width'=>'5', 'align'=>'left', 'search' => 'false', 'sortable' => 'false'), |
|
121 | + array('name'=>'title', 'index'=>'title', 'width'=>'40', 'align'=>'left', 'search' => 'false', 'wrap_cell' => 'true'), |
|
122 | 122 | array('name'=>'qualification', 'index'=>'qualification', 'width'=>'10', 'align'=>'left', 'search' => 'true'), |
123 | - array('name'=>'sent_date', 'index'=>'sent_date', 'width'=>'30', 'align'=>'left', 'search' => 'true', 'wrap_cell' => 'true'), |
|
123 | + array('name'=>'sent_date', 'index'=>'sent_date', 'width'=>'30', 'align'=>'left', 'search' => 'true', 'wrap_cell' => 'true'), |
|
124 | 124 | array('name'=>'qualificator_id', 'index'=>'qualificator_id', 'width'=>'20', 'align'=>'left', 'search' => 'true'), |
125 | 125 | array('name'=>'actions', 'index'=>'actions', 'width'=>'20', 'align'=>'left', 'search' => 'false', 'sortable'=>'false') |
126 | 126 | ); |
@@ -136,11 +136,11 @@ discard block |
||
136 | 136 | ); |
137 | 137 | |
138 | 138 | $column_model = array( |
139 | - array('name'=>'type', 'index'=>'file', 'width'=>'5', 'align'=>'left', 'search' => 'false', 'sortable' => 'false'), |
|
140 | - array('name'=>'title', 'index'=>'title', 'width'=>'60', 'align'=>'left', 'search' => 'false', 'wrap_cell' => "true"), |
|
141 | - array('name'=>'qualification', 'index'=>'qualification', 'width'=>'10', 'align'=>'left', 'search' => 'true'), |
|
139 | + array('name'=>'type', 'index'=>'file', 'width'=>'5', 'align'=>'left', 'search' => 'false', 'sortable' => 'false'), |
|
140 | + array('name'=>'title', 'index'=>'title', 'width'=>'60', 'align'=>'left', 'search' => 'false', 'wrap_cell' => "true"), |
|
141 | + array('name'=>'qualification', 'index'=>'qualification', 'width'=>'10', 'align'=>'left', 'search' => 'true'), |
|
142 | 142 | array('name'=>'sent_date', 'index'=>'sent_date', 'width'=>'30', 'align'=>'left', 'search' => 'true', 'wrap_cell' => 'true', 'sortable'=>'false'), |
143 | - array('name'=>'actions', 'index'=>'actions', 'width'=>'20', 'align'=>'left', 'search' => 'false', 'sortable'=>'false') |
|
143 | + array('name'=>'actions', 'index'=>'actions', 'width'=>'20', 'align'=>'left', 'search' => 'false', 'sortable'=>'false') |
|
144 | 144 | ); |
145 | 145 | } |
146 | 146 |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | use ChamiloSession as Session; |
9 | 9 | |
10 | 10 | require_once '../inc/global.inc.php'; |
11 | -$current_course_tool = TOOL_STUDENTPUBLICATION; |
|
11 | +$current_course_tool = TOOL_STUDENTPUBLICATION; |
|
12 | 12 | |
13 | 13 | api_protect_course_script(true); |
14 | 14 | |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | $item_id = isset($_REQUEST['item_id']) ? intval($_REQUEST['item_id']) : null; |
40 | 40 | $origin = isset($_REQUEST['origin']) ? Security::remove_XSS($_REQUEST['origin']) : ''; |
41 | 41 | $course_dir = api_get_path(SYS_COURSE_PATH).$_course['path']; |
42 | -$base_work_dir = $course_dir . '/work'; |
|
42 | +$base_work_dir = $course_dir.'/work'; |
|
43 | 43 | $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : 'list'; |
44 | 44 | |
45 | 45 | //Download folder |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | 'url' => api_get_path(WEB_CODE_PATH).'work/work.php?'.api_get_cidreq(), |
77 | 77 | 'name' => get_lang('StudentPublications'), |
78 | 78 | ); |
79 | - $url_dir = api_get_path(WEB_CODE_PATH).'work/work.php?&id=' . $work_id.'&'.api_get_cidreq(); |
|
79 | + $url_dir = api_get_path(WEB_CODE_PATH).'work/work.php?&id='.$work_id.'&'.api_get_cidreq(); |
|
80 | 80 | if (!empty($my_folder_data)) { |
81 | 81 | $interbreadcrumb[] = array('url' => $url_dir, 'name' => $my_folder_data['title']); |
82 | 82 | } |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('EditToolOptions')); |
120 | 120 | } |
121 | 121 | if ($action == 'create_dir') { |
122 | - $interbreadcrumb[] = array('url' => '#','name' => get_lang('CreateAssignment')); |
|
122 | + $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('CreateAssignment')); |
|
123 | 123 | } |
124 | 124 | } |
125 | 125 | } |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | $form = new FormValidator( |
171 | 171 | 'form1', |
172 | 172 | 'post', |
173 | - api_get_path(WEB_CODE_PATH) . 'work/work.php?action=create_dir&' . api_get_cidreq() |
|
173 | + api_get_path(WEB_CODE_PATH).'work/work.php?action=create_dir&'.api_get_cidreq() |
|
174 | 174 | ); |
175 | 175 | $form->addElement('header', get_lang('CreateAssignment')); |
176 | 176 | $form->addElement('hidden', 'action', 'add'); |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | $result = deleteDirWork($_REQUEST['id']); |
208 | 208 | if ($result) { |
209 | 209 | $message = Display::return_message( |
210 | - get_lang('DirDeleted') . ': ' . $work_to_delete['title'], |
|
210 | + get_lang('DirDeleted').': '.$work_to_delete['title'], |
|
211 | 211 | 'success' |
212 | 212 | ); |
213 | 213 | Session::write('message', $message); |
@@ -235,19 +235,19 @@ discard block |
||
235 | 235 | if ($is_allowed_to_edit) { |
236 | 236 | $move_to_path = get_work_path($_REQUEST['move_to_id']); |
237 | 237 | |
238 | - if ($move_to_path==-1) { |
|
238 | + if ($move_to_path == -1) { |
|
239 | 239 | $move_to_path = '/'; |
240 | 240 | } elseif (substr($move_to_path, -1, 1) != '/') { |
241 | - $move_to_path = $move_to_path .'/'; |
|
241 | + $move_to_path = $move_to_path.'/'; |
|
242 | 242 | } |
243 | 243 | |
244 | 244 | // Security fix: make sure they can't move files that are not in the document table |
245 | 245 | if ($path = get_work_path($item_id)) { |
246 | - if (move($course_dir.'/'.$path, $base_work_dir . $move_to_path)) { |
|
246 | + if (move($course_dir.'/'.$path, $base_work_dir.$move_to_path)) { |
|
247 | 247 | // Update db |
248 | 248 | updateWorkUrl( |
249 | 249 | $item_id, |
250 | - 'work' . $move_to_path, |
|
250 | + 'work'.$move_to_path, |
|
251 | 251 | $_REQUEST['move_to_id'] |
252 | 252 | ); |
253 | 253 | |
@@ -345,7 +345,7 @@ discard block |
||
345 | 345 | $content .= '</div>'; |
346 | 346 | $content .= '</div>'; |
347 | 347 | $content .= '<div id="student-list-work" style="display: none" class="table-responsive">'; |
348 | - $content .= '<div class="toolbar"><a id="closed-view-list" href="#"><em class="fa fa-times-circle"></em> ' .get_lang('Close'). '</a></div>'; |
|
348 | + $content .= '<div class="toolbar"><a id="closed-view-list" href="#"><em class="fa fa-times-circle"></em> '.get_lang('Close').'</a></div>'; |
|
349 | 349 | $content .= showStudentList($work_id); |
350 | 350 | $content .= '</div>'; |
351 | 351 | } else { |
@@ -4,7 +4,7 @@ discard block |
||
4 | 4 | use ChamiloSession as Session; |
5 | 5 | |
6 | 6 | require_once '../inc/global.inc.php'; |
7 | -$current_course_tool = TOOL_STUDENTPUBLICATION; |
|
7 | +$current_course_tool = TOOL_STUDENTPUBLICATION; |
|
8 | 8 | |
9 | 9 | api_protect_course_script(true); |
10 | 10 | |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | $token = Security::get_token(); |
51 | 51 | |
52 | 52 | $student_can_edit_in_session = api_is_allowed_to_session_edit(false, true); |
53 | -$has_ended = false; |
|
53 | +$has_ended = false; |
|
54 | 54 | $is_author = false; |
55 | 55 | $work_item = get_work_data_by_id($item_id); |
56 | 56 | |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | $form->setDefaults($defaults); |
221 | 221 | $error_message = null; |
222 | 222 | $_course = api_get_course_info(); |
223 | -$currentCourseRepositorySys = api_get_path(SYS_COURSE_PATH).$_course['path'] . '/'; |
|
223 | +$currentCourseRepositorySys = api_get_path(SYS_COURSE_PATH).$_course['path'].'/'; |
|
224 | 224 | |
225 | 225 | $succeed = false; |
226 | 226 | if ($form->validate()) { |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | $description = isset($_POST['description']) ? $_POST['description'] : $work_data['description']; |
242 | 242 | |
243 | 243 | $add_to_update = null; |
244 | - if ($is_allowed_to_edit && ($_POST['qualification'] !='' )) { |
|
244 | + if ($is_allowed_to_edit && ($_POST['qualification'] != '')) { |
|
245 | 245 | $add_to_update = ', qualificator_id ='."'".api_get_user_id()."', "; |
246 | 246 | $add_to_update .= ' qualification = '."'".Database::escape_string($_POST['qualification'])."',"; |
247 | 247 | $add_to_update .= ' date_of_qualification = '."'".api_get_utc_datetime()."'"; |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | 'error' |
268 | 268 | ); |
269 | 269 | } else { |
270 | - $sql = "UPDATE " . $work_table . " |
|
270 | + $sql = "UPDATE ".$work_table." |
|
271 | 271 | SET title = '".Database::escape_string($title)."', |
272 | 272 | description = '".Database::escape_string($description)."' |
273 | 273 | ".$add_to_update." |
@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | /* For licensing terms, see /license.txt */ |
3 | 3 | |
4 | 4 | require_once '../inc/global.inc.php'; |
5 | -$current_course_tool = TOOL_STUDENTPUBLICATION; |
|
5 | +$current_course_tool = TOOL_STUDENTPUBLICATION; |
|
6 | 6 | |
7 | 7 | /* Configuration settings */ |
8 | 8 | |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | $token = Security::get_token(); |
57 | 57 | |
58 | 58 | if (!empty($group_id)) { |
59 | - $group_properties = GroupManager::get_group_properties($group_id); |
|
59 | + $group_properties = GroupManager::get_group_properties($group_id); |
|
60 | 60 | $show_work = false; |
61 | 61 | |
62 | 62 | if (api_is_allowed_to_edit(false, true)) { |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | if (!empty($workId)) { |
109 | 109 | if (empty($_GET['list']) or Security::remove_XSS($_GET['list']) == 'with') { |
110 | 110 | $output .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&id='.$workId.'&list=without">'. |
111 | - Display::return_icon('exercice_uncheck.png', get_lang('ViewUsersWithoutTask'),'',ICON_SIZE_MEDIUM)."</a>"; |
|
111 | + Display::return_icon('exercice_uncheck.png', get_lang('ViewUsersWithoutTask'), '', ICON_SIZE_MEDIUM)."</a>"; |
|
112 | 112 | } else { |
113 | 113 | if (!isset($_GET['action']) || (isset($_GET['action']) && $_GET['action'] != 'send_mail')) { |
114 | 114 | $output .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&id='.$workId.'&list=without&action=send_mail&sec_token='.$token.'">'. |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | |
42 | 42 | // STEP 2: at least one file has to be selected. If not we return an error message |
43 | 43 | $ids = isset($_GET['id']) ? $_GET['id'] : array(); |
44 | - if (count($ids)>0) { |
|
44 | + if (count($ids) > 0) { |
|
45 | 45 | $checked_file_ids = $_POST['id']; |
46 | 46 | } else { |
47 | 47 | foreach ($_POST as $key => $value) { |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | } |
134 | 134 | |
135 | 135 | $cat = get_dropbox_category($id); |
136 | - if (count($cat)==0) { |
|
136 | + if (count($cat) == 0) { |
|
137 | 137 | return false; |
138 | 138 | } |
139 | 139 | |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | WHERE c_id = $course_id AND cat_id='".intval($id)."'"; |
167 | 167 | $result = Database::query($sql); |
168 | 168 | |
169 | - while($row = Database::fetch_array($result)) { |
|
169 | + while ($row = Database::fetch_array($result)) { |
|
170 | 170 | $dropboxfile = new Dropbox_Person($user_id, $is_courseAdmin, $is_courseTutor); |
171 | 171 | if ($action == 'deletereceivedcategory') { |
172 | 172 | $dropboxfile->deleteReceivedWork($row[$id_field]); |
@@ -657,7 +657,7 @@ discard block |
||
657 | 657 | |
658 | 658 | $full_name = $userInfo['complete_name'].$groupNameListToString; |
659 | 659 | $current_user_id = $current_user['user_id']; |
660 | - $options['user_' . $current_user_id] = $full_name; |
|
660 | + $options['user_'.$current_user_id] = $full_name; |
|
661 | 661 | } |
662 | 662 | } |
663 | 663 | } |
@@ -706,11 +706,11 @@ discard block |
||
706 | 706 | |
707 | 707 | $mailingId = $id - dropbox_cnf('mailingIdBase'); |
708 | 708 | if ($mailingId > 0) { |
709 | - return get_lang('MailingAsUsername', '') . $mailingId; |
|
709 | + return get_lang('MailingAsUsername', '').$mailingId; |
|
710 | 710 | } |
711 | 711 | $id = intval($id); |
712 | 712 | $sql = "SELECT ".(api_is_western_name_order() ? "CONCAT(firstname,' ', lastname)" : "CONCAT(lastname,' ', firstname)")." AS name |
713 | - FROM " . $dropbox_cnf['tbl_user'] . " |
|
713 | + FROM " . $dropbox_cnf['tbl_user']." |
|
714 | 714 | WHERE user_id='$id'"; |
715 | 715 | $result = Database::query($sql); |
716 | 716 | $res = Database::fetch_array($result); |
@@ -730,7 +730,7 @@ discard block |
||
730 | 730 | { |
731 | 731 | $id = intval($id); |
732 | 732 | $sql = "SELECT username |
733 | - FROM " . dropbox_cnf('tbl_user') . " |
|
733 | + FROM " . dropbox_cnf('tbl_user')." |
|
734 | 734 | WHERE user_id='$id'"; |
735 | 735 | $result = Database::query($sql); |
736 | 736 | $res = Database::fetch_array($result); |
@@ -762,8 +762,8 @@ discard block |
||
762 | 762 | |
763 | 763 | // select all files that aren't referenced anymore |
764 | 764 | $sql = "SELECT DISTINCT f.id, f.filename |
765 | - FROM " . dropbox_cnf('tbl_file') . " f |
|
766 | - LEFT JOIN " . dropbox_cnf('tbl_person') . " p |
|
765 | + FROM " . dropbox_cnf('tbl_file')." f |
|
766 | + LEFT JOIN " . dropbox_cnf('tbl_person')." p |
|
767 | 767 | ON (f.id = p.file_id) |
768 | 768 | WHERE p.user_id IS NULL AND |
769 | 769 | f.c_id = $course_id |
@@ -771,14 +771,14 @@ discard block |
||
771 | 771 | $result = Database::query($sql); |
772 | 772 | while ($res = Database::fetch_array($result)) { |
773 | 773 | //delete the selected files from the post and file tables |
774 | - $sql = "DELETE FROM " . dropbox_cnf('tbl_post') . " |
|
775 | - WHERE c_id = $course_id AND file_id = '" . $res['id'] . "'"; |
|
774 | + $sql = "DELETE FROM ".dropbox_cnf('tbl_post')." |
|
775 | + WHERE c_id = $course_id AND file_id = '".$res['id']."'"; |
|
776 | 776 | Database::query($sql); |
777 | - $sql = "DELETE FROM " . dropbox_cnf('tbl_file') . " |
|
778 | - WHERE c_id = $course_id AND id ='" . $res['id'] . "'"; |
|
777 | + $sql = "DELETE FROM ".dropbox_cnf('tbl_file')." |
|
778 | + WHERE c_id = $course_id AND id ='".$res['id']."'"; |
|
779 | 779 | Database::query($sql); |
780 | 780 | //delete file from server |
781 | - @unlink( dropbox_cnf('sysPath') . '/' . $res['filename']); |
|
781 | + @unlink(dropbox_cnf('sysPath').'/'.$res['filename']); |
|
782 | 782 | } |
783 | 783 | } |
784 | 784 | |
@@ -801,11 +801,11 @@ discard block |
||
801 | 801 | |
802 | 802 | $mailingPseudoId = intval($mailingPseudoId); |
803 | 803 | $sql = "SELECT f.uploader_id |
804 | - FROM " . $dropbox_cnf['tbl_file'] . " f |
|
805 | - LEFT JOIN " . $dropbox_cnf['tbl_post'] . " p |
|
804 | + FROM " . $dropbox_cnf['tbl_file']." f |
|
805 | + LEFT JOIN " . $dropbox_cnf['tbl_post']." p |
|
806 | 806 | ON (f.id = p.file_id AND f.c_id = $course_id AND p.c_id = $course_id) |
807 | 807 | WHERE |
808 | - p.dest_user_id = '" . $mailingPseudoId . "' AND |
|
808 | + p.dest_user_id = '".$mailingPseudoId."' AND |
|
809 | 809 | p.c_id = $course_id |
810 | 810 | "; |
811 | 811 | $result = Database::query($sql); |
@@ -832,20 +832,20 @@ discard block |
||
832 | 832 | // for all content files, replace mailingPseudoId by owner as uploader |
833 | 833 | $file_id = intval($file_id); |
834 | 834 | $sql = "SELECT p.dest_user_id |
835 | - FROM " . $dropbox_cnf['tbl_post'] . " p |
|
836 | - WHERE c_id = $course_id AND p.file_id = '" . $file_id . "'"; |
|
835 | + FROM " . $dropbox_cnf['tbl_post']." p |
|
836 | + WHERE c_id = $course_id AND p.file_id = '".$file_id."'"; |
|
837 | 837 | $result = Database::query($sql); |
838 | 838 | |
839 | 839 | if ($res = Database::fetch_array($result)) { |
840 | 840 | $mailingPseudoId = $res['dest_user_id']; |
841 | 841 | if ($mailingPseudoId > dropbox_cnf('mailingIdBase')) { |
842 | - $sql = "DELETE FROM " . dropbox_cnf('tbl_person') . " |
|
843 | - WHERE c_id = $course_id AND user_id='" . $mailingPseudoId . "'"; |
|
842 | + $sql = "DELETE FROM ".dropbox_cnf('tbl_person')." |
|
843 | + WHERE c_id = $course_id AND user_id='".$mailingPseudoId."'"; |
|
844 | 844 | Database::query($sql); |
845 | 845 | |
846 | - $sql = "UPDATE " . dropbox_cnf('tbl_file') ." |
|
847 | - SET uploader_id='" . api_get_user_id() . "' |
|
848 | - WHERE c_id = $course_id AND uploader_id='" . $mailingPseudoId . "'"; |
|
846 | + $sql = "UPDATE ".dropbox_cnf('tbl_file')." |
|
847 | + SET uploader_id='" . api_get_user_id()."' |
|
848 | + WHERE c_id = $course_id AND uploader_id='".$mailingPseudoId."'"; |
|
849 | 849 | Database::query($sql); |
850 | 850 | } |
851 | 851 | } |
@@ -984,7 +984,7 @@ discard block |
||
984 | 984 | } |
985 | 985 | } |
986 | 986 | } else { // rename file to login_filename_uniqueId format |
987 | - $dropbox_filename = getLoginFromId($_user['user_id']) . "_" . $dropbox_filename . "_".uniqid(''); |
|
987 | + $dropbox_filename = getLoginFromId($_user['user_id'])."_".$dropbox_filename."_".uniqid(''); |
|
988 | 988 | } |
989 | 989 | |
990 | 990 | // creating the array that contains all the users who will receive the file |
@@ -1002,7 +1002,7 @@ discard block |
||
1002 | 1002 | } |
1003 | 1003 | } |
1004 | 1004 | |
1005 | - @move_uploaded_file($dropbox_filetmpname, dropbox_cnf('sysPath') . '/' . $dropbox_filename); |
|
1005 | + @move_uploaded_file($dropbox_filetmpname, dropbox_cnf('sysPath').'/'.$dropbox_filename); |
|
1006 | 1006 | |
1007 | 1007 | $b_send_mail = api_get_course_setting('email_alert_on_new_doc_dropbox'); |
1008 | 1008 | |
@@ -1023,14 +1023,14 @@ discard block |
||
1023 | 1023 | ), |
1024 | 1024 | $recipent_temp['email'], |
1025 | 1025 | get_lang('NewDropboxFileUploaded'), |
1026 | - get_lang('NewDropboxFileUploadedContent').' <a href="'.api_get_path(WEB_CODE_PATH).'dropbox/index.php?' . api_get_cidreq() . '">'.get_lang('SeeFile').'</a>'. |
|
1026 | + get_lang('NewDropboxFileUploadedContent').' <a href="'.api_get_path(WEB_CODE_PATH).'dropbox/index.php?'.api_get_cidreq().'">'.get_lang('SeeFile').'</a>'. |
|
1027 | 1027 | "\n\n". |
1028 | 1028 | api_get_person_name( |
1029 | 1029 | $_user['firstName'], |
1030 | 1030 | $_user['lastName'], |
1031 | 1031 | null, |
1032 | 1032 | PERSON_NAME_EMAIL_ADDRESS |
1033 | - )."\n". get_lang('Email') ." : ".$_user['mail'], |
|
1033 | + )."\n".get_lang('Email')." : ".$_user['mail'], |
|
1034 | 1034 | api_get_person_name( |
1035 | 1035 | $_user['firstName'], |
1036 | 1036 | $_user['lastName'], |
@@ -1308,7 +1308,7 @@ discard block |
||
1308 | 1308 | // Adding the content. |
1309 | 1309 | $return .= "\n<tr>"; |
1310 | 1310 | foreach ($column as $column_key => $column_value) { |
1311 | - if (!in_array($column_value,$dont_show_columns)) { |
|
1311 | + if (!in_array($column_value, $dont_show_columns)) { |
|
1312 | 1312 | $return .= "\n\t<td>"; |
1313 | 1313 | if (in_array($column_value, $make_link)) { |
1314 | 1314 | $return .= '<a href="'.$value[$column_value].'">'.$value[$column_value].'</a>'; |
@@ -1341,7 +1341,7 @@ discard block |
||
1341 | 1341 | WHERE c_id = $course_id GROUP BY file_id"; |
1342 | 1342 | $result = Database::query($sql); |
1343 | 1343 | $return = array(); |
1344 | - while ($row=Database::fetch_array($result)) { |
|
1344 | + while ($row = Database::fetch_array($result)) { |
|
1345 | 1345 | $return[$row['file_id']] = $row['total']; |
1346 | 1346 | } |
1347 | 1347 | return $return; |