Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
8e30981f
Commit
8e30981f
authored
Jun 07, 2013
by
Brian Talbot
Committed by
Giulio Gratta
Jun 10, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
revises the show/hide answer input to use an HTML button element for accessibility purposes
parent
7390b517
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
9 deletions
+18
-9
common/lib/xmodule/xmodule/css/capa/display.scss
+9
-0
common/lib/xmodule/xmodule/js/fixtures/problem_content.html
+1
-1
common/lib/xmodule/xmodule/js/src/capa/display.coffee
+3
-3
lms/templates/problem.html
+5
-5
No files found.
common/lib/xmodule/xmodule/css/capa/display.scss
View file @
8e30981f
...
@@ -555,6 +555,15 @@ section.problem {
...
@@ -555,6 +555,15 @@ section.problem {
@extend
.blue-button
;
@extend
.blue-button
;
}
}
button
.show
{
height
:
(
$baseline
*
2
);
span
{
font-size
:
1
.0em
;
font-weight
:
600
;
}
}
.submission_feedback
{
.submission_feedback
{
// background: #F3F3F3;
// background: #F3F3F3;
// border: 1px solid #ddd;
// border: 1px solid #ddd;
...
...
common/lib/xmodule/xmodule/js/fixtures/problem_content.html
View file @
8e30981f
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
<input
class=
"check"
type=
"button"
value=
"Check"
>
<input
class=
"check"
type=
"button"
value=
"Check"
>
<input
class=
"reset"
type=
"button"
value=
"Reset"
>
<input
class=
"reset"
type=
"button"
value=
"Reset"
>
<input
class=
"save"
type=
"button"
value=
"Save"
>
<input
class=
"save"
type=
"button"
value=
"Save"
>
<
input
class=
"show"
type=
"button"
value=
"Show Answer"
>
<
button
class=
"show"
><span
class=
"show-label"
>
Show Answer(s)
</span>
<span
class=
"sr"
>
(for question(s) above - adjacent to each field)
</span></button
>
<a
href=
"/courseware/6.002_Spring_2012/${ explain }"
class=
"new-page"
>
Explanation
</a>
<a
href=
"/courseware/6.002_Spring_2012/${ explain }"
class=
"new-page"
>
Explanation
</a>
<section
class=
"submission_feedback"
></section>
<section
class=
"submission_feedback"
></section>
</section>
</section>
...
...
common/lib/xmodule/xmodule/js/src/capa/display.coffee
View file @
8e30981f
...
@@ -24,7 +24,7 @@ class @Problem
...
@@ -24,7 +24,7 @@ class @Problem
@
$
(
'section.action input.check'
).
click
@
check_fd
@
$
(
'section.action input.check'
).
click
@
check_fd
#@$('section.action input.check').click @check
#@$('section.action input.check').click @check
@
$
(
'section.action input.reset'
).
click
@
reset
@
$
(
'section.action input.reset'
).
click
@
reset
@
$
(
'section.action
input
.show'
).
click
@
show
@
$
(
'section.action
button
.show'
).
click
@
show
@
$
(
'section.action input.save'
).
click
@
save
@
$
(
'section.action input.save'
).
click
@
save
# Collapsibles
# Collapsibles
...
@@ -260,14 +260,14 @@ class @Problem
...
@@ -260,14 +260,14 @@ class @Problem
@
el
.
find
(
'.problem > div'
).
each
(
index
,
element
)
=>
@
el
.
find
(
'.problem > div'
).
each
(
index
,
element
)
=>
MathJax
.
Hub
.
Queue
[
"Typeset"
,
MathJax
.
Hub
,
element
]
MathJax
.
Hub
.
Queue
[
"Typeset"
,
MathJax
.
Hub
,
element
]
@
$
(
'.show
'
).
val
'Hide Answer
'
@
$
(
'.show
-label'
).
text
'Hide Answer(s)
'
@
el
.
addClass
'showed'
@
el
.
addClass
'showed'
@
updateProgress
response
@
updateProgress
response
else
else
@
$
(
'[id^=answer_], [id^=solution_]'
).
text
''
@
$
(
'[id^=answer_], [id^=solution_]'
).
text
''
@
$
(
'[correct_answer]'
).
attr
correct_answer
:
null
@
$
(
'[correct_answer]'
).
attr
correct_answer
:
null
@
el
.
removeClass
'showed'
@
el
.
removeClass
'showed'
@
$
(
'.show
'
).
val
'Show Answer
'
@
$
(
'.show
-label'
).
text
'Show Answer(s)
'
@
el
.
find
(
".capa_inputtype"
).
each
(
index
,
inputtype
)
=>
@
el
.
find
(
".capa_inputtype"
).
each
(
index
,
inputtype
)
=>
display
=
@
inputtypeDisplays
[
$
(
inputtype
).
attr
(
'id'
)]
display
=
@
inputtypeDisplays
[
$
(
inputtype
).
attr
(
'id'
)]
...
...
lms/templates/problem.html
View file @
8e30981f
...
@@ -10,19 +10,19 @@
...
@@ -10,19 +10,19 @@
${ problem['html'] }
${ problem['html'] }
<section
class=
"action"
>
<section
class=
"action"
>
<input
type=
"hidden"
name=
"problem_id"
value=
"${ problem['name'] }"
>
<input
type=
"hidden"
name=
"problem_id"
value=
"${ problem['name'] }"
/
>
% if check_button:
% if check_button:
<input
class=
"check ${ check_button }"
type=
"button"
value=
"${ check_button }"
>
<input
class=
"check ${ check_button }"
type=
"button"
value=
"${ check_button }"
/
>
% endif
% endif
% if reset_button:
% if reset_button:
<input
class=
"reset"
type=
"button"
value=
"Reset"
>
<input
class=
"reset"
type=
"button"
value=
"Reset"
/
>
% endif
% endif
% if save_button:
% if save_button:
<input
class=
"save"
type=
"button"
value=
"Save"
>
<input
class=
"save"
type=
"button"
value=
"Save"
/
>
% endif
% endif
% if answer_available:
% if answer_available:
<
input
class=
"show"
type=
"button"
value=
"Show Answer"
>
<
button
class=
"show"
><span
class=
"show-label"
>
Show Answer(s)
</span>
<span
class=
"sr"
>
(for question(s) above - adjacent to each field)
</span></button
>
% endif
% endif
% if attempts_allowed :
% if attempts_allowed :
<section
class=
"submission_feedback"
>
<section
class=
"submission_feedback"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment