@@ -1,4 +1,4 @@ |
||
1 | 1 | <?php |
2 | 2 | /* For licensing terms, see /license.txt */ |
3 | 3 | |
4 | -require_once __DIR__ . '/../../main/inc/global.inc.php'; |
|
4 | +require_once __DIR__.'/../../main/inc/global.inc.php'; |
@@ -8,7 +8,7 @@ |
||
8 | 8 | /** |
9 | 9 | * Initialization |
10 | 10 | */ |
11 | -require_once dirname(__FILE__) . '/config.php'; |
|
11 | +require_once dirname(__FILE__).'/config.php'; |
|
12 | 12 | if (!api_is_platform_admin()) { |
13 | 13 | die ('You must have admin permissions to install plugins'); |
14 | 14 | } |
@@ -7,7 +7,7 @@ |
||
7 | 7 | api_get_setting('cas_activate') == 'true' && |
8 | 8 | $_user['auth_source'] == CAS_AUTH_SOURCE |
9 | 9 | ) { |
10 | - $_template['show_message'] = true; |
|
10 | + $_template['show_message'] = true; |
|
11 | 11 | // the link URL |
12 | 12 | $link_url = "#"; |
13 | 13 | if (!empty($plugin_info['settings']['ext_auth_chamilo_logout_button_behaviour_eaclbb_form_link_url'])) { |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | */ |
11 | 11 | |
12 | 12 | //the plugin title |
13 | -$plugin_info['title'] = 'Enable or disable logout button'; |
|
13 | +$plugin_info['title'] = 'Enable or disable logout button'; |
|
14 | 14 | |
15 | 15 | //the comments that go with the plugin |
16 | 16 | $plugin_info['comment'] = "If you use some other authentication than local Chamilo authentication, you may have to disable the Chamilo logout button and give users information about your SSO logout."; |
@@ -23,8 +23,8 @@ discard block |
||
23 | 23 | $form->addElement("html", "<div class='normal-message'>Fill the text boxes below to overwrite the default values used in this plugin</div>"); |
24 | 24 | $form->addElement('text', 'eaclbb_form_link_url', 'Page to load when clicking on the logout button'); |
25 | 25 | $form->addElement('text', 'eaclbb_form_link_infobulle', 'Tooltip text for the logout button (displayed on mouseover)'); |
26 | -$form->addElement('checkbox', 'eaclbb_form_link_image', "Display the logout button disabled (black and white)", "", array('checked' => true)); |
|
27 | -$form->addElement('checkbox', 'eaclbb_form_alert_onoff', "Display an alert when clicking on the logout button", "", array('checked' => true)); |
|
26 | +$form->addElement('checkbox', 'eaclbb_form_link_image', "Display the logout button disabled (black and white)", "", array('checked' => true)); |
|
27 | +$form->addElement('checkbox', 'eaclbb_form_alert_onoff', "Display an alert when clicking on the logout button", "", array('checked' => true)); |
|
28 | 28 | $form->addElement('text', 'eaclbb_form_alert_text', "Text displayed in the alert box when clickng on the logout button (if checkbox above has been checked)."); |
29 | 29 | |
30 | 30 | $form->addButtonSave(get_lang('Save'), 'submit_button'); |
@@ -44,4 +44,4 @@ discard block |
||
44 | 44 | $plugin_info['settings_form'] = $form; |
45 | 45 | |
46 | 46 | // Set the templates that are going to be used |
47 | -$plugin_info['templates'] = array('template.tpl'); |
|
47 | +$plugin_info['templates'] = array('template.tpl'); |
@@ -1,16 +1,16 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -require __DIR__ . '/../../vendor/autoload.php'; |
|
4 | -if (file_exists(__DIR__ . '/config.vm.php')) { |
|
3 | +require __DIR__.'/../../vendor/autoload.php'; |
|
4 | +if (file_exists(__DIR__.'/config.vm.php')) { |
|
5 | 5 | |
6 | - require_once dirname(__FILE__) . '/config.php'; |
|
6 | + require_once dirname(__FILE__).'/config.php'; |
|
7 | 7 | |
8 | - require __DIR__ . '/lib/vm/AbstractVM.php'; |
|
9 | - require __DIR__ . '/lib/vm/VMInterface.php'; |
|
10 | - require __DIR__ . '/lib/vm/DigitalOceanVM.php'; |
|
11 | - require __DIR__ . '/lib/VM.php'; |
|
8 | + require __DIR__.'/lib/vm/AbstractVM.php'; |
|
9 | + require __DIR__.'/lib/vm/VMInterface.php'; |
|
10 | + require __DIR__.'/lib/vm/DigitalOceanVM.php'; |
|
11 | + require __DIR__.'/lib/VM.php'; |
|
12 | 12 | |
13 | - $config = require __DIR__ . '/config.vm.php'; |
|
13 | + $config = require __DIR__.'/config.vm.php'; |
|
14 | 14 | |
15 | 15 | $vm = new VM($config); |
16 | 16 | |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | if (empty($activeSessions)) { |
22 | 22 | $vm->runCron(); |
23 | 23 | } else { |
24 | - echo "Can't run cron active sessions found: " . $activeSessions; |
|
24 | + echo "Can't run cron active sessions found: ".$activeSessions; |
|
25 | 25 | } |
26 | 26 | } |
27 | 27 | } |
@@ -70,7 +70,7 @@ |
||
70 | 70 | |
71 | 71 | foreach ($vmList as $vm) { |
72 | 72 | if (isset($vm['enabled']) && $vm['enabled'] == true) { |
73 | - $className = $vm['name'] . 'VM'; |
|
73 | + $className = $vm['name'].'VM'; |
|
74 | 74 | |
75 | 75 | return new $className($vm); |
76 | 76 | break; |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | break; |
101 | 101 | } |
102 | 102 | } else { |
103 | - throw new \Exception(" Id " . $this->vmId . " doesn't exists."); |
|
103 | + throw new \Exception(" Id ".$this->vmId." doesn't exists."); |
|
104 | 104 | } |
105 | 105 | } catch (Exception $e) { |
106 | 106 | die($e->getMessage()); |
@@ -118,22 +118,22 @@ discard block |
||
118 | 118 | |
119 | 119 | $powerOff = $droplets->powerOff($this->vmId); |
120 | 120 | |
121 | - $this->addMessage('Power off droplet #' . $this->vmId); |
|
121 | + $this->addMessage('Power off droplet #'.$this->vmId); |
|
122 | 122 | |
123 | 123 | $this->waitForEvent($powerOff->event_id); |
124 | 124 | |
125 | - $this->addMessage('Current status: ' . $dropletInfo->droplet->status); |
|
125 | + $this->addMessage('Current status: '.$dropletInfo->droplet->status); |
|
126 | 126 | |
127 | 127 | $resizeDroplet = $droplets->resize( |
128 | 128 | $this->vmId, |
129 | 129 | array('size_id' => intval($sizeId)) |
130 | 130 | ); |
131 | - $this->addMessage('Resize droplet to size id: ' . $sizeId); |
|
131 | + $this->addMessage('Resize droplet to size id: '.$sizeId); |
|
132 | 132 | $this->waitForEvent($resizeDroplet->event_id); |
133 | 133 | |
134 | 134 | $powerOn = $droplets->powerOn($this->vmId); |
135 | 135 | $this->waitForEvent($powerOn->event_id); |
136 | - $this->addMessage('Power on droplet #' . $this->vmId); |
|
136 | + $this->addMessage('Power on droplet #'.$this->vmId); |
|
137 | 137 | |
138 | 138 | } |
139 | 139 |
@@ -63,19 +63,19 @@ discard block |
||
63 | 63 | $content = $this->get_content_html(); |
64 | 64 | $html = ' |
65 | 65 | <div class="panel panel-default" id="intro"> |
66 | - <div class="panel-heading">' . get_lang('CoursesInformation') . ' |
|
66 | + <div class="panel-heading">' . get_lang('CoursesInformation').' |
|
67 | 67 | <div class="pull-right"><a class="btn btn-danger btn-xs" onclick="javascript:if(!confirm(\'' . addslashes( |
68 | 68 | api_htmlentities( |
69 | 69 | get_lang('ConfirmYourChoice'), |
70 | 70 | ENT_QUOTES, |
71 | 71 | $charset |
72 | 72 | ) |
73 | - ) . '\')) return false;" href="index.php?action=disable_block&path=' . $this->path . '"> |
|
73 | + ).'\')) return false;" href="index.php?action=disable_block&path='.$this->path.'"> |
|
74 | 74 | <em class="fa fa-times"></em> |
75 | 75 | </a></div> |
76 | 76 | </div> |
77 | 77 | <div class="panel-body"> |
78 | - ' . $content . ' |
|
78 | + ' . $content.' |
|
79 | 79 | </div> |
80 | 80 | </div> |
81 | 81 | '; |
@@ -93,17 +93,17 @@ discard block |
||
93 | 93 | { |
94 | 94 | $course_data = $this->get_course_information_data(); |
95 | 95 | //$content = '<div style="margin:10px;">'; |
96 | - $content = '<h4>' . get_lang( |
|
96 | + $content = '<h4>'.get_lang( |
|
97 | 97 | 'YourCourseList' |
98 | - ) . '</h4>'; |
|
98 | + ).'</h4>'; |
|
99 | 99 | $data_table = null; |
100 | 100 | if (!empty($course_data)) { |
101 | 101 | $data_table .= '<table class="data_table" width:"95%">'; |
102 | 102 | $data_table .= '<tr> |
103 | - <th>' . get_lang('CourseTitle') . '</th> |
|
104 | - <th width="20%">' . get_lang('NbStudents') . '</th> |
|
105 | - <th width="20%">' . get_lang('AvgTimeSpentInTheCourse') . '</th> |
|
106 | - <th width="20%">' . get_lang('ThematicAdvance') . '</th> |
|
103 | + <th>' . get_lang('CourseTitle').'</th> |
|
104 | + <th width="20%">' . get_lang('NbStudents').'</th> |
|
105 | + <th width="20%">' . get_lang('AvgTimeSpentInTheCourse').'</th> |
|
106 | + <th width="20%">' . get_lang('ThematicAdvance').'</th> |
|
107 | 107 | </tr>'; |
108 | 108 | $i = 1; |
109 | 109 | foreach ($course_data as $course) { |
@@ -112,12 +112,12 @@ discard block |
||
112 | 112 | } else { |
113 | 113 | $class_tr = 'row_even'; |
114 | 114 | } |
115 | - $data_table .= '<tr class="' . $class_tr . '">'; |
|
115 | + $data_table .= '<tr class="'.$class_tr.'">'; |
|
116 | 116 | if (!isset($course[2])) { |
117 | 117 | $course[2] = '0:00:00'; |
118 | 118 | } |
119 | 119 | foreach ($course as $cell) { |
120 | - $data_table .= '<td align="right">' . $cell . '</td>'; |
|
120 | + $data_table .= '<td align="right">'.$cell.'</td>'; |
|
121 | 121 | } |
122 | 122 | $data_table .= '</tr>'; |
123 | 123 | $i++; |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | } |
129 | 129 | $content .= $data_table; |
130 | 130 | if (!empty($course_data)) { |
131 | - $content .= '<div style="text-align:right;margin-top:10px;"><a href="' . api_get_path(WEB_CODE_PATH) . 'mySpace/course.php?follow">' . get_lang('SeeMore') . '</a></div>'; |
|
131 | + $content .= '<div style="text-align:right;margin-top:10px;"><a href="'.api_get_path(WEB_CODE_PATH).'mySpace/course.php?follow">'.get_lang('SeeMore').'</a></div>'; |
|
132 | 132 | } |
133 | 133 | //$content .= '</div>'; |
134 | 134 | |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | |
164 | 164 | // students directly subscribed to the course |
165 | 165 | $sql = "SELECT user_id FROM $tbl_course_user as course_rel_user |
166 | - WHERE course_rel_user.status=" . STUDENT . " AND course_rel_user.c_id='$courseId'"; |
|
166 | + WHERE course_rel_user.status=".STUDENT." AND course_rel_user.c_id='$courseId'"; |
|
167 | 167 | $rs = Database::query($sql); |
168 | 168 | $users = array(); |
169 | 169 | while ($row = Database::fetch_array($rs)) { |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | ); |
183 | 183 | |
184 | 184 | if (!empty($tematic_advance)) { |
185 | - $tematic_advance_progress = '<a title="' . get_lang('GoToThematicAdvance') . '" href="' . api_get_path(WEB_CODE_PATH) . 'course_progress/index.php?cidReq=' . $course_code . '&action=thematic_details">' . $tematic_advance . '%</a>'; |
|
185 | + $tematic_advance_progress = '<a title="'.get_lang('GoToThematicAdvance').'" href="'.api_get_path(WEB_CODE_PATH).'course_progress/index.php?cidReq='.$course_code.'&action=thematic_details">'.$tematic_advance.'%</a>'; |
|
186 | 186 | } else { |
187 | 187 | $tematic_advance_progress = '0%'; |
188 | 188 | } |
@@ -22,40 +22,40 @@ discard block |
||
22 | 22 | { |
23 | 23 | |
24 | 24 | private $user_id; |
25 | - private $students; |
|
26 | - private $path; |
|
27 | - private $permission = array(DRH); |
|
25 | + private $students; |
|
26 | + private $path; |
|
27 | + private $permission = array(DRH); |
|
28 | 28 | |
29 | - /** |
|
30 | - * Constructor |
|
31 | - */ |
|
29 | + /** |
|
30 | + * Constructor |
|
31 | + */ |
|
32 | 32 | public function __construct ($user_id) |
33 | 33 | { |
34 | - $this->user_id = $user_id; |
|
35 | - $this->path = 'block_student_graph'; |
|
36 | - if ($this->is_block_visible_for_user($user_id)) { |
|
37 | - /*if (api_is_platform_admin()) { |
|
34 | + $this->user_id = $user_id; |
|
35 | + $this->path = 'block_student_graph'; |
|
36 | + if ($this->is_block_visible_for_user($user_id)) { |
|
37 | + /*if (api_is_platform_admin()) { |
|
38 | 38 | $this->students = UserManager::get_user_list(array('status' => STUDENT)); |
39 | 39 | } else if (api_is_drh()) {*/ |
40 | - $this->students = UserManager::get_users_followed_by_drh($user_id, STUDENT); |
|
41 | - //} |
|
42 | - } |
|
40 | + $this->students = UserManager::get_users_followed_by_drh($user_id, STUDENT); |
|
41 | + //} |
|
42 | + } |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | /** |
46 | - * This method check if a user is allowed to see the block inside dashboard interface |
|
47 | - * @param int User id |
|
48 | - * @return bool Is block visible for user |
|
49 | - */ |
|
46 | + * This method check if a user is allowed to see the block inside dashboard interface |
|
47 | + * @param int User id |
|
48 | + * @return bool Is block visible for user |
|
49 | + */ |
|
50 | 50 | public function is_block_visible_for_user($user_id) |
51 | 51 | { |
52 | - $user_info = api_get_user_info($user_id); |
|
53 | - $user_status = $user_info['status']; |
|
54 | - $is_block_visible_for_user = false; |
|
55 | - if (UserManager::is_admin($user_id) || in_array($user_status, $this->permission)) { |
|
56 | - $is_block_visible_for_user = true; |
|
57 | - } |
|
58 | - return $is_block_visible_for_user; |
|
52 | + $user_info = api_get_user_info($user_id); |
|
53 | + $user_status = $user_info['status']; |
|
54 | + $is_block_visible_for_user = false; |
|
55 | + if (UserManager::is_admin($user_id) || in_array($user_status, $this->permission)) { |
|
56 | + $is_block_visible_for_user = true; |
|
57 | + } |
|
58 | + return $is_block_visible_for_user; |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | /** |
@@ -67,12 +67,12 @@ discard block |
||
67 | 67 | public function get_block() |
68 | 68 | { |
69 | 69 | |
70 | - global $charset; |
|
71 | - $column = 1; |
|
72 | - $data = array(); |
|
73 | - $students_attendance_graph = $this->get_students_attendance_graph(); |
|
70 | + global $charset; |
|
71 | + $column = 1; |
|
72 | + $data = array(); |
|
73 | + $students_attendance_graph = $this->get_students_attendance_graph(); |
|
74 | 74 | |
75 | - $html = '<div class="panel panel-default" id="intro"> |
|
75 | + $html = '<div class="panel panel-default" id="intro"> |
|
76 | 76 | <div class="panel-heading"> |
77 | 77 | '.get_lang('StudentsInformationsGraph').' |
78 | 78 | <div class="pull-right"><a class="btn btn-danger btn-xs" onclick="javascript:if(!confirm(\''.addslashes(api_htmlentities(get_lang('ConfirmYourChoice'),ENT_QUOTES,$charset)).'\')) return false;" href="index.php?action=disable_block&path='.$this->path.'"> |
@@ -84,51 +84,51 @@ discard block |
||
84 | 84 | '.$students_attendance_graph.' |
85 | 85 | </div> |
86 | 86 | </div>'; |
87 | - $data['column'] = $column; |
|
88 | - $data['content_html'] = $html; |
|
89 | - return $data; |
|
87 | + $data['column'] = $column; |
|
88 | + $data['content_html'] = $html; |
|
89 | + return $data; |
|
90 | 90 | } |
91 | 91 | |
92 | 92 | /** |
93 | - * This method return a graph containing information about students evaluation, |
|
93 | + * This method return a graph containing information about students evaluation, |
|
94 | 94 | * it's used inside get_block method for showing it inside dashboard interface |
95 | - * @return string img html |
|
96 | - */ |
|
95 | + * @return string img html |
|
96 | + */ |
|
97 | 97 | public function get_students_attendance_graph() |
98 | 98 | { |
99 | 99 | |
100 | - $students = $this->students; |
|
101 | - $attendance = new Attendance(); |
|
102 | - |
|
103 | - // get data |
|
104 | - $attendances_faults_avg = array(); |
|
105 | - if (is_array($students) && count($students) > 0) { |
|
106 | - foreach ($students as $student) { |
|
107 | - $student_id = $student['user_id']; |
|
108 | - //$student_info = api_get_user_info($student_id); |
|
109 | - // get average of faults in attendances by student |
|
110 | - $results_faults_avg = $attendance->get_faults_average_inside_courses($student_id); |
|
111 | - |
|
112 | - if (!empty($results_faults_avg)) { |
|
113 | - $attendances_faults_avg[$student['lastname']] = $results_faults_avg['porcent']; |
|
114 | - } else { |
|
115 | - $attendances_faults_avg[$student['lastname']] = 0; |
|
116 | - } |
|
117 | - } |
|
118 | - } |
|
100 | + $students = $this->students; |
|
101 | + $attendance = new Attendance(); |
|
102 | + |
|
103 | + // get data |
|
104 | + $attendances_faults_avg = array(); |
|
105 | + if (is_array($students) && count($students) > 0) { |
|
106 | + foreach ($students as $student) { |
|
107 | + $student_id = $student['user_id']; |
|
108 | + //$student_info = api_get_user_info($student_id); |
|
109 | + // get average of faults in attendances by student |
|
110 | + $results_faults_avg = $attendance->get_faults_average_inside_courses($student_id); |
|
111 | + |
|
112 | + if (!empty($results_faults_avg)) { |
|
113 | + $attendances_faults_avg[$student['lastname']] = $results_faults_avg['porcent']; |
|
114 | + } else { |
|
115 | + $attendances_faults_avg[$student['lastname']] = 0; |
|
116 | + } |
|
117 | + } |
|
118 | + } |
|
119 | 119 | |
120 | - arsort($attendances_faults_avg); |
|
121 | - $usernames = array_keys($attendances_faults_avg); |
|
120 | + arsort($attendances_faults_avg); |
|
121 | + $usernames = array_keys($attendances_faults_avg); |
|
122 | 122 | |
123 | - $faults = array(); |
|
124 | - foreach ($usernames as $username) { |
|
125 | - $faults[] = $attendances_faults_avg[$username]; |
|
126 | - } |
|
123 | + $faults = array(); |
|
124 | + foreach ($usernames as $username) { |
|
125 | + $faults[] = $attendances_faults_avg[$username]; |
|
126 | + } |
|
127 | 127 | |
128 | - $graph = ''; |
|
129 | - $img_file = ''; |
|
128 | + $graph = ''; |
|
129 | + $img_file = ''; |
|
130 | 130 | |
131 | - if (is_array($usernames) && count($usernames) > 0) { |
|
131 | + if (is_array($usernames) && count($usernames) > 0) { |
|
132 | 132 | |
133 | 133 | // Defining data |
134 | 134 | $dataSet = new pData(); |
@@ -233,19 +233,19 @@ discard block |
||
233 | 233 | $imgPath = api_get_path(WEB_ARCHIVE_PATH) . $chartHash; |
234 | 234 | } |
235 | 235 | $graph = '<img src="' . $imgPath . '" >'; |
236 | - } else { |
|
237 | - $graph = '<p>'.api_convert_encoding(get_lang('GraphicNotAvailable'),'UTF-8').'</p>'; |
|
238 | - } |
|
236 | + } else { |
|
237 | + $graph = '<p>'.api_convert_encoding(get_lang('GraphicNotAvailable'),'UTF-8').'</p>'; |
|
238 | + } |
|
239 | 239 | |
240 | - return $graph; |
|
241 | - } |
|
240 | + return $graph; |
|
241 | + } |
|
242 | 242 | |
243 | 243 | /** |
244 | - * Get number of students |
|
245 | - * @return int |
|
246 | - */ |
|
247 | - function get_number_of_students() |
|
244 | + * Get number of students |
|
245 | + * @return int |
|
246 | + */ |
|
247 | + function get_number_of_students() |
|
248 | 248 | { |
249 | - return count($this->students); |
|
250 | - } |
|
249 | + return count($this->students); |
|
250 | + } |
|
251 | 251 | } |
@@ -29,15 +29,15 @@ discard block |
||
29 | 29 | /** |
30 | 30 | * Constructor |
31 | 31 | */ |
32 | - public function __construct ($user_id) |
|
32 | + public function __construct($user_id) |
|
33 | 33 | { |
34 | - $this->user_id = $user_id; |
|
35 | - $this->path = 'block_student_graph'; |
|
34 | + $this->user_id = $user_id; |
|
35 | + $this->path = 'block_student_graph'; |
|
36 | 36 | if ($this->is_block_visible_for_user($user_id)) { |
37 | 37 | /*if (api_is_platform_admin()) { |
38 | 38 | $this->students = UserManager::get_user_list(array('status' => STUDENT)); |
39 | 39 | } else if (api_is_drh()) {*/ |
40 | - $this->students = UserManager::get_users_followed_by_drh($user_id, STUDENT); |
|
40 | + $this->students = UserManager::get_users_followed_by_drh($user_id, STUDENT); |
|
41 | 41 | //} |
42 | 42 | } |
43 | 43 | } |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | $html = '<div class="panel panel-default" id="intro"> |
76 | 76 | <div class="panel-heading"> |
77 | 77 | '.get_lang('StudentsInformationsGraph').' |
78 | - <div class="pull-right"><a class="btn btn-danger btn-xs" onclick="javascript:if(!confirm(\''.addslashes(api_htmlentities(get_lang('ConfirmYourChoice'),ENT_QUOTES,$charset)).'\')) return false;" href="index.php?action=disable_block&path='.$this->path.'"> |
|
78 | + <div class="pull-right"><a class="btn btn-danger btn-xs" onclick="javascript:if(!confirm(\''.addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES, $charset)).'\')) return false;" href="index.php?action=disable_block&path='.$this->path.'"> |
|
79 | 79 | <em class="fa fa-times"></em> |
80 | 80 | </a></div> |
81 | 81 | </div> |
@@ -155,9 +155,9 @@ discard block |
||
155 | 155 | $myCache = new pCache(array('CacheFolder' => substr($cachePath, 0, strlen($cachePath) - 1))); |
156 | 156 | $chartHash = $myCache->getHash($dataSet); |
157 | 157 | if ($myCache->isInCache($chartHash)) { |
158 | - $imgPath = api_get_path(SYS_ARCHIVE_PATH) . $chartHash; |
|
158 | + $imgPath = api_get_path(SYS_ARCHIVE_PATH).$chartHash; |
|
159 | 159 | $myCache->saveFromCache($chartHash, $imgPath); |
160 | - $imgPath = api_get_path(WEB_ARCHIVE_PATH) . $chartHash; |
|
160 | + $imgPath = api_get_path(WEB_ARCHIVE_PATH).$chartHash; |
|
161 | 161 | } else { |
162 | 162 | |
163 | 163 | $maxCounts = max(count($usernames), count($faults)); |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | /* Set the default font */ |
183 | 183 | $myPicture->setFontProperties( |
184 | 184 | array( |
185 | - 'FontName' => api_get_path(SYS_FONTS_PATH) . 'opensans/OpenSans-Regular.ttf', |
|
185 | + 'FontName' => api_get_path(SYS_FONTS_PATH).'opensans/OpenSans-Regular.ttf', |
|
186 | 186 | 'FontSize' => 10 |
187 | 187 | ) |
188 | 188 | ); |
@@ -228,13 +228,13 @@ discard block |
||
228 | 228 | |
229 | 229 | /* Write and save into cache */ |
230 | 230 | $myCache->writeToCache($chartHash, $myPicture); |
231 | - $imgPath = api_get_path(SYS_ARCHIVE_PATH) . $chartHash; |
|
231 | + $imgPath = api_get_path(SYS_ARCHIVE_PATH).$chartHash; |
|
232 | 232 | $myCache->saveFromCache($chartHash, $imgPath); |
233 | - $imgPath = api_get_path(WEB_ARCHIVE_PATH) . $chartHash; |
|
233 | + $imgPath = api_get_path(WEB_ARCHIVE_PATH).$chartHash; |
|
234 | 234 | } |
235 | - $graph = '<img src="' . $imgPath . '" >'; |
|
235 | + $graph = '<img src="'.$imgPath.'" >'; |
|
236 | 236 | } else { |
237 | - $graph = '<p>'.api_convert_encoding(get_lang('GraphicNotAvailable'),'UTF-8').'</p>'; |
|
237 | + $graph = '<p>'.api_convert_encoding(get_lang('GraphicNotAvailable'), 'UTF-8').'</p>'; |
|
238 | 238 | } |
239 | 239 | |
240 | 240 | return $graph; |