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,12 +18,13 @@ | ||
18 | # An instance of an actual question is an object that inherits from Question() | 18 | # An instance of an actual question is an object that inherits from Question() |
19 | # | 19 | # |
20 | # Question - base class inherited by other classes | 20 | # Question - base class inherited by other classes |
21 | +# QuestionInformation - not a question, just a box with content | ||
21 | # QuestionRadio - single choice from a list of options | 22 | # QuestionRadio - single choice from a list of options |
22 | # QuestionCheckbox - multiple choice, equivalent to multiple true/false | 23 | # QuestionCheckbox - multiple choice, equivalent to multiple true/false |
23 | # QuestionText - line of text compared to a list of acceptable answers | 24 | # QuestionText - line of text compared to a list of acceptable answers |
24 | # QuestionTextRegex - line of text matched against a regular expression | 25 | # QuestionTextRegex - line of text matched against a regular expression |
25 | # QuestionTextArea - corrected by an external program | 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 | # base | 29 | # base |
29 | from os import path | 30 | from os import path |
@@ -34,7 +35,7 @@ import logging | @@ -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 | # setup logger for this module | 41 | # setup logger for this module |
questions.py
serve.py
@@ -18,7 +18,7 @@ import tornado.httpserver | @@ -18,7 +18,7 @@ import tornado.httpserver | ||
18 | from tornado import template, gen | 18 | from tornado import template, gen |
19 | 19 | ||
20 | # project | 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 | from app import App, AppException | 22 | from app import App, AppException |
23 | 23 | ||
24 | 24 | ||
@@ -72,6 +72,8 @@ class LoginHandler(BaseHandler): | @@ -72,6 +72,8 @@ class LoginHandler(BaseHandler): | ||
72 | # @gen.coroutine | 72 | # @gen.coroutine |
73 | def post(self): | 73 | def post(self): |
74 | uid = self.get_body_argument('uid') | 74 | uid = self.get_body_argument('uid') |
75 | + if uid.startswith('l'): # remove prefix 'l' | ||
76 | + uid = uid[1:] | ||
75 | pw = self.get_body_argument('pw') | 77 | pw = self.get_body_argument('pw') |
76 | 78 | ||
77 | if self.testapp.login(uid, pw): | 79 | if self.testapp.login(uid, pw): |