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
de4652aa
Commit
de4652aa
authored
Aug 21, 2015
by
Chris Dodge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
limit the number of pages to display to just be 7 on the instructor dashboard
parent
55b744ea
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
5 deletions
+23
-5
edx_proctoring/static/proctoring/js/views/proctored_exam_attempt_view.js
+22
-4
edx_proctoring/static/proctoring/templates/student-proctored-exam-attempts.underscore
+1
-1
No files found.
edx_proctoring/static/proctoring/js/views/proctored_exam_attempt_view.js
View file @
de4652aa
...
...
@@ -136,12 +136,30 @@ var edx = edx || {};
},
render
:
function
()
{
if
(
this
.
template
!==
null
)
{
var
data_json
=
this
.
collection
.
toJSON
()[
0
];
// calculate which pages ranges to display
// show no more than 7 pages at the same time
var
start_page
=
data_json
.
pagination_info
.
current_page
-
3
;
var
end_page
=
data_json
.
pagination_info
.
current_page
+
3
;
if
(
start_page
<
1
)
{
start_page
=
1
;
}
if
(
end_page
>
data_json
.
pagination_info
.
total_pages
)
{
end_page
=
data_json
.
pagination_info
.
total_pages
;
}
var
data
=
{
proctored_exam_attempts
:
this
.
collection
.
toJSON
()[
0
]
.
proctored_exam_attempts
,
pagination_info
:
this
.
collection
.
toJSON
()[
0
]
.
pagination_info
,
attempt_url
:
this
.
collection
.
toJSON
()[
0
]
.
attempt_url
,
proctored_exam_attempts
:
data_json
.
proctored_exam_attempts
,
pagination_info
:
data_json
.
pagination_info
,
attempt_url
:
data_json
.
attempt_url
,
inSearchMode
:
this
.
inSearchMode
,
searchText
:
this
.
searchText
searchText
:
this
.
searchText
,
start_page
:
start_page
,
end_page
:
end_page
,
};
_
.
extend
(
data
,
viewHelper
);
var
html
=
this
.
template
(
data
);
...
...
edx_proctoring/static/proctoring/templates/student-proctored-exam-attempts.underscore
View file @
de4652aa
...
...
@@ -34,7 +34,7 @@
</a>
</li>
<% }%>
<% for(var n =
1; n <= pagination_info.total_pages
; n++) { %>
<% for(var n =
start_page; n <= end_page
; n++) { %>
<li>
<a class="target-link <% if (pagination_info.current_page == n){ %> active <% } %>"
data-target-url="
...
...
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