diff --git a/school/lms/md.py b/school/lms/md.py index 5acb6322..b072af2a 100644 --- a/school/lms/md.py +++ b/school/lms/md.py @@ -105,7 +105,7 @@ def sanitize_html(html, macro): any broken tags. This makes sures that all those things are fixed before passing to the etree parser. """ - soup = BeautifulSoup(html, features="lxml") + soup = BeautifulSoup(html, features="html5lib") nodes = soup.body.children classname = "" if macro == "YouTubeVideo": diff --git a/school/public/css/style.css b/school/public/css/style.css index c22311f3..97903fc5 100644 --- a/school/public/css/style.css +++ b/school/public/css/style.css @@ -824,10 +824,15 @@ input[type=checkbox] { display: flex; align-items: center; justify-content: space-between; + margin-top: 5rem; } .question { flex-direction: column; +} + +.question-card { + flex-direction: column; padding: 1.25rem; } @@ -1721,6 +1726,7 @@ pre { display: flex; align-items: center; justify-content: space-between; + margin-bottom: 2rem; } .question-number { diff --git a/school/templates/quiz.html b/school/templates/quiz.html index 72aa20f8..a7cf17bc 100644 --- a/school/templates/quiz.html +++ b/school/templates/quiz.html @@ -2,12 +2,12 @@
-
+
{% for question in quiz.questions %} {% set instruction = _("Choose all answers that apply") if question.multiple else _("Choose 1 answer") %} -
{{ loop.index }}
@@ -22,22 +22,22 @@ {% set options = [question.option_1, question.option_2, question.option_3, question.option_4] %} {% for option in options %} {% if option %} +
+
+ +
-
- + {% set explanation = question['explanation_' + loop.index | string] %} + {% if explanation %} + {{ explanation }} + {% endif %}
- - {% set explanation = question['explanation_' + loop.index | string] %} - {% if explanation %} - {{ explanation }} - {% endif %} - {% endif %} {% endfor %} diff --git a/school/www/batch/learn.html b/school/www/batch/learn.html index 444e6676..34a5bd52 100644 --- a/school/www/batch/learn.html +++ b/school/www/batch/learn.html @@ -108,7 +108,7 @@ {% set progress = get_progress(course.name, lesson.name) %}