Initial Joomla test questions component

This commit is contained in:
Wojtek
2026-10-14 22:29:10 +02:00
commit 9b093b278d
44 changed files with 964 additions and 0 deletions
@@ -0,0 +1,36 @@
CREATE TABLE IF NOT EXISTS `#__testquestions_questions` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`category_id` int unsigned NOT NULL DEFAULT 0,
`time_limit` smallint unsigned NOT NULL DEFAULT 60,
`points` tinyint unsigned NOT NULL DEFAULT 1,
`question_type` varchar(10) NOT NULL DEFAULT 'closed',
`question` text NOT NULL,
`answer_a` text NOT NULL,
`answer_b` text NOT NULL,
`answer_c` text NOT NULL,
`answer_d` text NOT NULL,
`answer_open` text NULL,
`correct_answer` tinyint unsigned NOT NULL DEFAULT 0,
`image` varchar(1024) NOT NULL DEFAULT '',
`published` tinyint NOT NULL DEFAULT 1,
`ordering` int NOT NULL DEFAULT 0,
`created` datetime NOT NULL,
`created_by` int unsigned NOT NULL DEFAULT 0,
`modified` datetime NULL DEFAULT NULL,
`modified_by` int unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
KEY `idx_published` (`published`),
KEY `idx_ordering` (`ordering`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS `#__testquestions_categories` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`title` varchar(150) NOT NULL,
`published` tinyint NOT NULL DEFAULT 1,
`ordering` int NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE KEY `idx_title` (`title`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;
INSERT IGNORE INTO `#__testquestions_categories` (`id`, `title`, `published`, `ordering`)
VALUES (1, 'Bez kategorii', 1, 0);