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
424f1e44
Commit
424f1e44
authored
Jul 15, 2015
by
Afzal Wali
Committed by
Muhammad Shoaib
Jul 16, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clear search text.
parent
8f061921
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
8 deletions
+19
-8
edx_proctoring/static/proctoring/js/views/proctored_exam_attempt_view.js
+13
-6
edx_proctoring/static/proctoring/templates/student-proctored-exam-attempts.underscore
+6
-2
No files found.
edx_proctoring/static/proctoring/js/views/proctored_exam_attempt_view.js
View file @
424f1e44
...
@@ -18,8 +18,8 @@ var edx = edx || {};
...
@@ -18,8 +18,8 @@ var edx = edx || {};
this
.
initial_url
=
this
.
collection
.
url
;
this
.
initial_url
=
this
.
collection
.
url
;
this
.
attempt_url
=
this
.
model
.
url
;
this
.
attempt_url
=
this
.
model
.
url
;
this
.
collection
.
url
=
this
.
initial_url
+
this
.
course_id
;
this
.
collection
.
url
=
this
.
initial_url
+
this
.
course_id
;
this
.
inSearchMode
=
tru
e
;
this
.
inSearchMode
=
fals
e
;
this
.
search
String
=
"abc
"
;
this
.
search
Text
=
"
"
;
/* re-render if the model changes */
/* re-render if the model changes */
this
.
listenTo
(
this
.
collection
,
'change'
,
this
.
collectionChanged
);
this
.
listenTo
(
this
.
collection
,
'change'
,
this
.
collectionChanged
);
...
@@ -30,21 +30,28 @@ var edx = edx || {};
...
@@ -30,21 +30,28 @@ var edx = edx || {};
events
:
{
events
:
{
"click .remove-attempt"
:
"onRemoveAttempt"
,
"click .remove-attempt"
:
"onRemoveAttempt"
,
'click li > a.target-link'
:
'getPaginatedAttempts'
,
'click li > a.target-link'
:
'getPaginatedAttempts'
,
'click .search-attempts > span.search'
:
'searchAttempts'
'click .search-attempts > span.search'
:
'searchAttempts'
,
'click .search-attempts > span.clear-search'
:
'clearSearch'
},
},
searchAttempts
:
function
(
event
)
{
searchAttempts
:
function
(
event
)
{
var
searchText
=
$
(
'#search_attempt_id'
).
val
();
var
searchText
=
$
(
'#search_attempt_id'
).
val
();
debugger
;
if
(
searchText
!==
""
)
{
if
(
searchText
!==
""
)
{
this
.
inSearchMode
=
true
;
this
.
inSearchMode
=
true
;
this
.
search
String
=
searchText
;
this
.
search
Text
=
searchText
;
this
.
collection
.
url
=
this
.
initial_url
+
this
.
course_id
+
"/search/"
+
searchText
;
this
.
collection
.
url
=
this
.
initial_url
+
this
.
course_id
+
"/search/"
+
searchText
;
this
.
hydrate
();
this
.
hydrate
();
event
.
stopPropagation
();
event
.
stopPropagation
();
event
.
preventDefault
();
event
.
preventDefault
();
}
}
},
},
clearSearch
:
function
(
event
)
{
this
.
inSearchMode
=
false
;
this
.
searchText
=
""
;
this
.
collection
.
url
=
this
.
initial_url
+
this
.
course_id
;
this
.
hydrate
();
event
.
stopPropagation
();
event
.
preventDefault
();
},
getPaginatedAttempts
:
function
(
event
)
{
getPaginatedAttempts
:
function
(
event
)
{
var
target
=
$
(
event
.
currentTarget
);
var
target
=
$
(
event
.
currentTarget
);
var
url
=
target
.
data
(
'target-url'
);
var
url
=
target
.
data
(
'target-url'
);
...
...
edx_proctoring/static/proctoring/templates/student-proctored-exam-attempts.underscore
View file @
424f1e44
...
@@ -2,9 +2,13 @@
...
@@ -2,9 +2,13 @@
<section class="content">
<section class="content">
<div class="top-header">
<div class="top-header">
<div class='search-attempts'>
<div class='search-attempts'>
<input type="text" id="search_attempt_id" placeholder="e.g johndoe or john.do@gmail.com" />
<input type="text" id="search_attempt_id" placeholder="e.g johndoe or john.do@gmail.com"
<% if (inSearchMode) { %>
value="<%= searchText %>"
<%} %>
/>
<span class="search"><i class="fa fa-search"></i></span>
<span class="search"><i class="fa fa-search"></i></span>
<span
><i class="fa fa-refresh
"></i></i></span>
<span
class="clear-search"><i class="fa fa-remove
"></i></i></span>
</div>
</div>
<ul class="pagination">
<ul class="pagination">
<% if (!pagination_info.has_previous){ %>
<% if (!pagination_info.has_previous){ %>
...
...
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