Show percentages for original and corrected points

This commit is contained in:
Wojtek
2026-10-15 21:39:34 +02:00
parent 987373b565
commit 301f322017
7 changed files with 19 additions and 3 deletions
@@ -84,6 +84,7 @@ CREATE TABLE IF NOT EXISTS `#__testquestions_results` (
`correct_count` smallint unsigned NOT NULL DEFAULT 0,
`total_count` smallint unsigned NOT NULL DEFAULT 0,
`percentage` decimal(5,2) NOT NULL DEFAULT 0.00,
`points_total` int unsigned NOT NULL DEFAULT 0,
`points_before` int unsigned NOT NULL DEFAULT 0,
`points_after` int unsigned NOT NULL DEFAULT 0,
`answers` longtext NULL,
@@ -0,0 +1,6 @@
ALTER TABLE `#__testquestions_results`
ADD COLUMN `points_total` int unsigned NOT NULL DEFAULT 0 AFTER `percentage`;
UPDATE `#__testquestions_results`
SET `points_total` = `total_count`
WHERE `points_total` = 0;