@@ -55,56 +55,56 @@ |
||
55 | 55 | } |
56 | 56 | |
57 | 57 | switch ($action) { |
58 | - case 'chatheartbeat': |
|
59 | - $chat->heartbeat(); |
|
60 | - break; |
|
61 | - case 'closechat': |
|
62 | - $chat->close(); |
|
63 | - break; |
|
64 | - case 'sendchat': |
|
65 | - $chat->send(api_get_user_id(), $to_user_id, $message); |
|
66 | - break; |
|
67 | - case 'startchatsession': |
|
68 | - $chat->startSession(); |
|
69 | - break; |
|
70 | - case 'set_status': |
|
71 | - $status = isset($_REQUEST['status']) ? intval($_REQUEST['status']) : 0; |
|
72 | - $chat->setUserStatus($status); |
|
73 | - break; |
|
74 | - case 'create_room': |
|
75 | - $room = VideoChat::getChatRoomByUsers(api_get_user_id(), $to_user_id); |
|
76 | - |
|
77 | - if ($room === false) { |
|
78 | - $createdRoom = VideoChat::createRoom(api_get_user_id(), $to_user_id); |
|
79 | - |
|
80 | - if ($createdRoom === false) { |
|
81 | - echo Display::return_message(get_lang('ChatRoomNotCreated'), 'error'); |
|
82 | - break; |
|
58 | + case 'chatheartbeat': |
|
59 | + $chat->heartbeat(); |
|
60 | + break; |
|
61 | + case 'closechat': |
|
62 | + $chat->close(); |
|
63 | + break; |
|
64 | + case 'sendchat': |
|
65 | + $chat->send(api_get_user_id(), $to_user_id, $message); |
|
66 | + break; |
|
67 | + case 'startchatsession': |
|
68 | + $chat->startSession(); |
|
69 | + break; |
|
70 | + case 'set_status': |
|
71 | + $status = isset($_REQUEST['status']) ? intval($_REQUEST['status']) : 0; |
|
72 | + $chat->setUserStatus($status); |
|
73 | + break; |
|
74 | + case 'create_room': |
|
75 | + $room = VideoChat::getChatRoomByUsers(api_get_user_id(), $to_user_id); |
|
76 | + |
|
77 | + if ($room === false) { |
|
78 | + $createdRoom = VideoChat::createRoom(api_get_user_id(), $to_user_id); |
|
79 | + |
|
80 | + if ($createdRoom === false) { |
|
81 | + echo Display::return_message(get_lang('ChatRoomNotCreated'), 'error'); |
|
82 | + break; |
|
83 | + } |
|
84 | + |
|
85 | + $room = VideoChat::getChatRoomByUsers(api_get_user_id(), $to_user_id); |
|
83 | 86 | } |
84 | 87 | |
85 | - $room = VideoChat::getChatRoomByUsers(api_get_user_id(), $to_user_id); |
|
86 | - } |
|
87 | - |
|
88 | - $videoChatUrl = api_get_path(WEB_LIBRARY_JS_PATH) . "chat/video.php?room={$room['id']}"; |
|
89 | - $videoChatLink = Display::url( |
|
90 | - Display::returnFontAwesomeIcon('video-camera') . get_lang('StartVideoChat'), |
|
91 | - $videoChatUrl |
|
92 | - ); |
|
93 | - |
|
94 | - $chat->send( |
|
95 | - api_get_user_id(), |
|
96 | - $to_user_id, |
|
97 | - $videoChatLink, |
|
98 | - false, |
|
99 | - false |
|
100 | - ); |
|
101 | - |
|
102 | - echo Display::tag('p', $videoChatLink, ['class' => 'lead']); |
|
103 | - break; |
|
104 | - case 'notify_not_support': |
|
105 | - $chat->send(api_get_user_id(), $to_user_id, get_lang('TheXUserBrowserDoesNotSupportWebRTC')); |
|
106 | - break; |
|
107 | - default: |
|
108 | - echo ''; |
|
88 | + $videoChatUrl = api_get_path(WEB_LIBRARY_JS_PATH) . "chat/video.php?room={$room['id']}"; |
|
89 | + $videoChatLink = Display::url( |
|
90 | + Display::returnFontAwesomeIcon('video-camera') . get_lang('StartVideoChat'), |
|
91 | + $videoChatUrl |
|
92 | + ); |
|
93 | + |
|
94 | + $chat->send( |
|
95 | + api_get_user_id(), |
|
96 | + $to_user_id, |
|
97 | + $videoChatLink, |
|
98 | + false, |
|
99 | + false |
|
100 | + ); |
|
101 | + |
|
102 | + echo Display::tag('p', $videoChatLink, ['class' => 'lead']); |
|
103 | + break; |
|
104 | + case 'notify_not_support': |
|
105 | + $chat->send(api_get_user_id(), $to_user_id, get_lang('TheXUserBrowserDoesNotSupportWebRTC')); |
|
106 | + break; |
|
107 | + default: |
|
108 | + echo ''; |
|
109 | 109 | } |
110 | 110 | exit; |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | * Responses to AJAX calls |
6 | 6 | */ |
7 | 7 | |
8 | -$_dont_save_user_course_access = true; |
|
8 | +$_dont_save_user_course_access = true; |
|
9 | 9 | |
10 | 10 | require_once '../global.inc.php'; |
11 | 11 | |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | } |
35 | 35 | |
36 | 36 | $to_user_id = isset($_REQUEST['to']) ? $_REQUEST['to'] : null; |
37 | -$message = isset($_REQUEST['message']) ? $_REQUEST['message'] : null; |
|
37 | +$message = isset($_REQUEST['message']) ? $_REQUEST['message'] : null; |
|
38 | 38 | |
39 | 39 | if (!isset($_SESSION['chatHistory'])) { |
40 | 40 | $_SESSION['chatHistory'] = array(); |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | } |
46 | 46 | |
47 | 47 | $chat = new Chat(); |
48 | -if (chat::disableChat()){ |
|
48 | +if (chat::disableChat()) { |
|
49 | 49 | exit; |
50 | 50 | } |
51 | 51 | if ($chat->is_chat_blocked_by_exercises()) { |
@@ -85,9 +85,9 @@ discard block |
||
85 | 85 | $room = VideoChat::getChatRoomByUsers(api_get_user_id(), $to_user_id); |
86 | 86 | } |
87 | 87 | |
88 | - $videoChatUrl = api_get_path(WEB_LIBRARY_JS_PATH) . "chat/video.php?room={$room['id']}"; |
|
88 | + $videoChatUrl = api_get_path(WEB_LIBRARY_JS_PATH)."chat/video.php?room={$room['id']}"; |
|
89 | 89 | $videoChatLink = Display::url( |
90 | - Display::returnFontAwesomeIcon('video-camera') . get_lang('StartVideoChat'), |
|
90 | + Display::returnFontAwesomeIcon('video-camera').get_lang('StartVideoChat'), |
|
91 | 91 | $videoChatUrl |
92 | 92 | ); |
93 | 93 |
@@ -58,9 +58,9 @@ |
||
58 | 58 | $db['is_empty'] = false; |
59 | 59 | $db['result'] = convert_to_string($sql_result); |
60 | 60 | $rst = get_stats($user_id, $course_code, $start_date, $end_date); |
61 | - $foo_stats = '<strong>' . get_lang('Total') . ': </strong>' . $rst['total'] . '<br />'; |
|
62 | - $foo_stats .= '<strong>' . get_lang('Average') . ': </strong>' . $rst['avg'] . '<br />'; |
|
63 | - $foo_stats .= '<strong>' . get_lang('Quantity') . ' : </strong>' . $rst['times'] . '<br />'; |
|
61 | + $foo_stats = '<strong>'.get_lang('Total').': </strong>'.$rst['total'].'<br />'; |
|
62 | + $foo_stats .= '<strong>'.get_lang('Average').': </strong>'.$rst['avg'].'<br />'; |
|
63 | + $foo_stats .= '<strong>'.get_lang('Quantity').' : </strong>'.$rst['times'].'<br />'; |
|
64 | 64 | $db['stats'] = $foo_stats; |
65 | 65 | $db['graph_result'] = grapher($sql_result, $start_date, $end_date, $type); |
66 | 66 | } else { |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | <div class="row"> |
59 | 59 | <div class="col-sm-10 col-sm-offset-2"> |
60 | 60 | <a class="btn btn-primary" id="send_message_link"> |
61 | - <em class="fa fa-envelope"></em> ' . get_lang('Send') . ' |
|
61 | + <em class="fa fa-envelope"></em> ' . get_lang('Send').' |
|
62 | 62 | </a> |
63 | 63 | </div> |
64 | 64 | </div> |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | |
113 | 113 | if (!empty($user_id)) { |
114 | 114 | $user_table = Database :: get_main_table(TABLE_MAIN_USER); |
115 | - $sql="UPDATE $user_table SET active='".$status."' WHERE user_id='".$user_id."'"; |
|
115 | + $sql = "UPDATE $user_table SET active='".$status."' WHERE user_id='".$user_id."'"; |
|
116 | 116 | $result = Database::query($sql); |
117 | 117 | |
118 | 118 | //Send and email if account is active |
@@ -122,13 +122,13 @@ discard block |
||
122 | 122 | $emailsubject = '['.api_get_setting('siteName').'] '.get_lang('YourReg').' '.api_get_setting('siteName'); |
123 | 123 | $email_admin = api_get_setting('emailAdministrator'); |
124 | 124 | $sender_name = api_get_person_name(api_get_setting('administratorName'), api_get_setting('administratorSurname'), null, PERSON_NAME_EMAIL_ADDRESS); |
125 | - $emailbody=get_lang('Dear')." ".stripslashes($recipient_name).",\n\n"; |
|
125 | + $emailbody = get_lang('Dear')." ".stripslashes($recipient_name).",\n\n"; |
|
126 | 126 | |
127 | - $emailbody.=sprintf(get_lang('YourAccountOnXHasJustBeenApprovedByOneOfOurAdministrators'), api_get_setting('siteName'))."\n"; |
|
128 | - $emailbody.=sprintf(get_lang('YouCanNowLoginAtXUsingTheLoginAndThePasswordYouHaveProvided'), api_get_path(WEB_PATH)).",\n\n"; |
|
129 | - $emailbody.=get_lang('HaveFun')."\n\n"; |
|
127 | + $emailbody .= sprintf(get_lang('YourAccountOnXHasJustBeenApprovedByOneOfOurAdministrators'), api_get_setting('siteName'))."\n"; |
|
128 | + $emailbody .= sprintf(get_lang('YouCanNowLoginAtXUsingTheLoginAndThePasswordYouHaveProvided'), api_get_path(WEB_PATH)).",\n\n"; |
|
129 | + $emailbody .= get_lang('HaveFun')."\n\n"; |
|
130 | 130 | //$emailbody.=get_lang('Problem'). "\n\n". get_lang('SignatureFormula'); |
131 | - $emailbody.=api_get_person_name(api_get_setting('administratorName'), api_get_setting('administratorSurname'))."\n". get_lang('Manager'). " ".api_get_setting('siteName')."\nT. ".api_get_setting('administratorTelephone')."\n" .get_lang('Email') ." : ".api_get_setting('emailAdministrator'); |
|
131 | + $emailbody .= api_get_person_name(api_get_setting('administratorName'), api_get_setting('administratorSurname'))."\n".get_lang('Manager')." ".api_get_setting('siteName')."\nT. ".api_get_setting('administratorTelephone')."\n".get_lang('Email')." : ".api_get_setting('emailAdministrator'); |
|
132 | 132 | |
133 | 133 | $additionalParameters = array( |
134 | 134 | 'smsType' => SmsPlugin::ACCOUNT_APPROVED_CONNECT, |
@@ -731,7 +731,7 @@ discard block |
||
731 | 731 | } |
732 | 732 | |
733 | 733 | break; |
734 | - case 'get_user_skill_ranking': |
|
734 | + case 'get_user_skill_ranking': |
|
735 | 735 | $columns = array('photo', 'firstname', 'lastname', 'skills_acquired', 'currently_learning', 'rank'); |
736 | 736 | $result = $skill->get_user_list_skill_ranking($start, $limit, $sidx, $sord, $whereCondition); |
737 | 737 | $result = msort($result, 'skills_acquired', 'asc'); |
@@ -1281,7 +1281,7 @@ discard block |
||
1281 | 1281 | |
1282 | 1282 | if (!empty($item['certif_min_score']) && !empty($item['document_id'])) { |
1283 | 1283 | $item['certificates'] = Display::return_icon('accept.png', get_lang('WithCertificate'), array(), ICON_SIZE_SMALL); |
1284 | - $item['has_certificates'] = '1'; |
|
1284 | + $item['has_certificates'] = '1'; |
|
1285 | 1285 | } else { |
1286 | 1286 | $item['certificates'] = Display::return_icon('warning.png', get_lang('NoCertificate'), array(), ICON_SIZE_SMALL); |
1287 | 1287 | $item['has_certificates'] = '0'; |
@@ -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 = ''; |
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; |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | foreach ($filters->rules as $key => $rule) { |
172 | 172 | $whereCondition .= getWhereClause($rule->field, $rule->op, $rule->data); |
173 | 173 | |
174 | - if ($counter < count($filters->rules) -1) { |
|
174 | + if ($counter < count($filters->rules) - 1) { |
|
175 | 175 | $whereCondition .= $filters->groupOp; |
176 | 176 | } |
177 | 177 | $counter++; |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | $userId = api_get_user_id(); |
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()) { |
@@ -585,7 +585,7 @@ discard block |
||
585 | 585 | $total_pages = 0; |
586 | 586 | if ($count > 0) { |
587 | 587 | if (!empty($limit)) { |
588 | - $total_pages = ceil((float)$count/(float)$limit); |
|
588 | + $total_pages = ceil((float) $count / (float) $limit); |
|
589 | 589 | } |
590 | 590 | } |
591 | 591 | if ($page > $total_pages) { |
@@ -865,10 +865,10 @@ discard block |
||
865 | 865 | case 'get_work_user_list_others': |
866 | 866 | if (isset($_GET['type']) && $_GET['type'] === 'simple') { |
867 | 867 | $columns = array( |
868 | - 'type', 'firstname', 'lastname', 'title', 'qualification', 'sent_date', 'qualificator_id', 'actions' |
|
868 | + 'type', 'firstname', 'lastname', 'title', 'qualification', 'sent_date', 'qualificator_id', 'actions' |
|
869 | 869 | ); |
870 | 870 | } else { |
871 | - $columns = array('type', 'firstname', 'lastname', 'title', 'sent_date', 'actions'); |
|
871 | + $columns = array('type', 'firstname', 'lastname', 'title', 'sent_date', 'actions'); |
|
872 | 872 | } |
873 | 873 | $whereCondition .= " AND u.user_id <> ".api_get_user_id(); |
874 | 874 | $result = get_work_user_list($start, $limit, $sidx, $sord, $work_id, $whereCondition); |
@@ -902,7 +902,7 @@ discard block |
||
902 | 902 | case 'get_exercise_results': |
903 | 903 | $course = api_get_course_info(); |
904 | 904 | // Used inside ExerciseLib::get_exam_results_data() |
905 | - $documentPath = api_get_path(SYS_COURSE_PATH) . $course['path'] . "/document"; |
|
905 | + $documentPath = api_get_path(SYS_COURSE_PATH).$course['path']."/document"; |
|
906 | 906 | if ($is_allowedToEdit || api_is_student_boss()) { |
907 | 907 | $columns = array( |
908 | 908 | 'firstname', |
@@ -927,11 +927,11 @@ discard block |
||
927 | 927 | break; |
928 | 928 | case 'get_hotpotatoes_exercise_results': |
929 | 929 | $course = api_get_course_info(); |
930 | - $documentPath = api_get_path(SYS_COURSE_PATH) . $course['path'] . "/document"; |
|
930 | + $documentPath = api_get_path(SYS_COURSE_PATH).$course['path']."/document"; |
|
931 | 931 | if (api_is_allowed_to_edit()) { |
932 | - $columns = array('firstname', 'lastname', 'username', 'group_name', 'exe_date', 'score', 'actions'); |
|
932 | + $columns = array('firstname', 'lastname', 'username', 'group_name', 'exe_date', 'score', 'actions'); |
|
933 | 933 | } else { |
934 | - $columns = array('exe_date', 'score', 'actions'); |
|
934 | + $columns = array('exe_date', 'score', 'actions'); |
|
935 | 935 | } |
936 | 936 | $result = ExerciseLib::get_exam_results_hotpotatoes_data( |
937 | 937 | $start, |
@@ -964,12 +964,12 @@ discard block |
||
964 | 964 | break; |
965 | 965 | case 'get_hotpotatoes_exercise_results': |
966 | 966 | $course = api_get_course_info(); |
967 | - $documentPath = api_get_path(SYS_COURSE_PATH) . $course['path'] . "/document"; |
|
967 | + $documentPath = api_get_path(SYS_COURSE_PATH).$course['path']."/document"; |
|
968 | 968 | |
969 | 969 | if (api_is_allowed_to_edit(null, true) || api_is_drh()) { |
970 | - $columns = array('firstname', 'lastname', 'username', 'group_name', 'exe_date', 'score', 'actions'); |
|
970 | + $columns = array('firstname', 'lastname', 'username', 'group_name', 'exe_date', 'score', 'actions'); |
|
971 | 971 | } else { |
972 | - $columns = array('exe_date', 'score', 'actions'); |
|
972 | + $columns = array('exe_date', 'score', 'actions'); |
|
973 | 973 | } |
974 | 974 | $result = ExerciseLib::get_exam_results_hotpotatoes_data( |
975 | 975 | $start, |
@@ -1005,7 +1005,7 @@ discard block |
||
1005 | 1005 | ); |
1006 | 1006 | } |
1007 | 1007 | |
1008 | - $columns = array( |
|
1008 | + $columns = array( |
|
1009 | 1009 | 'name', |
1010 | 1010 | 'date', |
1011 | 1011 | 'course_per_session', |
@@ -1041,17 +1041,17 @@ discard block |
||
1041 | 1041 | $detailButtons = []; |
1042 | 1042 | $detailButtons[] = Display::url( |
1043 | 1043 | Display::return_icon('works.png', get_lang('WorksReport')), |
1044 | - api_get_path(WEB_CODE_PATH) . 'mySpace/works_in_session_report.php?session=' . $session['id'] |
|
1044 | + api_get_path(WEB_CODE_PATH).'mySpace/works_in_session_report.php?session='.$session['id'] |
|
1045 | 1045 | ); |
1046 | 1046 | $detailButtons[] = Display::url( |
1047 | 1047 | Display::return_icon('2rightarrow.png'), |
1048 | - api_get_path(WEB_CODE_PATH) . 'mySpace/course.php?session_id=' . $session['id'] |
|
1048 | + api_get_path(WEB_CODE_PATH).'mySpace/course.php?session_id='.$session['id'] |
|
1049 | 1049 | ); |
1050 | 1050 | |
1051 | 1051 | $result[] = array( |
1052 | 1052 | 'name' => Display::url( |
1053 | 1053 | $session['name'], |
1054 | - api_get_path(WEB_CODE_PATH) . 'mySpace/course.php?session_id=' . $session['id'] |
|
1054 | + api_get_path(WEB_CODE_PATH).'mySpace/course.php?session_id='.$session['id'] |
|
1055 | 1055 | ), |
1056 | 1056 | 'date' => $session_date_string, |
1057 | 1057 | 'course_per_session' => $count_courses_in_session, |
@@ -1363,7 +1363,7 @@ discard block |
||
1363 | 1363 | $result = $new_result; |
1364 | 1364 | break; |
1365 | 1365 | case 'get_gradebooks': |
1366 | - $columns = array('name', 'certificates','skills', 'actions', 'has_certificates'); |
|
1366 | + $columns = array('name', 'certificates', 'skills', 'actions', 'has_certificates'); |
|
1367 | 1367 | if (!in_array($sidx, $columns)) { |
1368 | 1368 | $sidx = 'name'; |
1369 | 1369 | } |
@@ -1536,7 +1536,7 @@ discard block |
||
1536 | 1536 | if (!empty($exercises[$cnt - 4]['title'])) { |
1537 | 1537 | $title = ucwords(strtolower(trim($exercises[$cnt - 4]['title']))); |
1538 | 1538 | } |
1539 | - $columns[] = 'exer' . $i; |
|
1539 | + $columns[] = 'exer'.$i; |
|
1540 | 1540 | $column_names[] = $title; |
1541 | 1541 | $i++; |
1542 | 1542 | break; |
@@ -1569,7 +1569,7 @@ discard block |
||
1569 | 1569 | $sessionInfo = SessionManager::fetch($listUserSess[$user['user_id']]['id_session']); |
1570 | 1570 | $result[$i]['session'] = $sessionInfo['name']; |
1571 | 1571 | $result[$i]['username'] = $user['username']; |
1572 | - $result[$i]['name'] = $user['lastname'] . " " . $user['firstname']; |
|
1572 | + $result[$i]['name'] = $user['lastname']." ".$user['firstname']; |
|
1573 | 1573 | $j = 1; |
1574 | 1574 | $finalScore = 0; |
1575 | 1575 | foreach ($quizIds as $quizID) { |
@@ -1577,7 +1577,7 @@ discard block |
||
1577 | 1577 | if (!empty($arrGrade [$user['user_id']][$quizID]) || $arrGrade [$user['user_id']][$quizID] == 0) { |
1578 | 1578 | $finalScore += $grade = $arrGrade [$user['user_id']][$quizID]; |
1579 | 1579 | } |
1580 | - $result[$i]['exer' . $j] = $grade; |
|
1580 | + $result[$i]['exer'.$j] = $grade; |
|
1581 | 1581 | $j++; |
1582 | 1582 | } |
1583 | 1583 | |
@@ -1745,9 +1745,9 @@ discard block |
||
1745 | 1745 | foreach ($result as $row) { |
1746 | 1746 | // if results tab give not id, set id to $i otherwise id="null" for all <tr> of the jqgrid - ref #4235 |
1747 | 1747 | if (!isset($row['id']) || isset($row['id']) && $row['id'] == '') { |
1748 | - $response->rows[$i]['id']= $i; |
|
1748 | + $response->rows[$i]['id'] = $i; |
|
1749 | 1749 | } else { |
1750 | - $response->rows[$i]['id']= $row['id']; |
|
1750 | + $response->rows[$i]['id'] = $row['id']; |
|
1751 | 1751 | } |
1752 | 1752 | $array = array(); |
1753 | 1753 | foreach ($columns as $col) { |
@@ -1757,7 +1757,7 @@ discard block |
||
1757 | 1757 | $array[] = isset($row[$col]) ? Security::remove_XSS($row[$col]) : ''; |
1758 | 1758 | } |
1759 | 1759 | } |
1760 | - $response->rows[$i]['cell']=$array; |
|
1760 | + $response->rows[$i]['cell'] = $array; |
|
1761 | 1761 | $i++; |
1762 | 1762 | } |
1763 | 1763 | } |
@@ -758,7 +758,7 @@ |
||
758 | 758 | // $gidReset = true; |
759 | 759 | } // end else |
760 | 760 | |
761 | - // Now check for anonymous user mode |
|
761 | + // Now check for anonymous user mode |
|
762 | 762 | if (isset($use_anonymous) && $use_anonymous) { |
763 | 763 | //if anonymous mode is set, then try to set the current user as anonymous |
764 | 764 | //if he doesn't have a login yet |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | |
217 | 217 | // is necessary verify check |
218 | 218 | if ($legal_type == 1) { |
219 | - if ((isset($_POST['legal_accept']) && $_POST['legal_accept']=='1')) { |
|
219 | + if ((isset($_POST['legal_accept']) && $_POST['legal_accept'] == '1')) { |
|
220 | 220 | $legal_option = true; |
221 | 221 | } else { |
222 | 222 | $legal_option = false; |
@@ -504,7 +504,7 @@ discard block |
||
504 | 504 | * Process external authentication |
505 | 505 | * on the basis of the given login name |
506 | 506 | */ |
507 | - $loginFailed = true; // Default initialisation. It could |
|
507 | + $loginFailed = true; // Default initialisation. It could |
|
508 | 508 | // change after the external authentication |
509 | 509 | $key = $uData['auth_source']; //'ldap','shibboleth'... |
510 | 510 | |
@@ -549,7 +549,7 @@ discard block |
||
549 | 549 | * Process external authentication |
550 | 550 | * on the basis of the given login name |
551 | 551 | */ |
552 | - $loginFailed = true; // Default initialisation. It could |
|
552 | + $loginFailed = true; // Default initialisation. It could |
|
553 | 553 | // change after the external authentication |
554 | 554 | $key = $uData['auth_source']; //'ldap','shibboleth'... |
555 | 555 | |
@@ -560,11 +560,11 @@ discard block |
||
560 | 560 | } else { |
561 | 561 | // change after the external authentication |
562 | 562 | // login failed, Database::num_rows($result) <= 0 |
563 | - $loginFailed = true; // Default initialisation. It could |
|
563 | + $loginFailed = true; // Default initialisation. It could |
|
564 | 564 | } |
565 | 565 | |
566 | 566 | // login failed, Database::num_rows($result) <= 0 |
567 | - $loginFailed = true; // Default initialisation. It could |
|
567 | + $loginFailed = true; // Default initialisation. It could |
|
568 | 568 | // change after the external authentication |
569 | 569 | |
570 | 570 | /* |
@@ -593,7 +593,7 @@ discard block |
||
593 | 593 | include_once($thisAuthSource['newUser']); |
594 | 594 | } else { |
595 | 595 | error_log( |
596 | - 'Chamilo Authentication external file' . |
|
596 | + 'Chamilo Authentication external file'. |
|
597 | 597 | ' could not be found - this might prevent your system from using'. |
598 | 598 | ' the authentication process in the user creation process', |
599 | 599 | 0 |
@@ -705,7 +705,7 @@ discard block |
||
705 | 705 | online_logout(null, false); |
706 | 706 | $osso->logout(); //redirects and exits |
707 | 707 | } |
708 | - } elseif (api_get_setting('openid_authentication')=='true') { |
|
708 | + } elseif (api_get_setting('openid_authentication') == 'true') { |
|
709 | 709 | if (!empty($_POST['openid_url'])) { |
710 | 710 | include api_get_path(SYS_CODE_PATH).'auth/openid/login.php'; |
711 | 711 | openid_begin(trim($_POST['openid_url']), api_get_path(WEB_PATH).'index.php'); |
@@ -718,7 +718,7 @@ discard block |
||
718 | 718 | if ($res['status'] == 'success') { |
719 | 719 | $id1 = Database::escape_string($res['openid.identity']); |
720 | 720 | //have another id with or without the final '/' |
721 | - $id2 = (substr($id1, -1, 1)=='/'?substr($id1, 0, -1):$id1.'/'); |
|
721 | + $id2 = (substr($id1, -1, 1) == '/' ? substr($id1, 0, -1) : $id1.'/'); |
|
722 | 722 | //lookup the user in the main database |
723 | 723 | $user_table = Database::get_main_table(TABLE_MAIN_USER); |
724 | 724 | $sql = "SELECT user_id, username, password, auth_source, active, expiration_date |
@@ -727,14 +727,14 @@ discard block |
||
727 | 727 | OR openid = '$id2' "; |
728 | 728 | $result = Database::query($sql); |
729 | 729 | if ($result !== false) { |
730 | - if (Database::num_rows($result)>0) { |
|
730 | + if (Database::num_rows($result) > 0) { |
|
731 | 731 | $uData = Database::fetch_array($result); |
732 | 732 | |
733 | 733 | if ($uData['auth_source'] == PLATFORM_AUTH_SOURCE) { |
734 | 734 | //the authentification of this user is managed by Chamilo itself |
735 | 735 | |
736 | 736 | // check if the account is active (not locked) |
737 | - if ($uData['active']=='1') { |
|
737 | + if ($uData['active'] == '1') { |
|
738 | 738 | // check if the expiration date has not been reached |
739 | 739 | if ($uData['expiration_date'] > date('Y-m-d H:i:s') |
740 | 740 | || empty($uData['expiration_date']) |
@@ -813,7 +813,7 @@ discard block |
||
813 | 813 | (isset($_SESSION['_cid']) && $cidReq != $_SESSION['_cid'])) |
814 | 814 | ) { |
815 | 815 | $cidReset = true; |
816 | - $gidReset = true; // As groups depend from courses, group id is reset |
|
816 | + $gidReset = true; // As groups depend from courses, group id is reset |
|
817 | 817 | } |
818 | 818 | |
819 | 819 | /* USER INIT */ |
@@ -957,8 +957,8 @@ discard block |
||
957 | 957 | $tbl_session_course_user = Database::get_main_table(TABLE_MAIN_SESSION_COURSE_USER); |
958 | 958 | |
959 | 959 | if (!empty($_GET['id_session'])) { |
960 | - $sql = 'SELECT name FROM '.$tbl_session . ' |
|
961 | - WHERE id="'.intval($_GET['id_session']) . '"'; |
|
960 | + $sql = 'SELECT name FROM '.$tbl_session.' |
|
961 | + WHERE id="'.intval($_GET['id_session']).'"'; |
|
962 | 962 | $rs = Database::query($sql); |
963 | 963 | if (Database::num_rows($rs)) { |
964 | 964 | list($_SESSION['session_name']) = Database::fetch_array($rs); |
@@ -1045,7 +1045,7 @@ discard block |
||
1045 | 1045 | // Moreover, if we want to track a course with another session it can be usefull |
1046 | 1046 | if (!empty($_GET['id_session']) && is_numeric($_GET['id_session'])) { |
1047 | 1047 | $tbl_session = Database::get_main_table(TABLE_MAIN_SESSION); |
1048 | - $sql = 'SELECT name FROM '.$tbl_session . ' WHERE id="'.intval($_GET['id_session']). '"'; |
|
1048 | + $sql = 'SELECT name FROM '.$tbl_session.' WHERE id="'.intval($_GET['id_session']).'"'; |
|
1049 | 1049 | $rs = Database::query($sql); |
1050 | 1050 | if (Database::num_rows($rs)) { |
1051 | 1051 | list($_SESSION['session_name']) = Database::fetch_array($rs); |
@@ -1169,7 +1169,7 @@ discard block |
||
1169 | 1169 | } |
1170 | 1170 | } |
1171 | 1171 | $url = api_get_path(WEB_CODE_PATH).'auth/inscription.php'; |
1172 | - header("Location:". $url); |
|
1172 | + header("Location:".$url); |
|
1173 | 1173 | exit; |
1174 | 1174 | } |
1175 | 1175 | } |
@@ -1189,8 +1189,8 @@ discard block |
||
1189 | 1189 | if (Database::num_rows($result) > 0) { // this user have a recorded state for this course |
1190 | 1190 | $cuData = Database::fetch_array($result, 'ASSOC'); |
1191 | 1191 | |
1192 | - $is_courseAdmin = (bool)($cuData['status'] == 1); |
|
1193 | - $is_courseTutor = (bool)($cuData['is_tutor'] == 1); |
|
1192 | + $is_courseAdmin = (bool) ($cuData['status'] == 1); |
|
1193 | + $is_courseTutor = (bool) ($cuData['is_tutor'] == 1); |
|
1194 | 1194 | $is_courseMember = true; |
1195 | 1195 | } |
1196 | 1196 | |
@@ -1201,7 +1201,7 @@ discard block |
||
1201 | 1201 | // This user has no status related to this course |
1202 | 1202 | // The user is subscribed in a session? The user is a Session coach a Session admin ? |
1203 | 1203 | |
1204 | - $tbl_session = Database :: get_main_table(TABLE_MAIN_SESSION); |
|
1204 | + $tbl_session = Database :: get_main_table(TABLE_MAIN_SESSION); |
|
1205 | 1205 | $tbl_session_course = Database :: get_main_table(TABLE_MAIN_SESSION_COURSE); |
1206 | 1206 | $tbl_session_course_user = Database :: get_main_table(TABLE_MAIN_SESSION_COURSE_USER); |
1207 | 1207 | |
@@ -1506,12 +1506,12 @@ discard block |
||
1506 | 1506 | ($logging_in && exist_firstpage_parameter()) |
1507 | 1507 | ) { |
1508 | 1508 | $redirectCourseDir = api_get_firstpage_parameter(); |
1509 | - api_delete_firstpage_parameter(); // delete the cookie |
|
1509 | + api_delete_firstpage_parameter(); // delete the cookie |
|
1510 | 1510 | |
1511 | 1511 | if (!isset($_SESSION['request_uri'])) { |
1512 | 1512 | if (CourseManager::get_course_id_from_path($redirectCourseDir)) { |
1513 | 1513 | $_SESSION['noredirection'] = false; |
1514 | - $_SESSION['request_uri'] = api_get_path(WEB_COURSE_PATH) . $redirectCourseDir . '/'; |
|
1514 | + $_SESSION['request_uri'] = api_get_path(WEB_COURSE_PATH).$redirectCourseDir.'/'; |
|
1515 | 1515 | } |
1516 | 1516 | } |
1517 | 1517 | } elseif (api_user_is_login() && exist_firstpage_parameter()) { |
@@ -1519,7 +1519,7 @@ discard block |
||
1519 | 1519 | api_delete_firstpage_parameter(); // delete the cookie |
1520 | 1520 | if (CourseManager::get_course_id_from_path($redirectCourseDir)) { |
1521 | 1521 | $_SESSION['noredirection'] = false; |
1522 | - $_SESSION['request_uri'] = api_get_path(WEB_COURSE_PATH) . $redirectCourseDir . '/'; |
|
1522 | + $_SESSION['request_uri'] = api_get_path(WEB_COURSE_PATH).$redirectCourseDir.'/'; |
|
1523 | 1523 | } |
1524 | 1524 | } |
1525 | 1525 |
@@ -196,7 +196,7 @@ |
||
196 | 196 | * |
197 | 197 | * @return array |
198 | 198 | */ |
199 | - public function sender($key = '', $userId = '') |
|
199 | + public function sender($key = '', $userId = '') |
|
200 | 200 | { |
201 | 201 | $_user = api_get_user_info($userId); |
202 | 202 |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | */ |
36 | 36 | public static function path($name = '') |
37 | 37 | { |
38 | - return api_get_path(SYS_PATH) . 'custompages/' . $name; |
|
38 | + return api_get_path(SYS_PATH).'custompages/'.$name; |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | /** |
@@ -50,12 +50,12 @@ discard block |
||
50 | 50 | return false; |
51 | 51 | } |
52 | 52 | |
53 | - $file = self::path($page_name . '.php'); |
|
53 | + $file = self::path($page_name.'.php'); |
|
54 | 54 | if (file_exists($file)) { |
55 | 55 | include($file); |
56 | 56 | exit; |
57 | 57 | } else { |
58 | - error_log('CustomPages::displayPage : could not read file ' . $file); |
|
58 | + error_log('CustomPages::displayPage : could not read file '.$file); |
|
59 | 59 | } |
60 | 60 | } |
61 | 61 | |
@@ -69,14 +69,14 @@ discard block |
||
69 | 69 | public static function getURLImages($url_id = null) |
70 | 70 | { |
71 | 71 | if (is_null($url_id)) { |
72 | - $url = 'http://' . $_SERVER['HTTP_HOST'] . '/'; |
|
72 | + $url = 'http://'.$_SERVER['HTTP_HOST'].'/'; |
|
73 | 73 | $url_id = UrlManager::get_url_id($url); |
74 | 74 | } |
75 | - $url_images_dir = api_get_path(SYS_PATH) . 'custompages/url-images/'; |
|
75 | + $url_images_dir = api_get_path(SYS_PATH).'custompages/url-images/'; |
|
76 | 76 | $images = array(); |
77 | 77 | for ($img_id = 1; $img_id <= 3; $img_id++) { |
78 | - if (file_exists($url_images_dir . $url_id . '_url_image_' . $img_id . '.png')) { |
|
79 | - $images[] = api_get_path(WEB_PATH) . 'custompages/url-images/' . $url_id . '_url_image_' . $img_id . '.png'; |
|
78 | + if (file_exists($url_images_dir.$url_id.'_url_image_'.$img_id.'.png')) { |
|
79 | + $images[] = api_get_path(WEB_PATH).'custompages/url-images/'.$url_id.'_url_image_'.$img_id.'.png'; |
|
80 | 80 | } |
81 | 81 | } |
82 | 82 |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | self::navigate($url); |
35 | 35 | } |
36 | 36 | |
37 | - $url = self::www() . $url; |
|
37 | + $url = self::www().$url; |
|
38 | 38 | self::navigate($url); |
39 | 39 | } |
40 | 40 | |
@@ -67,25 +67,25 @@ discard block |
||
67 | 67 | case COURSEMANAGER: |
68 | 68 | $redir = api_get_setting('teacher_page_after_login'); |
69 | 69 | if (!empty($redir)) { |
70 | - self::navigate(api_get_path(WEB_PATH) . $redir); |
|
70 | + self::navigate(api_get_path(WEB_PATH).$redir); |
|
71 | 71 | } |
72 | 72 | break; |
73 | 73 | case STUDENT: |
74 | 74 | $redir = api_get_setting('student_page_after_login'); |
75 | 75 | if (!empty($redir)) { |
76 | - self::navigate(api_get_path(WEB_PATH) . $redir); |
|
76 | + self::navigate(api_get_path(WEB_PATH).$redir); |
|
77 | 77 | } |
78 | 78 | break; |
79 | 79 | case DRH: |
80 | 80 | $redir = api_get_setting('drh_page_after_login'); |
81 | 81 | if (!empty($redir)) { |
82 | - self::navigate(api_get_path(WEB_PATH) . $redir); |
|
82 | + self::navigate(api_get_path(WEB_PATH).$redir); |
|
83 | 83 | } |
84 | 84 | break; |
85 | 85 | case SESSIONADMIN: |
86 | 86 | $redir = api_get_setting('sessionadmin_page_after_login'); |
87 | 87 | if (!empty($redir)) { |
88 | - self::navigate(api_get_path(WEB_PATH) . $redir); |
|
88 | + self::navigate(api_get_path(WEB_PATH).$redir); |
|
89 | 89 | } |
90 | 90 | break; |
91 | 91 | default: |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | } |
112 | 112 | $page_after_login = api_get_setting('page_after_login'); |
113 | 113 | if (!empty($page_after_login)) { |
114 | - self::navigate(api_get_path(WEB_PATH) . $page_after_login); |
|
114 | + self::navigate(api_get_path(WEB_PATH).$page_after_login); |
|
115 | 115 | } |
116 | 116 | } |
117 | 117 | } |
@@ -720,11 +720,11 @@ discard block |
||
720 | 720 | return false; |
721 | 721 | } |
722 | 722 | |
723 | - /** |
|
724 | - * @param int $itemId |
|
725 | - * @param int $fieldId |
|
726 | - * @return array |
|
727 | - */ |
|
723 | + /** |
|
724 | + * @param int $itemId |
|
725 | + * @param int $fieldId |
|
726 | + * @return array |
|
727 | + */ |
|
728 | 728 | public function getAllValuesByItemAndField($itemId, $fieldId) |
729 | 729 | { |
730 | 730 | $fieldId = intval($fieldId); |
@@ -847,7 +847,6 @@ discard block |
||
847 | 847 | /** |
848 | 848 | * Deletes all values from an item |
849 | 849 | * @param int $itemId (session id, course id, etc) |
850 | - |
|
851 | 850 | * @assert (-1,-1) == null |
852 | 851 | */ |
853 | 852 | public function deleteValuesByItem($itemId) |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | break; |
217 | 217 | } |
218 | 218 | |
219 | - $fileName = ExtraField::FIELD_TYPE_FILE_IMAGE . "_{$params['item_id']}.png"; |
|
219 | + $fileName = ExtraField::FIELD_TYPE_FILE_IMAGE."_{$params['item_id']}.png"; |
|
220 | 220 | |
221 | 221 | if (!file_exists($fileDir)) { |
222 | 222 | mkdir($fileDir, $dirPermissions, true); |
@@ -226,15 +226,15 @@ discard block |
||
226 | 226 | |
227 | 227 | //Crop the image to adjust 16:9 ratio |
228 | 228 | $crop = new Image($value['tmp_name']); |
229 | - $crop->crop($params['extra_' . $field_variable . '_crop_result']); |
|
229 | + $crop->crop($params['extra_'.$field_variable.'_crop_result']); |
|
230 | 230 | |
231 | 231 | $imageExtraField = new Image($value['tmp_name']); |
232 | 232 | $imageExtraField->resize(400); |
233 | - $imageExtraField->send_image($fileDir . $fileName, -1, 'png'); |
|
233 | + $imageExtraField->send_image($fileDir.$fileName, -1, 'png'); |
|
234 | 234 | $newParams = array( |
235 | 235 | 'item_id' => $params['item_id'], |
236 | 236 | 'field_id' => $extraFieldInfo['id'], |
237 | - 'value' => $fileDirStored . $fileName, |
|
237 | + 'value' => $fileDirStored.$fileName, |
|
238 | 238 | 'comment' => $comment |
239 | 239 | ); |
240 | 240 | |
@@ -260,18 +260,18 @@ discard block |
||
260 | 260 | } |
261 | 261 | |
262 | 262 | $cleanedName = api_replace_dangerous_char($value['name']); |
263 | - $fileName = ExtraField::FIELD_TYPE_FILE . "_{$params['item_id']}_$cleanedName"; |
|
263 | + $fileName = ExtraField::FIELD_TYPE_FILE."_{$params['item_id']}_$cleanedName"; |
|
264 | 264 | if (!file_exists($fileDir)) { |
265 | 265 | mkdir($fileDir, $dirPermissions, true); |
266 | 266 | } |
267 | 267 | |
268 | 268 | if ($value['error'] == 0) { |
269 | - moveUploadedFile($value, $fileDir . $fileName); |
|
269 | + moveUploadedFile($value, $fileDir.$fileName); |
|
270 | 270 | |
271 | 271 | $new_params = array( |
272 | 272 | 'item_id' => $params['item_id'], |
273 | 273 | 'field_id' => $extraFieldInfo['id'], |
274 | - 'value' => $fileDirStored . $fileName |
|
274 | + 'value' => $fileDirStored.$fileName |
|
275 | 275 | ); |
276 | 276 | |
277 | 277 | if ($this->type !== 'session' && $this->type !== 'course') { |
@@ -411,7 +411,7 @@ discard block |
||
411 | 411 | */ |
412 | 412 | if (false) { |
413 | 413 | global $app; |
414 | - switch($this->type) { |
|
414 | + switch ($this->type) { |
|
415 | 415 | case 'question': |
416 | 416 | $extraFieldValue = new ChamiloLMS\Entity\QuestionFieldValues(); |
417 | 417 | $extraFieldValue->setUserId(api_get_user_id()); |
@@ -473,7 +473,7 @@ discard block |
||
473 | 473 | */ |
474 | 474 | if (false) { |
475 | 475 | global $app; |
476 | - switch($this->type) { |
|
476 | + switch ($this->type) { |
|
477 | 477 | case 'question': |
478 | 478 | $extraFieldValue = $app['orm.ems']['db_write']->getRepository('ChamiloLMS\Entity\QuestionFieldValues')->find($field_values['id']); |
479 | 479 | $extraFieldValue->setUserId(api_get_user_id()); |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | * This function is used with $extraField->addElements() |
76 | 76 | * @param array $params array for the insertion into the *_field_values table |
77 | 77 | * @param bool $showQuery |
78 | - * @return mixed false on empty params, void otherwise |
|
78 | + * @return false|null false on empty params, void otherwise |
|
79 | 79 | * @assert (array()) === false |
80 | 80 | */ |
81 | 81 | public function saveFieldValues($params, $showQuery = false) |
@@ -531,7 +531,7 @@ discard block |
||
531 | 531 | * @param int $item_id Item ID (It could be a session_id, course_id or user_id) |
532 | 532 | * @param int $field_id Field ID (the ID from the *_field table) |
533 | 533 | * @param bool $transform Whether to transform the result to a human readable strings |
534 | - * @return mixed A structured array with the field_id and field_value, or false on error |
|
534 | + * @return string A structured array with the field_id and field_value, or false on error |
|
535 | 535 | * @assert (-1,-1) === false |
536 | 536 | */ |
537 | 537 | public function get_values_by_handler_and_field_id($item_id, $field_id, $transform = false) |
@@ -624,7 +624,7 @@ discard block |
||
624 | 624 | * @param int $item_id Item ID from the original table |
625 | 625 | * @param string $field_variable The name of the field we are looking for |
626 | 626 | * @param bool $transform |
627 | - * @param bool $allVisibility |
|
627 | + * @param bool $visibility |
|
628 | 628 | * |
629 | 629 | * @return mixed Array of results, or false on error or not found |
630 | 630 | * @assert (-1,'') === false |
@@ -686,7 +686,7 @@ discard block |
||
686 | 686 | * @param string $field_value Data we are looking for in the given field |
687 | 687 | * @param bool $transform Whether to transform the result to a human readable strings |
688 | 688 | * @param bool $last Whether to return the last element or simply the first one we get |
689 | - * @return mixed Give the ID if found, or false on failure or not found |
|
689 | + * @return string|null Give the ID if found, or false on failure or not found |
|
690 | 690 | * @assert (-1,-1) === false |
691 | 691 | */ |
692 | 692 | public function get_item_id_from_field_variable_and_field_value( |