diff --git a/demo/test-tutorial.yaml b/demo/test-tutorial.yaml index 471a65a..f57bb01 100644 --- a/demo/test-tutorial.yaml +++ b/demo/test-tutorial.yaml @@ -58,7 +58,7 @@ questions: points: 2.0 - tut-information - - tut-success111 + - tut-success - tut-warning - tut-alert diff --git a/serve.py b/serve.py index ac850c1..a4fd0c5 100755 --- a/serve.py +++ b/serve.py @@ -184,11 +184,9 @@ class TestHandler(BaseHandler): 'textarea': 'question-textarea.html', # -- information panels -- 'information': 'question-information.html', - 'info': 'question-information.html', - 'warning': 'question-warning.html', - 'warn': 'question-warning.html', - 'alert': 'question-alert.html', - 'success': 'question-success.html', + 'success': 'question-information.html', + 'warning': 'question-information.html', + 'alert': 'question-information.html', } # --- GET @@ -258,12 +256,10 @@ class ReviewHandler(BaseHandler): 'numeric-interval': 'review-question-text.html', 'textarea': 'review-question-text.html', # -- information panels -- - 'information': 'question-information.html', - 'info': 'question-information.html', - 'warning': 'question-warning.html', - 'warn': 'question-warning.html', - 'alert': 'question-alert.html', - 'success': 'question-success.html', + 'information': 'review-question-information.html', + 'success': 'review-question-information.html', + 'warning': 'review-question-information.html', + 'alert': 'review-question-information.html', } @tornado.web.authenticated @@ -283,11 +279,10 @@ class ReviewHandler(BaseHandler): else: with f: t = json.load(f) - # print(yaml.dump(t, default_flow_style=False)) - self.render('review.html', t=t, md=md_to_html, templ=self._templates) + self.render('review.html', t=t, md=md_to_html, templ=self._templates) -# ------------------------------------------------------------------------- +# --- ADMIN ------------------------------------------------------------------ class AdminHandler(BaseHandler): SUPPORTED_METHODS = ['GET', 'POST'] diff --git a/templates/question-alert.html b/templates/question-alert.html deleted file mode 100644 index 3b23230..0000000 --- a/templates/question-alert.html +++ /dev/null @@ -1,12 +0,0 @@ -{% autoescape %} - - - diff --git a/templates/question-information.html b/templates/question-information.html index 7543bf6..bc24acb 100644 --- a/templates/question-information.html +++ b/templates/question-information.html @@ -1,12 +1,26 @@ {% autoescape %} +{% if q['type'] == 'information' %} +