@@ -563,7 +563,7 @@ |
||
563 | 563 | $photo = '<img src="' . $userPicture. '" alt="' . api_get_person_name($user[2], $user[3]) . '" title="' . api_get_person_name($user[2], $user[3]) . '" />'; |
564 | 564 | $button = '<a href="javascript:void(0)" onclick="load_course_list(\'div_' . $user_id . '\',' . $user_id . ', \'' . $user[5] . '\')">' |
565 | 565 | . Display::return_icon('view_more_stats.gif', get_lang('Info')) . |
566 | - '</a> '; |
|
566 | + '</a> '; |
|
567 | 567 | $users[] = array( |
568 | 568 | $photo, |
569 | 569 | $user_id, |
@@ -352,7 +352,7 @@ discard block |
||
352 | 352 | |
353 | 353 | foreach ($admins as $admin) { |
354 | 354 | $select_admins.= "<option value = '" . $admin['user_id'] . "' " . (($user_id == $admin['user_id']) ? ("selected='selected'") : '') . ">" . |
355 | - $admin['complete_name'] . "</option>"; |
|
355 | + $admin['complete_name'] . "</option>"; |
|
356 | 356 | } |
357 | 357 | $select_admins .= "</select>"; |
358 | 358 | echo '<div id="dialog-form" title="' . $plugin->get_lang('AssignTicket') . '" >'; |
@@ -548,7 +548,7 @@ discard block |
||
548 | 548 | $form->addElement( |
549 | 549 | 'checkbox', |
550 | 550 | 'confirmation', |
551 | - null, |
|
551 | + null, |
|
552 | 552 | $plugin->get_lang('RequestConfirmation') |
553 | 553 | ); |
554 | 554 | } |
@@ -101,7 +101,7 @@ |
||
101 | 101 | "categories.php?action=delete&id={$row['id']}" |
102 | 102 | ); |
103 | 103 | |
104 | - return $result; |
|
104 | + return $result; |
|
105 | 105 | } |
106 | 106 | |
107 | 107 | Display::display_header($plugin->get_lang('MyTickets')); |
@@ -101,7 +101,7 @@ |
||
101 | 101 | "categories.php?action=delete&id={$row['id']}" |
102 | 102 | ); |
103 | 103 | |
104 | - return $result; |
|
104 | + return $result; |
|
105 | 105 | } |
106 | 106 | |
107 | 107 | Display::display_header($plugin->get_lang('MyTickets')); |
@@ -396,7 +396,7 @@ |
||
396 | 396 | '<a href="' . api_get_path(WEB_PLUGIN_PATH) . 'ticket/src/new_ticket.php">' . |
397 | 397 | Display::return_icon('add.png', $plugin->get_lang('TckNew'), '', '32') . |
398 | 398 | '</a>' . |
399 | - '</span>'; |
|
399 | + '</span>'; |
|
400 | 400 | echo '<span style="float:right;">' . |
401 | 401 | '</span>'; |
402 | 402 | echo '</div>'; |
@@ -1480,7 +1480,7 @@ discard block |
||
1480 | 1480 | ]; |
1481 | 1481 | Database::update($table, $newParams, ['id = ? ' => $ticketId]); |
1482 | 1482 | |
1483 | - self::sendNotification( |
|
1483 | + self::sendNotification( |
|
1484 | 1484 | $ticketId, |
1485 | 1485 | $userId, |
1486 | 1486 | get_lang('TicketUpdated'), |
@@ -1901,9 +1901,9 @@ discard block |
||
1901 | 1901 | return $list; |
1902 | 1902 | } |
1903 | 1903 | |
1904 | - /** |
|
1905 | - * @return array |
|
1906 | - */ |
|
1904 | + /** |
|
1905 | + * @return array |
|
1906 | + */ |
|
1907 | 1907 | public static function getPriorityList() |
1908 | 1908 | { |
1909 | 1909 | $projects = Database::getManager()->getRepository('ChamiloTicketBundle:Priority')->findAll(); |
@@ -49,12 +49,12 @@ discard block |
||
49 | 49 | ); |
50 | 50 | } |
51 | 51 | |
52 | - /** |
|
53 | - * Displays the page header |
|
54 | - * @param string The name of the page (will be showed in the page title) |
|
55 | - * @param string Optional help file name |
|
56 | - * @param string $page_header |
|
57 | - */ |
|
52 | + /** |
|
53 | + * Displays the page header |
|
54 | + * @param string The name of the page (will be showed in the page title) |
|
55 | + * @param string Optional help file name |
|
56 | + * @param string $page_header |
|
57 | + */ |
|
58 | 58 | public static function display_header($tool_name ='', $help = null, $page_header = null) |
59 | 59 | { |
60 | 60 | $origin = api_get_origin(); |
@@ -448,7 +448,7 @@ discard block |
||
448 | 448 | */ |
449 | 449 | public static function display_normal_message($message, $filter = true, $returnValue = false) |
450 | 450 | { |
451 | - $message = self::return_message($message, 'normal', $filter); |
|
451 | + $message = self::return_message($message, 'normal', $filter); |
|
452 | 452 | if ($returnValue) { |
453 | 453 | return $message; |
454 | 454 | } else { |
@@ -528,22 +528,22 @@ discard block |
||
528 | 528 | } |
529 | 529 | |
530 | 530 | if ($filter) { |
531 | - $message = api_htmlentities($message, ENT_QUOTES, api_is_xml_http_request() ? 'UTF-8' : api_get_system_encoding()); |
|
531 | + $message = api_htmlentities($message, ENT_QUOTES, api_is_xml_http_request() ? 'UTF-8' : api_get_system_encoding()); |
|
532 | 532 | } |
533 | 533 | |
534 | 534 | $class = ""; |
535 | 535 | switch($type) { |
536 | 536 | case 'warning': |
537 | 537 | $class .= 'alert alert-warning'; |
538 | - break; |
|
538 | + break; |
|
539 | 539 | case 'error': |
540 | 540 | $class .= 'alert alert-danger'; |
541 | - break; |
|
541 | + break; |
|
542 | 542 | case 'confirmation': |
543 | 543 | case 'confirm': |
544 | 544 | case 'success': |
545 | 545 | $class .= 'alert alert-success'; |
546 | - break; |
|
546 | + break; |
|
547 | 547 | case 'normal': |
548 | 548 | default: |
549 | 549 | $class .= 'alert alert-info'; |
@@ -686,7 +686,7 @@ discard block |
||
686 | 686 | * @param array additional attributes (for instance height, width, onclick, ...) |
687 | 687 | * @param integer The wanted width of the icon (to be looked for in the corresponding img/icons/ folder) |
688 | 688 | * @return void |
689 | - */ |
|
689 | + */ |
|
690 | 690 | public static function display_icon( |
691 | 691 | $image, |
692 | 692 | $alt_text = '', |
@@ -722,7 +722,7 @@ discard block |
||
722 | 722 | * @author Julio Montoya 2010 Function improved, adding image constants |
723 | 723 | * @author Yannick Warnier 2011 Added size handler |
724 | 724 | * @version Feb 2011 |
725 | - */ |
|
725 | + */ |
|
726 | 726 | public static function return_icon( |
727 | 727 | $image, |
728 | 728 | $alt_text = '', |
@@ -911,14 +911,14 @@ discard block |
||
911 | 911 | */ |
912 | 912 | public static function input($type, $name, $value, $attributes = array()) |
913 | 913 | { |
914 | - if (isset($type)) { |
|
915 | - $attributes['type']= $type; |
|
916 | - } |
|
917 | - if (isset($name)) { |
|
918 | - $attributes['name']= $name; |
|
919 | - } |
|
920 | - if (isset($value)) { |
|
921 | - $attributes['value']= $value; |
|
914 | + if (isset($type)) { |
|
915 | + $attributes['type']= $type; |
|
916 | + } |
|
917 | + if (isset($name)) { |
|
918 | + $attributes['name']= $name; |
|
919 | + } |
|
920 | + if (isset($value)) { |
|
921 | + $attributes['value']= $value; |
|
922 | 922 | } |
923 | 923 | return self::tag('input', '', $attributes); |
924 | 924 | } |
@@ -931,10 +931,10 @@ discard block |
||
931 | 931 | */ |
932 | 932 | public static function button($name, $value, $attributes = array()) |
933 | 933 | { |
934 | - if (!empty($name)) { |
|
934 | + if (!empty($name)) { |
|
935 | 935 | $attributes['name'] = $name; |
936 | - } |
|
937 | - return self::tag('button', $value, $attributes); |
|
936 | + } |
|
937 | + return self::tag('button', $value, $attributes); |
|
938 | 938 | } |
939 | 939 | |
940 | 940 | /** |
@@ -1001,7 +1001,7 @@ discard block |
||
1001 | 1001 | * in the $htmlHeadXtra variable before the display_header |
1002 | 1002 | * Add this script |
1003 | 1003 | * @example |
1004 | - * <script> |
|
1004 | + * <script> |
|
1005 | 1005 | $(function() { |
1006 | 1006 | $( "#tabs" ).tabs(); |
1007 | 1007 | }); |
@@ -1067,20 +1067,20 @@ discard block |
||
1067 | 1067 | */ |
1068 | 1068 | public static function tabsOnlyLink($headers, $selected = null) |
1069 | 1069 | { |
1070 | - $id = uniqid(); |
|
1071 | - $i = 1; |
|
1072 | - $lis = null; |
|
1073 | - foreach ($headers as $item) { |
|
1070 | + $id = uniqid(); |
|
1071 | + $i = 1; |
|
1072 | + $lis = null; |
|
1073 | + foreach ($headers as $item) { |
|
1074 | 1074 | $class = null; |
1075 | 1075 | if ($i == $selected) { |
1076 | 1076 | $class = 'active'; |
1077 | 1077 | } |
1078 | - $item = self::tag( |
|
1079 | - 'a', |
|
1080 | - $item['content'], |
|
1081 | - array('id' => $id.'-'.$i, 'href' => $item['url']) |
|
1082 | - ); |
|
1083 | - $lis .= self::tag('li', $item, array('class' => $class)); |
|
1078 | + $item = self::tag( |
|
1079 | + 'a', |
|
1080 | + $item['content'], |
|
1081 | + array('id' => $id.'-'.$i, 'href' => $item['url']) |
|
1082 | + ); |
|
1083 | + $lis .= self::tag('li', $item, array('class' => $class)); |
|
1084 | 1084 | $i++; |
1085 | 1085 | } |
1086 | 1086 | return self::tag('ul', $lis, array('class' => 'nav nav-tabs tabs-margin')); |
@@ -1292,8 +1292,8 @@ discard block |
||
1292 | 1292 | */ |
1293 | 1293 | public static function table($headers, $rows, $attributes = array()) |
1294 | 1294 | { |
1295 | - if (empty($attributes)) { |
|
1296 | - $attributes['class'] = 'data_table'; |
|
1295 | + if (empty($attributes)) { |
|
1296 | + $attributes['class'] = 'data_table'; |
|
1297 | 1297 | } |
1298 | 1298 | $table = new HTML_Table($attributes); |
1299 | 1299 | $row = 0; |
@@ -1301,17 +1301,17 @@ discard block |
||
1301 | 1301 | |
1302 | 1302 | // Course headers |
1303 | 1303 | if (!empty($headers)) { |
1304 | - foreach ($headers as $item) { |
|
1305 | - $table->setHeaderContents($row, $column, $item); |
|
1306 | - $column++; |
|
1307 | - } |
|
1308 | - $row = 1; |
|
1309 | - $column = 0; |
|
1304 | + foreach ($headers as $item) { |
|
1305 | + $table->setHeaderContents($row, $column, $item); |
|
1306 | + $column++; |
|
1307 | + } |
|
1308 | + $row = 1; |
|
1309 | + $column = 0; |
|
1310 | 1310 | } |
1311 | 1311 | |
1312 | 1312 | if (!empty($rows)) { |
1313 | - foreach($rows as $content) { |
|
1314 | - $table->setCellContents($row, $column, $content); |
|
1313 | + foreach($rows as $content) { |
|
1314 | + $table->setCellContents($row, $column, $content); |
|
1315 | 1315 | $row++; |
1316 | 1316 | } |
1317 | 1317 | } |
@@ -1417,7 +1417,7 @@ discard block |
||
1417 | 1417 | //$item_property['tool'] != TOOL_DROPBOX && |
1418 | 1418 | $item_property['tool'] != TOOL_NOTEBOOK && |
1419 | 1419 | $item_property['tool'] != TOOL_CHAT) |
1420 | - ) |
|
1420 | + ) |
|
1421 | 1421 | ) |
1422 | 1422 | // Take only what's visible or "invisible but where the user is a teacher" or where the visibility is unset. |
1423 | 1423 | && ($item_property['visibility'] == '1' |
@@ -1433,7 +1433,7 @@ discard block |
||
1433 | 1433 | ($item_property['to_user_id'] != $user_id) && |
1434 | 1434 | (!isset($item_property['to_group_id']) || !in_array($item_property['to_group_id'], $group_ids))) |
1435 | 1435 | ) { |
1436 | - continue; |
|
1436 | + continue; |
|
1437 | 1437 | } |
1438 | 1438 | |
1439 | 1439 | // If it's a survey, make sure the user's invited. Otherwise drop it. |
@@ -1651,21 +1651,21 @@ discard block |
||
1651 | 1651 | * |
1652 | 1652 | * @param string id of the rating ul element |
1653 | 1653 | * @param string url that will be added (for jquery see hot_courses.tpl) |
1654 | - * @param string point info array see function CourseManager::get_course_ranking() |
|
1655 | - * @param bool add a div wrapper |
|
1656 | - * @todo use templates |
|
1654 | + * @param string point info array see function CourseManager::get_course_ranking() |
|
1655 | + * @param bool add a div wrapper |
|
1656 | + * @todo use templates |
|
1657 | 1657 | **/ |
1658 | 1658 | public static function return_rating_system($id, $url, $point_info = array(), $add_div_wrapper = true) |
1659 | 1659 | { |
1660 | - $number_of_users_who_voted = isset($point_info['users_who_voted']) ? $point_info['users_who_voted'] : null; |
|
1661 | - $percentage = isset($point_info['point_average']) ? $point_info['point_average'] : 0; |
|
1660 | + $number_of_users_who_voted = isset($point_info['users_who_voted']) ? $point_info['users_who_voted'] : null; |
|
1661 | + $percentage = isset($point_info['point_average']) ? $point_info['point_average'] : 0; |
|
1662 | 1662 | |
1663 | - if (!empty($percentage)) { |
|
1663 | + if (!empty($percentage)) { |
|
1664 | 1664 | $percentage = $percentage*125/100; |
1665 | 1665 | } |
1666 | - $accesses = isset($point_info['accesses']) ? $point_info['accesses'] : 0; |
|
1666 | + $accesses = isset($point_info['accesses']) ? $point_info['accesses'] : 0; |
|
1667 | 1667 | |
1668 | - $star_label = sprintf(get_lang('XStarsOutOf5'), $point_info['point_average_star']); |
|
1668 | + $star_label = sprintf(get_lang('XStarsOutOf5'), $point_info['point_average_star']); |
|
1669 | 1669 | |
1670 | 1670 | $html = '<ul id="'.$id.'" class="star-rating"> |
1671 | 1671 | <li class="current-rating" style="width:'.$percentage.'px;"></li> |
@@ -1676,26 +1676,26 @@ discard block |
||
1676 | 1676 | <li><a href="javascript:void(0);" data-link="'.$url.'&star=5" title="'.$star_label.'" class="five-stars">5</a></li> |
1677 | 1677 | </ul>'; |
1678 | 1678 | |
1679 | - $labels = array(); |
|
1679 | + $labels = array(); |
|
1680 | 1680 | |
1681 | - $labels[]= $number_of_users_who_voted == 1 ? $number_of_users_who_voted.' '.get_lang('Vote') : $number_of_users_who_voted.' '.get_lang('Votes'); |
|
1682 | - $labels[]= $accesses == 1 ? $accesses.' '.get_lang('Visit') : $accesses.' '.get_lang('Visits'); |
|
1683 | - /* if (!empty($number_of_users_who_voted)) { |
|
1681 | + $labels[]= $number_of_users_who_voted == 1 ? $number_of_users_who_voted.' '.get_lang('Vote') : $number_of_users_who_voted.' '.get_lang('Votes'); |
|
1682 | + $labels[]= $accesses == 1 ? $accesses.' '.get_lang('Visit') : $accesses.' '.get_lang('Visits'); |
|
1683 | + /* if (!empty($number_of_users_who_voted)) { |
|
1684 | 1684 | $labels[]= get_lang('Average').' '.$point_info['point_average_star'].'/5'; |
1685 | 1685 | } */ |
1686 | 1686 | |
1687 | - $labels[]= $point_info['user_vote'] ? get_lang('YourVote').' ['.$point_info['user_vote'].']' : get_lang('YourVote'). ' [?] '; |
|
1687 | + $labels[]= $point_info['user_vote'] ? get_lang('YourVote').' ['.$point_info['user_vote'].']' : get_lang('YourVote'). ' [?] '; |
|
1688 | 1688 | |
1689 | - if (!$add_div_wrapper && api_is_anonymous()) { |
|
1690 | - $labels[]= Display::tag('span', get_lang('LoginToVote'), array('class' => 'error')); |
|
1691 | - } |
|
1689 | + if (!$add_div_wrapper && api_is_anonymous()) { |
|
1690 | + $labels[]= Display::tag('span', get_lang('LoginToVote'), array('class' => 'error')); |
|
1691 | + } |
|
1692 | 1692 | |
1693 | 1693 | $html .= Display::div(implode(' | ', $labels) , array('id' => 'vote_label_'.$id, 'class' => 'vote_label_info')); |
1694 | 1694 | $html .= ' '.Display::span(' ', array('id' => 'vote_label2_'.$id)); |
1695 | 1695 | |
1696 | 1696 | if ($add_div_wrapper) { |
1697 | - $html = Display::div($html, array('id' => 'rating_wrapper_'.$id)); |
|
1698 | - } |
|
1697 | + $html = Display::div($html, array('id' => 'rating_wrapper_'.$id)); |
|
1698 | + } |
|
1699 | 1699 | |
1700 | 1700 | return $html; |
1701 | 1701 | } |
@@ -1733,8 +1733,8 @@ discard block |
||
1733 | 1733 | return self::page_header($title, $second_title); |
1734 | 1734 | } |
1735 | 1735 | |
1736 | - public static function page_subheader_and_translate($title, $second_title = null) |
|
1737 | - { |
|
1736 | + public static function page_subheader_and_translate($title, $second_title = null) |
|
1737 | + { |
|
1738 | 1738 | $title = get_lang($title); |
1739 | 1739 | return self::page_subheader($title, $second_title); |
1740 | 1740 | } |
@@ -105,8 +105,8 @@ discard block |
||
105 | 105 | |
106 | 106 | if (isset($_POST['language'])) { |
107 | 107 | |
108 | - $form->addElement('static', Security::remove_XSS($_POST['language'])); |
|
109 | - $form->addElement('hidden', 'language', Security::remove_XSS($_POST['language'])); |
|
108 | + $form->addElement('static', Security::remove_XSS($_POST['language'])); |
|
109 | + $form->addElement('hidden', 'language', Security::remove_XSS($_POST['language'])); |
|
110 | 110 | $form->addHtmlEditor( |
111 | 111 | 'content', |
112 | 112 | get_lang('Content'), |
@@ -136,8 +136,8 @@ discard block |
||
136 | 136 | $form->addElement('html', $buttons); |
137 | 137 | |
138 | 138 | } else { |
139 | - $form->addElement('select_language', 'language', get_lang('Language'),null,array()); |
|
140 | - $form->addButtonSearch(get_lang('Load'), 'send'); |
|
139 | + $form->addElement('select_language', 'language', get_lang('Language'),null,array()); |
|
140 | + $form->addButtonSearch(get_lang('Load'), 'send'); |
|
141 | 141 | |
142 | 142 | } |
143 | 143 |
@@ -42,10 +42,10 @@ |
||
42 | 42 | // this 2 "mask" function are here just because the SortableTable |
43 | 43 | function get_legal_data_mask($id, $params = null, $row = null) |
44 | 44 | { |
45 | - return LegalManager::get_legal_data($id, $params, $row); |
|
45 | + return LegalManager::get_legal_data($id, $params, $row); |
|
46 | 46 | } |
47 | 47 | function count_mask() |
48 | 48 | { |
49 | - return LegalManager::count(); |
|
49 | + return LegalManager::count(); |
|
50 | 50 | } |
51 | 51 | Display :: display_footer(); |