quizcomp.model.constants

 1import enum
 2import string
 3import typing
 4
 5QUIZ_FILENAME: str = 'quiz.json'
 6QUESTION_FILENAME: str = 'question.json'
 7
 8MAX_IMAGE_RENAMES: int = 1000
 9
10DEFAULT_CHOICES: typing.List[str] = list(string.ascii_uppercase)
11MAX_CHOICES: int = len(DEFAULT_CHOICES)
12
13class Format(enum.Enum):
14    """ Different formats that are available for output document or parser rendering. """
15
16    CANVAS = 'canvas'
17    HTML = 'html'
18    JSON = 'json'
19    MD = 'md'
20    TEX = 'tex'
21    TEXT = 'text'
22    QTI = 'qti'
23
24DOC_FORMATS: typing.List[Format] = [
25    Format.CANVAS,
26    Format.HTML,
27    Format.JSON,
28    Format.TEX,
29    Format.QTI,
30]
31""" Format that can be used for output documents. """
32
33PARSER_FORMATS: typing.List[Format] = [
34    Format.CANVAS,
35    Format.HTML,
36    Format.JSON,
37    Format.MD,
38    Format.TEX,
39    Format.TEXT,
40]
41""" Formats that the parser understands basic conversions to. """
42
43class QuestionType(enum.Enum):
44    """ The types of questions supported by the Quiz Composer. """
45
46    ESSAY = 'essay'
47    FIMB = 'fill_in_multiple_blanks'
48    FITB = 'fill_in_the_blank'
49    MATCHING = 'matching'
50    MA = 'multiple_answers'
51    MCQ = 'multiple_choice'
52    MDD = 'multiple_dropdowns'
53    NUMERICAL = 'numerical'
54    SA = 'short_answer'
55    TEXT_ONLY = 'text_only'
56    TF = 'true_false'
QUIZ_FILENAME: str = 'quiz.json'
QUESTION_FILENAME: str = 'question.json'
MAX_IMAGE_RENAMES: int = 1000
DEFAULT_CHOICES: List[str] = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
MAX_CHOICES: int = 26
class Format(enum.Enum):
14class Format(enum.Enum):
15    """ Different formats that are available for output document or parser rendering. """
16
17    CANVAS = 'canvas'
18    HTML = 'html'
19    JSON = 'json'
20    MD = 'md'
21    TEX = 'tex'
22    TEXT = 'text'
23    QTI = 'qti'

Different formats that are available for output document or parser rendering.

CANVAS = <Format.CANVAS: 'canvas'>
HTML = <Format.HTML: 'html'>
JSON = <Format.JSON: 'json'>
MD = <Format.MD: 'md'>
TEX = <Format.TEX: 'tex'>
TEXT = <Format.TEXT: 'text'>
QTI = <Format.QTI: 'qti'>
DOC_FORMATS: List[Format] = [<Format.CANVAS: 'canvas'>, <Format.HTML: 'html'>, <Format.JSON: 'json'>, <Format.TEX: 'tex'>, <Format.QTI: 'qti'>]

Format that can be used for output documents.

PARSER_FORMATS: List[Format] = [<Format.CANVAS: 'canvas'>, <Format.HTML: 'html'>, <Format.JSON: 'json'>, <Format.MD: 'md'>, <Format.TEX: 'tex'>, <Format.TEXT: 'text'>]

Formats that the parser understands basic conversions to.

class QuestionType(enum.Enum):
44class QuestionType(enum.Enum):
45    """ The types of questions supported by the Quiz Composer. """
46
47    ESSAY = 'essay'
48    FIMB = 'fill_in_multiple_blanks'
49    FITB = 'fill_in_the_blank'
50    MATCHING = 'matching'
51    MA = 'multiple_answers'
52    MCQ = 'multiple_choice'
53    MDD = 'multiple_dropdowns'
54    NUMERICAL = 'numerical'
55    SA = 'short_answer'
56    TEXT_ONLY = 'text_only'
57    TF = 'true_false'

The types of questions supported by the Quiz Composer.

ESSAY = <QuestionType.ESSAY: 'essay'>
FIMB = <QuestionType.FIMB: 'fill_in_multiple_blanks'>
FITB = <QuestionType.FITB: 'fill_in_the_blank'>
MATCHING = <QuestionType.MATCHING: 'matching'>
MA = <QuestionType.MA: 'multiple_answers'>
MCQ = <QuestionType.MCQ: 'multiple_choice'>
MDD = <QuestionType.MDD: 'multiple_dropdowns'>
NUMERICAL = <QuestionType.NUMERICAL: 'numerical'>
SA = <QuestionType.SA: 'short_answer'>
TEXT_ONLY = <QuestionType.TEXT_ONLY: 'text_only'>
TF = <QuestionType.TF: 'true_false'>