code Format - refs #6715

1.9.x
Francis Gonzales 12 years ago
parent b0fd490384
commit 6fdb56391a
  1. 1
      plugin/ticket/config.php
  2. 1
      plugin/ticket/src/download.php
  3. 4
      plugin/ticket/src/myticket.php
  4. 29
      plugin/ticket/src/new_ticket.php
  5. 30
      plugin/ticket/src/report.php
  6. 16
      plugin/ticket/src/send_ticket.php
  7. 148
      plugin/ticket/src/ticket.class.php
  8. 13
      plugin/ticket/src/ticket_details.php
  9. 1
      plugin/ticket/src/tutor.php
  10. 4
      plugin/ticket/src/tutor_report.lib.php
  11. 1
      plugin/ticket/src/update_report.php

@ -1,4 +1,5 @@
<?php
/* For licensing terms, see /license.txt */
/**
* @package chamilo.plugin.ticket

@ -1,4 +1,5 @@
<?php
/* For licensing terms, see /license.txt */
/**
*

@ -1,4 +1,5 @@
<?php
/* For licensing terms, see /license.txt */
/**
* This script is the Tickets plugin main entry point
@ -90,8 +91,7 @@ div.row div.formw2 {
$this_section = 'tickets';
unset($_SESSION['this_section']);
$table = new SortableTable('Tickets', array('TicketManager', 'get_total_tickets_by_user_id'),
array('TicketManager', 'get_tickets_by_user_id'), 2, 20, 'DESC');
$table = new SortableTable('Tickets', array('TicketManager', 'get_total_tickets_by_user_id'), array('TicketManager', 'get_tickets_by_user_id'), 2, 20, 'DESC');
if ($table->per_page == 0) {
$table->per_page = 20;
}

@ -1,4 +1,5 @@
<?php
/* For licensing terms, see /license.txt */
/**
* @package chamilo.plugin.ticket
@ -147,7 +148,8 @@ $htmlHeadXtra[] = '<link href="'.api_get_path(WEB_LIBRARY_PATH).'javascript/tag
* @param $s
* @return string
*/
function js_str($s) {
function js_str($s)
{
return '"' . addcslashes($s, "\0..\37\"\\") . '"';
}
@ -157,7 +159,8 @@ function js_str($s) {
* @param $key
* @return string
*/
function js_array($array,$name,$key) {
function js_array($array, $name, $key)
{
$temp = array();
$return = "new Array(); ";
foreach ($array as $value) {
@ -169,7 +172,8 @@ function js_array($array,$name,$key) {
/**
*
*/
function show_form_send_ticket(){
function show_form_send_ticket()
{
global $types, $plugin;
echo '<div class="divTicket">';
echo '<form enctype="multipart/form-data" action="' . api_get_self() . '" method="post" name="send_ticket" id="send_ticket"
@ -320,11 +324,13 @@ function show_form_send_ticket(){
/**
*
*/
function save_ticket(){
function save_ticket()
{
global $plugin;
$category_id = $_POST['category_id'];
$content = $_POST['content'];
if ($_POST['phone']!="") $content.= '<p style="color:red">&nbsp;'.get_lang('Phone').': '.$_POST['phone'].'</p>';
if ($_POST['phone'] != "")
$content.= '<p style="color:red">&nbsp;' . get_lang('Phone') . ': ' . $_POST['phone'] . '</p>';
$course_id = $_POST['course_id'];
$project_id = $_POST['project_id'];
$subject = $_POST['subject'];
@ -343,11 +349,13 @@ function save_ticket(){
Display::display_error_message($plugin->get_lang('ErrorRegisterMessage'));
}
}
/**
* Get the total number of users on the platform
* @see SortableTable#get_total_number_of_items()
*/
function get_number_of_users() {
function get_number_of_users()
{
$user_table = Database :: get_main_table(TABLE_MAIN_USER);
$sql = "SELECT COUNT(u.user_id) AS total_number_of_items FROM $user_table u";
if ((api_is_platform_admin() || api_is_session_admin()) && api_get_multiple_access_url()) {
@ -362,6 +370,7 @@ function get_number_of_users() {
$obj = Database::fetch_object($res);
return $obj->total_number_of_items;
}
/**
* Get the users to display on the current page (fill the sortable-table)
* @param int offset of first user to recover
@ -377,10 +386,8 @@ function get_user_data($from, $number_of_items, $column, $direction)
$sql = "SELECT
u.user_id AS col0,
u.official_code AS col2,
".(api_is_western_name_order()
? "u.firstname AS col3,
u.lastname AS col4,"
: "u.lastname AS col3,
" . (api_is_western_name_order() ? "u.firstname AS col3,
u.lastname AS col4," : "u.lastname AS col3,
u.firstname AS col4,") . "
u.username AS col5,
u.email AS col6,
@ -426,8 +433,6 @@ function get_user_data($from, $number_of_items, $column, $direction)
return $users;
}
if (!isset($_POST['compose'])) {
Display::display_header(get_lang('ComposeMessage'));
echo '

@ -1,4 +1,5 @@
<?php
/* For licensing terms, see /license.txt */
/**
* @package chamilo.plugin.ticket
@ -91,11 +92,13 @@ $tools['student_publication']= array('id'=>'student_publication','name'=>get_lan
$tools['user'] = array('id' => 'user', 'name' => get_lang('User'));
$tools['forum'] = array('id' => 'forum', 'name' => get_lang('Forum'));
function js_str($s) {
function js_str($s)
{
return '"' . addcslashes($s, "\0..\37\"\\") . '"';
}
function show_form(){
function show_form()
{
global $types;
global $tools;
echo '<div class="formulario">';
@ -134,13 +137,14 @@ function show_form(){
<button class="save" name="report" type="submit" id="btnsubmit" disabled="disabled">Generar Reporte</button>
</div>
</div>';
}
/**
* Get the total number of users on the platform
* @see SortableTable#get_total_number_of_items()
*/
function get_number_of_users() {
function get_number_of_users()
{
$user_table = Database :: get_main_table(TABLE_MAIN_USER);
$sql = "SELECT COUNT(u.user_id) AS total_number_of_items FROM $user_table u";
if ((api_is_platform_admin() || api_is_session_admin()) && api_get_multiple_access_url()) {
@ -155,6 +159,7 @@ function get_number_of_users() {
$obj = Database::fetch_object($res);
return $obj->total_number_of_items;
}
/**
* Get the users to display on the current page (fill the sortable-table)
* @param int offset of first user to recover
@ -170,10 +175,8 @@ function get_user_data($from, $number_of_items, $column, $direction)
$sql = "SELECT
u.user_id AS col0,
u.official_code AS col2,
".(api_is_western_name_order()
? "u.firstname AS col3,
u.lastname AS col4,"
: "u.lastname AS col3,
" . (api_is_western_name_order() ? "u.firstname AS col3,
u.lastname AS col4," : "u.lastname AS col3,
u.firstname AS col4,") . "
u.username AS col5,
u.email AS col6,
@ -219,8 +222,6 @@ function get_user_data($from, $number_of_items, $column, $direction)
return $users;
}
Display::display_header('Reportes');
echo '<div class="actions">
<form action="' . api_get_self() . '" method="get" name="search_simple" id="search_simple">
@ -258,17 +259,18 @@ if (isset($_POST['report'])) {
LEFT JOIN " . Database::get_main_table(TABLE_MAIN_USER) . " u ON access.access_user_id = u.user_id
LEFT JOIN " . Database::get_main_table(TABLE_MAIN_COURSE) . " c ON access.access_cours_code = c.CODE
WHERE access.access_cours_code = '" . $course_info['code'] . "' AND u.user_id = '$user_id' ";
if($tool!= '') $sql.="AND access.access_tool = '$tool' ";
if ($tool != '')
$sql.="AND access.access_tool = '$tool' ";
$start_date = $_POST['keyword_start_date_start'];
$end_date = $_POST['keyword_start_date_end'];
if ($start_date != '' || $end_date != '') {
$sql .= " HAVING ";
if ($start_date != '') $sql .= " access_date >= '$start_date' ";
if ($start_date != '')
$sql .= " access_date >= '$start_date' ";
if ($end_date != '') {
$sql = ($start_date == '') ? $sql : ($sql . " AND ");
$sql .= " access_date <= '$end_date' ";
}
}
$result = Database::query($sql);
$table_result = new SortableTable();
@ -282,8 +284,6 @@ if (isset($_POST['report'])) {
$table_result->addRow($row);
}
$table_result->display();
} else {
show_form();
}

@ -1,4 +1,5 @@
<?php
/* For licensing terms, see /license.txt */
/**
*
@ -137,11 +138,13 @@ $htmlHeadXtra[] = '<script language="javascript">
$htmlHeadXtra[] = '<script src="' . api_get_path(WEB_LIBRARY_PATH) . 'javascript/tag/jquery.fcbkcomplete.js" type="text/javascript" language="javascript"></script>';
$htmlHeadXtra[] = '<link href="' . api_get_path(WEB_LIBRARY_PATH) . 'javascript/tag/style.css" rel="stylesheet" type="text/css" />';
function js_str($s) {
function js_str($s)
{
return '"' . addcslashes($s, "\0..\37\"\\") . '"';
}
function js_array($array,$name,$key) {
function js_array($array, $name, $key)
{
$temp = array();
$return = "new Array(); ";
foreach ($array as $value) {
@ -150,7 +153,8 @@ function js_array($array,$name,$key) {
return $return;
}
function show_form_send_ticket(){
function show_form_send_ticket()
{
global $types, $plugin;
$courses_list = CourseManager::get_courses_list_by_user_id(api_get_user_id(), false, true);
echo '<div class="divTicket">';
@ -224,10 +228,12 @@ function show_form_send_ticket(){
echo '</form></div>';
}
function save_ticket(){
function save_ticket()
{
$category_id = $_POST['category_id'];
$content = $_POST['content'];
if ($_POST['phone']!="") $content.= '<p style="color:red">&nbsp;'.get_lang('Phone').': '.$_POST['phone'].'</p>';
if ($_POST['phone'] != "")
$content.= '<p style="color:red">&nbsp;' . get_lang('Phone') . ': ' . $_POST['phone'] . '</p>';
$course_id = $_POST['course_id'];
$project_id = $_POST['project_id'];
$subject = $_POST['subject'];

@ -1,20 +1,24 @@
<?php
/* For licensing terms, see /license.txt */
/**
* Declaration of TicketManager class
* @package chamilo.plugin.ticket
*/
/**
* Class TicketManager
*
*/
class TicketManager
{
/**
* Constructor
*/
function __construct()
{
}
/**
@ -76,21 +80,9 @@ class TicketManager
* @return bool
*/
public static function insert_new_ticket(
$category_id,
$course_id,
$project_id,
$other_area,
$email,
$subject,
$content,
$personalEmail = "",
$file_attachments,
$source = 'VRT',
$priority = 'NRM',
$status = '',
$request_user = '',
$assigned_user = 0
) {
$category_id, $course_id, $project_id, $other_area, $email, $subject, $content, $personalEmail = "", $file_attachments, $source = 'VRT', $priority = 'NRM', $status = '', $request_user = '', $assigned_user = 0
)
{
$table_support_tickets = Database::get_main_table(TABLE_TICKET_TICKET);
$table_support_category = Database::get_main_table(
TABLE_TICKET_CATEGORY
@ -152,10 +144,7 @@ class TicketManager
}
if ($ticket_id != 0) {
$ticket_code = "A" . str_pad(
(int)$ticket_id,
11,
"0",
STR_PAD_LEFT
(int) $ticket_id, 11, "0", STR_PAD_LEFT
);
$sql_update_code = "UPDATE $table_support_tickets
SET ticket_code = '$ticket_code' WHERE ticket_id = '$ticket_id'";
@ -192,23 +181,12 @@ class TicketManager
</tr>
</table>';
api_mail_html(
'Soporte virtual',
$email,
"[SOPORTE] Incidente Reenviado de Soporte Virtual",
$helpDeskMessage,
$user['firstname'] . ' ' . $user['lastname'],
$personalEmail,
array('cc' => 'soportevirtual@usil.edu.pe'),
$data_files
'Soporte virtual', $email, "[SOPORTE] Incidente Reenviado de Soporte Virtual", $helpDeskMessage, $user['firstname'] . ' ' . $user['lastname'], $personalEmail, array('cc' => 'soportevirtual@usil.edu.pe'), $data_files
);
$studentMessage = '<p>Su consulta fue reenviada al area responsable : <a href="mailto:' . $email . '">' . $email . '</a></p>';
$studentMessage .= '<p>La respuesta a su consulta ser&aacute; enviada al correo : <a href="#">' . $personalEmail . '</a></p>';
self::insert_message(
$ticket_id,
get_lang('MessageResent'),
$studentMessage,
null,
1
$ticket_id, get_lang('MessageResent'), $studentMessage, null, 1
);
}
@ -262,11 +240,7 @@ class TicketManager
WEB_PLUGIN_PATH
) . PLUGIN_NAME . '/src/ticket_details.php?ticket_id=' . $ticket_id . '">Ticket</a></p>';
api_mail_html(
$info['firstname'] . " " . $info['lastname'],
$info['mail'],
"[TICKETS] Asignacion de Ticket #$ticket_id ",
$message,
null, // sender name
$info['firstname'] . " " . $info['lastname'], $info['mail'], "[TICKETS] Asignacion de Ticket #$ticket_id ", $message, null, // sender name
null, // sender e-mail
array('cc' => $sender['email']) // should be support e-mail (platform admin) here
);
@ -285,13 +259,7 @@ class TicketManager
* @return bool
*/
public static function insert_message(
$ticket_id,
$subject,
$content,
$file_attachments,
$user_id,
$status = 'NOL',
$sendConfirmation = false
$ticket_id, $subject, $content, $file_attachments, $user_id, $status = 'NOL', $sendConfirmation = false
)
{
global $data_files;
@ -370,10 +338,7 @@ class TicketManager
foreach ($file_attachments as $file_attach) {
if ($file_attach['error'] == 0) {
$data_files[] = self::save_message_attachment_file(
$file_attach,
$ticket_id,
$message_id,
$message_attch_id
$file_attach, $ticket_id, $message_id, $message_attch_id
);
$message_attch_id++;
} else {
@ -395,18 +360,14 @@ class TicketManager
* @return array
*/
public static function save_message_attachment_file(
$file_attach,
$ticket_id,
$message_id,
$message_attch_id
$file_attach, $ticket_id, $message_id, $message_attch_id
)
{
$now = api_get_utc_datetime();
$user_id = api_get_user_id();
$ticket_id = intval($ticket_id);
$new_file_name = add_ext_on_mime(
stripslashes($file_attach['name']),
$file_attach['type']
stripslashes($file_attach['name']), $file_attach['type']
);
$file_name = $file_attach['name'];
$table_support_message_attachments = Database::get_main_table(
@ -422,9 +383,7 @@ class TicketManager
$path_message_attach = $path_attachment . 'plugin_ticket_messageattch/';
if (!file_exists($path_message_attach)) {
@mkdir(
$path_message_attach,
api_get_permissions_for_new_directories(),
true
$path_message_attach, api_get_permissions_for_new_directories(), true
);
}
$new_path = $path_message_attach . $new_file_name;
@ -473,12 +432,9 @@ class TicketManager
* @return array
*/
public static function get_tickets_by_user_id(
$from,
$number_of_items,
$column,
$direction,
$user_id = null
) {
$from, $number_of_items, $column, $direction, $user_id = null
)
{
$table_support_category = Database::get_main_table(
TABLE_TICKET_CATEGORY
);
@ -614,7 +570,6 @@ class TicketManager
)
)";
}
}
if ($keyword_unread == 'yes') {
$sql .= " AND ticket.ticket_id IN (SELECT ticket.ticket_id
@ -662,8 +617,7 @@ class TicketManager
$name = '<a href="' . api_get_path(
WEB_PATH
) . 'main/admin/user_information.php?user_id=' . $row['user_id'] . '">' . api_get_person_name(
$userInfo['firstname'],
$userInfo['lastname']
$userInfo['firstname'], $userInfo['lastname']
) . '</a>';
$actions = "";
/* if($row['status_id']!='CLS' && $row['status_id']!='REE'){
@ -703,15 +657,13 @@ class TicketManager
$row['col2'] = api_get_local_time($row['col2']);
if ($isAdmin) {
$actions .= '<a href="ticket_details.php?ticket_id=' . $row['col0'] . '">' . Display::return_icon(
'synthese_view.gif',
get_lang('Info')
'synthese_view.gif', get_lang('Info')
) . '</a>&nbsp;&nbsp;';
if ($row['priority_id'] == 'ALT' && $row['status_id'] != 'CLS') {
$actions .= '<img src="' . api_get_path(WEB_CODE_PATH) . 'img/exclamation.png" border="0" />';
}
$row['col0'] = Display::return_icon(
$img_source,
get_lang('Info')
$img_source, get_lang('Info')
) . '<a href="ticket_details.php?ticket_id=' . $row['col0'] . '">' . $row['ticket_code'] . '</a>';
if ($row['col7'] == 'PENDIENTE') {
$row['col7'] = '<span style="color: #f00; font-weight:bold;">' . $row['col7'] . '</span>';
@ -728,20 +680,16 @@ class TicketManager
$row['col8'],
$actions,
eregi_replace(
"[\n|\r|\n\r|\r\n]",
' ',
strip_tags($row['col9'])
"[\n|\r|\n\r|\r\n]", ' ', strip_tags($row['col9'])
)
);
} else {
$actions = "";
$actions .= '<a href="ticket_details.php?ticket_id=' . $row['col0'] . '">' . Display::return_icon(
'synthese_view.gif',
get_lang('Info')
'synthese_view.gif', get_lang('Info')
) . '</a>&nbsp;&nbsp;';
$row['col0'] = Display::return_icon(
$img_source,
get_lang('Info')
$img_source, get_lang('Info')
) . '<a href="ticket_details.php?ticket_id=' . $row['col0'] . '">' . $row['ticket_code'] . '</a>';
$now = api_strtotime(api_get_utc_datetime());
$last_edit_date = api_strtotime($row['sys_lastedit_datetime']);
@ -765,7 +713,6 @@ class TicketManager
if ($unread > 0) {
$ticket['0'] = $ticket['0'] . '&nbsp;&nbsp;(' . $unread . ')<a href="ticket_details.php?ticket_id=' . $row['ticket_id'] . '"><img src="../../../main/img/message_new.png" border="0" title="' . $unread . ' Nuevo(s) Mensajes"/></a>';
}
if ($isAdmin) {
$ticket['0'] .= '&nbsp;&nbsp;<a href="javascript:void(0)" onclick="load_history_ticket(\'div_' . $row['ticket_id'] . '\',' . $row['ticket_id'] . ')">
@ -887,7 +834,6 @@ class TicketManager
$sql .= " AND ticket.course_id IN ( ";
$sql .= "SELECT id FROM $course_table WHERE (title LIKE '%" . $keyword_course . "%' OR code LIKE '%" . $keyword_course . "%' OR visual_code LIKE '%" . $keyword_course . "%' )) ";
}
}
if ($keyword_unread == 'yes') {
$sql .= " AND ticket.ticket_id IN (SELECT ticket.ticket_id FROM $table_support_tickets ticket, $table_support_messages message, $table_main_user user WHERE ticket.ticket_id = message.ticket_id AND message.status = 'NOL' AND message.sys_insert_user_id = user.user_id AND user.user_id NOT IN (SELECT user_id FROM $table_main_admin) AND ticket.status_id != 'REE' GROUP BY ticket.ticket_id)";
@ -935,19 +881,13 @@ class TicketManager
while ($row = Database::fetch_assoc($result)) {
$row['course'] = null;
$row['start_date'] = api_convert_and_format_date(
api_get_local_time($row['start_date']),
DATE_TIME_FORMAT_LONG,
_api_get_timezone()
api_get_local_time($row['start_date']), DATE_TIME_FORMAT_LONG, _api_get_timezone()
);
$row['end_date'] = api_convert_and_format_date(
api_get_local_time($row['end_date']),
DATE_TIME_FORMAT_LONG,
_api_get_timezone()
api_get_local_time($row['end_date']), DATE_TIME_FORMAT_LONG, _api_get_timezone()
);
$row['sys_lastedit_datetime'] = api_convert_and_format_date(
api_get_local_time($row['sys_lastedit_datetime']),
DATE_TIME_FORMAT_LONG,
_api_get_timezone()
api_get_local_time($row['sys_lastedit_datetime']), DATE_TIME_FORMAT_LONG, _api_get_timezone()
);
$row['course_url'] = null;
if ($row['course_id'] != 0) {
@ -960,8 +900,7 @@ class TicketManager
$row['user_url'] = '<a href="' . api_get_path(
WEB_PATH
) . 'main/admin/user_information.php?user_id=' . $row['request_user'] . '">' . api_get_person_name(
$userInfo['firstname'],
$userInfo['lastname']
$userInfo['firstname'], $userInfo['lastname']
) . '</a>';
$ticket['usuario'] = $userInfo;
$ticket['ticket'] = $row;
@ -1040,10 +979,9 @@ class TicketManager
* @return bool
*/
public static function update_ticket_status(
$status_id,
$ticket_id,
$user_id
) {
$status_id, $ticket_id, $user_id
)
{
$table_support_tickets = Database::get_main_table(TABLE_TICKET_TICKET);
$table_support_messages = Database::get_main_table(
TABLE_TICKET_MESSAGE
@ -1081,7 +1019,6 @@ class TicketManager
$res = Database::query($sql);
$obj = Database::fetch_object($res);
return $obj->unread;
}
/**
@ -1140,9 +1077,7 @@ class TicketManager
}
$insertuser = api_get_user_info($row['sys_insert_user_id']);
$row['assigned_date'] = api_convert_and_format_date(
api_get_local_time($row['assigned_date']),
'%d/%m/%y-%H:%M:%S',
_api_get_timezone()
api_get_local_time($row['assigned_date']), '%d/%m/%y-%H:%M:%S', _api_get_timezone()
);
$row['assignuser'] = ($row['user_id'] != 0) ? ('<a href="' . api_get_path(
WEB_PATH
@ -1166,12 +1101,9 @@ class TicketManager
* @return array
*/
public static function export_tickets_by_user_id(
$from,
$number_of_items,
$column,
$direction,
$user_id = null
) {
$from, $number_of_items, $column, $direction, $user_id = null
)
{
$table_support_category = Database::get_main_table(
TABLE_TICKET_CATEGORY
);
@ -1278,7 +1210,6 @@ class TicketManager
$sql .= " AND ticket.ticket_id NOT IN (SELECT ticket.ticket_id FROM $table_support_tickets ticket, $table_support_messages message, $table_main_user user WHERE ticket.ticket_id = message.ticket_id AND message.status = 'NOL' AND message.sys_insert_user_id = user.user_id AND user.status != 1 AND ticket.status_id != 'REE' GROUP BY ticket.ticket_id)";
}
}
}
@ -1304,12 +1235,10 @@ class TicketManager
$row['responsable'] = $row['responsable']['firstname'] . ' ' . $row['responsable']['lastname'];
}
$row['sys_insert_datetime'] = api_format_date(
$row['sys_insert_datetime'],
'%d/%m/%y - %I:%M:%S %p'
$row['sys_insert_datetime'], '%d/%m/%y - %I:%M:%S %p'
);
$row['sys_lastedit_datetime'] = api_format_date(
$row['sys_lastedit_datetime'],
'%d/%m/%y - %I:%M:%S %p'
$row['sys_lastedit_datetime'], '%d/%m/%y - %I:%M:%S %p'
);
$row['category'] = utf8_decode($row['category']);
$row['programa'] = utf8_decode($row['fullname']);
@ -1320,4 +1249,5 @@ class TicketManager
return $tickets;
}
}

@ -1,4 +1,5 @@
<?php
/* For licensing terms, see /license.txt */
/**
*
@ -164,7 +165,6 @@ if(isset($_POST['respuesta'])){
$ticket['ticket']['status'] = 'PENDIENTE';
}
}
}
if (isset($_REQUEST['action'])) {
$action = $_REQUEST['action'];
@ -205,7 +205,6 @@ if(!isset($_POST['compose'])){
$form_close_ticket.= '</form>';
}
}
}
$titulo = '<center><h1>Ticket #' . $ticket['ticket']['ticket_code'] . '</h1></center>';
if ($isAdmin && $ticket['ticket']['status_id'] != 'CLS' && $ticket['ticket']['status_id'] != 'REE') {
@ -281,7 +280,8 @@ if(!isset($_POST['compose'])){
$class = "messageuser";
if ($message['admin']) {
$class = "messagesupport";
if($isAdmin)$message['message'].="<br/><b>Atendido por: ".$message['user_created']." - ".api_convert_and_format_date(api_get_local_time($message['sys_insert_datetime']), DATE_TIME_FORMAT_LONG,_api_get_timezone())."</b>";
if ($isAdmin)
$message['message'].="<br/><b>Atendido por: " . $message['user_created'] . " - " . api_convert_and_format_date(api_get_local_time($message['sys_insert_datetime']), DATE_TIME_FORMAT_LONG, _api_get_timezone()) . "</b>";
}else {
$message['message'].="<b>Enviado: " . api_convert_and_format_date(api_get_local_time($message['sys_insert_datetime']), DATE_TIME_FORMAT_LONG, _api_get_timezone()) . "</b>";
}
@ -302,11 +302,9 @@ if(!isset($_POST['compose'])){
if (intval($ticket['ticket']['assigned_last_user']) == $user_id) {
show_form_send_message();
$cheked = "";
}
}
}
} else {
$ticket_id = $_POST['ticket_id'];
$content = $_POST['content'];
@ -317,7 +315,9 @@ if(!isset($_POST['compose'])){
TicketManager::insert_message($ticket_id, $subject, $content, $file_attachments, $user_id, 'NOL', $mensajeconfirmacion);
header("location:" . api_get_self() . "?ticket_id=" . $ticket_id);
}
function show_form_send_message(){
function show_form_send_message()
{
global $isAdmin;
global $ticket;
global $asunto;
@ -361,5 +361,6 @@ function show_form_send_message(){
</div>';
echo '</form>';
}
Display::display_footer();
?>

@ -1,4 +1,5 @@
<?php
/* For licensing terms, see /license.txt */
/**
*

@ -1,9 +1,11 @@
<?php
/* For licensing terms, see /license.txt */
/**
* Helper library for weekly reports
* @package chamilo.plugin.ticket
*/
/**
* @param $course_code
* @return array|bool
@ -60,7 +62,6 @@ function initializeReport($course_code)
return showResults($course_info, $weeksCount, $page);
}
}
/**
@ -125,7 +126,6 @@ function showResults($courseInfo,$weeksCount, $page)
</a>
</th>'; */
}
}
$tableExport[] = $lineHeaderExport;
$tableExport[] = $lineHeaderExport2;

@ -1,4 +1,5 @@
<?php
/* For licensing terms, see /license.txt */
/**
* @package chamilo.plugin.ticket

Loading…
Cancel
Save