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
cf3dfce2
Commit
cf3dfce2
authored
Jul 20, 2017
by
Joshua Spayd
Committed by
Farhanah Sheets
Oct 24, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add ability to toggle timer visibility
For timed exams
parent
23ab09c4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
edx_proctoring/static/proctoring/js/views/proctored_exam_view.js
+19
-0
No files found.
edx_proctoring/static/proctoring/js/views/proctored_exam_view.js
View file @
cf3dfce2
...
@@ -49,6 +49,9 @@ var edx = edx || {};
...
@@ -49,6 +49,9 @@ var edx = edx || {};
/* will call into the rendering */
/* will call into the rendering */
this
.
model
.
fetch
();
this
.
model
.
fetch
();
},
},
events
:
{
'click #toggle_timer'
:
'toggleTimerVisibility'
},
detectScroll
:
function
(
event
)
{
detectScroll
:
function
(
event
)
{
if
(
$
(
event
.
currentTarget
).
scrollTop
()
>
this
.
timerBarTopPosition
)
{
if
(
$
(
event
.
currentTarget
).
scrollTop
()
>
this
.
timerBarTopPosition
)
{
$
(
".proctored_exam_status"
).
addClass
(
'is-fixed'
);
$
(
".proctored_exam_status"
).
addClass
(
'is-fixed'
);
...
@@ -171,6 +174,22 @@ var edx = edx || {};
...
@@ -171,6 +174,22 @@ var edx = edx || {};
// refresh the page when the timer expired
// refresh the page when the timer expired
self
.
reloadPage
();
self
.
reloadPage
();
}
}
},
toggleTimerVisibility
:
function
(
event
)
{
var
button
=
$
(
event
.
currentTarget
);
var
icon
=
button
.
find
(
'i'
);
var
timer
=
this
.
$el
.
find
(
'span#time_remaining_id b'
);
if
(
timer
.
css
(
'visibility'
)
===
'visible'
)
{
timer
.
css
(
'visibility'
,
'hidden'
);
button
.
attr
(
'title'
,
gettext
(
'Show Timer'
));
icon
.
removeClass
(
'fa-eye-slash'
).
addClass
(
'fa-eye'
);
}
else
{
timer
.
css
(
'visibility'
,
'visible'
);
button
.
attr
(
'title'
,
gettext
(
'Hide Timer'
));
icon
.
removeClass
(
'fa-eye'
).
addClass
(
'fa-eye-slash'
);
}
event
.
stopPropagation
();
event
.
preventDefault
();
}
}
});
});
this
.
edx
.
coursware
.
proctored_exam
.
ProctoredExamView
=
edx
.
coursware
.
proctored_exam
.
ProctoredExamView
;
this
.
edx
.
coursware
.
proctored_exam
.
ProctoredExamView
=
edx
.
coursware
.
proctored_exam
.
ProctoredExamView
;
...
...
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