@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | api_protect_course_script(true); |
22 | 22 | |
23 | 23 | $lib_path = api_get_path(LIBRARY_PATH); |
24 | -$blog_table_attachment = Database::get_course_table(TABLE_BLOGS_ATTACHMENT); |
|
24 | +$blog_table_attachment = Database::get_course_table(TABLE_BLOGS_ATTACHMENT); |
|
25 | 25 | |
26 | 26 | $nameTools = get_lang('Blogs'); |
27 | 27 | $DaysShort = api_get_week_days_short(); |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | $safe_comment_title, |
135 | 135 | $safe_comment_text, |
136 | 136 | $blog_id, |
137 | - (int)$_GET['post_id'], |
|
137 | + (int) $_GET['post_id'], |
|
138 | 138 | $_POST['comment_parent_id'], |
139 | 139 | $_POST['task_id'] |
140 | 140 | ); |
@@ -146,29 +146,29 @@ discard block |
||
146 | 146 | if (!empty($_POST['register'])) { |
147 | 147 | if (is_array($_POST['user'])) { |
148 | 148 | foreach ($_POST['user'] as $index => $user_id) { |
149 | - Blog :: set_user_subscribed((int)$_GET['blog_id'], $user_id); |
|
149 | + Blog :: set_user_subscribed((int) $_GET['blog_id'], $user_id); |
|
150 | 150 | } |
151 | 151 | } |
152 | 152 | } |
153 | 153 | if (!empty($_POST['unregister'])) { |
154 | 154 | if (is_array($_POST['user'])) { |
155 | 155 | foreach ($_POST['user'] as $index => $user_id) { |
156 | - Blog :: set_user_unsubscribed((int)$_GET['blog_id'], $user_id); |
|
156 | + Blog :: set_user_unsubscribed((int) $_GET['blog_id'], $user_id); |
|
157 | 157 | } |
158 | 158 | } |
159 | 159 | } |
160 | 160 | if (!empty($_GET['register'])) { |
161 | - Blog :: set_user_subscribed((int)$_GET['blog_id'], (int)$_GET['user_id']); |
|
161 | + Blog :: set_user_subscribed((int) $_GET['blog_id'], (int) $_GET['user_id']); |
|
162 | 162 | $return_message = array('type' => 'confirmation', 'message' => get_lang('UserRegistered')); |
163 | 163 | $flag = 1; |
164 | 164 | } |
165 | 165 | if (!empty($_GET['unregister'])) { |
166 | - Blog :: set_user_unsubscribed((int)$_GET['blog_id'], (int)$_GET['user_id']); |
|
166 | + Blog :: set_user_unsubscribed((int) $_GET['blog_id'], (int) $_GET['user_id']); |
|
167 | 167 | } |
168 | 168 | |
169 | 169 | if (isset($_GET['action']) && $_GET['action'] == 'manage_tasks') { |
170 | 170 | if (isset($_GET['do']) && $_GET['do'] == 'delete') { |
171 | - Blog :: delete_task($blog_id, (int)$_GET['task_id']); |
|
171 | + Blog :: delete_task($blog_id, (int) $_GET['task_id']); |
|
172 | 172 | $return_message = array('type' => 'confirmation', 'message' => get_lang('TaskDeleted')); |
173 | 173 | } |
174 | 174 | |
@@ -181,9 +181,9 @@ discard block |
||
181 | 181 | if (isset($_GET['action']) && $_GET['action'] == 'view_post') { |
182 | 182 | $task_id = (isset ($_GET['task_id']) && is_numeric($_GET['task_id'])) ? $_GET['task_id'] : 0; |
183 | 183 | |
184 | - if (isset($_GET['do']) && $_GET['do'] == 'delete_comment') { |
|
184 | + if (isset($_GET['do']) && $_GET['do'] == 'delete_comment') { |
|
185 | 185 | if (api_is_allowed('BLOG_'.$blog_id, 'article_comments_delete', $task_id)) { |
186 | - Blog :: delete_comment($blog_id, (int)$_GET['post_id'],(int)$_GET['comment_id']); |
|
186 | + Blog :: delete_comment($blog_id, (int) $_GET['post_id'], (int) $_GET['comment_id']); |
|
187 | 187 | $return_message = array('type' => 'confirmation', 'message' => get_lang('CommentDeleted')); |
188 | 188 | } else { |
189 | 189 | $error = true; |
@@ -191,9 +191,9 @@ discard block |
||
191 | 191 | } |
192 | 192 | } |
193 | 193 | |
194 | - if (isset($_GET['do']) && $_GET['do'] == 'delete_article') { |
|
194 | + if (isset($_GET['do']) && $_GET['do'] == 'delete_article') { |
|
195 | 195 | if (api_is_allowed('BLOG_'.$blog_id, 'article_delete', $task_id)) { |
196 | - Blog :: delete_post($blog_id, (int)$_GET['article_id']); |
|
196 | + Blog :: delete_post($blog_id, (int) $_GET['article_id']); |
|
197 | 197 | $action = ''; // Article is gone, go to blog home |
198 | 198 | $return_message = array('type' => 'confirmation', 'message' => get_lang('BlogDeleted')); |
199 | 199 | } else { |
@@ -204,13 +204,13 @@ discard block |
||
204 | 204 | if (isset($_GET['do']) && $_GET['do'] == 'rate') { |
205 | 205 | if (isset($_GET['type']) && $_GET['type'] == 'post') { |
206 | 206 | if (api_is_allowed('BLOG_'.$blog_id, 'article_rate')) { |
207 | - Blog :: add_rating('post', $blog_id, (int)$_GET['post_id'], (int)$_GET['rating']); |
|
207 | + Blog :: add_rating('post', $blog_id, (int) $_GET['post_id'], (int) $_GET['rating']); |
|
208 | 208 | $return_message = array('type' => 'confirmation', 'message' => get_lang('RatingAdded')); |
209 | 209 | } |
210 | 210 | } |
211 | 211 | if (isset($_GET['type']) && $_GET['type'] == 'comment') { |
212 | 212 | if (api_is_allowed('BLOG_'.$blog_id, 'article_comments_add')) { |
213 | - Blog :: add_rating('comment', $blog_id, (int)$_GET['comment_id'], (int)$_GET['rating']); |
|
213 | + Blog :: add_rating('comment', $blog_id, (int) $_GET['comment_id'], (int) $_GET['rating']); |
|
214 | 214 | $return_message = array('type' => 'confirmation', 'message' => get_lang('RatingAdded')); |
215 | 215 | } |
216 | 216 | } |
@@ -289,16 +289,16 @@ discard block |
||
289 | 289 | echo '<div class=actions>'; |
290 | 290 | ?> |
291 | 291 | <a href="<?php echo api_get_self(); ?>?blog_id=<?php echo $blog_id ?>&<?php echo api_get_cidreq(); ?>" title="<?php echo get_lang('Home') ?>"> |
292 | - <?php echo Display::return_icon('blog.png', get_lang('Home'),'',ICON_SIZE_MEDIUM); ?></a> |
|
293 | - <?php if(api_is_allowed('BLOG_'.$blog_id, 'article_add')) { ?> |
|
292 | + <?php echo Display::return_icon('blog.png', get_lang('Home'), '', ICON_SIZE_MEDIUM); ?></a> |
|
293 | + <?php if (api_is_allowed('BLOG_'.$blog_id, 'article_add')) { ?> |
|
294 | 294 | <a href="<?php echo api_get_self(); ?>?action=new_post&blog_id=<?php echo $blog_id ?>" title="<?php echo get_lang('NewPost') ?>"> |
295 | - <?php echo Display::return_icon('new_article.png', get_lang('NewPost'),'',ICON_SIZE_MEDIUM); ?></a><?php } ?> |
|
296 | - <?php if(api_is_allowed('BLOG_'.$blog_id, 'task_management')) { ?> |
|
295 | + <?php echo Display::return_icon('new_article.png', get_lang('NewPost'), '', ICON_SIZE_MEDIUM); ?></a><?php } ?> |
|
296 | + <?php if (api_is_allowed('BLOG_'.$blog_id, 'task_management')) { ?> |
|
297 | 297 | <a href="<?php echo api_get_self(); ?>?action=manage_tasks&blog_id=<?php echo $blog_id ?>" title="<?php echo get_lang('ManageTasks') ?>"> |
298 | - <?php echo Display::return_icon('blog_tasks.png', get_lang('TaskManager'),'',ICON_SIZE_MEDIUM); ?></a><?php } ?> |
|
299 | - <?php if(api_is_allowed('BLOG_'.$blog_id, 'member_management')) { ?> |
|
298 | + <?php echo Display::return_icon('blog_tasks.png', get_lang('TaskManager'), '', ICON_SIZE_MEDIUM); ?></a><?php } ?> |
|
299 | + <?php if (api_is_allowed('BLOG_'.$blog_id, 'member_management')) { ?> |
|
300 | 300 | <a href="<?php echo api_get_self(); ?>?action=manage_members&blog_id=<?php echo $blog_id ?>" title="<?php echo get_lang('ManageMembers') ?>"> |
301 | - <?php echo Display::return_icon('blog_admin_users.png', get_lang('MemberManager'),'',ICON_SIZE_MEDIUM); ?></a><?php } ?> |
|
301 | + <?php echo Display::return_icon('blog_admin_users.png', get_lang('MemberManager'), '', ICON_SIZE_MEDIUM); ?></a><?php } ?> |
|
302 | 302 | <?php |
303 | 303 | echo '</div>'; |
304 | 304 | |
@@ -315,8 +315,8 @@ discard block |
||
315 | 315 | <div class="panel-heading"><?php echo get_lang('Calendar') ?></div> |
316 | 316 | <div class="panel-body"> |
317 | 317 | <?php |
318 | - $month = isset($_GET['month']) ? (int)$_GET['month'] : (int) date('m'); |
|
319 | - $year = isset($_GET['year']) ? (int)$_GET['year'] : date('Y'); |
|
318 | + $month = isset($_GET['month']) ? (int) $_GET['month'] : (int) date('m'); |
|
319 | + $year = isset($_GET['year']) ? (int) $_GET['year'] : date('Y'); |
|
320 | 320 | Blog::display_minimonthcalendar($month, $year, $blog_id); |
321 | 321 | ?> |
322 | 322 | </div> |
@@ -362,7 +362,7 @@ discard block |
||
362 | 362 | $course_id = api_get_course_int_id(); |
363 | 363 | |
364 | 364 | if (isset ($_GET['task_id']) && is_numeric($_GET['task_id'])) { |
365 | - $task_id = (int)$_GET['task_id']; |
|
365 | + $task_id = (int) $_GET['task_id']; |
|
366 | 366 | } else { |
367 | 367 | $task_id = 0; |
368 | 368 | $tbl_blogs_tasks_rel_user = Database :: get_course_table(TABLE_BLOGS_TASKS_REL_USER); |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | null, |
21 | 21 | 'edit_eval_form', |
22 | 22 | null, |
23 | - api_get_self() . '?editeval=' . Security::remove_XSS($_GET['editeval']) |
|
23 | + api_get_self().'?editeval='.Security::remove_XSS($_GET['editeval']) |
|
24 | 24 | ); |
25 | 25 | if ($form->validate()) { |
26 | 26 | $values = $form->exportValues(); |
@@ -45,10 +45,10 @@ discard block |
||
45 | 45 | } |
46 | 46 | $eval->set_visible($visible); |
47 | 47 | $eval->save(); |
48 | - header('Location: '.$_SESSION['gradebook_dest'].'?editeval=&selectcat=' . $eval->get_category_id()); |
|
48 | + header('Location: '.$_SESSION['gradebook_dest'].'?editeval=&selectcat='.$eval->get_category_id()); |
|
49 | 49 | exit; |
50 | 50 | } |
51 | -$selectcat_inter=isset($_GET['selectcat']) ? (int) $_GET['selectcat'] : 0; |
|
51 | +$selectcat_inter = isset($_GET['selectcat']) ? (int) $_GET['selectcat'] : 0; |
|
52 | 52 | $interbreadcrumb[] = array( |
53 | 53 | 'url' => $_SESSION['gradebook_dest'].'?selectcat='.$selectcat_inter, |
54 | 54 | 'name' => get_lang('Gradebook' |
@@ -14,7 +14,7 @@ |
||
14 | 14 | GradebookUtils::block_students(); |
15 | 15 | |
16 | 16 | $courseCode = isset($_GET['course_code']) ? Security::remove_XSS($_GET['course_code']) : null; |
17 | -$selectCat = isset($_GET['selectcat']) ? (int) $_GET['selectcat'] : 0; |
|
17 | +$selectCat = isset($_GET['selectcat']) ? (int) $_GET['selectcat'] : 0; |
|
18 | 18 | |
19 | 19 | $course_info = api_get_course_info($courseCode); |
20 | 20 | $tbl_forum_thread = Database :: get_course_table(TABLE_FORUM_THREAD); |
@@ -39,15 +39,15 @@ |
||
39 | 39 | FROM ".$t_link_log." lk inner join ".$t_user." us |
40 | 40 | ON lk.user_id_log=us.user_id |
41 | 41 | WHERE lk.id_linkeval_log=".$evaledit[0]->get_id()." AND lk.type='link';"; |
42 | -$result=Database::query($sql); |
|
43 | -$list_info=array(); |
|
44 | -while ($row=Database::fetch_row($result)) { |
|
42 | +$result = Database::query($sql); |
|
43 | +$list_info = array(); |
|
44 | +while ($row = Database::fetch_row($result)) { |
|
45 | 45 | $list_info[] = $row; |
46 | 46 | } |
47 | 47 | |
48 | 48 | foreach ($list_info as $key => $info_log) { |
49 | - $list_info[$key][5]=($info_log[5]) ? api_convert_and_format_date($info_log[5]) : 'N/A'; |
|
50 | - $list_info[$key][3]=($info_log[3]==1) ? get_lang('GradebookVisible') : get_lang('GradebookInvisible'); |
|
49 | + $list_info[$key][5] = ($info_log[5]) ? api_convert_and_format_date($info_log[5]) : 'N/A'; |
|
50 | + $list_info[$key][3] = ($info_log[3] == 1) ? get_lang('GradebookVisible') : get_lang('GradebookInvisible'); |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | $parameters = array( |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | if (isset($link_object)) { |
32 | 32 | $link = $link_object; |
33 | 33 | } elseif (isset($link_type) && isset($category_object)) { |
34 | - $link = LinkFactory :: create ($link_type); |
|
34 | + $link = LinkFactory :: create($link_type); |
|
35 | 35 | $link->set_course_code(api_get_course_id()); |
36 | 36 | $link->set_category_id($category_object[0]->get_id()); |
37 | 37 | } else { |
@@ -52,12 +52,12 @@ discard block |
||
52 | 52 | } else { |
53 | 53 | $select = $this->addElement('select', 'select_link', get_lang('ChooseItem')); |
54 | 54 | foreach ($link->get_all_links() as $newlink) { |
55 | - $select->addoption($newlink[1],$newlink[0]); |
|
55 | + $select->addoption($newlink[1], $newlink[0]); |
|
56 | 56 | } |
57 | 57 | } |
58 | 58 | } else { |
59 | - $this->addElement('label',get_lang('Name'), '<span class="freeze">'.$link->get_name().' ['.$link->get_type_name().']</span>'); |
|
60 | - $this->addElement('hidden','name_link',$link->get_name(),array('id'=>'name_link')); |
|
59 | + $this->addElement('label', get_lang('Name'), '<span class="freeze">'.$link->get_name().' ['.$link->get_type_name().']</span>'); |
|
60 | + $this->addElement('hidden', 'name_link', $link->get_name(), array('id'=>'name_link')); |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | if (count($category_object) == 1) { |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | if ($my_cat->get_course_code() == api_get_course_id()) { |
79 | 79 | $grade_model_id = $my_cat->get_grade_model_id(); |
80 | 80 | if (empty($grade_model_id)) { |
81 | - if ($my_cat->get_parent_id() == 0 ) { |
|
81 | + if ($my_cat->get_parent_id() == 0) { |
|
82 | 82 | $default_weight = $my_cat->get_weight(); |
83 | 83 | $select_gradebook->addoption(get_lang('Default'), $my_cat->get_id()); |
84 | 84 | } else { |
@@ -117,8 +117,8 @@ discard block |
||
117 | 117 | 'class' => 'span1' |
118 | 118 | ));*/ |
119 | 119 | |
120 | - $this->addRule('weight_mask',get_lang('OnlyNumbers'),'numeric'); |
|
121 | - $this->addRule(array ('weight_mask', 'zero'), get_lang('NegativeValue'), 'compare', '>='); |
|
120 | + $this->addRule('weight_mask', get_lang('OnlyNumbers'), 'numeric'); |
|
121 | + $this->addRule(array('weight_mask', 'zero'), get_lang('NegativeValue'), 'compare', '>='); |
|
122 | 122 | if ($form_type == self :: TYPE_EDIT) { |
123 | 123 | $parent_cat = Category :: load($link->get_category_id()); |
124 | 124 | |
@@ -131,20 +131,20 @@ discard block |
||
131 | 131 | //var_dump($global_weight, $link->get_weight(), $parent_cat[0]->get_weight()); |
132 | 132 | //$weight = $parent_cat[0]->get_weight()* $link->get_weight() / $global_weight; |
133 | 133 | //$values['weight'] = $weight; |
134 | - $values['weight'] = $link->get_weight() ; |
|
134 | + $values['weight'] = $link->get_weight(); |
|
135 | 135 | } |
136 | - $defaults['weight_mask'] = $values['weight'] ; |
|
136 | + $defaults['weight_mask'] = $values['weight']; |
|
137 | 137 | $defaults['select_gradebook'] = $link->get_category_id(); |
138 | 138 | |
139 | 139 | } |
140 | 140 | // ELEMENT: max |
141 | 141 | if ($link->needs_max()) { |
142 | 142 | if ($form_type == self :: TYPE_EDIT && $link->has_results()) { |
143 | - $this->addText('max', get_lang('QualificationNumeric'), false, array ('size' => '4','maxlength' => '5', 'disabled' => 'disabled')); |
|
143 | + $this->addText('max', get_lang('QualificationNumeric'), false, array('size' => '4', 'maxlength' => '5', 'disabled' => 'disabled')); |
|
144 | 144 | } else { |
145 | - $this->addText('max', get_lang('QualificationNumeric'), true, array ('size' => '4','maxlength' => '5')); |
|
145 | + $this->addText('max', get_lang('QualificationNumeric'), true, array('size' => '4', 'maxlength' => '5')); |
|
146 | 146 | $this->addRule('max', get_lang('OnlyNumbers'), 'numeric'); |
147 | - $this->addRule(array ('max', 'zero'), get_lang('NegativeValue'), 'compare', '>='); |
|
147 | + $this->addRule(array('max', 'zero'), get_lang('NegativeValue'), 'compare', '>='); |
|
148 | 148 | } |
149 | 149 | if ($form_type == self :: TYPE_EDIT) { |
150 | 150 | $defaults['max'] = $link->get_max(); |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | |
154 | 154 | // ELEMENT: description |
155 | 155 | if ($link->needs_name_and_description()) { |
156 | - $this->addElement('textarea', 'description', get_lang('Description'), array ('rows' => '3','cols' => '34')); |
|
156 | + $this->addElement('textarea', 'description', get_lang('Description'), array('rows' => '3', 'cols' => '34')); |
|
157 | 157 | if ($form_type == self :: TYPE_EDIT) { |
158 | 158 | $defaults['description'] = $link->get_description(); |
159 | 159 | } |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | if (isset($setting['gradebook']) && $setting['gradebook'] == 'false') { |
184 | 184 | $visibility_default = 0; |
185 | 185 | } |
186 | - $defaults['visible'] = $visibility_default; |
|
186 | + $defaults['visible'] = $visibility_default; |
|
187 | 187 | } |
188 | 188 | |
189 | 189 | // set default values |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | */ |
10 | 10 | class UserForm extends FormValidator |
11 | 11 | { |
12 | - const TYPE_USER_INFO= 1; |
|
12 | + const TYPE_USER_INFO = 1; |
|
13 | 13 | const TYPE_SIMPLE_SEARCH = 3; |
14 | 14 | |
15 | 15 | /** |
@@ -20,15 +20,15 @@ discard block |
||
20 | 20 | * @param method |
21 | 21 | * @param action |
22 | 22 | */ |
23 | - public function __construct($form_type, $user, $form_name, $method= 'post', $action= null) |
|
23 | + public function __construct($form_type, $user, $form_name, $method = 'post', $action = null) |
|
24 | 24 | { |
25 | 25 | parent :: __construct($form_name, $method, $action); |
26 | - $this->form_type= $form_type; |
|
26 | + $this->form_type = $form_type; |
|
27 | 27 | if (isset ($user)) { |
28 | - $this->user_info= $user; |
|
28 | + $this->user_info = $user; |
|
29 | 29 | } |
30 | 30 | if (isset ($result_object)) { |
31 | - $this->result_object= $result_object; |
|
31 | + $this->result_object = $result_object; |
|
32 | 32 | } |
33 | 33 | if ($this->form_type == self :: TYPE_USER_INFO) { |
34 | 34 | $this->build_user_info_form(); |
@@ -46,9 +46,9 @@ discard block |
||
46 | 46 | 'keyword' => Security::remove_XSS($_GET['search']) |
47 | 47 | )); |
48 | 48 | } |
49 | - $renderer =& $this->defaultRenderer(); |
|
49 | + $renderer = & $this->defaultRenderer(); |
|
50 | 50 | $renderer->setCustomElementTemplate('<span>{element}</span> '); |
51 | - $this->addElement('text','keyword',''); |
|
51 | + $this->addElement('text', 'keyword', ''); |
|
52 | 52 | $this->addButtonSearch(get_lang('Search'), 'submit'); |
53 | 53 | } |
54 | 54 | |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | $this->addElement('static', 'fname', get_lang('FirstName'), $this->user_info['firstname']); |
63 | 63 | } |
64 | 64 | $this->addElement('static', 'uname', get_lang('UserName'), $this->user_info['username']); |
65 | - $this->addElement('static', 'email', get_lang('Email'), '<a href="mailto:' . $this->user_info['email'] . '">' . $this->user_info['email'] . '</a>'); |
|
65 | + $this->addElement('static', 'email', get_lang('Email'), '<a href="mailto:'.$this->user_info['email'].'">'.$this->user_info['email'].'</a>'); |
|
66 | 66 | $this->addElement('static', 'ofcode', get_lang('OfficialCode'), $this->user_info['official_code']); |
67 | 67 | $this->addElement('static', 'phone', get_lang('Phone'), $this->user_info['phone']); |
68 | 68 | $this->addButtonSave(get_lang('Back'), 'submit'); |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | parent :: display(); |
74 | 74 | } |
75 | 75 | |
76 | - function setDefaults($defaults= array(), $filter = null) |
|
76 | + function setDefaults($defaults = array(), $filter = null) |
|
77 | 77 | { |
78 | 78 | parent :: setDefaults($defaults, $filter); |
79 | 79 | } |
@@ -20,37 +20,37 @@ discard block |
||
20 | 20 | if (api_is_allowed_to_edit(null, true)) { |
21 | 21 | $header = '<div class="actions">'; |
22 | 22 | if ($page != 'statistics') { |
23 | - $header .= '<a href="' . Security::remove_XSS($_SESSION['gradebook_dest']) . '?selectcat=' . $selectcat . '&'.api_get_cidreq().'">' . |
|
24 | - Display::return_icon(('back.png'), get_lang('FolderView'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
23 | + $header .= '<a href="'.Security::remove_XSS($_SESSION['gradebook_dest']).'?selectcat='.$selectcat.'&'.api_get_cidreq().'">'. |
|
24 | + Display::return_icon(('back.png'), get_lang('FolderView'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
25 | 25 | if ($evalobj->get_course_code() == null) { |
26 | 26 | |
27 | 27 | } elseif (!$evalobj->has_results()) { |
28 | - $header .= '<a href="gradebook_add_result.php?'.api_get_cidreq().'&selectcat=' . $selectcat . '&selecteval=' . $evalobj->get_id() . '"> |
|
29 | - ' . Display::return_icon('evaluation_rate.png', get_lang('AddResult'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
28 | + $header .= '<a href="gradebook_add_result.php?'.api_get_cidreq().'&selectcat='.$selectcat.'&selecteval='.$evalobj->get_id().'"> |
|
29 | + ' . Display::return_icon('evaluation_rate.png', get_lang('AddResult'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | if (api_is_platform_admin() || $evalobj->is_locked() == false) { |
33 | - $header .= '<a href="' . api_get_self() . '?'.api_get_cidreq().'&selecteval=' . $evalobj->get_id() . '&import=">' . |
|
34 | - Display::return_icon('import_evaluation.png', get_lang('ImportResult'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
33 | + $header .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&selecteval='.$evalobj->get_id().'&import=">'. |
|
34 | + Display::return_icon('import_evaluation.png', get_lang('ImportResult'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | if ($evalobj->has_results()) { |
38 | - $header .= '<a href="' . api_get_self() . '?'.api_get_cidreq().'&selecteval=' . $evalobj->get_id() . '&export=">' . |
|
39 | - Display::return_icon('export_evaluation.png', get_lang('ExportResult'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
38 | + $header .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&selecteval='.$evalobj->get_id().'&export=">'. |
|
39 | + Display::return_icon('export_evaluation.png', get_lang('ExportResult'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
40 | 40 | |
41 | 41 | if (api_is_platform_admin() || $evalobj->is_locked() == false) { |
42 | - $header .= '<a href="gradebook_edit_result.php?'.api_get_cidreq().'&selecteval=' . $evalobj->get_id() . '">' . |
|
43 | - Display::return_icon('edit.png', get_lang('EditResult'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
44 | - $header .= '<a href="' . api_get_self() . '?'.api_get_cidreq().'&selecteval=' . $evalobj->get_id() . '&deleteall=" onclick="return confirmationall();">' . |
|
45 | - Display::return_icon('delete.png', get_lang('DeleteResult'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
42 | + $header .= '<a href="gradebook_edit_result.php?'.api_get_cidreq().'&selecteval='.$evalobj->get_id().'">'. |
|
43 | + Display::return_icon('edit.png', get_lang('EditResult'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
44 | + $header .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&selecteval='.$evalobj->get_id().'&deleteall=" onclick="return confirmationall();">'. |
|
45 | + Display::return_icon('delete.png', get_lang('DeleteResult'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
46 | 46 | } |
47 | 47 | } |
48 | 48 | |
49 | - $header .= '<a href="' . api_get_self() . '?'.api_get_cidreq().'&print=&selecteval=' . $evalobj->get_id() . '" target="_blank">' . |
|
50 | - Display::return_icon('printer.png', get_lang('Print'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
49 | + $header .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&print=&selecteval='.$evalobj->get_id().'" target="_blank">'. |
|
50 | + Display::return_icon('printer.png', get_lang('Print'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
51 | 51 | } else { |
52 | - $header .= '<a href="gradebook_view_result.php?'.api_get_cidreq().'&selecteval=' . Security::remove_XSS($_GET['selecteval']) . '"> ' . |
|
53 | - Display::return_icon(('back.png'), get_lang('FolderView'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
52 | + $header .= '<a href="gradebook_view_result.php?'.api_get_cidreq().'&selecteval='.Security::remove_XSS($_GET['selecteval']).'"> '. |
|
53 | + Display::return_icon(('back.png'), get_lang('FolderView'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
54 | 54 | } |
55 | 55 | $header .= '</div>'; |
56 | 56 | } |
@@ -69,17 +69,17 @@ discard block |
||
69 | 69 | $score = $evalobj->calc_score(); |
70 | 70 | |
71 | 71 | if ($score != null) { |
72 | - $average = get_lang('Average') . ' :<b> ' . $scoredisplay->display_score($score, SCORE_AVERAGE) . '</b>'; |
|
72 | + $average = get_lang('Average').' :<b> '.$scoredisplay->display_score($score, SCORE_AVERAGE).'</b>'; |
|
73 | 73 | $student_score = $evalobj->calc_score(api_get_user_id()); |
74 | 74 | $student_score = Display::tag( |
75 | 75 | 'h3', |
76 | - get_lang('Score') . ': ' . $scoredisplay->display_score($student_score, SCORE_DIV_PERCENT) |
|
76 | + get_lang('Score').': '.$scoredisplay->display_score($student_score, SCORE_DIV_PERCENT) |
|
77 | 77 | ); |
78 | 78 | } |
79 | 79 | } |
80 | 80 | $description = ""; |
81 | 81 | if (!$evalobj->get_description() == '') { |
82 | - $description = get_lang('Description') . ' :<b> ' . $evalobj->get_description() . '</b><br>'; |
|
82 | + $description = get_lang('Description').' :<b> '.$evalobj->get_description().'</b><br>'; |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | if ($evalobj->get_course_code() == null) { |
@@ -89,17 +89,17 @@ discard block |
||
89 | 89 | } |
90 | 90 | |
91 | 91 | $evalinfo = '<table width="100%" border="0"><tr><td>'; |
92 | - $evalinfo .= '<h2>' . $evalobj->get_name() . '</h2><hr>'; |
|
92 | + $evalinfo .= '<h2>'.$evalobj->get_name().'</h2><hr>'; |
|
93 | 93 | $evalinfo .= $description; |
94 | - $evalinfo .= get_lang('Course') . ' :<b> ' . $course . '</b><br />'; |
|
95 | - $evalinfo .= get_lang('QualificationNumeric') . ' :<b> ' . $evalobj->get_max() . '</b><br>' . $average; |
|
94 | + $evalinfo .= get_lang('Course').' :<b> '.$course.'</b><br />'; |
|
95 | + $evalinfo .= get_lang('QualificationNumeric').' :<b> '.$evalobj->get_max().'</b><br>'.$average; |
|
96 | 96 | |
97 | 97 | if (!api_is_allowed_to_edit()) { |
98 | 98 | $evalinfo .= $student_score; |
99 | 99 | } |
100 | 100 | |
101 | 101 | if (!$evalobj->has_results()) { |
102 | - $evalinfo .= '<br /><i>' . get_lang('NoResultsInEvaluation') . '</i>'; |
|
102 | + $evalinfo .= '<br /><i>'.get_lang('NoResultsInEvaluation').'</i>'; |
|
103 | 103 | } elseif ($scoredisplay->is_custom() && api_get_self() != '/main/gradebook/gradebook_statistics.php') { |
104 | 104 | if (api_is_allowed_to_edit(null, true)) { |
105 | 105 | if ($page != 'statistics') { |
@@ -109,8 +109,8 @@ discard block |
||
109 | 109 | } |
110 | 110 | if ($page != 'statistics') { |
111 | 111 | if (api_is_allowed_to_edit(null, true)) { |
112 | - $evalinfo .= '<br /><a href="gradebook_statistics.php?' . api_get_cidreq() . '&selecteval=' . Security::remove_XSS($_GET['selecteval']) . '"> ' . |
|
113 | - Display::return_icon('statistics.png', get_lang('ViewStatistics'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
112 | + $evalinfo .= '<br /><a href="gradebook_statistics.php?'.api_get_cidreq().'&selecteval='.Security::remove_XSS($_GET['selecteval']).'"> '. |
|
113 | + Display::return_icon('statistics.png', get_lang('ViewStatistics'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
114 | 114 | } |
115 | 115 | } |
116 | 116 | $evalinfo .= '</td><td>'.Display::return_icon('tutorial.gif', '', ['style' => 'float:right; position:relative;']).'</td></table>'; |
@@ -135,14 +135,14 @@ discard block |
||
135 | 135 | $select_cat = $catobj->get_parent_id(); |
136 | 136 | $url = 'gradebook_flatview.php'; |
137 | 137 | } |
138 | - $header .= '<a href="' . $url . '?' . api_get_cidreq() . '&selectcat=' . $select_cat . '">' . |
|
139 | - Display::return_icon('back.png', get_lang('FolderView'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
138 | + $header .= '<a href="'.$url.'?'.api_get_cidreq().'&selectcat='.$select_cat.'">'. |
|
139 | + Display::return_icon('back.png', get_lang('FolderView'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
140 | 140 | |
141 | 141 | $pageNum = isset($_GET['flatviewlist_page_nr']) ? intval($_GET['flatviewlist_page_nr']) : null; |
142 | 142 | $perPage = isset($_GET['flatviewlist_per_page']) ? intval($_GET['flatviewlist_per_page']) : null; |
143 | 143 | $offset = isset($_GET['offset']) ? $_GET['offset'] : '0'; |
144 | 144 | |
145 | - $exportCsvUrl = api_get_self() . '?' . api_get_cidreq() . '&' . http_build_query([ |
|
145 | + $exportCsvUrl = api_get_self().'?'.api_get_cidreq().'&'.http_build_query([ |
|
146 | 146 | 'export_format' => 'csv', |
147 | 147 | 'export_report' => 'export_report', |
148 | 148 | 'selectcat' => $catobj->get_id() |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | $exportCsvUrl |
154 | 154 | ); |
155 | 155 | |
156 | - $exportXlsUrl = api_get_self() . '?' . api_get_cidreq() . '&' . http_build_query([ |
|
156 | + $exportXlsUrl = api_get_self().'?'.api_get_cidreq().'&'.http_build_query([ |
|
157 | 157 | 'export_format' => 'xls', |
158 | 158 | 'export_report' => 'export_report', |
159 | 159 | 'selectcat' => $catobj->get_id() |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | $exportXlsUrl |
165 | 165 | ); |
166 | 166 | |
167 | - $exportDocUrl = api_get_self() . '?' . api_get_cidreq() . '&' . http_build_query([ |
|
167 | + $exportDocUrl = api_get_self().'?'.api_get_cidreq().'&'.http_build_query([ |
|
168 | 168 | 'export_format' => 'doc', |
169 | 169 | 'export_report' => 'export_report', |
170 | 170 | 'selectcat' => $catobj->get_id() |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | $exportDocUrl |
176 | 176 | ); |
177 | 177 | |
178 | - $exportPrintUrl = api_get_self() . '?' . api_get_cidreq() . '&' . http_build_query([ |
|
178 | + $exportPrintUrl = api_get_self().'?'.api_get_cidreq().'&'.http_build_query([ |
|
179 | 179 | 'print' => '', |
180 | 180 | 'selectcat' => $catobj->get_id(), |
181 | 181 | ]); |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | ['target' => '_blank'] |
187 | 187 | ); |
188 | 188 | |
189 | - $exportPdfUrl = api_get_self() . '?' . api_get_cidreq() . '&' . http_build_query([ |
|
189 | + $exportPdfUrl = api_get_self().'?'.api_get_cidreq().'&'.http_build_query([ |
|
190 | 190 | 'exportpdf' => '', |
191 | 191 | 'selectcat' => $catobj->get_id(), |
192 | 192 | 'offset' => $offset, |
@@ -297,7 +297,7 @@ discard block |
||
297 | 297 | $aditionalButtons .= isset($certificateLinkInfo['badge_link']) ? $certificateLinkInfo['badge_link'] : ''; |
298 | 298 | $aditionalButtons .= '</div>'; |
299 | 299 | } |
300 | - $scoreinfo .= '<strong>' . sprintf(get_lang('TotalX'), $scorecourse_display . $aditionalButtons). '</strong>'; |
|
300 | + $scoreinfo .= '<strong>'.sprintf(get_lang('TotalX'), $scorecourse_display.$aditionalButtons).'</strong>'; |
|
301 | 301 | |
302 | 302 | } |
303 | 303 | Display :: display_normal_message($scoreinfo, false); |
@@ -308,10 +308,10 @@ discard block |
||
308 | 308 | $header = '<div class="actions"><table>'; |
309 | 309 | $header .= '<tr>'; |
310 | 310 | if (!$selectcat == '0') { |
311 | - $header .= '<td><a href="' . api_get_self() . '?selectcat=' . $catobj->get_parent_id() . '">' . |
|
312 | - Display::return_icon('back.png', get_lang('BackTo') . ' ' . get_lang('RootCat'), '', ICON_SIZE_MEDIUM) . '</a></td>'; |
|
311 | + $header .= '<td><a href="'.api_get_self().'?selectcat='.$catobj->get_parent_id().'">'. |
|
312 | + Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('RootCat'), '', ICON_SIZE_MEDIUM).'</a></td>'; |
|
313 | 313 | } |
314 | - $header .= '<td>' . get_lang('CurrentCategory') . '</td>' . |
|
314 | + $header .= '<td>'.get_lang('CurrentCategory').'</td>'. |
|
315 | 315 | '<td><form name="selector"><select name="selectcat" onchange="document.selector.submit()">'; |
316 | 316 | $cats = Category :: load(); |
317 | 317 | |
@@ -324,15 +324,15 @@ discard block |
||
324 | 324 | } |
325 | 325 | $line = isset($line) ? $line : ''; |
326 | 326 | if (isset($_GET['selectcat']) && $_GET['selectcat'] == $cat[0]) { |
327 | - $header .= '<option selected value=' . $cat[0] . '>' . $line . ' ' . $cat[1] . '</option>'; |
|
327 | + $header .= '<option selected value='.$cat[0].'>'.$line.' '.$cat[1].'</option>'; |
|
328 | 328 | } else { |
329 | - $header .= '<option value=' . $cat[0] . '>' . $line . ' ' . $cat[1] . '</option>'; |
|
329 | + $header .= '<option value='.$cat[0].'>'.$line.' '.$cat[1].'</option>'; |
|
330 | 330 | } |
331 | 331 | $line = ''; |
332 | 332 | } |
333 | 333 | $header .= '</select></form></td>'; |
334 | 334 | if (!empty($simple_search_form) && $message_resource === false) { |
335 | - $header .= '<td style="vertical-align: top;">' . $simple_search_form->toHtml() . '</td>'; |
|
335 | + $header .= '<td style="vertical-align: top;">'.$simple_search_form->toHtml().'</td>'; |
|
336 | 336 | } else { |
337 | 337 | $header .= '<td></td>'; |
338 | 338 | } |
@@ -343,9 +343,9 @@ discard block |
||
343 | 343 | } elseif (!(isset($_GET['studentoverview']))) { |
344 | 344 | |
345 | 345 | } else { |
346 | - $header .= '<td style="vertical-align: top;"><a href="' . api_get_self() . '?' . api_get_cidreq() . '&studentoverview=&exportpdf=&selectcat=' . $catobj->get_id() . '" target="_blank"> |
|
346 | + $header .= '<td style="vertical-align: top;"><a href="'.api_get_self().'?'.api_get_cidreq().'&studentoverview=&exportpdf=&selectcat='.$catobj->get_id().'" target="_blank"> |
|
347 | 347 | '.Display::return_icon('pdf.png', get_lang('ExportPDF'), [], ICON_SIZE_MEDIUM).' |
348 | - ' . get_lang('ExportPDF') . '</a>'; |
|
348 | + ' . get_lang('ExportPDF').'</a>'; |
|
349 | 349 | } |
350 | 350 | $header .= '</td></tr>'; |
351 | 351 | $header .= '</table></div>'; |
@@ -358,33 +358,33 @@ discard block |
||
358 | 358 | |
359 | 359 | if (api_is_allowed_to_edit(null, true)) { |
360 | 360 | if (empty($grade_model_id) || $grade_model_id == -1) { |
361 | - $actionsLeft .= '<a href="gradebook_add_cat.php?' . api_get_cidreq() . '&selectcat=' . $catobj->get_id() . '">' . |
|
362 | - Display::return_icon('new_folder.png', get_lang('AddGradebook'), array(), ICON_SIZE_MEDIUM) . '</a></td>'; |
|
361 | + $actionsLeft .= '<a href="gradebook_add_cat.php?'.api_get_cidreq().'&selectcat='.$catobj->get_id().'">'. |
|
362 | + Display::return_icon('new_folder.png', get_lang('AddGradebook'), array(), ICON_SIZE_MEDIUM).'</a></td>'; |
|
363 | 363 | } |
364 | 364 | if ($selectcat == '0') { |
365 | 365 | |
366 | 366 | } else { |
367 | 367 | $my_category = $catobj->shows_all_information_an_category($catobj->get_id()); |
368 | 368 | if ($my_api_cidreq == '') { |
369 | - $my_api_cidreq = 'cidReq=' . $my_category['course_code']; |
|
369 | + $my_api_cidreq = 'cidReq='.$my_category['course_code']; |
|
370 | 370 | } |
371 | 371 | if ($show_add_link && !$message_resource) { |
372 | - $actionsLeft .= '<a href="gradebook_add_eval.php?' . $my_api_cidreq . '&selectcat=' . $catobj->get_id() . '" >' . |
|
373 | - Display::return_icon('new_evaluation.png', get_lang('NewEvaluation'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
372 | + $actionsLeft .= '<a href="gradebook_add_eval.php?'.$my_api_cidreq.'&selectcat='.$catobj->get_id().'" >'. |
|
373 | + Display::return_icon('new_evaluation.png', get_lang('NewEvaluation'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
374 | 374 | $cats = Category :: load($selectcat); |
375 | 375 | |
376 | 376 | if ($cats[0]->get_course_code() != null && !$message_resource) { |
377 | - $actionsLeft .= '<a href="gradebook_add_link.php?' . $my_api_cidreq . '&selectcat=' . $catobj->get_id() . '">' . |
|
378 | - Display::return_icon('new_online_evaluation.png', get_lang('MakeLink'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
377 | + $actionsLeft .= '<a href="gradebook_add_link.php?'.$my_api_cidreq.'&selectcat='.$catobj->get_id().'">'. |
|
378 | + Display::return_icon('new_online_evaluation.png', get_lang('MakeLink'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
379 | 379 | } else { |
380 | - $actionsLeft .= '<a href="gradebook_add_link_select_course.php?' . $my_api_cidreq . '&selectcat=' . $catobj->get_id() . '">' . |
|
381 | - Display::return_icon('new_online_evaluation.png', get_lang('MakeLink'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
380 | + $actionsLeft .= '<a href="gradebook_add_link_select_course.php?'.$my_api_cidreq.'&selectcat='.$catobj->get_id().'">'. |
|
381 | + Display::return_icon('new_online_evaluation.png', get_lang('MakeLink'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
382 | 382 | } |
383 | 383 | } |
384 | 384 | |
385 | 385 | if (!$message_resource) { |
386 | - $actionsLeft .= '<a href="gradebook_flatview.php?' . $my_api_cidreq . '&selectcat=' . $catobj->get_id() . '">' . |
|
387 | - Display::return_icon('stats.png', get_lang('FlatView'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
386 | + $actionsLeft .= '<a href="gradebook_flatview.php?'.$my_api_cidreq.'&selectcat='.$catobj->get_id().'">'. |
|
387 | + Display::return_icon('stats.png', get_lang('FlatView'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
388 | 388 | |
389 | 389 | if ($my_category['generate_certificates'] == 1) { |
390 | 390 | $actionsLeft .= Display::url( |
@@ -394,7 +394,7 @@ discard block |
||
394 | 394 | '', |
395 | 395 | ICON_SIZE_MEDIUM |
396 | 396 | ), |
397 | - "gradebook_display_certificate.php?$my_api_cidreq&cat_id=" . $selectcat |
|
397 | + "gradebook_display_certificate.php?$my_api_cidreq&cat_id=".$selectcat |
|
398 | 398 | ); |
399 | 399 | } |
400 | 400 | |
@@ -405,29 +405,29 @@ discard block |
||
405 | 405 | '', |
406 | 406 | ICON_SIZE_MEDIUM |
407 | 407 | ), |
408 | - "gradebook_display_summary.php?$my_api_cidreq&selectcat=" . $selectcat |
|
408 | + "gradebook_display_summary.php?$my_api_cidreq&selectcat=".$selectcat |
|
409 | 409 | ); |
410 | 410 | |
411 | 411 | // Right icons |
412 | - $actionsRight = '<a href="gradebook_edit_cat.php?editcat=' . $catobj->get_id() . '&cidReq=' . $catobj->get_course_code() . '&id_session='.$catobj->get_session_id(). '">' . |
|
413 | - Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
414 | - $actionsRight .= '<a href="../document/document.php?curdirpath=/certificates&' . $my_api_cidreq . '&origin=gradebook&selectcat=' . $catobj->get_id() . '">' . |
|
415 | - Display::return_icon('certificate.png', get_lang('AttachCertificate'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
412 | + $actionsRight = '<a href="gradebook_edit_cat.php?editcat='.$catobj->get_id().'&cidReq='.$catobj->get_course_code().'&id_session='.$catobj->get_session_id().'">'. |
|
413 | + Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
414 | + $actionsRight .= '<a href="../document/document.php?curdirpath=/certificates&'.$my_api_cidreq.'&origin=gradebook&selectcat='.$catobj->get_id().'">'. |
|
415 | + Display::return_icon('certificate.png', get_lang('AttachCertificate'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
416 | 416 | |
417 | 417 | if (empty($categories)) { |
418 | - $actionsRight .= '<a href="gradebook_edit_all.php?id_session=' . api_get_session_id() . '&' . $my_api_cidreq . '&selectcat=' . $catobj->get_id() . '">' . |
|
419 | - Display::return_icon('percentage.png', get_lang('EditAllWeights'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
418 | + $actionsRight .= '<a href="gradebook_edit_all.php?id_session='.api_get_session_id().'&'.$my_api_cidreq.'&selectcat='.$catobj->get_id().'">'. |
|
419 | + Display::return_icon('percentage.png', get_lang('EditAllWeights'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
420 | 420 | } |
421 | 421 | $score_display_custom = api_get_setting('gradebook_score_display_custom'); |
422 | 422 | if (api_get_setting('teachers_can_change_score_settings') == 'true' && $score_display_custom['my_display_custom'] == 'true') { |
423 | - $actionsRight .= '<a href="gradebook_scoring_system.php?' . $my_api_cidreq . '&selectcat=' . $catobj->get_id() . '">' . |
|
424 | - Display::return_icon('ranking.png', get_lang('ScoreEdit'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
423 | + $actionsRight .= '<a href="gradebook_scoring_system.php?'.$my_api_cidreq.'&selectcat='.$catobj->get_id().'">'. |
|
424 | + Display::return_icon('ranking.png', get_lang('ScoreEdit'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
425 | 425 | } |
426 | 426 | |
427 | 427 | } |
428 | 428 | } |
429 | 429 | } elseif (isset($_GET['search'])) { |
430 | - echo $header = '<b>' . get_lang('SearchResults') . ' :</b>'; |
|
430 | + echo $header = '<b>'.get_lang('SearchResults').' :</b>'; |
|
431 | 431 | } |
432 | 432 | |
433 | 433 | $isDrhOfCourse = CourseManager::isUserSubscribedInCourseAsDrh( |
@@ -436,26 +436,26 @@ discard block |
||
436 | 436 | ); |
437 | 437 | |
438 | 438 | if ($isDrhOfCourse) { |
439 | - $$actionsLeft .= '<a href="gradebook_flatview.php?' . $my_api_cidreq . '&selectcat=' . $catobj->get_id() . '">' . |
|
440 | - Display::return_icon('stats.png', get_lang('FlatView'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
439 | + $$actionsLeft .= '<a href="gradebook_flatview.php?'.$my_api_cidreq.'&selectcat='.$catobj->get_id().'">'. |
|
440 | + Display::return_icon('stats.png', get_lang('FlatView'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
441 | 441 | } |
442 | 442 | |
443 | - if (api_is_allowed_to_edit(null, true)){ |
|
443 | + if (api_is_allowed_to_edit(null, true)) { |
|
444 | 444 | echo $toolbar = Display::toolbarAction('gradebook-actions', array($actionsLeft, $actionsRight)); |
445 | 445 | } |
446 | 446 | |
447 | 447 | if (api_is_allowed_to_edit(null, true)) { |
448 | 448 | $weight = intval($catobj->get_weight()) > 0 ? $catobj->get_weight() : 0; |
449 | - $weight = '<strong>' . get_lang('TotalWeight') . ' : </strong>' . $weight; |
|
449 | + $weight = '<strong>'.get_lang('TotalWeight').' : </strong>'.$weight; |
|
450 | 450 | |
451 | 451 | $min_certification = (intval($catobj->get_certificate_min_score() > 0) ? $catobj->get_certificate_min_score() : 0); |
452 | - $min_certification = get_lang('CertificateMinScore') . ' : ' . $min_certification; |
|
453 | - $edit_icon = '<a href="gradebook_edit_cat.php?editcat=' . $catobj->get_id() . '&cidReq=' . $catobj->get_course_code() . '&id_session='.$catobj->get_session_id(). '">' . |
|
454 | - Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL) . '</a>'; |
|
452 | + $min_certification = get_lang('CertificateMinScore').' : '.$min_certification; |
|
453 | + $edit_icon = '<a href="gradebook_edit_cat.php?editcat='.$catobj->get_id().'&cidReq='.$catobj->get_course_code().'&id_session='.$catobj->get_session_id().'">'. |
|
454 | + Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL).'</a>'; |
|
455 | 455 | //$msg = Display::tag('h3', $weight.' - '.$min_certification); |
456 | - $msg = $weight . ' - ' . $min_certification . $edit_icon; |
|
456 | + $msg = $weight.' - '.$min_certification.$edit_icon; |
|
457 | 457 | //@todo show description |
458 | - $description = (($catobj->get_description() == "" || is_null($catobj->get_description())) ? '' : '<strong>' . get_lang('GradebookDescriptionLog') . '</strong>' . ': ' . $catobj->get_description()); |
|
458 | + $description = (($catobj->get_description() == "" || is_null($catobj->get_description())) ? '' : '<strong>'.get_lang('GradebookDescriptionLog').'</strong>'.': '.$catobj->get_description()); |
|
459 | 459 | Display::display_normal_message($msg, false); |
460 | 460 | if (!empty($description)) { |
461 | 461 | echo Display::div($description, array()); |
@@ -483,24 +483,24 @@ discard block |
||
483 | 483 | $cattotal = Category :: load(0); |
484 | 484 | $scoretotal = $cattotal[0]->calc_score(api_get_user_id()); |
485 | 485 | $scoretotal_display = (isset($scoretotal) ? $scoredisplay->display_score($scoretotal, SCORE_PERCENT) : get_lang('NoResultsAvailable')); |
486 | - $scoreinfo = get_lang('StatsStudent') . ' :<b> ' . $user['complete_name']. '</b><br />'; |
|
486 | + $scoreinfo = get_lang('StatsStudent').' :<b> '.$user['complete_name'].'</b><br />'; |
|
487 | 487 | if ((!$catobj->get_id() == '0') && (!isset($_GET['studentoverview'])) && (!isset($_GET['search']))) |
488 | - $scoreinfo.= '<br />' . get_lang('TotalForThisCategory') . ' : <b>' . $scorecourse_display . '</b>'; |
|
489 | - $scoreinfo.= '<br />' . get_lang('Total') . ' : <b>' . $scoretotal_display . '</b>'; |
|
488 | + $scoreinfo .= '<br />'.get_lang('TotalForThisCategory').' : <b>'.$scorecourse_display.'</b>'; |
|
489 | + $scoreinfo .= '<br />'.get_lang('Total').' : <b>'.$scoretotal_display.'</b>'; |
|
490 | 490 | Display :: display_normal_message($scoreinfo, false); |
491 | 491 | } |
492 | 492 | // show navigation tree and buttons? |
493 | 493 | $header = '<div class="actions">'; |
494 | 494 | |
495 | 495 | if ($is_course_admin) { |
496 | - $header .= '<a href="gradebook_flatview.php?' . api_get_cidreq() . '&selectcat=' . $catobj->get_id() . '">' . Display::return_icon('stats.png', get_lang('FlatView'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
497 | - $header .= '<a href="gradebook_scoring_system.php?' . api_get_cidreq() . '&selectcat=' . $catobj->get_id() . '">' . Display::return_icon('settings.png', get_lang('ScoreEdit'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
496 | + $header .= '<a href="gradebook_flatview.php?'.api_get_cidreq().'&selectcat='.$catobj->get_id().'">'.Display::return_icon('stats.png', get_lang('FlatView'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
497 | + $header .= '<a href="gradebook_scoring_system.php?'.api_get_cidreq().'&selectcat='.$catobj->get_id().'">'.Display::return_icon('settings.png', get_lang('ScoreEdit'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
498 | 498 | } elseif (!(isset($_GET['studentoverview']))) { |
499 | - $header .= '<a href="' . api_get_self() . '?' . api_get_cidreq() . '&studentoverview=&selectcat=' . $catobj->get_id() . '">' . Display::return_icon('view_list.gif', get_lang('FlatView')) . ' ' . get_lang('FlatView') . '</a>'; |
|
499 | + $header .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&studentoverview=&selectcat='.$catobj->get_id().'">'.Display::return_icon('view_list.gif', get_lang('FlatView')).' '.get_lang('FlatView').'</a>'; |
|
500 | 500 | } else { |
501 | - $header .= '<a href="' . api_get_self() . '?' . api_get_cidreq() . '&studentoverview=&exportpdf=&selectcat=' . $catobj->get_id() . '" target="_blank">' . Display::return_icon('pdf.png', get_lang('ExportPDF'), '', ICON_SIZE_MEDIUM) . '</a>'; |
|
501 | + $header .= '<a href="'.api_get_self().'?'.api_get_cidreq().'&studentoverview=&exportpdf=&selectcat='.$catobj->get_id().'" target="_blank">'.Display::return_icon('pdf.png', get_lang('ExportPDF'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
502 | 502 | } |
503 | - $header.='</div>'; |
|
503 | + $header .= '</div>'; |
|
504 | 504 | echo $header; |
505 | 505 | } |
506 | 506 | |
@@ -526,8 +526,8 @@ discard block |
||
526 | 526 | $item = $evals_links[$count]; |
527 | 527 | $score = $item->calc_score($user_id); |
528 | 528 | $my_score_denom = ($score[1] == 0) ? 1 : $score[1]; |
529 | - $item_value+=$score[0] / $my_score_denom * $item->get_weight(); |
|
530 | - $item_total+=$item->get_weight(); |
|
529 | + $item_value += $score[0] / $my_score_denom * $item->get_weight(); |
|
530 | + $item_total += $item->get_weight(); |
|
531 | 531 | } |
532 | 532 | $item_value = number_format($item_value, 2, '.', ' '); |
533 | 533 | $total_score = array($item_value, $item_total); |
@@ -541,17 +541,17 @@ discard block |
||
541 | 541 | $imageUrl = UserManager::getUserPicture($userid); |
542 | 542 | |
543 | 543 | $info = '<div class="row"><div class="col-md-3">'; |
544 | - $info .= '<div class="thumbnail"><img src="' . $imageUrl . '" /></div>'; |
|
544 | + $info .= '<div class="thumbnail"><img src="'.$imageUrl.'" /></div>'; |
|
545 | 545 | $info .= '</div>'; |
546 | 546 | $info .= '<div class="col-md-6">'; |
547 | - $info .= get_lang('Name') . ' : <a target="_blank" href="' . api_get_path(WEB_CODE_PATH) . 'social/profile.php?u=' . $userid . '"> ' . |
|
548 | - $user['complete_name'] . '</a><br />'; |
|
547 | + $info .= get_lang('Name').' : <a target="_blank" href="'.api_get_path(WEB_CODE_PATH).'social/profile.php?u='.$userid.'"> '. |
|
548 | + $user['complete_name'].'</a><br />'; |
|
549 | 549 | |
550 | 550 | if (api_get_setting('show_email_addresses') == 'true') { |
551 | - $info .= get_lang('Email') . ' : <a href="mailto:' . $user['email'] . '">' . $user['email'] . '</a><br />'; |
|
551 | + $info .= get_lang('Email').' : <a href="mailto:'.$user['email'].'">'.$user['email'].'</a><br />'; |
|
552 | 552 | } |
553 | 553 | |
554 | - $info .= get_lang('TotalUser') . ' : <b>' . $scorecourse_display . '</b>'; |
|
554 | + $info .= get_lang('TotalUser').' : <b>'.$scorecourse_display.'</b>'; |
|
555 | 555 | $info .= '</div>'; |
556 | 556 | $info .= '</div>'; |
557 | 557 |
@@ -87,8 +87,8 @@ discard block |
||
87 | 87 | // generate the data to display |
88 | 88 | $sortable_data = array(); |
89 | 89 | foreach ($data_array as $data) { |
90 | - if ($data[2]!="") {//filter by course removed |
|
91 | - $row = array (); |
|
90 | + if ($data[2] != "") {//filter by course removed |
|
91 | + $row = array(); |
|
92 | 92 | $row[] = $this->build_type_column($data[0]); |
93 | 93 | $row[] = $this->build_name_link($data[0]); |
94 | 94 | $row[] = $data[2]; |
@@ -124,15 +124,15 @@ discard block |
||
124 | 124 | // evaluation |
125 | 125 | case 'E': |
126 | 126 | return ' ' |
127 | - . '<a href="gradebook_view_result.php?selecteval=' . $item->get_id() . '">' |
|
127 | + . '<a href="gradebook_view_result.php?selecteval='.$item->get_id().'">' |
|
128 | 128 | . $item->get_name() |
129 | 129 | . '</a>'; |
130 | 130 | // link |
131 | 131 | case 'L': |
132 | - return ' <a href="' . $item->get_link() . '">' |
|
132 | + return ' <a href="'.$item->get_link().'">' |
|
133 | 133 | . $item->get_name() |
134 | 134 | . '</a>' |
135 | - . ' [' . $item->get_type_name() . ']'; |
|
135 | + . ' ['.$item->get_type_name().']'; |
|
136 | 136 | } |
137 | 137 | } |
138 | 138 | } |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | |
57 | 57 | protected function build_move() |
58 | 58 | { |
59 | - $renderer =& $this->defaultRenderer(); |
|
59 | + $renderer = & $this->defaultRenderer(); |
|
60 | 60 | $renderer->setCustomElementTemplate('<span>{element}</span> '); |
61 | 61 | $this->addElement( |
62 | 62 | 'static', |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | $link = LinkFactory::create($link); |
139 | 139 | if (!empty($courseCode)) { |
140 | 140 | $link->set_course_code($courseCode); |
141 | - } elseif(!empty($_GET['course_code'])) { |
|
141 | + } elseif (!empty($_GET['course_code'])) { |
|
142 | 142 | $link->set_course_code(Database::escape_string($_GET['course_code'], null, false)); |
143 | 143 | } |
144 | 144 |