diff --git a/plugin/ticket/src/ticket.class.php b/main/inc/lib/TicketManager.php old mode 100755 new mode 100644 similarity index 100% rename from plugin/ticket/src/ticket.class.php rename to main/inc/lib/TicketManager.php diff --git a/main/inc/lib/database.constants.inc.php b/main/inc/lib/database.constants.inc.php index f05aebcf44..6418e35810 100755 --- a/main/inc/lib/database.constants.inc.php +++ b/main/inc/lib/database.constants.inc.php @@ -332,3 +332,13 @@ define('TABLE_GRADE_MODEL_COMPONENTS', 'grade_components'); define('TABLE_HOOK_OBSERVER', 'hook_observer'); define('TABLE_HOOK_CALL', 'hook_call'); define('TABLE_HOOK_EVENT', 'hook_event'); + +define('TABLE_TICKET_ASSIGNED_LOG', 'ticket_assigned_log'); +define('TABLE_TICKET_CATEGORY', 'ticket_category'); +define('TABLE_TICKET_MESSAGE', 'ticket_message'); +define('TABLE_TICKET_PRIORITY', 'ticket_priority'); +define('TABLE_TICKET_PROJECT', 'ticket_project'); +define('TABLE_TICKET_STATUS', 'ticket_status'); +define('TABLE_TICKET_TICKET', 'ticket_ticket'); +define('TABLE_TICKET_CATEGORY_REL_USER', 'ticket_category_rel_user'); +define('TABLE_TICKET_MESSAGE_ATTACHMENTS', 'ticket_message_attachments'); diff --git a/plugin/ticket/README.md b/plugin/ticket/README.md deleted file mode 100644 index 758b4b2de0..0000000000 --- a/plugin/ticket/README.md +++ /dev/null @@ -1 +0,0 @@ -Ticket management system features for Chamilo. \ No newline at end of file diff --git a/plugin/ticket/config.php b/plugin/ticket/config.php deleted file mode 100755 index 4d9b6a86c9..0000000000 --- a/plugin/ticket/config.php +++ /dev/null @@ -1,23 +0,0 @@ -install(); diff --git a/plugin/ticket/plugin.php b/plugin/ticket/plugin.php deleted file mode 100755 index 6e0031b148..0000000000 --- a/plugin/ticket/plugin.php +++ /dev/null @@ -1,8 +0,0 @@ -get_info(); diff --git a/plugin/ticket/src/ticket_plugin.class.php b/plugin/ticket/src/ticket_plugin.class.php deleted file mode 100755 index c9c70e31ee..0000000000 --- a/plugin/ticket/src/ticket_plugin.class.php +++ /dev/null @@ -1,98 +0,0 @@ - 'boolean', - 'allow_student_add' => 'boolean', - 'allow_category_edition' => 'boolean', - 'warn_admin_no_user_in_category' => 'boolean', - 'send_warning_to_all_admins' => 'boolean' - ); - - parent::__construct( - '3.0', - 'Kenny Rodas Chavez, Genesis Lopez, Francis Gonzales, Yannick Warnier, Julio Montoya', - $settings - ); - } - - /** - * Install the ticket plugin - */ - public function install() - { - // Create database tables and insert a Tab - require_once api_get_path(SYS_PLUGIN_PATH) . PLUGIN_NAME . '/database.php'; - } - - /** - * Uninstall the ticket plugin - */ - public function uninstall() - { - $tblSettings = Database::get_main_table(TABLE_MAIN_SETTINGS_CURRENT); - $tblTicketTicket = Database::get_main_table(TABLE_TICKET_TICKET); - $tblTicketStatus = Database::get_main_table(TABLE_TICKET_STATUS); - $tblTicketProject = Database::get_main_table(TABLE_TICKET_PROJECT); - $tblTicketPriority = Database::get_main_table(TABLE_TICKET_PRIORITY); - $tblTicketMesAttch = Database::get_main_table(TABLE_TICKET_MESSAGE_ATTACHMENTS); - $tblTicketMessage = Database::get_main_table(TABLE_TICKET_MESSAGE); - $tblTicketCategory = Database::get_main_table(TABLE_TICKET_CATEGORY); - $tblTicketAssgLog = Database::get_main_table(TABLE_TICKET_ASSIGNED_LOG); - $settings = $this->get_settings(); - $plugSetting = current($settings); - - // Delete settings - $sql = "DELETE FROM $tblSettings WHERE variable = 'ticket_tool_enable'"; - Database::query($sql); - - $sql = "DROP TABLE IF EXISTS $tblTicketTicket"; - Database::query($sql); - $sql = "DROP TABLE IF EXISTS $tblTicketStatus"; - Database::query($sql); - $sql = "DROP TABLE IF EXISTS $tblTicketProject"; - Database::query($sql); - $sql = "DROP TABLE IF EXISTS $tblTicketPriority"; - Database::query($sql); - $sql = "DROP TABLE IF EXISTS $tblTicketMesAttch"; - Database::query($sql); - $sql = "DROP TABLE IF EXISTS $tblTicketMessage"; - Database::query($sql); - $sql = "DROP TABLE IF EXISTS $tblTicketCategory"; - Database::query($sql); - $sql = "DROP TABLE IF EXISTS $tblTicketAssgLog"; - Database::query($sql); - $sql = "DROP TABLE IF EXISTS $tblTicketTicket"; - Database::query($sql); - - $rsTab = $this->deleteTab($plugSetting['comment']); - - if ($rsTab) { - echo ""; - } - } -} diff --git a/plugin/ticket/start.php b/plugin/ticket/start.php deleted file mode 100755 index d344a38fba..0000000000 --- a/plugin/ticket/start.php +++ /dev/null @@ -1,14 +0,0 @@ -assign('message', $message); -$tpl->display_one_col_template(); diff --git a/plugin/ticket/uninstall.php b/plugin/ticket/uninstall.php deleted file mode 100755 index 56689a1882..0000000000 --- a/plugin/ticket/uninstall.php +++ /dev/null @@ -1,11 +0,0 @@ -uninstall(); diff --git a/src/Chamilo/CoreBundle/Composer/ScriptHandler.php b/src/Chamilo/CoreBundle/Composer/ScriptHandler.php index 20405c8179..ce553b9750 100644 --- a/src/Chamilo/CoreBundle/Composer/ScriptHandler.php +++ b/src/Chamilo/CoreBundle/Composer/ScriptHandler.php @@ -57,6 +57,7 @@ class ScriptHandler __DIR__.'/../../../../main/inc/lib/pchart/', __DIR__.'/../../../../main/inc/lib/htmlpurifier', __DIR__.'/../../../../main/announcements/resources', + __DIR__.'/../../../../main/plugin/ticket', __DIR__.'/../../../../src/Chamilo/CoreBundle/Entity/GroupRelGroup.php', __DIR__.'/../../../../src/Chamilo/CoreBundle/Entity/GroupRelTag.php', __DIR__.'/../../../../src/Chamilo/CoreBundle/Entity/GroupRelUser.php',