Commit 29ec441abd0843e70f1cdf15e5cd03921b944511
1 parent
d9224bb6
Exists in
master
and in
1 other branch
- remove prefix 'l' from student id on login
Showing
3 changed files
with
6 additions
and
4 deletions
Show diff stats
questionfactory.py
... | ... | @@ -18,12 +18,13 @@ |
18 | 18 | # An instance of an actual question is an object that inherits from Question() |
19 | 19 | # |
20 | 20 | # Question - base class inherited by other classes |
21 | +# QuestionInformation - not a question, just a box with content | |
21 | 22 | # QuestionRadio - single choice from a list of options |
22 | 23 | # QuestionCheckbox - multiple choice, equivalent to multiple true/false |
23 | 24 | # QuestionText - line of text compared to a list of acceptable answers |
24 | 25 | # QuestionTextRegex - line of text matched against a regular expression |
25 | 26 | # QuestionTextArea - corrected by an external program |
26 | -# QuestionInformation - not a question, just a box with content | |
27 | +# QuestionNumericInterval - line of text parsed as a float | |
27 | 28 | |
28 | 29 | # base |
29 | 30 | from os import path |
... | ... | @@ -34,7 +35,7 @@ import logging |
34 | 35 | |
35 | 36 | |
36 | 37 | |
37 | -from questions import Question, QuestionRadio, QuestionCheckbox, QuestionText, QuestionTextRegex, QuestionNumericInterval, QuestionTextArea, QuestionInformation | |
38 | +from questions import QuestionRadio, QuestionCheckbox, QuestionText, QuestionTextRegex, QuestionNumericInterval, QuestionTextArea, QuestionInformation | |
38 | 39 | |
39 | 40 | |
40 | 41 | # setup logger for this module | ... | ... |
questions.py
serve.py
... | ... | @@ -18,7 +18,7 @@ import tornado.httpserver |
18 | 18 | from tornado import template, gen |
19 | 19 | |
20 | 20 | # project |
21 | -from tools import load_yaml, md_to_html #, md_to_html_review | |
21 | +from tools import load_yaml, md_to_html | |
22 | 22 | from app import App, AppException |
23 | 23 | |
24 | 24 | |
... | ... | @@ -72,6 +72,8 @@ class LoginHandler(BaseHandler): |
72 | 72 | # @gen.coroutine |
73 | 73 | def post(self): |
74 | 74 | uid = self.get_body_argument('uid') |
75 | + if uid.startswith('l'): # remove prefix 'l' | |
76 | + uid = uid[1:] | |
75 | 77 | pw = self.get_body_argument('pw') |
76 | 78 | |
77 | 79 | if self.testapp.login(uid, pw): | ... | ... |