Commit b617dc4a by chrisndodge

Merge pull request #32 from edx/muhhshoaib/bug-fixes

According pane content display Section
parents 7ab4c451 365f8986
...@@ -123,7 +123,6 @@ var edx = edx || {}; ...@@ -123,7 +123,6 @@ var edx = edx || {};
if (this.template !== null) { if (this.template !== null) {
var html = this.template({proctored_exam_allowances: this.collection.toJSON()}); var html = this.template({proctored_exam_allowances: this.collection.toJSON()});
this.$el.html(html); this.$el.html(html);
this.$el.show();
} }
}, },
showAddModal: function (event) { showAddModal: function (event) {
......
...@@ -125,7 +125,6 @@ var edx = edx || {}; ...@@ -125,7 +125,6 @@ var edx = edx || {};
_.extend(data, viewHelper); _.extend(data, viewHelper);
var html = this.template(data); var html = this.template(data);
this.$el.html(html); this.$el.html(html);
this.$el.show();
} }
}, },
onRemoveAttempt: function (event) { onRemoveAttempt: function (event) {
......
<div class="wrapper-content wrapper"> <div class="wrapper-content wrapper">
<section class="content"> <% var is_proctored_attempts = proctored_exam_attempts.length !== 0 %>
<div class="top-header"> <% if (is_proctored_attempts) { %>
<div class='search-attempts'> <section class="content">
<input type="text" id="search_attempt_id" placeholder="e.g johndoe or john.doe@gmail.com" <div class="top-header">
<% if (inSearchMode) { %> <div class='search-attempts'>
value="<%= searchText %>" <input type="text" id="search_attempt_id" placeholder="e.g johndoe or john.doe@gmail.com"
<%} %> <% if (inSearchMode) { %>
/> value="<%= searchText %>"
<span class="search"><i class="fa fa-search"></i></span> <%} %>
<span class="clear-search"><i class="fa fa-remove"></i></i></span> />
</div> <span class="search"><i class="fa fa-search"></i></span>
<ul class="pagination"> <span class="clear-search"><i class="fa fa-remove"></i></i></span>
<% if (!pagination_info.has_previous){ %> </div>
<li class="disabled"> <ul class="pagination">
<a aria-label="Previous"> <% if (!pagination_info.has_previous){ %>
<span aria-hidden="true">&laquo;</span> <li class="disabled">
</a> <a aria-label="Previous">
</li> <span aria-hidden="true">&laquo;</span>
<% } else { %> </a>
<li> </li>
<a class="target-link " data-target-url=" <% } else { %>
<%- interpolate( <li>
'%(attempt_url)s?page=%(count)s ', <a class="target-link " data-target-url="
{ <%- interpolate(
attempt_url: attempt_url, '%(attempt_url)s?page=%(count)s ',
count: pagination_info.current_page - 1 {
}, attempt_url: attempt_url,
count: pagination_info.current_page - 1
},
true
) %> "
href="#" aria-label="Previous">
<span aria-hidden="true">&laquo;</span>
</a>
</li>
<% }%>
<% for(var n = 1; n <= pagination_info.total_pages; n++) { %>
<li>
<a class="target-link <% if (pagination_info.current_page == n){ %> active <% } %>"
data-target-url="
<%- interpolate(
'%(attempt_url)s?page=%(count)s ',
{
attempt_url: attempt_url,
count: n
},
true
) %>
"
href="#"><%= n %>
</a>
</li>
<% } %>
<% if (!pagination_info.has_next){ %>
<li class="disabled">
<a aria-label="Next">
<span aria-hidden="true">&raquo;</span>
</a>
</li>
<% } else { %>
<li>
<a class="target-link" href="#" aria-label="Next" data-target-url="
<%- interpolate(
'%(attempt_url)s?page=%(count)s ',
{
attempt_url: attempt_url,
count: pagination_info.current_page + 1
},
true true
) %> " ) %> "
href="#" aria-label="Previous"> >
<span aria-hidden="true">&laquo;</span> <span aria-hidden="true">&raquo;</span>
</a> </a>
</li>
<% }%>
<% for(var n = 1; n <= pagination_info.total_pages; n++) { %>
<li>
<a class="target-link <% if (pagination_info.current_page == n){ %> active <% } %>"
data-target-url="
<%- interpolate(
'%(attempt_url)s?page=%(count)s ',
{
attempt_url: attempt_url,
count: n
},
true
) %>
"
href="#"><%= n %>
</a>
</li> </li>
<% } %> <% }%>
<% if (!pagination_info.has_next){ %> </ul>
<li class="disabled"> <div class="clearfix"></div>
<a aria-label="Next"> </div>
<span aria-hidden="true">&raquo;</span> <table class="exam-attempts-table">
</a> <thead>
</li> <tr class="exam-attempt-headings">
<% } else { %> <th class="username"><%- gettext("Username") %></th>
<li> <th class="exam-name"><%- gettext("Exam Name") %></th>
<a class="target-link" href="#" aria-label="Next" data-target-url=" <th class="attempt-allowed-time"><%- gettext("Allowed Time (Minutes)") %> </th>
<%- interpolate( <th class="attempt-started-at"><%- gettext("Started At") %></th>
'%(attempt_url)s?page=%(count)s ', <th class="attempt-completed-at"><%- gettext("Completed At") %> </th>
{ <th class="attempt-status"><%- gettext("Status") %> </th>
attempt_url: attempt_url, <th class="c_action"><%- gettext("Action") %> </th>
count: pagination_info.current_page + 1
},
true
) %> "
>
<span aria-hidden="true">&raquo;</span>
</a>
</li>
<% }%>
</ul>
<div class="clearfix"></div>
</div>
<table class="exam-attempts-table">
<thead>
<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-started-at"><%- gettext("Started At") %></th>
<th class="attempt-completed-at"><%- gettext("Completed At") %> </th>
<th class="attempt-status"><%- gettext("Status") %> </th>
<th class="c_action"><%- gettext("Action") %> </th>
</tr>
</thead>
<tbody>
<% _.each(proctored_exam_attempts, function(proctored_exam_attempt){ %>
<tr class="allowance-items">
<td>
<%- interpolate(gettext(' %(username)s '), { username: proctored_exam_attempt.user.username }, true) %>
</td>
<td>
<%- interpolate(gettext(' %(exam_display_name)s '), { exam_display_name: proctored_exam_attempt.proctored_exam.exam_name }, true) %>
</td>
<td> <%= proctored_exam_attempt.allowed_time_limit_mins %></td>
<td> <%= getDateFormat(proctored_exam_attempt.started_at) %></td>
<td> <%= getDateFormat(proctored_exam_attempt.completed_at) %></td>
<td>
<% if (proctored_exam_attempt.status){ %>
<%= proctored_exam_attempt.status %>
<% } else { %>
N/A
<% } %>
</td>
<td>
<% if (proctored_exam_attempt.status){ %>
<a href="#" class="remove-attempt" data-attempt-id="<%= proctored_exam_attempt.id %>" >[x]</a>
</td>
<% } else { %>
N/A
<% } %>
</tr> </tr>
<% }); %> </thead>
</tbody> <tbody>
</table> <% _.each(proctored_exam_attempts, function(proctored_exam_attempt){ %>
</section> <tr class="allowance-items">
<td>
<%- interpolate(gettext(' %(username)s '), { username: proctored_exam_attempt.user.username }, true) %>
</td>
<td>
<%- interpolate(gettext(' %(exam_display_name)s '), { exam_display_name: proctored_exam_attempt.proctored_exam.exam_name }, true) %>
</td>
<td> <%= proctored_exam_attempt.allowed_time_limit_mins %></td>
<td> <%= getDateFormat(proctored_exam_attempt.started_at) %></td>
<td> <%= getDateFormat(proctored_exam_attempt.completed_at) %></td>
<td>
<% if (proctored_exam_attempt.status){ %>
<%= proctored_exam_attempt.status %>
<% } else { %>
N/A
<% } %>
</td>
<td>
<% if (proctored_exam_attempt.status){ %>
<a href="#" class="remove-attempt" data-attempt-id="<%= proctored_exam_attempt.id %>" >[x]</a>
</td>
<% } else { %>
N/A
<% } %>
</tr>
<% }); %>
</tbody>
</table>
</section>
<% } else { %>
<p> No exam results found.
<% } %>
</div> </div>
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