@@ -11,8 +11,8 @@ discard block |
||
11 | 11 | $action = $_GET['a']; |
12 | 12 | $page = intval($_REQUEST['page']); //page |
13 | 13 | $limit = intval($_REQUEST['rows']); //quantity of rows |
14 | -$sidx = $_REQUEST['sidx']; //index (field) to filter |
|
15 | -$sord = $_REQUEST['sord']; //asc or desc |
|
14 | +$sidx = $_REQUEST['sidx']; //index (field) to filter |
|
15 | +$sord = $_REQUEST['sord']; //asc or desc |
|
16 | 16 | |
17 | 17 | if (strpos(strtolower($sidx), 'asc') !== false) { |
18 | 18 | $sidx = str_replace(array('asc', ','), '', $sidx); |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | $sord = 'desc'; |
25 | 25 | } |
26 | 26 | |
27 | -if (!in_array($sord, array('asc','desc'))) { |
|
27 | +if (!in_array($sord, array('asc', 'desc'))) { |
|
28 | 28 | $sord = 'desc'; |
29 | 29 | } |
30 | 30 | |
@@ -64,19 +64,19 @@ discard block |
||
64 | 64 | function getWhereClause($col, $oper, $val) |
65 | 65 | { |
66 | 66 | $ops = array( |
67 | - 'eq' => '=', //equal |
|
68 | - 'ne' => '<>', //not equal |
|
69 | - 'lt' => '<', //less than |
|
70 | - 'le' => '<=', //less than or equal |
|
71 | - 'gt' => '>', //greater than |
|
72 | - 'ge' => '>=', //greater than or equal |
|
73 | - 'bw' => 'LIKE', //begins with |
|
67 | + 'eq' => '=', //equal |
|
68 | + 'ne' => '<>', //not equal |
|
69 | + 'lt' => '<', //less than |
|
70 | + 'le' => '<=', //less than or equal |
|
71 | + 'gt' => '>', //greater than |
|
72 | + 'ge' => '>=', //greater than or equal |
|
73 | + 'bw' => 'LIKE', //begins with |
|
74 | 74 | 'bn' => 'NOT LIKE', //doesn't begin with |
75 | - 'in' => 'LIKE', //is in |
|
75 | + 'in' => 'LIKE', //is in |
|
76 | 76 | 'ni' => 'NOT LIKE', //is not in |
77 | - 'ew' => 'LIKE', //ends with |
|
77 | + 'ew' => 'LIKE', //ends with |
|
78 | 78 | 'en' => 'NOT LIKE', //doesn't end with |
79 | - 'cn' => 'LIKE', //contains |
|
79 | + 'cn' => 'LIKE', //contains |
|
80 | 80 | 'nc' => 'NOT LIKE' //doesn't contain |
81 | 81 | ); |
82 | 82 | |
@@ -100,10 +100,10 @@ discard block |
||
100 | 100 | |
101 | 101 | // If there is no search request sent by jqgrid, $where should be empty |
102 | 102 | $whereCondition = null; |
103 | -$operation = isset($_REQUEST['oper']) ? $_REQUEST['oper'] : false; |
|
104 | -$exportFormat = isset($_REQUEST['export_format']) ? $_REQUEST['export_format'] : 'csv'; |
|
105 | -$searchField = isset($_REQUEST['searchField']) ? $_REQUEST['searchField'] : false; |
|
106 | -$searchOperator = isset($_REQUEST['searchOper']) ? $_REQUEST['searchOper'] : false; |
|
103 | +$operation = isset($_REQUEST['oper']) ? $_REQUEST['oper'] : false; |
|
104 | +$exportFormat = isset($_REQUEST['export_format']) ? $_REQUEST['export_format'] : 'csv'; |
|
105 | +$searchField = isset($_REQUEST['searchField']) ? $_REQUEST['searchField'] : false; |
|
106 | +$searchOperator = isset($_REQUEST['searchOper']) ? $_REQUEST['searchOper'] : false; |
|
107 | 107 | $searchString = isset($_REQUEST['searchString']) ? $_REQUEST['searchString'] : false; |
108 | 108 | $search = isset($_REQUEST['_search']) ? $_REQUEST['_search'] : false; |
109 | 109 | $forceSearch = isset($_REQUEST['_force_search']) ? $_REQUEST['_force_search'] : false; |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | foreach ($filters->rules as $key => $rule) { |
168 | 168 | $whereCondition .= getWhereClause($rule->field, $rule->op, $rule->data); |
169 | 169 | |
170 | - if ($counter < count($filters->rules) -1) { |
|
170 | + if ($counter < count($filters->rules) - 1) { |
|
171 | 171 | $whereCondition .= $filters->groupOp; |
172 | 172 | } |
173 | 173 | $counter++; |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | |
202 | 202 | $sessionId = isset($_GET['session_id']) ? intval($_GET['session_id']) : 0; |
203 | 203 | $courseCodeList = array(); |
204 | - $userIdList = array(); |
|
204 | + $userIdList = array(); |
|
205 | 205 | $sessionIdList = []; |
206 | 206 | $searchByGroups = false; |
207 | 207 | if (api_is_drh()) { |
@@ -554,7 +554,7 @@ discard block |
||
554 | 554 | $total_pages = 0; |
555 | 555 | if ($count > 0) { |
556 | 556 | if (!empty($limit)) { |
557 | - $total_pages = ceil((float)$count/(float)$limit); |
|
557 | + $total_pages = ceil((float) $count / (float) $limit); |
|
558 | 558 | } |
559 | 559 | } |
560 | 560 | if ($page > $total_pages) { |
@@ -806,7 +806,7 @@ discard block |
||
806 | 806 | $result = getWorkListStudent($start, $limit, $sidx, $sord, $whereCondition); |
807 | 807 | break; |
808 | 808 | case 'get_work_user_list_all': |
809 | - if (isset($_GET['type']) && $_GET['type'] == 'simple') { |
|
809 | + if (isset($_GET['type']) && $_GET['type'] == 'simple') { |
|
810 | 810 | $columns = array( |
811 | 811 | //'type', |
812 | 812 | 'firstname', |
@@ -833,18 +833,18 @@ discard block |
||
833 | 833 | $result = get_work_user_list($start, $limit, $sidx, $sord, $work_id, $whereCondition); |
834 | 834 | break; |
835 | 835 | case 'get_work_user_list_others': |
836 | - if (isset($_GET['type']) && $_GET['type'] == 'simple') { |
|
836 | + if (isset($_GET['type']) && $_GET['type'] == 'simple') { |
|
837 | 837 | $columns = array( |
838 | - 'type', 'firstname', 'lastname', 'title', 'qualification', 'sent_date', 'qualificator_id', 'actions' |
|
838 | + 'type', 'firstname', 'lastname', 'title', 'qualification', 'sent_date', 'qualificator_id', 'actions' |
|
839 | 839 | ); |
840 | 840 | } else { |
841 | - $columns = array('type', 'firstname', 'lastname', 'title', 'sent_date', 'actions'); |
|
841 | + $columns = array('type', 'firstname', 'lastname', 'title', 'sent_date', 'actions'); |
|
842 | 842 | } |
843 | 843 | $whereCondition .= " AND u.user_id <> ".api_get_user_id(); |
844 | 844 | $result = get_work_user_list($start, $limit, $sidx, $sord, $work_id, $whereCondition); |
845 | 845 | break; |
846 | 846 | case 'get_work_user_list': |
847 | - if (isset($_GET['type']) && $_GET['type'] == 'simple') { |
|
847 | + if (isset($_GET['type']) && $_GET['type'] == 'simple') { |
|
848 | 848 | $columns = array( |
849 | 849 | 'type', 'title', 'qualification', 'sent_date', 'qualificator_id', 'actions' |
850 | 850 | ); |
@@ -872,10 +872,10 @@ discard block |
||
872 | 872 | case 'get_exercise_results': |
873 | 873 | $course = api_get_course_info(); |
874 | 874 | // Used inside ExerciseLib::get_exam_results_data() |
875 | - $documentPath = api_get_path(SYS_COURSE_PATH) . $course['path'] . "/document"; |
|
875 | + $documentPath = api_get_path(SYS_COURSE_PATH).$course['path']."/document"; |
|
876 | 876 | if ($is_allowedToEdit || api_is_student_boss()) { |
877 | 877 | $columns = array( |
878 | - 'firstname', 'lastname', 'username', 'group_name', 'exe_duration', 'start_date', 'exe_date', 'score', 'user_ip', 'status', 'lp', 'actions' |
|
878 | + 'firstname', 'lastname', 'username', 'group_name', 'exe_duration', 'start_date', 'exe_date', 'score', 'user_ip', 'status', 'lp', 'actions' |
|
879 | 879 | ); |
880 | 880 | $officialCodeInList = api_get_setting('show_official_code_exercise_result_list'); |
881 | 881 | if ($officialCodeInList === 'true') { |
@@ -886,11 +886,11 @@ discard block |
||
886 | 886 | break; |
887 | 887 | case 'get_hotpotatoes_exercise_results': |
888 | 888 | $course = api_get_course_info(); |
889 | - $documentPath = api_get_path(SYS_COURSE_PATH) . $course['path'] . "/document"; |
|
889 | + $documentPath = api_get_path(SYS_COURSE_PATH).$course['path']."/document"; |
|
890 | 890 | if (api_is_allowed_to_edit()) { |
891 | - $columns = array('firstname', 'lastname', 'username', 'group_name', 'exe_date', 'score', 'actions'); |
|
891 | + $columns = array('firstname', 'lastname', 'username', 'group_name', 'exe_date', 'score', 'actions'); |
|
892 | 892 | } else { |
893 | - $columns = array('exe_date', 'score', 'actions'); |
|
893 | + $columns = array('exe_date', 'score', 'actions'); |
|
894 | 894 | } |
895 | 895 | $result = ExerciseLib::get_exam_results_hotpotatoes_data($start, $limit, $sidx, $sord, $hotpot_path, $whereCondition); |
896 | 896 | break; |
@@ -916,12 +916,12 @@ discard block |
||
916 | 916 | break; |
917 | 917 | case 'get_hotpotatoes_exercise_results': |
918 | 918 | $course = api_get_course_info(); |
919 | - $documentPath = api_get_path(SYS_COURSE_PATH) . $course['path'] . "/document"; |
|
919 | + $documentPath = api_get_path(SYS_COURSE_PATH).$course['path']."/document"; |
|
920 | 920 | |
921 | 921 | if (api_is_allowed_to_edit(null, true) || api_is_drh()) { |
922 | - $columns = array('firstname', 'lastname', 'username', 'group_name', 'exe_date', 'score', 'actions'); |
|
922 | + $columns = array('firstname', 'lastname', 'username', 'group_name', 'exe_date', 'score', 'actions'); |
|
923 | 923 | } else { |
924 | - $columns = array('exe_date', 'score', 'actions'); |
|
924 | + $columns = array('exe_date', 'score', 'actions'); |
|
925 | 925 | } |
926 | 926 | $result = ExerciseLib::get_exam_results_hotpotatoes_data($start, $limit, $sidx, $sord, $hotpot_path, $whereCondition); |
927 | 927 | break; |
@@ -950,7 +950,7 @@ discard block |
||
950 | 950 | ); |
951 | 951 | } |
952 | 952 | |
953 | - $columns = array( |
|
953 | + $columns = array( |
|
954 | 954 | 'name', |
955 | 955 | 'date', |
956 | 956 | 'course_per_session', |
@@ -986,11 +986,11 @@ discard block |
||
986 | 986 | $detailButtons = []; |
987 | 987 | $detailButtons[] = Display::url( |
988 | 988 | Display::return_icon('works.png', get_lang('Works')), |
989 | - api_get_path(WEB_CODE_PATH) . 'mySpace/works.php' |
|
989 | + api_get_path(WEB_CODE_PATH).'mySpace/works.php' |
|
990 | 990 | ); |
991 | 991 | $detailButtons[] = Display::url( |
992 | 992 | Display::return_icon('2rightarrow.png'), |
993 | - api_get_path(WEB_CODE_PATH) . 'mySpace/course.php?session_id=' . $session['id'] |
|
993 | + api_get_path(WEB_CODE_PATH).'mySpace/course.php?session_id='.$session['id'] |
|
994 | 994 | ); |
995 | 995 | |
996 | 996 | $result[] = array( |
@@ -1306,7 +1306,7 @@ discard block |
||
1306 | 1306 | $result = $new_result; |
1307 | 1307 | break; |
1308 | 1308 | case 'get_gradebooks': |
1309 | - $columns = array('name', 'certificates','skills', 'actions', 'has_certificates'); |
|
1309 | + $columns = array('name', 'certificates', 'skills', 'actions', 'has_certificates'); |
|
1310 | 1310 | if (!in_array($sidx, $columns)) { |
1311 | 1311 | $sidx = 'name'; |
1312 | 1312 | } |
@@ -1476,7 +1476,7 @@ discard block |
||
1476 | 1476 | if (!empty($exercises[$cnt - 4]['title'])) { |
1477 | 1477 | $title = ucwords(strtolower(trim($exercises[$cnt - 4]['title']))); |
1478 | 1478 | } |
1479 | - $columns[] = 'exer' . $i; |
|
1479 | + $columns[] = 'exer'.$i; |
|
1480 | 1480 | $column_names[] = $title; |
1481 | 1481 | $i++; |
1482 | 1482 | break; |
@@ -1509,7 +1509,7 @@ discard block |
||
1509 | 1509 | $sessionInfo = SessionManager::fetch($listUserSess[$user['user_id']]['id_session']); |
1510 | 1510 | $result[$i]['session'] = $sessionInfo['name']; |
1511 | 1511 | $result[$i]['username'] = $user['username']; |
1512 | - $result[$i]['name'] = $user['lastname'] . " " . $user['firstname']; |
|
1512 | + $result[$i]['name'] = $user['lastname']." ".$user['firstname']; |
|
1513 | 1513 | $j = 1; |
1514 | 1514 | $finalScore = 0; |
1515 | 1515 | foreach ($quizIds as $quizID) { |
@@ -1517,7 +1517,7 @@ discard block |
||
1517 | 1517 | if (!empty($arrGrade [$user['user_id']][$quizID]) || $arrGrade [$user['user_id']][$quizID] == 0) { |
1518 | 1518 | $finalScore += $grade = $arrGrade [$user['user_id']][$quizID]; |
1519 | 1519 | } |
1520 | - $result[$i]['exer' . $j] = $grade; |
|
1520 | + $result[$i]['exer'.$j] = $grade; |
|
1521 | 1521 | $j++; |
1522 | 1522 | } |
1523 | 1523 | |
@@ -1689,9 +1689,9 @@ discard block |
||
1689 | 1689 | foreach ($result as $row) { |
1690 | 1690 | // if results tab give not id, set id to $i otherwise id="null" for all <tr> of the jqgrid - ref #4235 |
1691 | 1691 | if (!isset($row['id']) || isset($row['id']) && $row['id'] == '') { |
1692 | - $response->rows[$i]['id']= $i; |
|
1692 | + $response->rows[$i]['id'] = $i; |
|
1693 | 1693 | } else { |
1694 | - $response->rows[$i]['id']= $row['id']; |
|
1694 | + $response->rows[$i]['id'] = $row['id']; |
|
1695 | 1695 | } |
1696 | 1696 | $array = array(); |
1697 | 1697 | foreach ($columns as $col) { |
@@ -1701,7 +1701,7 @@ discard block |
||
1701 | 1701 | $array[] = isset($row[$col]) ? Security::remove_XSS($row[$col]) : ''; |
1702 | 1702 | } |
1703 | 1703 | } |
1704 | - $response->rows[$i]['cell']=$array; |
|
1704 | + $response->rows[$i]['cell'] = $array; |
|
1705 | 1705 | $i++; |
1706 | 1706 | } |
1707 | 1707 | } |
@@ -88,7 +88,7 @@ |
||
88 | 88 | } |
89 | 89 | |
90 | 90 | $interbreadcrumb[] = [ |
91 | - 'url' => api_get_path(WEB_CODE_PATH) . 'mySpace/index.php', |
|
91 | + 'url' => api_get_path(WEB_CODE_PATH).'mySpace/index.php', |
|
92 | 92 | 'name' => get_lang('MySpace') |
93 | 93 | ]; |
94 | 94 |