Commit c5485e4f6ba219dbca503acb22806ca9bf7c63db
Exists in
master
and in
1 other branch
Merge branch 'master' into dev
fixes initdb error where csv was being initialized twice.
Showing
4 changed files
with
19 additions
and
2 deletions
Show diff stats
perguntations/__init__.py
perguntations/main.py
perguntations/templates/test.html
... | ... | @@ -158,6 +158,13 @@ |
158 | 158 | viewportMargin: Infinity, |
159 | 159 | matchBrackets: true, |
160 | 160 | styleActiveLine: true, |
161 | + indentUnit: 4, | |
162 | + indentWithTabs: false, | |
163 | + smartIndent: true, | |
164 | + extraKeys: { | |
165 | + "Tab": (cm) => cm.execCommand("indentMore"), | |
166 | + "Shift-Tab": (cm) => cm.execCommand("indentLess"), | |
167 | + }, | |
161 | 168 | }); |
162 | 169 | }); |
163 | 170 | </script> | ... | ... |
perguntations/test.py
... | ... | @@ -16,6 +16,16 @@ logger = logging.getLogger(__name__) |
16 | 16 | class Test(dict): |
17 | 17 | ''' |
18 | 18 | Each instance Test() is a concrete test of a single student. |
19 | + A test can be in one of the states: ACTIVE, SUBMITTED, CORRECTED, QUIT | |
20 | + Methods: | |
21 | + t.start(student) - marks start of test (register time and state) | |
22 | + t.reset_answers() - remove all answers from the test | |
23 | + t.update_answer(ref, ans) - update answer of a given question | |
24 | + t.submit(answers_dict) - update answers, register time and state | |
25 | + t.correct_async() | |
26 | + t.correct() - corrects questions and compute grade, register state | |
27 | + t.giveup() - register the test as given up, answers are not corrected | |
28 | + t.save_json(filename) - save the current test to file in JSON format | |
19 | 29 | ''' |
20 | 30 | |
21 | 31 | # ------------------------------------------------------------------------ | ... | ... |