Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion problem_builder/public/css/questionnaire.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
9 changes: 9 additions & 0 deletions problem_builder/public/themes/apros.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.mentoring .questionnaire .choice-tips,
.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;
}
1 change: 0 additions & 1 deletion problem_builder/public/themes/lms.css
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
10 changes: 5 additions & 5 deletions problem_builder/questionnaire.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 <input> and <label> elements.
"""
return unicode(id(self)) # Unique as long as all choices are loaded at once
return uuid.uuid4().hex[:20]

def student_view(self, context=None):
name = getattr(self, "unmixed_class", self.__class__).__name__
Expand Down
1 change: 1 addition & 0 deletions problem_builder/tests/integration/test_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ def test_dashboard(self):
choices = mcq.find_elements_by_css_selector('.choices .choice label')
choices[idx].click()
submit = pb.find_element_by_css_selector('.submit input.input-main')
self.assertTrue(submit.is_enabled())
submit.click()
self.wait_until_disabled(submit)

Expand Down