From 30df65acfd7b743aeec5b3344c8af629fa1a95eb Mon Sep 17 00:00:00 2001 From: Braden MacDonald Date: Wed, 8 Apr 2015 18:49:07 -0700 Subject: [PATCH 1/3] Fix invalid appearance in Apros due to their box-sizing global --- problem_builder/public/css/questionnaire.css | 2 +- problem_builder/public/themes/apros.css | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/problem_builder/public/css/questionnaire.css b/problem_builder/public/css/questionnaire.css index f7b1af8b..b202506e 100644 --- a/problem_builder/public/css/questionnaire.css +++ b/problem_builder/public/css/questionnaire.css @@ -37,7 +37,7 @@ font-family: arial; font-size: 14px; opacity: 0.9; - padding: 22px 10px; + padding: 22px 10px 10px 10px; width: 300px; min-height: 40px; z-index: 10000; diff --git a/problem_builder/public/themes/apros.css b/problem_builder/public/themes/apros.css index e69de29b..d1589cf7 100644 --- a/problem_builder/public/themes/apros.css +++ b/problem_builder/public/themes/apros.css @@ -0,0 +1,4 @@ +.mentoring .questionnaire .choice-tips, +.mentoring .questionnaire .feedback { + box-sizing: content-box; /* Avoid a global reset to border-box found on Apros */ +} From 08cad153242265b43f729fc37794d7b73e10f1ed Mon Sep 17 00:00:00 2001 From: Braden MacDonald Date: Fri, 10 Apr 2015 00:52:03 -0700 Subject: [PATCH 2/3] Fix alignment of font awesome icons, checkbox, and text --- problem_builder/public/css/questionnaire.css | 3 +++ problem_builder/public/themes/apros.css | 5 +++++ problem_builder/public/themes/lms.css | 1 - 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/problem_builder/public/css/questionnaire.css b/problem_builder/public/css/questionnaire.css index b202506e..4c4124f8 100644 --- a/problem_builder/public/css/questionnaire.css +++ b/problem_builder/public/css/questionnaire.css @@ -78,10 +78,13 @@ display: table-cell; vertical-align: top; width: 28px; + padding-top: 3px; + padding-right: 5px; } .mentoring .choice-label { display: table-cell; vertical-align: top; line-height: 1.3; + padding-top: 4px; } diff --git a/problem_builder/public/themes/apros.css b/problem_builder/public/themes/apros.css index d1589cf7..1d3da512 100644 --- a/problem_builder/public/themes/apros.css +++ b/problem_builder/public/themes/apros.css @@ -2,3 +2,8 @@ .mentoring .questionnaire .feedback { box-sizing: content-box; /* Avoid a global reset to border-box found on Apros */ } + +.themed-xblock.mentoring .choices-list .choice-selector { + padding: 4px 3px 0 3px; + font-size: 16px; +} diff --git a/problem_builder/public/themes/lms.css b/problem_builder/public/themes/lms.css index dba07c95..15c33a46 100644 --- a/problem_builder/public/themes/lms.css +++ b/problem_builder/public/themes/lms.css @@ -42,7 +42,6 @@ div.course-wrapper section.course-content .themed-xblock.mentoring p:empty { vertical-align: middle; width: 100%; padding-bottom: 10px; - padding-top: 2px; } .themed-xblock.mentoring .choice-label span.low { From bbcaa2cdf612058c3d3168792d17bb2133031370 Mon Sep 17 00:00:00 2001 From: Braden MacDonald Date: Mon, 13 Apr 2015 13:40:22 -0700 Subject: [PATCH 3/3] Fix flaky dashboard test --- problem_builder/questionnaire.py | 10 +++++----- problem_builder/tests/integration/test_dashboard.py | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/problem_builder/questionnaire.py b/problem_builder/questionnaire.py index b2a352fd..d57e3e41 100644 --- a/problem_builder/questionnaire.py +++ b/problem_builder/questionnaire.py @@ -21,10 +21,10 @@ # Imports ########################################################### from django.utils.safestring import mark_safe -import logging -from lxml import etree +from lazy import lazy +import uuid from xblock.core import XBlock -from xblock.fields import Scope, String, Float, List, UNIQUE_ID +from xblock.fields import Scope, String, Float, UNIQUE_ID from xblock.fragment import Fragment from xblock.validation import ValidationMessage from xblockutils.helpers import child_isinstance @@ -90,14 +90,14 @@ def _(self, text): """ translate text """ return self.runtime.service(self, "i18n").ugettext(text) - @property + @lazy def html_id(self): """ A short, simple ID string used to uniquely identify this question. This is only used by templates for matching and