Commit 53ea7e808a0f285fd34c6c3db1e7ebbb157e5e21
1 parent
77357c9e
Exists in
master
and in
1 other branch
- removed 2nd argument from md and md_to_html
Showing
10 changed files
with
14 additions
and
14 deletions
Show diff stats
templates/question-alert.html
templates/question-checkbox.html
@@ -11,7 +11,7 @@ | @@ -11,7 +11,7 @@ | ||
11 | <input type="checkbox" id="{{i}}:{{n}}" name="{{i}}" value="{{n}}"> | 11 | <input type="checkbox" id="{{i}}:{{n}}" name="{{i}}" value="{{n}}"> |
12 | </div> | 12 | </div> |
13 | <div class="p-2"> | 13 | <div class="p-2"> |
14 | - <label for="{{n}}">{{ md(opt, q) }}</label> | 14 | + <label for="{{n}}">{{ md(opt) }}</label> |
15 | </div> | 15 | </div> |
16 | </div> | 16 | </div> |
17 | </a> | 17 | </a> |
templates/question-information.html
templates/question-radio.html
@@ -11,7 +11,7 @@ | @@ -11,7 +11,7 @@ | ||
11 | <input type="radio" id="{{i}}:{{n}}" name="{{i}}" value="{{n}}"> | 11 | <input type="radio" id="{{i}}:{{n}}" name="{{i}}" value="{{n}}"> |
12 | </div> | 12 | </div> |
13 | <div class="p-1"> | 13 | <div class="p-1"> |
14 | - <label for="{{n}}">{{ md(opt, q) }}</label> | 14 | + <label for="{{n}}">{{ md(opt) }}</label> |
15 | </div> | 15 | </div> |
16 | </div> | 16 | </div> |
17 | </a> | 17 | </a> |
templates/question-success.html
templates/question-warning.html
templates/question.html
templates/review-question-checkbox.html
@@ -12,7 +12,7 @@ | @@ -12,7 +12,7 @@ | ||
12 | <i class="fa fa-check-square-o" aria-hidden="true"></i> | 12 | <i class="fa fa-check-square-o" aria-hidden="true"></i> |
13 | </div> | 13 | </div> |
14 | <div class="p-2"> | 14 | <div class="p-2"> |
15 | - {{ md(opt, q) }} | 15 | + {{ md(opt) }} |
16 | </div> | 16 | </div> |
17 | <div class="ml-auto p-2"> | 17 | <div class="ml-auto p-2"> |
18 | {% if q['correct'][n] > 0 %} | 18 | {% if q['correct'][n] > 0 %} |
@@ -28,10 +28,10 @@ | @@ -28,10 +28,10 @@ | ||
28 | 28 | ||
29 | {% else %} | 29 | {% else %} |
30 | <div class="p-2"> | 30 | <div class="p-2"> |
31 | - <i class="fa fa-square-o" aria-hidden="true"></i> | 31 | + <i class="fa fa-square-o" aria-hidden="true"></i> |
32 | </div> | 32 | </div> |
33 | <div class="p-2"> | 33 | <div class="p-2"> |
34 | - {{ md(opt, q) }} | 34 | + {{ md(opt) }} |
35 | </div> | 35 | </div> |
36 | <div class="ml-auto p-2"> | 36 | <div class="ml-auto p-2"> |
37 | {% if q['correct'][n] > 0 %} | 37 | {% if q['correct'][n] > 0 %} |
templates/review-question-radio.html
@@ -12,13 +12,13 @@ | @@ -12,13 +12,13 @@ | ||
12 | <i class="fa fa-dot-circle-o" aria-hidden="true"></i> | 12 | <i class="fa fa-dot-circle-o" aria-hidden="true"></i> |
13 | </div> | 13 | </div> |
14 | <div class="p-2"> | 14 | <div class="p-2"> |
15 | - {{ md(opt, q) }} | 15 | + {{ md(opt) }} |
16 | </div> | 16 | </div> |
17 | <div class="ml-auto p-2"> | 17 | <div class="ml-auto p-2"> |
18 | {% if q['correct'][n] > 0 %} | 18 | {% if q['correct'][n] > 0 %} |
19 | <div class="text-right text-success"> | 19 | <div class="text-right text-success"> |
20 | <i class="fa fa-check" aria-hidden="true"></i> | 20 | <i class="fa fa-check" aria-hidden="true"></i> |
21 | - </div> | 21 | + </div> |
22 | {% else %} | 22 | {% else %} |
23 | <div class="text-right text-danger"> | 23 | <div class="text-right text-danger"> |
24 | <i class="fa fa-close" aria-hidden="true"></i> | 24 | <i class="fa fa-close" aria-hidden="true"></i> |
@@ -31,7 +31,7 @@ | @@ -31,7 +31,7 @@ | ||
31 | <i class="fa fa-circle-o" aria-hidden="true"></i> | 31 | <i class="fa fa-circle-o" aria-hidden="true"></i> |
32 | </div> | 32 | </div> |
33 | <div class="p-2"> | 33 | <div class="p-2"> |
34 | - {{ md(opt, q) }} | 34 | + {{ md(opt) }} |
35 | </div> | 35 | </div> |
36 | <div class="ml-auto p-2"> | 36 | <div class="ml-auto p-2"> |
37 | {% if q['correct'][n] > 0 %} | 37 | {% if q['correct'][n] > 0 %} |
tools.py
@@ -126,7 +126,7 @@ class HighlightRenderer(mistune.Renderer): | @@ -126,7 +126,7 @@ class HighlightRenderer(mistune.Renderer): | ||
126 | 126 | ||
127 | markdown = MarkdownWithMath(HighlightRenderer(escape=True)) # hard_wrap=True to insert <br> on newline | 127 | markdown = MarkdownWithMath(HighlightRenderer(escape=True)) # hard_wrap=True to insert <br> on newline |
128 | 128 | ||
129 | -def md_to_html(text, q=None): | 129 | +def md_to_html(text): |
130 | return markdown(text) | 130 | return markdown(text) |
131 | 131 | ||
132 | # --------------------------------------------------------------------------- | 132 | # --------------------------------------------------------------------------- |