# quiz

0 rows

### Description

The settings for each quiz. For reports see https://docs.moodle.org/en/ad-hoc_contributed_reports#Quiz_Activity

### Columns

Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments
--- | --- | --- | --- | --- | --- | --- | --- | ---
id | BIGINT | 19 |  | √ | null |
quiz_attempts.quiz | quizatte_qui2_fkR
quiz_feedback.quizid | quizfeed_qui2_fkR
quiz_grade_items.quizid | quizgraditem_qui2_fkR
quiz_grades.quiz | quizgrad_qui2_fkR
quiz_overrides.quiz | quizover_qui2_fkR
quiz_sections.quizid | quizsect_qui2_fkR
quiz_slots.quizid | quizslot_qui3_fkR
quizaccess_seb_quizsettings.quizid | quizsebquiz_qui_fkR
|  | Standard Moodle primary key.
course | BIGINT | 19 |  |  | 0 |  |  | Foreign key reference to the course this quiz is part of.
name | VARCHAR | 1333 |  |  |  |  |  | Quiz name.
intro | LONGTEXT | 2147483647 |  |  | null |  |  | Quiz introduction text.
introformat | SMALLINT | 5 |  |  | 0 |  |  | Quiz intro text format.
timeopen | BIGINT | 19 |  |  | 0 |  |  | The time when this quiz opens. (0 = no restriction.)
timeclose | BIGINT | 19 |  |  | 0 |  |  | The time when this quiz closes. (0 = no restriction.)
timelimit | BIGINT | 19 |  |  | 0 |  |  | The time limit for quiz attempts, in seconds.
overduehandling | VARCHAR | 16 |  |  | autoabandon |  |  | The method used to handle overdue attempts. 'autosubmit', 'graceperiod' or 'autoabandon'.
graceperiod | BIGINT | 19 |  |  | 0 |  |  | The amount of time (in seconds) after the time limit runs out during which attempts can still be submitted, if overduehandling is set to allow it.
preferredbehaviour | VARCHAR | 32 |  |  |  |  |  | The behaviour to ask questions to use.
canredoquestions | SMALLINT | 5 |  |  | 0 |  |  | Allows students to redo any completed question within a quiz attempt.
attempts | MEDIUMINT | 7 |  |  | 0 |  |  | The maximum number of attempts a student is allowed.
attemptonlast | SMALLINT | 5 |  |  | 0 |  |  | Whether subsequent attempts start from the answer to the previous attempt (1) or start blank (0).
grademethod | SMALLINT | 5 |  |  | 1 |  |  | One of the values QUIZ_GRADEHIGHEST, QUIZ_GRADEAVERAGE, QUIZ_ATTEMPTFIRST or QUIZ_ATTEMPTLAST.
decimalpoints | SMALLINT | 5 |  |  | 2 |  |  | Number of decimal points to use when displaying grades.
questiondecimalpoints | SMALLINT | 5 |  |  | -1 |  |  | Number of decimal points to use when displaying question grades. (-1 means use decimalpoints.)
reviewattempt | MEDIUMINT | 7 |  |  | 0 |  |  | Whether users are allowed to review their quiz attempts at various times. This is a bit field, decoded by the mod_quizquestiondisplay_options class. It is formed by ORing together the constants defined there.
reviewcorrectness | MEDIUMINT | 7 |  |  | 0 |  |  | Whether users are allowed to review the correctness of the questions in their quiz attempts at various times. A bit field, like reviewattempt.
reviewmaxmarks | MEDIUMINT | 7 |  |  | 0 |  |  | Works with reviewmarks to control whether users can see grades at various times. 0 here means no grade information is shown at all. If 1, student can see the number of marks available for this question, and reviewmarks applies. A bit field, like reviewattempt.
reviewmarks | MEDIUMINT | 7 |  |  | 0 |  |  | Works with reviewmaxmarks to control whether users can see grades at various times. If reviewmaxmarks is 1, then this controls whether students can see the the mark they got for the question, in addition to the max. A bit field, like reviewattempt.
reviewspecificfeedback | MEDIUMINT | 7 |  |  | 0 |  |  | Whether users are allowed to see the specific feedback in their quiz attempts. A bit field, like reviewattempt.
reviewgeneralfeedback | MEDIUMINT | 7 |  |  | 0 |  |  | Whether users are allowed to see the general feedback in their quiz attempts. A bit field, like reviewattempt.
reviewrightanswer | MEDIUMINT | 7 |  |  | 0 |  |  | Whether users are allowed to see the right answer in their quiz attempts. A bit field, like reviewattempt.
reviewoverallfeedback | MEDIUMINT | 7 |  |  | 0 |  |  | Whether users are allowed to see the overall feedback in their quiz attempts. A bit field, like reviewattempt.
questionsperpage | BIGINT | 19 |  |  | 0 |  |  | How often to insert a page break when editing the quiz, or when shuffling the question order.
navmethod | VARCHAR | 16 |  |  | free |  |  | Any constraints on how the user is allowed to navigate around the quiz. Currently recognised values are 'free' and 'seq'.
shuffleanswers | SMALLINT | 5 |  |  | 0 |  |  | Whether the parts of the question should be shuffled, in those question types that support it.
sumgrades | DECIMAL | 10,5 |  |  | 0.00000 |  |  | The total of all the question instance maxmarks.
grade | DECIMAL | 10,5 |  |  | 0.00000 |  |  | The total that the quiz overall grade is scaled to be out of.
timecreated | BIGINT | 19 |  |  | 0 |  |  | The time when the quiz was added to the course.
timemodified | BIGINT | 19 |  |  | 0 |  |  | Last modified time.
password | VARCHAR | 255 |  |  |  |  |  | A password that the student must enter before starting or continuing a quiz attempt.
subnet | VARCHAR | 255 |  |  |  |  |  | Used to restrict the IP addresses from which this quiz can be attempted. The format is as requried by the address_in_subnet function.
browsersecurity | VARCHAR | 32 |  |  |  |  |  | Restriciton on the browser the student must use. E.g. 'securewindow'.
delay1 | BIGINT | 19 |  |  | 0 |  |  | Delay that must be left between the first and second attempt, in seconds.
delay2 | BIGINT | 19 |  |  | 0 |  |  | Delay that must be left between the second and subsequent attempt, in seconds.
showuserpicture | SMALLINT | 5 |  |  | 0 |  |  | Option to show the user's picture during the attempt and on the review page.
showblocks | SMALLINT | 5 |  |  | 0 |  |  | Whether blocks should be shown on the attempt.php and review.php pages.
completionattemptsexhausted | BIT | 1 | √ |  | 0 |  |  | complete after available attempts exhausted
completionminattempts | BIGINT | 19 |  |  | 0 |  |  | complete after minimum number of attempts
allowofflineattempts | BIT | 1 | √ |  | 0 |  |  | Whether to allow the quiz to be attempted offline in the mobile app
precreateattempts | BIT | 1 | √ |  | null |  |  | Pre-create attempts for this quiz? This setting has no effect unless the precreateperiod config setting is set and unlocked.

### Indexes

Constraint Name | Type | Sort | Column(s)
--- | --- | --- | ---
PRIMARY | Primary key | Asc | id
quiz_cou_ix | Performance | Asc | course

### Relationships