Commit f7ba83a3 by Muhammad Shoaib

Merge pull request #103 from edx/muhhshoaib/PHX-112-style-improvements-instructor-dashboard

style improvements in the instructor dashboard
parents 3da199a9 9d0fced4
......@@ -5,6 +5,20 @@ var edx = edx || {};
edx.instructor_dashboard = edx.instructor_dashboard || {};
edx.instructor_dashboard.proctoring = edx.instructor_dashboard.proctoring || {};
var examStatusReadableFormat = {
eligible: gettext('Eligible'),
created: gettext('Created'),
ready_to_start: gettext('Ready to start'),
started: gettext('Started'),
ready_to_submit: gettext('Ready to submit'),
declined: gettext('Declined'),
timed_out: gettext('Timed out'),
submitted: gettext('Submitted'),
verified: gettext('Verified'),
rejected: gettext('Rejected'),
not_reviewed: gettext('Not reviewed'),
error: gettext('Error')
};
var viewHelper = {
getDateFormat: function(date) {
if (date) {
......@@ -14,6 +28,14 @@ var edx = edx || {};
return '---';
}
},
getExamAttemptStatus: function(status) {
if (status in examStatusReadableFormat) {
return examStatusReadableFormat[status]
}
else {
return status
}
}
};
edx.instructor_dashboard.proctoring.ProctoredExamAttemptView = Backbone.View.extend({
......
<div class="wrapper-content wrapper">
<% var is_proctored_attempts = proctored_exam_attempts.length !== 0 %>
<section class="content">
<section class="content exam-attempts-content">
<div class="top-header">
<div class='search-attempts'>
<input type="text" id="search_attempt_id" placeholder="e.g johndoe or john.doe@gmail.com"
......@@ -81,7 +81,7 @@
<tr class="exam-attempt-headings">
<th class="username"><%- gettext("Username") %></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-completed-at"><%- gettext("Completed At") %> </th>
<th class="attempt-status"><%- gettext("Status") %> </th>
......@@ -103,7 +103,7 @@
<td> <%= getDateFormat(proctored_exam_attempt.completed_at) %></td>
<td>
<% if (proctored_exam_attempt.status){ %>
<%= proctored_exam_attempt.status %>
<%= getExamAttemptStatus(proctored_exam_attempt.status) %>
<% } else { %>
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