Database Schema 1.9.8

quiz

http://pypi.rhaptos.org/mysql-autodoc/mysql-autodoc-0.1.tar.gz

mysql> show tables like '%quiz%';
+------------------------------+
| Tables_in_courses11 (%quiz%) |
+------------------------------+
| mdl_quiz                     |
| mdl_quiz_attempts            |
| mdl_quiz_feedback            |
| mdl_quiz_grades              |
| mdl_quiz_question_instances  |
| mdl_quiz_question_versions   |
+------------------------------+
6 rows in set (0.00 sec)

mysql> show columns from mdl_quiz_attempts;
+--------------+----------------------+------+-----+---------+----------------+
| Field        | Type                 | Null | Key | Default | Extra          |
+--------------+----------------------+------+-----+---------+----------------+
| id           | bigint(10) unsigned  | NO   | PRI | NULL    | auto_increment |
| uniqueid     | bigint(10) unsigned  | NO   | UNI | 0       |                |
| quiz         | bigint(10) unsigned  | NO   | MUL | 0       |                |
| userid       | bigint(10) unsigned  | NO   | MUL | 0       |                |
| attempt      | mediumint(6)         | NO   |     | 0       |                |
| sumgrades    | double               | NO   |     | 0       |                |
| timestart    | bigint(10) unsigned  | NO   |     | 0       |                |
| timefinish   | bigint(10) unsigned  | NO   |     | 0       |                |
| timemodified | bigint(10) unsigned  | NO   |     | 0       |                |
| layout       | text                 | NO   |     | NULL    |                |
| preview      | smallint(3) unsigned | NO   |     | 0       |                |
+--------------+----------------------+------+-----+---------+----------------+
11 rows in set (0.00 sec)

mysql> show columns from mdl_quiz;
+------------------+----------------------+------+-----+---------+----------------+
| Field            | Type                 | Null | Key | Default | Extra          |
+------------------+----------------------+------+-----+---------+----------------+
| id               | bigint(10) unsigned  | NO   | PRI | NULL    | auto_increment |
| course           | bigint(10) unsigned  | NO   | MUL | 0       |                |
| name             | varchar(255)         | NO   |     |         |                |
| intro            | text                 | NO   |     | NULL    |                |
| timeopen         | bigint(10) unsigned  | NO   |     | 0       |                |
| timeclose        | bigint(10) unsigned  | NO   |     | 0       |                |
| optionflags      | bigint(10) unsigned  | NO   |     | 0       |                |
| penaltyscheme    | smallint(4) unsigned | NO   |     | 0       |                |
| attempts         | mediumint(6)         | NO   |     | 0       |                |
| attemptonlast    | smallint(4)          | NO   |     | 0       |                |
| grademethod      | smallint(4)          | NO   |     | 1       |                |
| decimalpoints    | smallint(4)          | NO   |     | 2       |                |
| review           | bigint(10) unsigned  | NO   |     | 0       |                |
| questionsperpage | bigint(10)           | NO   |     | 0       |                |
| shufflequestions | smallint(4)          | NO   |     | 0       |                |
| shuffleanswers   | smallint(4)          | NO   |     | 0       |                |
| questions        | text                 | NO   |     | NULL    |                |
| sumgrades        | bigint(10)           | NO   |     | 0       |                |
| grade            | bigint(10)           | NO   |     | 0       |                |
| timecreated      | bigint(10) unsigned  | NO   |     | 0       |                |
| timemodified     | bigint(10) unsigned  | NO   |     | 0       |                |
| timelimit        | bigint(10) unsigned  | NO   |     | 0       |                |
| password         | varchar(255)         | NO   |     |         |                |
| subnet           | varchar(255)         | NO   |     |         |                |
| popup            | smallint(4)          | NO   |     | 0       |                |
| delay1           | bigint(10)           | NO   |     | 0       |                |
| delay2           | bigint(10)           | NO   |     | 0       |                |
+------------------+----------------------+------+-----+---------+----------------+
27 rows in set (0.00 sec)

mysql> show columns from mdl_quiz_feedback;
+--------------+---------------------+------+-----+---------+----------------+
| Field        | Type                | Null | Key | Default | Extra          |
+--------------+---------------------+------+-----+---------+----------------+
| id           | bigint(10) unsigned | NO   | PRI | NULL    | auto_increment |
| quizid       | bigint(10) unsigned | NO   | MUL | 0       |                |
| feedbacktext | text                | NO   |     | NULL    |                |
| mingrade     | double              | NO   |     | 0       |                |
| maxgrade     | double              | NO   |     | 0       |                |
+--------------+---------------------+------+-----+---------+----------------+
5 rows in set (0.00 sec)

mysql> show columns from mdl_quiz_grades;
+--------------+---------------------+------+-----+---------+----------------+
| Field        | Type                | Null | Key | Default | Extra          |
+--------------+---------------------+------+-----+---------+----------------+
| id           | bigint(10) unsigned | NO   | PRI | NULL    | auto_increment |
| quiz         | bigint(10) unsigned | NO   | MUL | 0       |                |
| userid       | bigint(10) unsigned | NO   | MUL | 0       |                |
| grade        | double              | NO   |     | 0       |                |
| timemodified | bigint(10) unsigned | NO   |     | 0       |                |
+--------------+---------------------+------+-----+---------+----------------+
5 rows in set (0.00 sec)

mysql> show columns from mdl_quiz_question_instances;
+----------+---------------------+------+-----+---------+----------------+
| Field    | Type                | Null | Key | Default | Extra          |
+----------+---------------------+------+-----+---------+----------------+
| id       | bigint(10) unsigned | NO   | PRI | NULL    | auto_increment |
| quiz     | bigint(10) unsigned | NO   | MUL | 0       |                |
| question | bigint(10) unsigned | NO   | MUL | 0       |                |
| grade    | mediumint(6)        | NO   |     | 0       |                |
+----------+---------------------+------+-----+---------+----------------+
4 rows in set (0.00 sec)

mysql> show columns from mdl_quiz_question_versions;
+------------------+---------------------+------+-----+---------+----------------+
| Field            | Type                | Null | Key | Default | Extra          |
+------------------+---------------------+------+-----+---------+----------------+
| id               | bigint(10) unsigned | NO   | PRI | NULL    | auto_increment |
| quiz             | bigint(10) unsigned | NO   | MUL | 0       |                |
| oldquestion      | bigint(10) unsigned | NO   | MUL | 0       |                |
| newquestion      | bigint(10) unsigned | NO   | MUL | 0       |                |
| originalquestion | bigint(10) unsigned | NO   | MUL | 0       |                |
| userid           | bigint(10) unsigned | NO   |     | 0       |                |
| timestamp        | bigint(10) unsigned | NO   |     | 0       |                |
+------------------+---------------------+------+-----+---------+----------------+
7 rows in set (0.00 sec)


[edit] questions

[edit] local modification

http://tracker.moodle.org/browse/MDL-17636?page=com.atlassian.jira.plugin.system.issuetabpanels%3Achangehistory-tabpanel

http://tracker.moodle.org/browse/MDL-16614 createdby and modifiedby assigned to wrong people when course restored to another site

mysql> select table_name, column_name, data_type from information_schema.columns where table_name like '%question%' and table_schema = 'courses11' order by table_name, column_name; 
+----------------------------------+--------------------------+-----------+
| table_name                       | column_name              | data_type |
+----------------------------------+--------------------------+-----------+
| mdl_hotpot_questions             | hotpot                   | bigint    |
| mdl_hotpot_questions             | id                       | bigint    |
| mdl_hotpot_questions             | md5key                   | varchar   |
| mdl_hotpot_questions             | name                     | text      |
| mdl_hotpot_questions             | text                     | bigint    |
| mdl_hotpot_questions             | type                     | smallint  |
| mdl_question                     | category                 | bigint    |
| mdl_question                     | createdby                | bigint    |
| mdl_question                     | defaultgrade             | bigint    |
| mdl_question                     | generalfeedback          | text      |
| mdl_question                     | hidden                   | tinyint   |
| mdl_question                     | id                       | bigint    |
| mdl_question                     | image                    | varchar   |
| mdl_question                     | length                   | bigint    |
| mdl_question                     | modifiedby               | bigint    |
| mdl_question                     | name                     | varchar   |
| mdl_question                     | parent                   | bigint    |
| mdl_question                     | penalty                  | double    |
| mdl_question                     | qtype                    | varchar   |
| mdl_question                     | questiontext             | text      |
| mdl_question                     | questiontextformat       | tinyint   |
| mdl_question                     | stamp                    | varchar   |
| mdl_question                     | timecreated              | bigint    |
| mdl_question                     | timemodified             | bigint    |
| mdl_question                     | version                  | varchar   |
| mdl_questionnaire                | closedate                | bigint    |
| mdl_questionnaire                | course                   | bigint    |
| mdl_questionnaire                | grade                    | bigint    |
| mdl_questionnaire                | id                       | bigint    |
| mdl_questionnaire                | name                     | varchar   |
| mdl_questionnaire                | navigate                 | tinyint   |
| mdl_questionnaire                | opendate                 | bigint    |
| mdl_questionnaire                | qtype                    | bigint    |
| mdl_questionnaire                | respondenttype           | enum      |
| mdl_questionnaire                | resp_eligible            | enum      |
| mdl_questionnaire                | resp_view                | tinyint   |
| mdl_questionnaire                | resume                   | tinyint   |
| mdl_questionnaire                | sid                      | bigint    |
| mdl_questionnaire                | summary                  | text      |
| mdl_questionnaire                | timemodified             | bigint    |
| mdl_questionnaire_attempts       | id                       | bigint    |
| mdl_questionnaire_attempts       | qid                      | bigint    |
| mdl_questionnaire_attempts       | rid                      | bigint    |
| mdl_questionnaire_attempts       | timemodified             | bigint    |
| mdl_questionnaire_attempts       | userid                   | bigint    |
| mdl_questionnaire_question       | content                  | text      |
| mdl_questionnaire_question       | deleted                  | enum      |
| mdl_questionnaire_question       | id                       | bigint    |
| mdl_questionnaire_question       | length                   | bigint    |
| mdl_questionnaire_question       | name                     | varchar   |
| mdl_questionnaire_question       | position                 | bigint    |
| mdl_questionnaire_question       | precise                  | bigint    |
| mdl_questionnaire_question       | required                 | enum      |
| mdl_questionnaire_question       | result_id                | bigint    |
| mdl_questionnaire_question       | survey_id                | bigint    |
| mdl_questionnaire_question       | type_id                  | bigint    |
| mdl_questionnaire_question_type  | has_choices              | enum      |
| mdl_questionnaire_question_type  | id                       | bigint    |
| mdl_questionnaire_question_type  | response_table           | varchar   |
| mdl_questionnaire_question_type  | type                     | varchar   |
| mdl_questionnaire_question_type  | typeid                   | bigint    |
| mdl_questionnaire_quest_choice   | content                  | text      |
| mdl_questionnaire_quest_choice   | id                       | bigint    |
| mdl_questionnaire_quest_choice   | question_id              | bigint    |
| mdl_questionnaire_quest_choice   | value                    | text      |
| mdl_questionnaire_response       | complete                 | enum      |
| mdl_questionnaire_response       | grade                    | bigint    |
| mdl_questionnaire_response       | id                       | bigint    |
| mdl_questionnaire_response       | submitted                | bigint    |
| mdl_questionnaire_response       | survey_id                | bigint    |
| mdl_questionnaire_response       | username                 | varchar   |
| mdl_questionnaire_response_bool  | choice_id                | enum      |
| mdl_questionnaire_response_bool  | id                       | bigint    |
| mdl_questionnaire_response_bool  | question_id              | bigint    |
| mdl_questionnaire_response_bool  | response_id              | bigint    |
| mdl_questionnaire_response_date  | id                       | bigint    |
| mdl_questionnaire_response_date  | question_id              | bigint    |
| mdl_questionnaire_response_date  | response                 | text      |
| mdl_questionnaire_response_date  | response_id              | bigint    |
| mdl_questionnaire_response_other | choice_id                | bigint    |
| mdl_questionnaire_response_other | id                       | bigint    |
| mdl_questionnaire_response_other | question_id              | bigint    |
| mdl_questionnaire_response_other | response                 | text      |
| mdl_questionnaire_response_other | response_id              | bigint    |
| mdl_questionnaire_response_rank  | choice_id                | bigint    |
| mdl_questionnaire_response_rank  | id                       | bigint    |
| mdl_questionnaire_response_rank  | question_id              | bigint    |
| mdl_questionnaire_response_rank  | rank                     | bigint    |
| mdl_questionnaire_response_rank  | response_id              | bigint    |
| mdl_questionnaire_response_text  | id                       | bigint    |
| mdl_questionnaire_response_text  | question_id              | bigint    |
| mdl_questionnaire_response_text  | response                 | text      |
| mdl_questionnaire_response_text  | response_id              | bigint    |
| mdl_questionnaire_resp_multiple  | choice_id                | bigint    |
| mdl_questionnaire_resp_multiple  | id                       | bigint    |
| mdl_questionnaire_resp_multiple  | question_id              | bigint    |
| mdl_questionnaire_resp_multiple  | response_id              | bigint    |
| mdl_questionnaire_resp_single    | choice_id                | bigint    |
| mdl_questionnaire_resp_single    | id                       | bigint    |
| mdl_questionnaire_resp_single    | question_id              | bigint    |
| mdl_questionnaire_resp_single    | response_id              | bigint    |
| mdl_questionnaire_survey         | email                    | varchar   |
| mdl_questionnaire_survey         | id                       | bigint    |
| mdl_questionnaire_survey         | info                     | text      |
| mdl_questionnaire_survey         | name                     | varchar   |
| mdl_questionnaire_survey         | owner                    | varchar   |
| mdl_questionnaire_survey         | realm                    | varchar   |
| mdl_questionnaire_survey         | status                   | bigint    |
| mdl_questionnaire_survey         | subtitle                 | text      |
| mdl_questionnaire_survey         | thanks_page              | varchar   |
| mdl_questionnaire_survey         | thank_body               | text      |
| mdl_questionnaire_survey         | thank_head               | varchar   |
| mdl_questionnaire_survey         | theme                    | varchar   |
| mdl_questionnaire_survey         | title                    | varchar   |
| mdl_question_answers             | answer                   | text      |
| mdl_question_answers             | feedback                 | text      |
| mdl_question_answers             | fraction                 | double    |
| mdl_question_answers             | id                       | bigint    |
| mdl_question_answers             | question                 | bigint    |
| mdl_question_attempts            | id                       | bigint    |
| mdl_question_attempts            | modulename               | varchar   |
| mdl_question_calculated          | answer                   | bigint    |
| mdl_question_calculated          | correctanswerformat      | bigint    |
| mdl_question_calculated          | correctanswerlength      | bigint    |
| mdl_question_calculated          | id                       | bigint    |
| mdl_question_calculated          | question                 | bigint    |
| mdl_question_calculated          | tolerance                | varchar   |
| mdl_question_calculated          | tolerancetype            | bigint    |
| mdl_question_categories          | contextid                | bigint    |
| mdl_question_categories          | id                       | bigint    |
| mdl_question_categories          | info                     | text      |
| mdl_question_categories          | name                     | varchar   |
| mdl_question_categories          | parent                   | bigint    |
| mdl_question_categories          | sortorder                | bigint    |
| mdl_question_categories          | stamp                    | varchar   |
| mdl_question_datasets            | datasetdefinition        | bigint    |
| mdl_question_datasets            | id                       | bigint    |
| mdl_question_datasets            | question                 | bigint    |
| mdl_question_dataset_definitions | category                 | bigint    |
| mdl_question_dataset_definitions | id                       | bigint    |
| mdl_question_dataset_definitions | itemcount                | bigint    |
| mdl_question_dataset_definitions | name                     | varchar   |
| mdl_question_dataset_definitions | options                  | varchar   |
| mdl_question_dataset_definitions | type                     | bigint    |
| mdl_question_dataset_items       | definition               | bigint    |
| mdl_question_dataset_items       | id                       | bigint    |
| mdl_question_dataset_items       | itemnumber               | bigint    |
| mdl_question_dataset_items       | value                    | varchar   |
| mdl_question_match               | id                       | bigint    |
| mdl_question_match               | question                 | bigint    |
| mdl_question_match               | shuffleanswers           | smallint  |
| mdl_question_match               | subquestions             | varchar   |
| mdl_question_match_sub           | answertext               | varchar   |
| mdl_question_match_sub           | code                     | bigint    |
| mdl_question_match_sub           | id                       | bigint    |
| mdl_question_match_sub           | question                 | bigint    |
| mdl_question_match_sub           | questiontext             | text      |
| mdl_question_multianswer         | id                       | bigint    |
| mdl_question_multianswer         | question                 | bigint    |
| mdl_question_multianswer         | sequence                 | text      |
| mdl_question_multichoice         | answernumbering          | varchar   |
| mdl_question_multichoice         | answers                  | varchar   |
| mdl_question_multichoice         | correctfeedback          | text      |
| mdl_question_multichoice         | id                       | bigint    |
| mdl_question_multichoice         | incorrectfeedback        | text      |
| mdl_question_multichoice         | layout                   | smallint  |
| mdl_question_multichoice         | partiallycorrectfeedback | text      |
| mdl_question_multichoice         | question                 | bigint    |
| mdl_question_multichoice         | shuffleanswers           | smallint  |
| mdl_question_multichoice         | single                   | smallint  |
| mdl_question_numerical           | answer                   | bigint    |
| mdl_question_numerical           | id                       | bigint    |
| mdl_question_numerical           | question                 | bigint    |
| mdl_question_numerical           | tolerance                | varchar   |
| mdl_question_numerical_units     | id                       | bigint    |
| mdl_question_numerical_units     | multiplier               | decimal   |
| mdl_question_numerical_units     | question                 | bigint    |
| mdl_question_numerical_units     | unit                     | varchar   |
| mdl_question_randomsamatch       | choose                   | bigint    |
| mdl_question_randomsamatch       | id                       | bigint    |
| mdl_question_randomsamatch       | question                 | bigint    |
| mdl_question_sessions            | attemptid                | bigint    |
| mdl_question_sessions            | id                       | bigint    |
| mdl_question_sessions            | manualcomment            | text      |
| mdl_question_sessions            | newest                   | bigint    |
| mdl_question_sessions            | newgraded                | bigint    |
| mdl_question_sessions            | questionid               | bigint    |
| mdl_question_sessions            | sumpenalty               | double    |
| mdl_question_shortanswer         | answers                  | varchar   |
| mdl_question_shortanswer         | id                       | bigint    |
| mdl_question_shortanswer         | question                 | bigint    |
| mdl_question_shortanswer         | usecase                  | tinyint   |
| mdl_question_states              | answer                   | text      |
| mdl_question_states              | attempt                  | bigint    |
| mdl_question_states              | event                    | smallint  |
| mdl_question_states              | grade                    | double    |
| mdl_question_states              | id                       | bigint    |
| mdl_question_states              | originalquestion         | bigint    |
| mdl_question_states              | penalty                  | double    |
| mdl_question_states              | question                 | bigint    |
| mdl_question_states              | raw_grade                | double    |
| mdl_question_states              | seq_number               | mediumint |
| mdl_question_states              | timestamp                | bigint    |
| mdl_question_truefalse           | falseanswer              | bigint    |
| mdl_question_truefalse           | id                       | bigint    |
| mdl_question_truefalse           | question                 | bigint    |
| mdl_question_truefalse           | trueanswer               | bigint    |
| mdl_quiz_question_instances      | grade                    | mediumint |
| mdl_quiz_question_instances      | id                       | bigint    |
| mdl_quiz_question_instances      | question                 | bigint    |
| mdl_quiz_question_instances      | quiz                     | bigint    |
| mdl_quiz_question_versions       | id                       | bigint    |
| mdl_quiz_question_versions       | newquestion              | bigint    |
| mdl_quiz_question_versions       | oldquestion              | bigint    |
| mdl_quiz_question_versions       | originalquestion         | bigint    |
| mdl_quiz_question_versions       | quiz                     | bigint    |
| mdl_quiz_question_versions       | timestamp                | bigint    |
| mdl_quiz_question_versions       | userid                   | bigint    |
| mdl_survey_questions             | id                       | bigint    |
| mdl_survey_questions             | intro                    | varchar   |
| mdl_survey_questions             | multi                    | varchar   |
| mdl_survey_questions             | options                  | text      |
| mdl_survey_questions             | shorttext                | varchar   |
| mdl_survey_questions             | text                     | varchar   |
| mdl_survey_questions             | type                     | smallint  |
+----------------------------------+--------------------------+-----------+
225 rows in set (0.01 sec)

Taxonomy: