Commit 27a0cf31 by Muhammad Shoaib

style improvements in the instructor dashboard

parent a938e7f2
...@@ -5,6 +5,20 @@ var edx = edx || {}; ...@@ -5,6 +5,20 @@ var edx = edx || {};
edx.instructor_dashboard = edx.instructor_dashboard || {}; edx.instructor_dashboard = edx.instructor_dashboard || {};
edx.instructor_dashboard.proctoring = edx.instructor_dashboard.proctoring || {}; edx.instructor_dashboard.proctoring = edx.instructor_dashboard.proctoring || {};
var examStatusReadableFormat = {
eligible: 'Eligible',
created: 'Created',
ready_to_start: 'Ready to start',
started: 'Started',
ready_to_submit: 'Ready to submit',
declined: 'Declined',
timed_out: 'Timed out',
submitted: 'Submitted',
verified: 'Verified',
rejected: 'Rejected',
not_reviewed: 'Not reviewed',
error: 'Error'
};
var viewHelper = { var viewHelper = {
getDateFormat: function(date) { getDateFormat: function(date) {
if (date) { if (date) {
...@@ -14,6 +28,14 @@ var edx = edx || {}; ...@@ -14,6 +28,14 @@ var edx = edx || {};
return '---'; return '---';
} }
},
getExamAttemptStatus: function(status) {
if (status in examStatusReadableFormat) {
return examStatusReadableFormat[status]
}
else {
return status
}
} }
}; };
edx.instructor_dashboard.proctoring.ProctoredExamAttemptView = Backbone.View.extend({ edx.instructor_dashboard.proctoring.ProctoredExamAttemptView = Backbone.View.extend({
......
<div class="wrapper-content wrapper"> <div class="wrapper-content wrapper">
<% var is_proctored_attempts = proctored_exam_attempts.length !== 0 %> <% var is_proctored_attempts = proctored_exam_attempts.length !== 0 %>
<section class="content"> <section class="content exam-attempts-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.doe@gmail.com" <input type="text" id="search_attempt_id" placeholder="e.g johndoe or john.doe@gmail.com"
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
<tr class="exam-attempt-headings"> <tr class="exam-attempt-headings">
<th class="username"><%- gettext("Username") %></th> <th class="username"><%- gettext("Username") %></th>
<th class="exam-name"><%- gettext("Exam Name") %></th> <th class="exam-name"><%- gettext("Exam Name") %></th>
<th class="attempt-allowed-time"><%- gettext("Allowed Time (Minutes)") %> </th> <th class="attempt-allowed-time"><%- gettext("Time Limit") %> </th>
<th class="attempt-started-at"><%- gettext("Started At") %></th> <th class="attempt-started-at"><%- gettext("Started At") %></th>
<th class="attempt-completed-at"><%- gettext("Completed At") %> </th> <th class="attempt-completed-at"><%- gettext("Completed At") %> </th>
<th class="attempt-status"><%- gettext("Status") %> </th> <th class="attempt-status"><%- gettext("Status") %> </th>
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
<td> <%= getDateFormat(proctored_exam_attempt.completed_at) %></td> <td> <%= getDateFormat(proctored_exam_attempt.completed_at) %></td>
<td> <td>
<% if (proctored_exam_attempt.status){ %> <% if (proctored_exam_attempt.status){ %>
<%= proctored_exam_attempt.status %> <%= getExamAttemptStatus(proctored_exam_attempt.status) %>
<% } else { %> <% } else { %>
N/A N/A
<% } %> <% } %>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment