8CHALLENGERESULT_UNFINISHED = 0x01
9CHALLENGERESULT_FINISHED = 0x02
10CHALLENGERESULT_PASSED = 0x04
14 """This class represents an attempt by a student to finish a
15 challenge. It contains their scores, individual results for each
16 problem,
and any answers
or files submitted.
20 'rid': (
'INTEGER',
'PRIMARY KEY NOT NULL',),
21 'userid': (
'INT',
'NOT NULL',),
22 'classid': (
'INT',
'NOT NULL',),
23 'challengetype': (
'INT16',
'NOT NULL',),
24 'timeused': (
'INT16',
'NOT NULL'),
25 'starttime': (
'DATETIME',
'NOT NULL',),
26 'endtime': (
'DATETIME',
'NOT NULL',),
27 'challenge': (
'TEXT',
'NOT NULL',),
28 'challengeid': (
'INT',
'NOT NULL',),
29 'problemresults': (
'LIST',
"NOT NULL DEFAULT ''",),
30 'answer': (
'TEXT',
"NOT NULL DEFAULT ''",),
31 'lessonids': (
'NEWLINELIST',
"NOT NULL DEFAULT ''",),
32 'problemids': (
'NEWLINELIST',
"NOT NULL DEFAULT ''",),
33 'files': (
'NEWLINELIST',
"NOT NULL DEFAULT ''",),
34 'score': (
'INT16',
'NOT NULL DEFAULT 0',),
35 'maximumscore': (
'INT16',
'NOT NULL DEFAULT 0',),
36 'percentright': (
'INT16',
'NOT NULL DEFAULT 0',),
37 'scoreadded': (
'INT16',
'NOT NULL DEFAULT 0',),
38 'flags': (
'INT',
'NOT NULL DEFAULT 0',),
43 _dbdisplay = [
'challenge',
'challengeid',
'lessonids',
'score',
'percentright']
This class represents an attempt by a student to finish a challenge.
def __init__(self)
Initialize all fields at creation like a good programmer should.
Base class for all database models.