Important notes (thank you to Lugsciath and HFScratch)
Change text field to NULL: http://forums.cricketmx.com/viewtopic.p ... 743#p96743 OR http://forums.cricketmx.com/viewtopic.p ... 741#p96741 (use only one of these solutions)
Enter the first category: http://forums.cricketmx.com/viewtopic.p ... 739#p96739
Changing the values of the minimum/maximum number of questions: http://forums.cricketmx.com/viewtopic.p ... 739#p96739
--------------------------------------------------------------------
Here is what is done:
- Submitting quizzes
- Playing quizzes
- Recording stats for quizzes
- Category view (except passwords)
- Index view
- Statistics view
I feel it's at a stage where it is usable, even if not all of the features are in yet. I still want to add the minor features (passwords for categories, minor options for the admin like playing quizzes once, not letting users play their own quizzes, Cash MOD functionality, etc) and 2 major features (ability to moderate quizzes and the ACP functions) before I release the first Beta.
For those that want to use this Pre-Alpha version, you will need to put this SQL into phpMyAdmin to create some tables and add to the config table: (I know some of my column lengths don't add up, like quiz_date being 16 in one table and 20 in another - I'm aware of this. at some point I will go back and make sure everything matches up

Don't forget to change phpbb_ to something else if you use another table prefix.INSERT INTO `phpbb_config` (`config_name`, `config_value`, `is_dynamic`) VALUES
('quiz_submit_min', '3', 0),
('quiz_submit_max', '9', 0),
('quiz_submit_max_multiple_choice', '4', 0),
('quiz_save_enabled', '1', 0),
('quiz_show_answers', '1', 0),
('quiz_time_limit_per_question', '15', 0),
('quiz_show_how_many_stats', '5', 0);
--
-- Table structure for table `phpbb_quiz`
--
CREATE TABLE IF NOT EXISTS `phpbb_quiz` (
`quiz_id` int(5) NOT NULL auto_increment,
`quiz_author` int(5) NOT NULL default '0',
`quiz_category` int(5) NOT NULL default '0',
`quiz_name` varchar(150) NOT NULL default '',
`quiz_date` int(16) NOT NULL default '0',
`quiz_number_of_questions` int(3) NOT NULL default '0',
`quiz_views` int(5) NOT NULL default '0',
PRIMARY KEY (`quiz_id`)
);
--
-- Table structure for table `phpbb_quiz_categories`
--
CREATE TABLE IF NOT EXISTS `phpbb_quiz_categories` (
`quiz_category_id` int(11) NOT NULL auto_increment,
`quiz_category_name` varchar(150) NOT NULL default '',
`quiz_category_description` varchar(255) NOT NULL default '',
`quiz_category_password` varchar(100) NOT NULL default '',
PRIMARY KEY (`quiz_category_id`)
);
--
-- Table structure for table `phpbb_quiz_data`
--
CREATE TABLE IF NOT EXISTS `phpbb_quiz_data` (
`quiz_data_id` int(5) NOT NULL auto_increment,
`quiz_question_id` int(5) NOT NULL default '0',
`quiz_answer` varchar(255) NOT NULL default '',
`quiz_correct` int(1) NOT NULL default '0',
`quiz_uid` varchar(255) NOT NULL default '',
`quiz_bitfield` varchar(8) NOT NULL default '',
`quiz_options` mediumint(4) NOT NULL default '0',
PRIMARY KEY (`quiz_data_id`)
) ;
--
-- Table structure for table `phpbb_quiz_progressive`
--
CREATE TABLE IF NOT EXISTS `phpbb_quiz_progressive` (
`quiz_progress_id` int(5) NOT NULL auto_increment,
`quiz_id` int(5) NOT NULL default '0',
`quiz_player_id` int(10) NOT NULL default '0',
`quiz_progress_time` int(20) NOT NULL default '0',
`quiz_progress_stop_time` int(10) NOT NULL default '0',
`quiz_time_used` int(15) NOT NULL default '0',
`quiz_progress_saved` text NOT NULL,
`quiz_in_progress` int(1) NOT NULL default '0',
PRIMARY KEY (`quiz_progress_id`)
) ;
--
-- Table structure for table `phpbb_quiz_questions`
--
CREATE TABLE IF NOT EXISTS `phpbb_quiz_questions` (
`quiz_question_id` int(5) NOT NULL auto_increment,
`quiz_related_id` int(5) NOT NULL default '0',
`quiz_question` varchar(255) NOT NULL default '',
`quiz_uid` varchar(255) NOT NULL default '',
`quiz_bitfield` varchar(8) NOT NULL default '',
`quiz_options` mediumint(4) NOT NULL default '0',
PRIMARY KEY (`quiz_question_id`)
) ;
--
-- Table structure for table `phpbb_quiz_statistics`
--
CREATE TABLE IF NOT EXISTS `phpbb_quiz_statistics` (
`quiz_stats_id` int(5) NOT NULL auto_increment,
`quiz_question_id` int(5) NOT NULL default '0',
`quiz_id` int(5) NOT NULL default '0',
`quiz_answer` varchar(255) NOT NULL default '',
`quiz_correct` int(1) NOT NULL default '0',
`quiz_player` int(10) NOT NULL default '0',
PRIMARY KEY (`quiz_stats_id`)
) ;
--
-- Table structure for table `phpbb_quiz_statistics_overview`
--
CREATE TABLE IF NOT EXISTS `phpbb_quiz_statistics_overview` (
`stats_id` int(6) NOT NULL auto_increment,
`quiz_id` int(6) NOT NULL default '0',
`quiz_correct` int(2) NOT NULL default '0',
`quiz_incorrect` int(2) NOT NULL default '0',
`user_id` int(6) NOT NULL default '0',
`quiz_time` int(20) NOT NULL default '0',
PRIMARY KEY (`stats_id`)
) ;
In the download, simply copy the files from the directories they are in (in the zip file) to their respective directories on your forum

In this pre-alpha release, no files need to be edited. Obviously this will change at a later date, as the quiz link will need to be added to the header and the table constants to go into constants.php (they are in functions_quiz.php at the moment


In the statistics section I have started to play with classes and objects. I've never used classes within any of my MODs before so it is quite new to me. Over time I might start to make the submit quiz part of the MOD based on objects as well, as I think that could do with some simplifying!
Thanks everyone for persevering with me, I know it has taken a long time. Most of the hard work is done, I feel it is downhill from here
