Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-proctoring
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-proctoring
Commits
63d9456e
Commit
63d9456e
authored
Jul 26, 2017
by
Joshua Spayd
Committed by
Farhanah Sheets
Oct 24, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make timer toggle accessible
parent
4364ba17
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
edx_proctoring/static/proctoring/js/views/proctored_exam_view.js
+2
-2
edx_proctoring/static/proctoring/spec/proctored_exam_spec.js
+4
-4
No files found.
edx_proctoring/static/proctoring/js/views/proctored_exam_view.js
View file @
63d9456e
...
@@ -181,11 +181,11 @@ var edx = edx || {};
...
@@ -181,11 +181,11 @@ var edx = edx || {};
var
timer
=
this
.
$el
.
find
(
'span#time_remaining_id b'
);
var
timer
=
this
.
$el
.
find
(
'span#time_remaining_id b'
);
if
(
timer
.
hasClass
(
'timer-hidden'
))
{
if
(
timer
.
hasClass
(
'timer-hidden'
))
{
timer
.
removeClass
(
'timer-hidden'
);
timer
.
removeClass
(
'timer-hidden'
);
button
.
attr
(
'
title'
,
gettext
(
'Hide Timer'
)
);
button
.
attr
(
'
aria-pressed'
,
'false'
);
icon
.
removeClass
(
'fa-eye'
).
addClass
(
'fa-eye-slash'
);
icon
.
removeClass
(
'fa-eye'
).
addClass
(
'fa-eye-slash'
);
}
else
{
}
else
{
timer
.
addClass
(
'timer-hidden'
);
timer
.
addClass
(
'timer-hidden'
);
button
.
attr
(
'
title'
,
gettext
(
'Show Timer'
)
);
button
.
attr
(
'
aria-pressed'
,
'true'
);
icon
.
removeClass
(
'fa-eye-slash'
).
addClass
(
'fa-eye'
);
icon
.
removeClass
(
'fa-eye-slash'
).
addClass
(
'fa-eye'
);
}
}
event
.
stopPropagation
();
event
.
stopPropagation
();
...
...
edx_proctoring/static/proctoring/spec/proctored_exam_spec.js
View file @
63d9456e
...
@@ -10,8 +10,8 @@ describe('ProctoredExamView', function () {
...
@@ -10,8 +10,8 @@ describe('ProctoredExamView', function () {
'<a href="<%= exam_url_path %>"> <%= exam_display_name %> </a>'
+
'<a href="<%= exam_url_path %>"> <%= exam_display_name %> </a>'
+
'" as a proctored exam. The timer on the right shows the time remaining in the exam'
+
'" as a proctored exam. The timer on the right shows the time remaining in the exam'
+
'<span class="exam-timer-clock"> <span id="time_remaining_id">'
+
'<span class="exam-timer-clock"> <span id="time_remaining_id">'
+
'<b> </b> <
a id="toggle_timer" href="#" title="Hide Timer
">'
+
'<b> </b> <
button role="button" id="toggle_timer" aria-label="Hide Timer" aria-pressed="false
">'
+
'<i class="fa fa-eye-slash" aria-hidden="true"></i></
a
>'
+
'<i class="fa fa-eye-slash" aria-hidden="true"></i></
button
>'
+
'</span> </span>'
+
'</span> </span>'
+
'</div>'
+
'</div>'
+
'</script>'
+
'</script>'
+
...
@@ -46,8 +46,8 @@ describe('ProctoredExamView', function () {
...
@@ -46,8 +46,8 @@ describe('ProctoredExamView', function () {
});
});
it
(
'renders items correctly'
,
function
()
{
it
(
'renders items correctly'
,
function
()
{
expect
(
this
.
proctored_exam_view
.
$el
.
find
(
'a'
)
.
not
(
'#toggle_timer'
)
).
toHaveAttr
(
'href'
,
this
.
model
.
get
(
"exam_url_path"
));
expect
(
this
.
proctored_exam_view
.
$el
.
find
(
'a'
)).
toHaveAttr
(
'href'
,
this
.
model
.
get
(
"exam_url_path"
));
expect
(
this
.
proctored_exam_view
.
$el
.
find
(
'a'
)
.
not
(
'#toggle_timer'
)
).
toContainHtml
(
this
.
model
.
get
(
'exam_display_name'
));
expect
(
this
.
proctored_exam_view
.
$el
.
find
(
'a'
)).
toContainHtml
(
this
.
model
.
get
(
'exam_display_name'
));
});
});
it
(
'changes behavior when clock time decreases low threshold'
,
function
()
{
it
(
'changes behavior when clock time decreases low threshold'
,
function
()
{
this
.
proctored_exam_view
.
secondsLeft
=
25
;
this
.
proctored_exam_view
.
secondsLeft
=
25
;
...
...
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