@@ -91,7 +91,7 @@ |
||
91 | 91 | $content .= '<div class="courseadminview-activity-3col"><span class="viewcaption">'.get_lang('SessionData').'</span> |
92 | 92 | <table width="100%">'; |
93 | 93 | $content .= CourseHome::show_session_data($session_id); |
94 | - $content .= '</table></div>'; |
|
94 | + $content .= '</table></div>'; |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | $content .= '<div class="Authoringview">'; |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | // Show message to confirm that a tool it to be hidden from available tools |
38 | 38 | // visibility 0,1->2 |
39 | 39 | if (!empty($_GET['askDelete'])) { |
40 | - $content .='<div id="toolhide">'.get_lang('DelLk').'<br /> |
|
40 | + $content .= '<div id="toolhide">'.get_lang('DelLk').'<br /> |
|
41 | 41 | <a href="'.api_get_self().'">'.get_lang('No').'</a> | |
42 | 42 | <a href="'.api_get_self().'?delete=yes&id='.$id.'">'.get_lang('Yes').'</a> |
43 | 43 | </div>'; |
@@ -55,14 +55,14 @@ discard block |
||
55 | 55 | |
56 | 56 | // Start of tools for CourseAdmins (teachers/tutors) |
57 | 57 | if (api_is_allowed_to_edit(null, true) && !api_is_coach()) { |
58 | - $content .= '<div class="courseadminview" style="border:0px; margin-top: 0px;padding:5px;"> |
|
58 | + $content .= '<div class="courseadminview" style="border:0px; margin-top: 0px;padding:5px;"> |
|
59 | 59 | <div class="normal-message" id="id_normal_message" style="display:none">'; |
60 | - $content .= '<img src="'.api_get_path(WEB_PATH).'main/inc/lib/javascript/indicator.gif"/> '; |
|
61 | - $content .= get_lang('PleaseStandBy'); |
|
60 | + $content .= '<img src="'.api_get_path(WEB_PATH).'main/inc/lib/javascript/indicator.gif"/> '; |
|
61 | + $content .= get_lang('PleaseStandBy'); |
|
62 | 62 | |
63 | - $content .= '</div> |
|
63 | + $content .= '</div> |
|
64 | 64 | <div class="confirmation-message" id="id_confirmation_message" style="display:none"></div></div>'; |
65 | - $content .= '<div id="activity-3col">'; |
|
65 | + $content .= '<div id="activity-3col">'; |
|
66 | 66 | |
67 | 67 | if (api_get_setting('show_session_data') == 'true' && $session_id > 0) { |
68 | 68 | $content .= '<div class="courseadminview-activity-3col"><span class="viewcaption">'.get_lang('SessionData').'</span> |
@@ -90,10 +90,10 @@ discard block |
||
90 | 90 | $content .= '<div class="courseadminview-activity-3col"><span class="viewcaption">'.get_lang('SessionData').'</span> |
91 | 91 | <table width="100%">'; |
92 | 92 | $content .= CourseHome::show_session_data($session_id); |
93 | - $content .= '</table></div>'; |
|
93 | + $content .= '</table></div>'; |
|
94 | 94 | } |
95 | 95 | |
96 | - $content .= '<div class="Authoringview">'; |
|
96 | + $content .= '<div class="Authoringview">'; |
|
97 | 97 | $my_list = CourseHome::get_tools_category(TOOL_STUDENT_VIEW); |
98 | 98 | $content .= CourseHome::show_tools_category($my_list); |
99 | 99 | $content .= '</div>'; |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | $order_tool_list = array(); |
107 | 107 | foreach ($my_list as $key => $new_tool) { |
108 | 108 | $tool_name = CourseHome::translate_tool_name($new_tool); |
109 | - $order_tool_list [$key]= $tool_name; |
|
109 | + $order_tool_list [$key] = $tool_name; |
|
110 | 110 | } |
111 | 111 | natsort($order_tool_list); |
112 | 112 | $my_temp_tool_array = array(); |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | $return_skills = array(); |
40 | 40 | foreach ($skills as $skill) { |
41 | 41 | $skill['caption'] = $skill['name']; |
42 | - $skill['value'] = $skill['id']; |
|
42 | + $skill['value'] = $skill['id']; |
|
43 | 43 | $return_skills[] = $skill; |
44 | 44 | } |
45 | 45 | echo json_encode($return_skills); |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | if (!empty($gradebooks)) { |
52 | 52 | foreach ($gradebooks as $gradebook) { |
53 | 53 | if ($gradebook['parent_id'] == 0 && !empty($gradebook['certif_min_score']) && !empty($gradebook['document_id'])) { |
54 | - $gradebook_list[] = $gradebook; |
|
54 | + $gradebook_list[] = $gradebook; |
|
55 | 55 | //$gradebook['name'] = $gradebook['name']; |
56 | 56 | //$gradebook_list[] = $gradebook; |
57 | 57 | } else { |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | $return = array(); |
68 | 68 | foreach ($gradebooks as $item) { |
69 | 69 | $item['caption'] = $item['name']; |
70 | - $item['value'] = $item['id']; |
|
70 | + $item['value'] = $item['id']; |
|
71 | 71 | $return[] = $item; |
72 | 72 | } |
73 | 73 | echo json_encode($return); |
@@ -92,13 +92,13 @@ discard block |
||
92 | 92 | } |
93 | 93 | break; |
94 | 94 | case 'get_skills_by_profile': |
95 | - $skill_rel_profile = new SkillRelProfile(); |
|
95 | + $skill_rel_profile = new SkillRelProfile(); |
|
96 | 96 | $profile_id = isset($_REQUEST['profile_id']) ? $_REQUEST['profile_id'] : null; |
97 | 97 | $skills = $skill_rel_profile->get_skills_by_profile($profile_id); |
98 | 98 | echo json_encode($skills); |
99 | 99 | break; |
100 | 100 | case 'get_saved_profiles': |
101 | - $skill_profile = new SkillProfile(); |
|
101 | + $skill_profile = new SkillProfile(); |
|
102 | 102 | $profiles = $skill_profile->get_all(); |
103 | 103 | Display::display_no_header(); |
104 | 104 | Display::$global_template->assign('profiles', $profiles); |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | $success = false; |
188 | 188 | } |
189 | 189 | |
190 | - $result = array ( |
|
190 | + $result = array( |
|
191 | 191 | 'success' => $success, |
192 | 192 | 'data' => $return |
193 | 193 | ); |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | $skills = $skill->get_direct_parents($id); |
199 | 199 | $return = array(); |
200 | 200 | foreach ($skills as $skill) { |
201 | - $return [$skill['data']['id']] = array ( |
|
201 | + $return [$skill['data']['id']] = array( |
|
202 | 202 | 'id' => $skill['data']['id'], |
203 | 203 | 'parent_id' => $skill['data']['parent_id'], |
204 | 204 | 'name' => $skill['data']['name'] |
@@ -207,8 +207,8 @@ discard block |
||
207 | 207 | echo json_encode($return); |
208 | 208 | break; |
209 | 209 | case 'profile_matches': |
210 | - $skill_rel_user = new SkillRelUser(); |
|
211 | - $skills = (!empty($_REQUEST['skill_id'])?$_REQUEST['skill_id']:array()); |
|
210 | + $skill_rel_user = new SkillRelUser(); |
|
211 | + $skills = (!empty($_REQUEST['skill_id']) ? $_REQUEST['skill_id'] : array()); |
|
212 | 212 | |
213 | 213 | $total_skills_to_search = $skills; |
214 | 214 | $users = $skill_rel_user->get_user_by_skills($skills); |
@@ -55,7 +55,7 @@ |
||
55 | 55 | //$gradebook['name'] = $gradebook['name']; |
56 | 56 | //$gradebook_list[] = $gradebook; |
57 | 57 | } else { |
58 | - // $gradebook['name'] = $gradebook_list[$gradebook['parent_id']]['name'].' > '.$gradebook['name']; |
|
58 | + // $gradebook['name'] = $gradebook_list[$gradebook['parent_id']]['name'].' > '.$gradebook['name']; |
|
59 | 59 | //$gradebook_list[] = $gradebook; |
60 | 60 | } |
61 | 61 | } |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | */ |
9 | 9 | |
10 | 10 | require_once '../global.inc.php'; |
11 | -require_once api_get_path(SYS_CODE_PATH) . 'forum/forumfunction.inc.php'; |
|
11 | +require_once api_get_path(SYS_CODE_PATH).'forum/forumfunction.inc.php'; |
|
12 | 12 | |
13 | 13 | // First, protect this script |
14 | 14 | api_protect_course_script(false); |
@@ -63,13 +63,13 @@ discard block |
||
63 | 63 | break; |
64 | 64 | } |
65 | 65 | // If pass all previous control, user can edit post |
66 | - $courseId = isset($_REQUEST['c_id'])? intval($_REQUEST['c_id']) : api_get_course_int_id(); |
|
66 | + $courseId = isset($_REQUEST['c_id']) ? intval($_REQUEST['c_id']) : api_get_course_int_id(); |
|
67 | 67 | $json['courseId'] = $courseId; |
68 | - $forumId = isset($_REQUEST['forum'])? intval($_REQUEST['forum']) : null; |
|
68 | + $forumId = isset($_REQUEST['forum']) ? intval($_REQUEST['forum']) : null; |
|
69 | 69 | $json['forum'] = $forumId; |
70 | - $threadId = isset($_REQUEST['thread'])? intval($_REQUEST['thread']) : null; |
|
70 | + $threadId = isset($_REQUEST['thread']) ? intval($_REQUEST['thread']) : null; |
|
71 | 71 | $json['thread'] = $threadId; |
72 | - $postId = isset($_REQUEST['postId'])? intval($_REQUEST['postId']) : null; |
|
72 | + $postId = isset($_REQUEST['postId']) ? intval($_REQUEST['postId']) : null; |
|
73 | 73 | $json['postId'] = $postId; |
74 | 74 | |
75 | 75 | if (!empty($courseId) && |
@@ -23,7 +23,7 @@ |
||
23 | 23 | // set URL and other appropriate options |
24 | 24 | $defaults = array( |
25 | 25 | CURLOPT_URL => $url, |
26 | - CURLOPT_FOLLOWLOCATION => true, // follow redirects accept youtube.com |
|
26 | + CURLOPT_FOLLOWLOCATION => true, // follow redirects accept youtube.com |
|
27 | 27 | CURLOPT_HEADER => 0, |
28 | 28 | CURLOPT_RETURNTRANSFER => true, |
29 | 29 | CURLOPT_TIMEOUT => 4 |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | $list_sessions = SessionManager::get_sessions_by_user($user_id, true); |
16 | 16 | if (!empty($list_sessions)) { |
17 | 17 | foreach ($list_sessions as $session_item) { |
18 | - echo $session_item['session_name'] . '<br />'; |
|
18 | + echo $session_item['session_name'].'<br />'; |
|
19 | 19 | } |
20 | 20 | } else { |
21 | 21 | echo get_lang('NoSessionsForThisUser'); |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | [ |
30 | 30 | 's.name' => [ |
31 | 31 | 'operator' => 'LIKE', |
32 | - 'value' => "%" . $_REQUEST['q'] . "%" |
|
32 | + 'value' => "%".$_REQUEST['q']."%" |
|
33 | 33 | ] |
34 | 34 | ] |
35 | 35 | ); |
@@ -4,7 +4,7 @@ discard block |
||
4 | 4 | |
5 | 5 | $action = $_GET['a']; |
6 | 6 | |
7 | -switch($action) { |
|
7 | +switch ($action) { |
|
8 | 8 | case 'load_online_user': |
9 | 9 | if (isset($_SESSION['who_is_online_counter'])) { |
10 | 10 | $_SESSION['who_is_online_counter']++; |
@@ -14,8 +14,8 @@ discard block |
||
14 | 14 | $images_to_show = 9; |
15 | 15 | |
16 | 16 | $page = intval($_REQUEST['online_page_nr']); |
17 | - $max_page = ceil(who_is_online_count()/$images_to_show); |
|
18 | - $page_rows = ($page-1)*9; |
|
17 | + $max_page = ceil(who_is_online_count() / $images_to_show); |
|
18 | + $page_rows = ($page - 1) * 9; |
|
19 | 19 | |
20 | 20 | if (!empty($max_page) && $page <= $max_page) { |
21 | 21 | if (isset($_GET['cidReq']) && strlen($_GET['cidReq']) > 0) { |
@@ -37,11 +37,11 @@ discard block |
||
37 | 37 | break; |
38 | 38 | } |
39 | 39 | $track_online_table = Database::get_main_table(TABLE_STATISTIC_TRACK_E_ONLINE); |
40 | - $tbl_my_user = Database::get_main_table(TABLE_MAIN_USER); |
|
40 | + $tbl_my_user = Database::get_main_table(TABLE_MAIN_USER); |
|
41 | 41 | $tbl_my_user_friend = Database::get_main_table(TABLE_MAIN_USER_REL_USER); |
42 | - $tbl_user = Database::get_main_table(TABLE_MAIN_USER); |
|
42 | + $tbl_user = Database::get_main_table(TABLE_MAIN_USER); |
|
43 | 43 | $tbl_access_url_rel_user = Database :: get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER); |
44 | - $search = Database::escape_string($_REQUEST['q']); |
|
44 | + $search = Database::escape_string($_REQUEST['q']); |
|
45 | 45 | |
46 | 46 | $access_url_id = api_get_multiple_access_url() == 'true' ? api_get_current_access_url_id() : 1; |
47 | 47 | $user_id = api_get_user_id(); |
@@ -49,9 +49,9 @@ discard block |
||
49 | 49 | |
50 | 50 | $likeCondition = " AND (firstname LIKE '%$search%' OR lastname LIKE '%$search%' OR email LIKE '%$search%') "; |
51 | 51 | |
52 | - if (api_get_setting('allow_social_tool')=='true' && api_get_setting('allow_message_tool') == 'true') { |
|
52 | + if (api_get_setting('allow_social_tool') == 'true' && api_get_setting('allow_message_tool') == 'true') { |
|
53 | 53 | // All users |
54 | - if (api_get_setting('allow_send_message_to_all_platform_users') == 'true' || api_is_platform_admin() ) { |
|
54 | + if (api_get_setting('allow_send_message_to_all_platform_users') == 'true' || api_is_platform_admin()) { |
|
55 | 55 | if ($access_url_id != 0) { |
56 | 56 | $sql = "SELECT DISTINCT u.user_id as id, u.firstname, u.lastname, u.email |
57 | 57 | FROM $tbl_user u LEFT JOIN $tbl_access_url_rel_user r ON u.user_id = r.user_id |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | $likeCondition"; |
98 | 98 | } |
99 | 99 | } |
100 | - } elseif (api_get_setting('allow_social_tool')=='false' && api_get_setting('allow_message_tool')=='true') { |
|
100 | + } elseif (api_get_setting('allow_social_tool') == 'false' && api_get_setting('allow_message_tool') == 'true') { |
|
101 | 101 | if (api_get_setting('allow_send_message_to_all_platform_users') == 'true') { |
102 | 102 | $sql = "SELECT DISTINCT u.user_id as id, u.firstname, u.lastname, u.email |
103 | 103 | FROM $tbl_user u LEFT JOIN $tbl_access_url_rel_user r ON u.user_id = r.user_id |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | $likeCondition "; |
109 | 109 | } else { |
110 | 110 | $time_limit = api_get_setting('time_limit_whosonline'); |
111 | - $online_time = time() - $time_limit*60; |
|
111 | + $online_time = time() - $time_limit * 60; |
|
112 | 112 | $limit_date = api_get_utc_datetime($online_time); |
113 | 113 | $sql = "SELECT SELECT DISTINCT u.user_id as id, u.firstname, u.lastname, u.email |
114 | 114 | FROM $tbl_my_user u INNER JOIN $track_online_table t |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | $likeCondition"; |
118 | 118 | } |
119 | 119 | } |
120 | - $sql .=' LIMIT 20'; |
|
120 | + $sql .= ' LIMIT 20'; |
|
121 | 121 | $result = Database::query($sql); |
122 | 122 | |
123 | 123 | $showEmail = api_get_setting('show_email_addresses'); |
@@ -50,9 +50,9 @@ discard block |
||
50 | 50 | $url = api_remove_trailing_slash(preg_replace('/https?:\/\//i', '', $urlInfo['url'])); |
51 | 51 | $cleanUrl = str_replace('/', '-', $url); |
52 | 52 | |
53 | - $newUrlDir = api_get_path(SYS_APP_PATH) . "home/$cleanUrl/admin/"; |
|
53 | + $newUrlDir = api_get_path(SYS_APP_PATH)."home/$cleanUrl/admin/"; |
|
54 | 54 | } else { |
55 | - $newUrlDir = api_get_path(SYS_APP_PATH) . "home/admin/"; |
|
55 | + $newUrlDir = api_get_path(SYS_APP_PATH)."home/admin/"; |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | if (!file_exists($newUrlDir)) { |
@@ -166,15 +166,15 @@ discard block |
||
166 | 166 | } |
167 | 167 | |
168 | 168 | if ($system_version != $version_info) { |
169 | - $output = '<br /><span style="color:red">' . get_lang('YourVersionNotUpToDate') . '. '.get_lang('LatestVersionIs').' <b>Chamilo '.$version_info.'</b>. '.get_lang('YourVersionIs').' <b>Chamilo '.$system_version. '</b>. '.str_replace('http://www.chamilo.org', '<a href="http://www.chamilo.org">http://www.chamilo.org</a>', get_lang('PleaseVisitOurWebsite')).'</span>'; |
|
169 | + $output = '<br /><span style="color:red">'.get_lang('YourVersionNotUpToDate').'. '.get_lang('LatestVersionIs').' <b>Chamilo '.$version_info.'</b>. '.get_lang('YourVersionIs').' <b>Chamilo '.$system_version.'</b>. '.str_replace('http://www.chamilo.org', '<a href="http://www.chamilo.org">http://www.chamilo.org</a>', get_lang('PleaseVisitOurWebsite')).'</span>'; |
|
170 | 170 | } else { |
171 | 171 | $output = '<br /><span style="color:green">'.get_lang('VersionUpToDate').': Chamilo '.$version_info.'</span>'; |
172 | 172 | } |
173 | 173 | } else { |
174 | - $output = '<span style="color:red">' . get_lang('ImpossibleToContactVersionServerPleaseTryAgain') . '</span>'; |
|
174 | + $output = '<span style="color:red">'.get_lang('ImpossibleToContactVersionServerPleaseTryAgain').'</span>'; |
|
175 | 175 | } |
176 | 176 | } else { |
177 | - $output = '<span style="color:red">' . get_lang('AllowurlfopenIsSetToOff') . '</span>'; |
|
177 | + $output = '<span style="color:red">'.get_lang('AllowurlfopenIsSetToOff').'</span>'; |
|
178 | 178 | } |
179 | 179 | return $output; |
180 | 180 | } |
@@ -197,17 +197,17 @@ discard block |
||
197 | 197 | $getdata_str = count($getdata) ? '?' : ''; |
198 | 198 | |
199 | 199 | foreach ($getdata as $k => $v) { |
200 | - $getdata_str .= urlencode($k) .'='. urlencode($v) . '&'; |
|
200 | + $getdata_str .= urlencode($k).'='.urlencode($v).'&'; |
|
201 | 201 | } |
202 | 202 | |
203 | 203 | $crlf = "\r\n"; |
204 | - $req = $verb .' '. $uri . $getdata_str .' HTTP/1.1' . $crlf; |
|
205 | - $req .= 'Host: '. $ip . $crlf; |
|
206 | - $req .= 'User-Agent: Mozilla/5.0 Firefox/3.6.12' . $crlf; |
|
207 | - $req .= 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' . $crlf; |
|
208 | - $req .= 'Accept-Language: en-us,en;q=0.5' . $crlf; |
|
209 | - $req .= 'Accept-Encoding: deflate' . $crlf; |
|
210 | - $req .= 'Accept-Charset: utf-8;q=0.7,*;q=0.7' . $crlf; |
|
204 | + $req = $verb.' '.$uri.$getdata_str.' HTTP/1.1'.$crlf; |
|
205 | + $req .= 'Host: '.$ip.$crlf; |
|
206 | + $req .= 'User-Agent: Mozilla/5.0 Firefox/3.6.12'.$crlf; |
|
207 | + $req .= 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'.$crlf; |
|
208 | + $req .= 'Accept-Language: en-us,en;q=0.5'.$crlf; |
|
209 | + $req .= 'Accept-Encoding: deflate'.$crlf; |
|
210 | + $req .= 'Accept-Charset: utf-8;q=0.7,*;q=0.7'.$crlf; |
|
211 | 211 | |
212 | 212 | $req .= $crlf; |
213 | 213 |
@@ -488,7 +488,7 @@ |
||
488 | 488 | $remind_list |
489 | 489 | ); |
490 | 490 | |
491 | - // Destruction of the Question object |
|
491 | + // Destruction of the Question object |
|
492 | 492 | unset($objQuestionTmp); |
493 | 493 | if ($debug) { |
494 | 494 | error_log(" -- end question -- "); |
@@ -30,10 +30,10 @@ discard block |
||
30 | 30 | $exercise_id = intval($_GET['exercise_id']); |
31 | 31 | $page = intval($_REQUEST['page']); //page |
32 | 32 | $limit = intval($_REQUEST['rows']); //quantity of rows |
33 | - $sidx = $_REQUEST['sidx']; //index to filter |
|
34 | - $sord = $_REQUEST['sord']; //asc or desc |
|
33 | + $sidx = $_REQUEST['sidx']; //index to filter |
|
34 | + $sord = $_REQUEST['sord']; //asc or desc |
|
35 | 35 | |
36 | - if (!in_array($sord, array('asc','desc'))) { |
|
36 | + if (!in_array($sord, array('asc', 'desc'))) { |
|
37 | 37 | $sord = 'desc'; |
38 | 38 | } |
39 | 39 | // get index row - i.e. user click to sort $sord = $_GET['sord']; |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | $total_pages = 0; |
63 | 63 | if ($count > 0) { |
64 | 64 | if (!empty($limit)) { |
65 | - $total_pages = ceil($count/$limit); |
|
65 | + $total_pages = ceil($count / $limit); |
|
66 | 66 | } |
67 | 67 | } |
68 | 68 | |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | $response->page = $page; |
125 | 125 | $response->total = $total_pages; |
126 | 126 | $response->records = $count; |
127 | - $i=0; |
|
127 | + $i = 0; |
|
128 | 128 | |
129 | 129 | if (!empty($results)) { |
130 | 130 | foreach ($results as $row) { |
@@ -138,22 +138,22 @@ discard block |
||
138 | 138 | GROUP by question_id |
139 | 139 | ) as count_table"; |
140 | 140 | $result_count = Database::query($sql); |
141 | - $count_questions = Database::fetch_array($result_count,'ASSOC'); |
|
141 | + $count_questions = Database::fetch_array($result_count, 'ASSOC'); |
|
142 | 142 | $count_questions = $count_questions['count_question_id']; |
143 | 143 | |
144 | 144 | $row['count_questions'] = $count_questions; |
145 | 145 | |
146 | 146 | $response->rows[$i]['id'] = $row['exe_id']; |
147 | - $remaining = strtotime($row['start_date'])+($oExe->expired_time*60) - strtotime(api_get_utc_datetime(time())); |
|
148 | - $h = floor($remaining/3600); |
|
149 | - $m = floor(($remaining - ($h*3600))/60); |
|
150 | - $s = ($remaining - ($h*3600) - ($m*60)); |
|
147 | + $remaining = strtotime($row['start_date']) + ($oExe->expired_time * 60) - strtotime(api_get_utc_datetime(time())); |
|
148 | + $h = floor($remaining / 3600); |
|
149 | + $m = floor(($remaining - ($h * 3600)) / 60); |
|
150 | + $s = ($remaining - ($h * 3600) - ($m * 60)); |
|
151 | 151 | $array = array( |
152 | 152 | $row['firstname'], |
153 | 153 | $row['lastname'], |
154 | - api_format_date($row['start_date'], DATE_TIME_FORMAT_LONG).' ['.($h>0?$h.':':'').sprintf("%02d",$m).':'.sprintf("%02d",$s).']', |
|
154 | + api_format_date($row['start_date'], DATE_TIME_FORMAT_LONG).' ['.($h > 0 ? $h.':' : '').sprintf("%02d", $m).':'.sprintf("%02d", $s).']', |
|
155 | 155 | $row['count_questions'], |
156 | - round($row['score']*100).'%' |
|
156 | + round($row['score'] * 100).'%' |
|
157 | 157 | ); |
158 | 158 | $response->rows[$i]['cell'] = $array; |
159 | 159 | $i++; |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | break; |
210 | 210 | case 'add_question_to_reminder': |
211 | 211 | /** @var Exercise $objExercise */ |
212 | - $objExercise = $_SESSION['objExercise']; |
|
212 | + $objExercise = $_SESSION['objExercise']; |
|
213 | 213 | if (empty($objExercise)) { |
214 | 214 | echo 0; |
215 | 215 | exit; |
@@ -362,8 +362,8 @@ discard block |
||
362 | 362 | $objQuestionTmp = Question::read($my_question_id, $course_id); |
363 | 363 | |
364 | 364 | // Getting free choice data. |
365 | - if ($objQuestionTmp->type == FREE_ANSWER && $type == 'all') { |
|
366 | - $my_choice = isset($_REQUEST['free_choice'][$my_question_id]) && !empty($_REQUEST['free_choice'][$my_question_id]) ? $_REQUEST['free_choice'][$my_question_id]: null; |
|
365 | + if ($objQuestionTmp->type == FREE_ANSWER && $type == 'all') { |
|
366 | + $my_choice = isset($_REQUEST['free_choice'][$my_question_id]) && !empty($_REQUEST['free_choice'][$my_question_id]) ? $_REQUEST['free_choice'][$my_question_id] : null; |
|
367 | 367 | } |
368 | 368 | |
369 | 369 | if ($type == 'all') { |
@@ -407,7 +407,7 @@ discard block |
||
407 | 407 | $session_id, |
408 | 408 | $my_question_id |
409 | 409 | ); |
410 | - if ($objQuestionTmp->type == HOT_SPOT) { |
|
410 | + if ($objQuestionTmp->type == HOT_SPOT) { |
|
411 | 411 | Event::delete_attempt_hotspot( |
412 | 412 | $exe_id, |
413 | 413 | api_get_user_id(), |