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
efe87a21
Commit
efe87a21
authored
Aug 25, 2015
by
Muhammad Shoaib
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PHX-120
updated the dialog box for the Open exam options
parent
86961f26
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
98 additions
and
48 deletions
+98
-48
edx_proctoring/templates/proctoring/seq_proctored_exam_entrance.html
+97
-47
edx_proctoring/tests/test_api.py
+1
-1
No files found.
edx_proctoring/templates/proctoring/seq_proctored_exam_entrance.html
View file @
efe87a21
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
<i
class=
"fa fa-arrow-circle-right"
></i>
<i
class=
"fa fa-arrow-circle-right"
></i>
</button>
</button>
<button
class=
"gated-sequence start-timed-exam"
data-a
jax-url=
"{{enter_exam_endpoint}}"
data-exam-id=
"{{exam_id}}"
data-attempt-proctored=
false
data-start-immediately=
tru
e
>
<button
class=
"gated-sequence start-timed-exam"
data-a
ttempt-proctored=
fals
e
>
<span><i
class=
"fa fa-unlock"
></i></span>
<span><i
class=
"fa fa-unlock"
></i></span>
<a>
<a>
{% trans "No, I want to take this exam without proctoring (and not be eligible for credit)" %}
{% trans "No, I want to take this exam without proctoring (and not be eligible for credit)" %}
...
@@ -41,72 +41,122 @@
...
@@ -41,72 +41,122 @@
<i
class=
"fa fa-arrow-circle-right"
></i>
<i
class=
"fa fa-arrow-circle-right"
></i>
</button>
</button>
</div>
</div>
<div
class=
"proctored-exam-skip-confirm-wrapper hidden"
>
<div
class=
"proctored-exam-skip-confirm"
>
<div
class=
"msg-title"
>
{% blocktrans %}
Are you sure you want to take this exam without proctoring?
{% endblocktrans %}
</div>
<div
class=
"msg-content"
>
{% blocktrans %}
You will no longer be eligible to use this course for academic credit.
{% endblocktrans %}
</div>
<div
class=
"proctored-exam-skip-actions"
>
<button
class=
"proctored-exam-skip-cancel-button btn btn-default btn-base"
>
{% trans "Cancel" %}
</button>
<button
class=
"proctored-exam-skip-confirm-button btn btn-primary btn-base"
data-ajax-url=
"{{enter_exam_endpoint}}"
data-exam-id=
"{{exam_id}}"
>
{% trans "Yes, Take this as an open exam" %}
</button>
</div>
<div
class=
"clearfix"
></div>
</div>
</div>
{% include 'proctoring/seq_proctored_exam_footer.html' %}
{% include 'proctoring/seq_proctored_exam_footer.html' %}
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
var
startProctoredExam
=
function
(
selector
,
exam_id
,
action_url
,
start_immediately
,
attempt_proctored
)
{
$
.
post
(
action_url
,
{
"exam_id"
:
exam_id
,
"attempt_proctored"
:
attempt_proctored
,
"start_clock"
:
start_immediately
},
function
(
data
)
{
// reload the page, because we've unlocked it
location
.
reload
();
}
).
fail
(
function
(){
enableClickEvent
(
selector
);
var
msg
=
gettext
(
"There has been a problem starting your exam.
\
n
\
n"
+
"Possible reasons are that your account has not been fully activated,
\
n"
+
"you have are experiencing a network connection problem, or there has been
\
n"
+
"a service disruption. Please check these and try again."
);
alert
(
msg
);
});
};
var
inProcess
=
false
;
var
inProcess
=
false
;
var
disableClickEvent
=
function
()
{
var
disableClickEvent
=
function
(
selector
)
{
inProcess
=
true
;
inProcess
=
true
;
$
(
'body'
).
css
(
'cursor'
,
'wait'
);
$
(
'body'
).
css
(
'cursor'
,
'wait'
);
$
(
'.start-timed-exam'
).
css
(
'cursor'
,
'wait'
);
selector
.
each
(
function
()
{
$
(
this
).
css
(
'cursor'
,
'wait'
);
});
};
};
var
enableClickEvent
=
function
()
{
var
enableClickEvent
=
function
(
selector
)
{
inProcess
=
false
;
inProcess
=
false
;
$
(
'body'
).
css
(
'cursor'
,
'auto'
);
$
(
'body'
).
css
(
'cursor'
,
'auto'
);
$
(
'.start-timed-exam'
).
css
(
'cursor'
,
'auto'
);
selector
.
each
(
function
()
{
$
(
this
).
css
(
'cursor'
,
'pointer'
);
});
};
};
$
(
'.start-timed-exam'
).
click
(
function
()
{
$
(
'.start-timed-exam'
).
click
(
function
()
{
if
(
!
inProcess
)
{
if
(
!
inProcess
)
{
disableClickEvent
();
disableClickEvent
(
$
(
this
));
var
action_url
=
$
(
this
).
data
(
'ajax-url'
);
var
exam_id
=
$
(
this
).
data
(
'exam-id'
);
var
attempt_proctored
=
$
(
this
).
data
(
'attempt-proctored'
);
var
attempt_proctored
=
$
(
this
).
data
(
'attempt-proctored'
);
var
start_immediately
=
$
(
this
).
data
(
'start-immediately'
);
if
(
!
attempt_proctored
)
{
if
(
!
attempt_proctored
)
{
var
msg
=
gettext
(
enableClickEvent
(
$
(
this
));
"Are you sure you want to take this exam without proctoring? "
+
$
(
".proctored-exam.entrance"
).
addClass
(
'hidden'
);
"You will no longer be eligible to use this course for academic credit."
$
(
".proctored-exam-skip-confirm-wrapper"
).
removeClass
(
'hidden'
);
);
}
else
{
if
(
!
confirm
(
msg
))
{
var
action_url
=
$
(
this
).
data
(
'ajax-url'
);
enableClickEvent
();
var
exam_id
=
$
(
this
).
data
(
'exam-id'
);
return
;
var
start_immediately
=
$
(
this
).
data
(
'start-immediately'
);
}
startProctoredExam
(
$
(
this
),
exam_id
,
action_url
,
start_immediately
,
attempt_proctored
);
}
if
(
typeof
action_url
===
"undefined"
)
{
enableClickEvent
();
return
false
;
}
}
var
self
=
$
(
this
);
$
.
post
(
action_url
,
{
"exam_id"
:
exam_id
,
"attempt_proctored"
:
attempt_proctored
,
"start_clock"
:
start_immediately
},
function
(
data
)
{
// reload the page, because we've unlocked it
location
.
reload
();
}
).
fail
(
function
(){
enableClickEvent
();
var
msg
=
gettext
(
"There has been a problem starting your exam.
\
n
\
n"
+
"Possible reasons are that your account has not been fully activated,
\
n"
+
"you have are experiencing a network connection problem, or there has been
\
n"
+
"a service disruption. Please check these and try again."
);
alert
(
msg
);
});
}
else
{
}
else
{
return
false
;
return
false
;
}
}
}
}
);
);
$
(
'.proctored-exam-skip-confirm-button'
).
click
(
function
(
event
){
if
(
!
inProcess
)
{
// find the all the buttons and call disableClickEvent
// on the events
var
events
=
$
(
this
).
parent
().
find
(
'button'
);
disableClickEvent
(
events
);
var
action_url
=
$
(
this
).
data
(
'ajax-url'
);
var
exam_id
=
$
(
this
).
data
(
'exam-id'
);
startProctoredExam
(
events
,
exam_id
,
action_url
,
true
,
false
);
}
else
{
return
false
}
}
);
$
(
'.proctored-exam-skip-cancel-button'
).
click
(
function
(
event
){
if
(
!
inProcess
)
{
enableClickEvent
(
$
(
this
));
$
(
".proctored-exam.entrance"
).
removeClass
(
'hidden'
);
$
(
".proctored-exam-skip-confirm-wrapper"
).
addClass
(
'hidden'
);
}
else
{
return
false
;
}
}
)
</script>
</script>
edx_proctoring/tests/test_api.py
View file @
efe87a21
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
# pylint: disable=too-many-lines, invalid-name
# pylint: disable=too-many-lines, invalid-name
"""
"""
All tests for the
models
.py
All tests for the
api
.py
"""
"""
import
ddt
import
ddt
from
datetime
import
datetime
,
timedelta
from
datetime
import
datetime
,
timedelta
...
...
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