% if status == 'unsubmitted':
unanswered
% elif status == 'correct':
diff --git a/common/lib/capa/capa/templates/vsepr_input.html b/common/lib/capa/capa/templates/vsepr_input.html
index 1bac2fd6e2..ab0fafe430 100644
--- a/common/lib/capa/capa/templates/vsepr_input.html
+++ b/common/lib/capa/capa/templates/vsepr_input.html
@@ -21,11 +21,11 @@
% endif
-
-
+
% if status == 'unsubmitted':
unanswered
% elif status == 'correct':
diff --git a/common/lib/xmodule/xmodule/css/capa/display.scss b/common/lib/xmodule/xmodule/css/capa/display.scss
index ab23bc1b48..bd131a9ff6 100644
--- a/common/lib/xmodule/xmodule/css/capa/display.scss
+++ b/common/lib/xmodule/xmodule/css/capa/display.scss
@@ -555,6 +555,15 @@ section.problem {
@extend .blue-button;
}
+ button.show {
+ height: ($baseline*2);
+
+ span {
+ font-size: 1.0em;
+ font-weight: 600;
+ }
+ }
+
.submission_feedback {
// background: #F3F3F3;
// border: 1px solid #ddd;
@@ -811,13 +820,13 @@ section.problem {
}
.selected-grade {
background: #666;
- color: white;
+ color: white;
}
input[type=radio]:checked + label {
background: #666;
color: white; }
input[class='score-selection'] {
- display: none;
+ display: none;
}
}
@@ -878,11 +887,11 @@ section.problem {
.tag-status, .tag { padding: .25em .5em; }
}
}
- textarea.comment {
+ textarea.comment {
$num-lines-to-show: 5;
$line-height: 1.4em;
$padding: .2em;
- width: 100%;
+ width: 100%;
padding: $padding (2 * $padding);
line-height: $line-height;
height: ($num-lines-to-show * $line-height) + (2*$padding) - (($line-height - 1)/2);
diff --git a/common/lib/xmodule/xmodule/js/fixtures/problem_content.html b/common/lib/xmodule/xmodule/js/fixtures/problem_content.html
index ffcb5e4682..3e580be722 100644
--- a/common/lib/xmodule/xmodule/js/fixtures/problem_content.html
+++ b/common/lib/xmodule/xmodule/js/fixtures/problem_content.html
@@ -13,7 +13,7 @@
-
+
Explanation
diff --git a/common/lib/xmodule/xmodule/js/spec/capa/display_spec.coffee b/common/lib/xmodule/xmodule/js/spec/capa/display_spec.coffee
index 9e2aab0c25..1efaa6c852 100644
--- a/common/lib/xmodule/xmodule/js/spec/capa/display_spec.coffee
+++ b/common/lib/xmodule/xmodule/js/spec/capa/display_spec.coffee
@@ -16,7 +16,7 @@ describe 'Problem', ->
# note that the fixturesPath is set in spec/helper.coffee
loadFixtures 'problem.html'
-
+
spyOn Logger, 'log'
spyOn($.fn, 'load').andCallFake (url, callback) ->
$(@).html readFixtures('problem_content.html')
@@ -27,13 +27,13 @@ describe 'Problem', ->
it 'set the element from html', ->
@problem999 = new Problem ("
- ")
+ ")
expect(@problem999.element_id).toBe 'problem_999'
it 'set the element from loadFixtures', ->
@@ -62,7 +62,7 @@ describe 'Problem', ->
expect($('section.action input.reset')).toHandleWith 'click', @problem.reset
it 'bind the show button', ->
- expect($('section.action input.show')).toHandleWith 'click', @problem.show
+ expect($('section.action button.show')).toHandleWith 'click', @problem.show
it 'bind the save button', ->
expect($('section.action input.save')).toHandleWith 'click', @problem.save
@@ -126,14 +126,14 @@ describe 'Problem', ->
describe 'when the response is correct', ->
it 'call render with returned content', ->
- spyOn($, 'postWithPrefix').andCallFake (url, answers, callback) ->
+ spyOn($, 'postWithPrefix').andCallFake (url, answers, callback) ->
callback(success: 'correct', contents: 'Correct!')
@problem.check()
expect(@problem.el.html()).toEqual 'Correct!'
describe 'when the response is incorrect', ->
it 'call render with returned content', ->
- spyOn($, 'postWithPrefix').andCallFake (url, answers, callback) ->
+ spyOn($, 'postWithPrefix').andCallFake (url, answers, callback) ->
callback(success: 'incorrect', contents: 'Incorrect!')
@problem.check()
expect(@problem.el.html()).toEqual 'Incorrect!'
@@ -159,7 +159,7 @@ describe 'Problem', ->
it 'POST to the problem reset page', ->
spyOn $, 'postWithPrefix'
@problem.reset()
- expect($.postWithPrefix).toHaveBeenCalledWith '/problem/Problem1/problem_reset',
+ expect($.postWithPrefix).toHaveBeenCalledWith '/problem/Problem1/problem_reset',
{ id: 'i4x://edX/101/problem/Problem1' }, jasmine.any(Function)
it 'render the returned content', ->
@@ -179,7 +179,7 @@ describe 'Problem', ->
it 'log the problem_show event', ->
@problem.show()
- expect(Logger.log).toHaveBeenCalledWith 'problem_show',
+ expect(Logger.log).toHaveBeenCalledWith 'problem_show',
problem: 'i4x://edX/101/problem/Problem1'
it 'fetch the answers', ->
@@ -198,7 +198,7 @@ describe 'Problem', ->
it 'toggle the show answer button', ->
spyOn($, 'postWithPrefix').andCallFake (url, callback) -> callback(answers: {})
@problem.show()
- expect($('.show')).toHaveValue 'Hide Answer'
+ expect($('.show .show-label')).toHaveText 'Hide Answer(s)'
it 'add the showed class to element', ->
spyOn($, 'postWithPrefix').andCallFake (url, callback) -> callback(answers: {})
@@ -223,7 +223,7 @@ describe 'Problem', ->
expect($('label[for="input_1_1_3"]')).toHaveAttr 'correct_answer', 'true'
expect($('label[for="input_1_2_1"]')).not.toHaveAttr 'correct_answer', 'true'
- describe 'when the answers are alreay shown', ->
+ describe 'when the answers are already shown', ->
beforeEach ->
@problem.el.addClass 'showed'
@problem.el.prepend '''
@@ -243,7 +243,7 @@ describe 'Problem', ->
it 'toggle the show answer button', ->
@problem.show()
- expect($('.show')).toHaveValue 'Show Answer'
+ expect($('.show .show-label')).toHaveText 'Show Answer(s)'
it 'remove the showed class from element', ->
@problem.show()
@@ -261,7 +261,7 @@ describe 'Problem', ->
it 'POST to save problem', ->
spyOn $, 'postWithPrefix'
@problem.save()
- expect($.postWithPrefix).toHaveBeenCalledWith '/problem/Problem1/problem_save',
+ expect($.postWithPrefix).toHaveBeenCalledWith '/problem/Problem1/problem_save',
'foo=1&bar=2', jasmine.any(Function)
# TODO: figure out why failing
diff --git a/common/lib/xmodule/xmodule/js/src/capa/display.coffee b/common/lib/xmodule/xmodule/js/src/capa/display.coffee
index 70704ab247..987d20b65a 100644
--- a/common/lib/xmodule/xmodule/js/src/capa/display.coffee
+++ b/common/lib/xmodule/xmodule/js/src/capa/display.coffee
@@ -19,12 +19,12 @@ class @Problem
problem_prefix = @element_id.replace(/problem_/,'')
@inputs = @$("[id^=input_#{problem_prefix}_]")
-
+
@$('section.action input:button').click @refreshAnswers
@$('section.action input.check').click @check_fd
#@$('section.action input.check').click @check
@$('section.action input.reset').click @reset
- @$('section.action input.show').click @show
+ @$('section.action button.show').click @show
@$('section.action input.save').click @save
# Collapsibles
@@ -44,7 +44,7 @@ class @Problem
forceUpdate: (response) =>
@el.attr progress: response.progress_status
@el.trigger('progressChanged')
-
+
queueing: =>
@queued_items = @$(".xqueue")
@@ -59,11 +59,11 @@ class @Problem
get_queuelen: =>
minlen = Infinity
@queued_items.each (index, qitem) ->
- len = parseInt($.text(qitem))
+ len = parseInt($.text(qitem))
if len < minlen
minlen = len
return minlen
-
+
poll: =>
$.postWithPrefix "#{@url}/problem_get", (response) =>
# If queueing status changed, then render
@@ -73,9 +73,9 @@ class @Problem
JavascriptLoader.executeModuleScripts @el, () =>
@setupInputTypes()
@bind()
-
+
@num_queued_items = @new_queued_items.length
- if @num_queued_items == 0
+ if @num_queued_items == 0
@forceUpdate response
delete window.queuePollerID
else
@@ -83,12 +83,12 @@ class @Problem
window.queuePollerID = window.setTimeout(@poll, 1000)
- # Use this if you want to make an ajax call on the input type object
+ # Use this if you want to make an ajax call on the input type object
# static method so you don't have to instantiate a Problem in order to use it
# Input:
- # url: the AJAX url of the problem
+ # url: the AJAX url of the problem
# input_id: the input_id of the input you would like to make the call on
- # NOTE: the id is the ${id} part of "input_${id}" during rendering
+ # NOTE: the id is the ${id} part of "input_${id}" during rendering
# If this function is passed the entire prefixed id, the backend may have trouble
# finding the correct input
# dispatch: string that indicates how this data should be handled by the inputtype
@@ -98,7 +98,7 @@ class @Problem
data['dispatch'] = dispatch
data['input_id'] = input_id
$.postWithPrefix "#{url}/input_ajax", data, callback
-
+
render: (content) ->
if content
@@ -141,7 +141,7 @@ class @Problem
Logger.log 'problem_check', @answers
# If there are no file inputs in the problem, we can fall back on @check
- if $('input:file').length == 0
+ if $('input:file').length == 0
@check()
return
@@ -150,7 +150,7 @@ class @Problem
return
fd = new FormData()
-
+
# Sanity checks on submission
max_filesize = 4*1000*1000 # 4 MB
file_too_large = false
@@ -195,19 +195,19 @@ class @Problem
abort_submission = file_too_large or file_not_selected or unallowed_file_submitted or required_files_not_submitted
- settings =
+ settings =
type: "POST"
data: fd
processData: false
contentType: false
- success: (response) =>
+ success: (response) =>
switch response.success
when 'incorrect', 'correct'
@render(response.contents)
@updateProgress response
else
@gentle_alert response.success
-
+
if not abort_submission
$.ajaxWithPrefix("#{@url}/problem_check", settings)
@@ -260,14 +260,14 @@ class @Problem
@el.find('.problem > div').each (index, element) =>
MathJax.Hub.Queue ["Typeset", MathJax.Hub, element]
- @$('.show').val 'Hide Answer'
+ @$('.show-label').text 'Hide Answer(s)'
@el.addClass 'showed'
@updateProgress response
else
@$('[id^=answer_], [id^=solution_]').text ''
@$('[correct_answer]').attr correct_answer: null
@el.removeClass 'showed'
- @$('.show').val 'Show Answer'
+ @$('.show-label').text 'Show Answer(s)'
@el.find(".capa_inputtype").each (index, inputtype) =>
display = @inputtypeDisplays[$(inputtype).attr('id')]
@@ -306,7 +306,7 @@ class @Problem
MathJax.Hub.Queue(['Text', jax, eqn], [@updateMathML, jax, element])
return # Explicit return for CoffeeScript
-
+
updateMathML: (jax, element) =>
try
$("##{element.id}_dynamath").val(jax.root.toMathML '')
diff --git a/lms/djangoapps/courseware/tests/test_masquerade.py b/lms/djangoapps/courseware/tests/test_masquerade.py
index 11cdc4c1f9..f9ddf88b5f 100644
--- a/lms/djangoapps/courseware/tests/test_masquerade.py
+++ b/lms/djangoapps/courseware/tests/test_masquerade.py
@@ -64,7 +64,7 @@ class TestStaffMasqueradeAsStudent(LoginEnrollmentTestCase):
def test_staff_debug_for_staff(self):
resp = self.get_cw_section()
sdebug = '
'
-
+
self.assertTrue(sdebug in resp.content)
@@ -84,9 +84,9 @@ class TestStaffMasqueradeAsStudent(LoginEnrollmentTestCase):
resp = self.get_cw_section()
sdebug = '
'
-
+
self.assertFalse(sdebug in resp.content)
-
+
def get_problem(self):
pun = 'H1P1'
problem_location = "i4x://edX/graded/problem/%s" % pun
@@ -105,7 +105,7 @@ class TestStaffMasqueradeAsStudent(LoginEnrollmentTestCase):
resp = self.get_problem()
html = json.loads(resp.content)['html']
print html
- sabut = '
'
+ sabut = '
'
self.assertTrue(sabut in html)
def test_no_showanswer_for_student(self):
@@ -116,5 +116,5 @@ class TestStaffMasqueradeAsStudent(LoginEnrollmentTestCase):
resp = self.get_problem()
html = json.loads(resp.content)['html']
print html
- sabut = '
'
+ sabut = '
'
self.assertFalse(sabut in html)
diff --git a/lms/static/sass/base/_base.scss b/lms/static/sass/base/_base.scss
index 6f43a02df7..9314877249 100644
--- a/lms/static/sass/base/_base.scss
+++ b/lms/static/sass/base/_base.scss
@@ -209,7 +209,7 @@ mark {
}
.sr {
- @include text-sr();
+ @extend .text-sr;
}
.help-tab {
diff --git a/lms/static/sass/base/_mixins.scss b/lms/static/sass/base/_mixins.scss
index 0b2b82dad8..4060c36f5f 100644
--- a/lms/static/sass/base/_mixins.scss
+++ b/lms/static/sass/base/_mixins.scss
@@ -14,18 +14,6 @@
overflow: hidden;
}
-// hidden elems - screenreaders
-@mixin text-sr() {
- border: 0;
- clip: rect(0 0 0 0);
- height: 1px;
- margin: -1px;
- overflow: hidden;
- padding: 0;
- position: absolute;
- width: 1px;
-}
-
@mixin vertically-and-horizontally-centered ( $height, $width ) {
left: 50%;
margin-left: -$width / 2;
@@ -49,4 +37,18 @@
//-----------------
@mixin login_register_h1_style {}
-@mixin footer_references_style {}
\ No newline at end of file
+@mixin footer_references_style {}
+
+// ====================
+
+// extends -hidden elems - screenreaders
+.text-sr {
+ border: 0;
+ clip: rect(1px 1px 1px 1px);
+ height: 1px;
+ margin: -1px;
+ overflow: hidden;
+ padding: 0;
+ position: absolute;
+ width: 1px;
+}
diff --git a/lms/templates/courseware/accordion.html b/lms/templates/courseware/accordion.html
index 157e6e1bec..5b9c6f7450 100644
--- a/lms/templates/courseware/accordion.html
+++ b/lms/templates/courseware/accordion.html
@@ -3,14 +3,17 @@
<%def name="make_chapter(chapter)">
-
+
% for section in chapter['sections']:
-
-
${section['display_name']}
+ ${section['display_name']} ${', current section' if 'active' in section and section['active'] else ''}
${section['format']} ${"due " + get_default_time_display(section['due'], show_timezone) if section.get('due') is not None else ''}
diff --git a/lms/templates/courseware/course_navigation.html b/lms/templates/courseware/course_navigation.html
index ea367873e2..98329b9836 100644
--- a/lms/templates/courseware/course_navigation.html
+++ b/lms/templates/courseware/course_navigation.html
@@ -20,6 +20,9 @@ def url_class(is_active):
-
${tab.name | h}
+ % if tab.is_active == True:
+ , current location
+ %endif
% if tab.has_img == True:
%endif
diff --git a/lms/templates/courseware/progress.html b/lms/templates/courseware/progress.html
index fcd4348f96..bf1414cc07 100644
--- a/lms/templates/courseware/progress.html
+++ b/lms/templates/courseware/progress.html
@@ -35,7 +35,7 @@ ${progress_graph.body(grade_summary, course.grade_cutoffs, "grade-detail-graph",
%if not course.disable_progress_graph:
-
+
%endif
@@ -54,7 +54,12 @@ ${progress_graph.body(grade_summary, course.grade_cutoffs, "grade-detail-graph",
%>
- ${ section['display_name'] }
+ ${ section['display_name'] }
+ %if total > 0 or earned > 0:
+
+ ${"{0:.3n} of {1:.3n} possible points".format( float(earned), float(total) )}
+
+ %endif
%if total > 0 or earned > 0:
${"({0:.3n}/{1:.3n}) {2}".format( float(earned), float(total), percentageString )}
%endif
diff --git a/lms/templates/login.html b/lms/templates/login.html
index d3c3384847..fbd2f6d07c 100644
--- a/lms/templates/login.html
+++ b/lms/templates/login.html
@@ -86,7 +86,7 @@