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
OpenEdx
edx-proctoring
Commits
82b6ddb7
Commit
82b6ddb7
authored
Sep 02, 2015
by
chrisndodge
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #126 from edx/hasnain-naveed/PHX-133-avoid-multiple-click
PHX-133/avoid multiple click
parents
db8efa82
9fc8672b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
103 additions
and
13 deletions
+103
-13
edx_proctoring/templates/proctoring/seq_proctored_exam_entrance.html
+37
-6
edx_proctoring/templates/proctoring/seq_proctored_practice_exam_entrance.html
+35
-4
edx_proctoring/templates/proctoring/seq_timed_exam_entrance.html
+31
-3
No files found.
edx_proctoring/templates/proctoring/seq_proctored_exam_entrance.html
View file @
82b6ddb7
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
{% endblocktrans %}
{% endblocktrans %}
</p>
</p>
<i
class=
"fa fa-arrow-circle-right
start-timed-exam"
data-ajax-url=
"{{enter_exam_endpoint}}"
data-exam-id=
"{{exam_id}}"
data-attempt-proctored=
true
data-start-immediately=
false
></i>
<i
class=
"fa fa-arrow-circle-right
"
></i>
</button>
</button>
<button
class=
"gated-sequence start-timed-exam"
data-ajax-url=
"{{enter_exam_endpoint}}"
data-exam-id=
"{{exam_id}}"
data-attempt-proctored=
false
data-start-immediately=
true
>
<button
class=
"gated-sequence start-timed-exam"
data-ajax-url=
"{{enter_exam_endpoint}}"
data-exam-id=
"{{exam_id}}"
data-attempt-proctored=
false
data-start-immediately=
true
>
<span><i
class=
"fa fa-unlock"
></i></span>
<span><i
class=
"fa fa-unlock"
></i></span>
...
@@ -38,14 +38,30 @@
...
@@ -38,14 +38,30 @@
even if you achieve a passing grade.
even if you achieve a passing grade.
{% endblocktrans %}
{% endblocktrans %}
</p>
</p>
<i
class=
"fa fa-arrow-circle-right
start-timed-exam"
data-ajax-url=
"{{enter_exam_endpoint}}"
data-exam-id=
"{{exam_id}}"
data-attempt-proctored=
false
data-start-immediately=
true
></i>
<i
class=
"fa fa-arrow-circle-right
"
></i>
</button>
</button>
</div>
</div>
{% include 'proctoring/seq_proctored_exam_footer.html' %}
{% include 'proctoring/seq_proctored_exam_footer.html' %}
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
$
(
'.start-timed-exam'
).
click
(
function
(
event
)
{
var
inProcess
=
false
;
var
disableClickEvent
=
function
()
{
inProcess
=
true
;
$
(
'body'
).
css
(
'cursor'
,
'wait'
);
$
(
'.start-timed-exam'
).
css
(
'cursor'
,
'wait'
);
};
var
enableClickEvent
=
function
()
{
inProcess
=
false
;
$
(
'body'
).
css
(
'cursor'
,
'auto'
);
$
(
'.start-timed-exam'
).
css
(
'cursor'
,
'auto'
);
};
$
(
'.start-timed-exam'
).
click
(
function
()
{
if
(
!
inProcess
)
{
disableClickEvent
();
var
action_url
=
$
(
this
).
data
(
'ajax-url'
);
var
action_url
=
$
(
this
).
data
(
'ajax-url'
);
var
exam_id
=
$
(
this
).
data
(
'exam-id'
);
var
exam_id
=
$
(
this
).
data
(
'exam-id'
);
var
attempt_proctored
=
$
(
this
).
data
(
'attempt-proctored'
);
var
attempt_proctored
=
$
(
this
).
data
(
'attempt-proctored'
);
...
@@ -57,13 +73,16 @@
...
@@ -57,13 +73,16 @@
"You will no longer be eligible to use this course for academic credit."
"You will no longer be eligible to use this course for academic credit."
);
);
if
(
!
confirm
(
msg
))
{
if
(
!
confirm
(
msg
))
{
enableClickEvent
();
return
;
return
;
}
}
}
}
if
(
typeof
action_url
===
"undefined"
)
{
if
(
typeof
action_url
===
"undefined"
)
{
enableClickEvent
();
return
false
;
return
false
;
}
}
var
self
=
$
(
this
);
$
.
post
(
$
.
post
(
action_url
,
action_url
,
{
{
...
@@ -71,11 +90,23 @@
...
@@ -71,11 +90,23 @@
"attempt_proctored"
:
attempt_proctored
,
"attempt_proctored"
:
attempt_proctored
,
"start_clock"
:
start_immediately
"start_clock"
:
start_immediately
},
},
function
(
data
)
{
function
(
data
)
{
// reload the page, because we've unlocked it
// reload the page, because we've unlocked it
location
.
reload
();
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
{
return
false
;
}
}
}
);
);
</script>
</script>
edx_proctoring/templates/proctoring/seq_proctored_practice_exam_entrance.html
View file @
82b6ddb7
...
@@ -28,15 +28,34 @@
...
@@ -28,15 +28,34 @@
{% include 'proctoring/seq_proctored_exam_footer.html' %}
{% include 'proctoring/seq_proctored_exam_footer.html' %}
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
$
(
'.start-timed-exam'
).
click
(
function
(
event
)
{
var
inProcess
=
false
;
var
disableClickEvent
=
function
()
{
inProcess
=
true
;
$
(
'body'
).
css
(
'cursor'
,
'wait'
);
$
(
'.start-timed-exam'
).
css
(
'cursor'
,
'wait'
);
};
var
enableClickEvent
=
function
()
{
inProcess
=
false
;
$
(
'body'
).
css
(
'cursor'
,
'auto'
);
$
(
'.start-timed-exam'
).
css
(
'cursor'
,
'auto'
);
};
$
(
'.start-timed-exam'
).
click
(
function
()
{
if
(
!
inProcess
)
{
disableClickEvent
();
var
action_url
=
$
(
this
).
data
(
'ajax-url'
);
var
action_url
=
$
(
this
).
data
(
'ajax-url'
);
var
exam_id
=
$
(
this
).
data
(
'exam-id'
);
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'
);
var
start_immediately
=
$
(
this
).
data
(
'start-immediately'
);
if
(
typeof
action_url
===
"undefined"
)
{
if
(
typeof
action_url
===
"undefined"
)
{
enableClickEvent
();
return
false
;
return
false
;
}
}
var
self
=
$
(
this
);
$
.
post
(
$
.
post
(
action_url
,
action_url
,
{
{
...
@@ -44,11 +63,23 @@
...
@@ -44,11 +63,23 @@
"attempt_proctored"
:
attempt_proctored
,
"attempt_proctored"
:
attempt_proctored
,
"start_clock"
:
start_immediately
"start_clock"
:
start_immediately
},
},
function
(
data
)
{
function
(
data
)
{
// reload the page, because we've unlocked it
// reload the page, because we've unlocked it
location
.
reload
();
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
{
return
false
;
}
}
}
);
);
</script>
</script>
edx_proctoring/templates/proctoring/seq_timed_exam_entrance.html
View file @
82b6ddb7
...
@@ -24,8 +24,24 @@
...
@@ -24,8 +24,24 @@
{% include 'proctoring/seq_timed_exam_footer.html' %}
{% include 'proctoring/seq_timed_exam_footer.html' %}
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
$
(
'.start-timed-exam'
).
click
(
function
(
event
)
{
var
inProcess
=
false
;
var
disableClickEvent
=
function
()
{
inProcess
=
true
;
$
(
'body'
).
css
(
'cursor'
,
'wait'
);
$
(
'.start-timed-exam'
).
css
(
'cursor'
,
'wait'
);
};
var
enableClickEvent
=
function
()
{
inProcess
=
false
;
$
(
'body'
).
css
(
'cursor'
,
'auto'
);
$
(
'.start-timed-exam'
).
css
(
'cursor'
,
'auto'
);
};
$
(
'.start-timed-exam'
).
click
(
function
()
{
if
(
!
inProcess
)
{
disableClickEvent
();
var
action_url
=
$
(
this
).
data
(
'ajax-url'
);
var
action_url
=
$
(
this
).
data
(
'ajax-url'
);
var
exam_id
=
$
(
this
).
data
(
'exam-id'
);
var
exam_id
=
$
(
this
).
data
(
'exam-id'
);
...
@@ -35,11 +51,23 @@
...
@@ -35,11 +51,23 @@
"exam_id"
:
exam_id
,
"exam_id"
:
exam_id
,
"start_clock"
:
true
"start_clock"
:
true
},
},
function
(
data
)
{
function
(
data
)
{
// reload the page, because we've unlocked it
// reload the page, because we've unlocked it
location
.
reload
();
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
{
return
false
;
}
}
}
);
);
</script>
</script>
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