<% include ../styles.ejs %> ADMI <% include ../header.ejs %>
<% var exist = "no"; var allow_count = 0; if(coursetests && coursetests.length > 0){ for(var i=0; i < coursetests.length; i++) { exist = "yes"; var page_wise_allow = 'yes'; if(coursetests[i].active==false){ page_wise_allow = 'no'; } else if(tests_mytests=='my-tests'){ if(coursetests[i].assigned_students.indexOf(studentId) > -1){ page_wise_allow = 'yes'; } else { page_wise_allow = 'no'; } } else { page_wise_allow = 'yes'; } if(push_test.indexOf(coursetests[i]._id) > -1){ page_wise_allow = 'yes'; } if(page_wise_allow=='yes'){ allow_count++; %>
<% if(push_test.indexOf(coursetests[i]._id) > -1){ %> <% }else{ %> <% } %>
<% if(push_test.indexOf(coursetests[i]._id) > -1){ %>

<%= coursetests[i].name %>

<% }else{ %>

<%= coursetests[i].name %>

<% } %>
<% var desc = coursetests[i].description; var noHTML = /(<([^>]+)>)/ig; // regex for removing HTML tags var clean_desc = desc.replace(noHTML, ''); // remove all html tags %> <%= clean_desc.substring(0,150) %>...
<% var test_fee = 0; if(push_test.indexOf(coursetests[i]._id) > -1){ %> Test Assigned <% } else if(coursetests[i].assigned_students.indexOf(studentId) > -1){ %> <% }else{ if(coursetests[i].testprice !=0){ test_fee = coursetests[i].testprice; if(coursetests[i].testdiscount !=0){ test_fee = coursetests[i].testprice - (coursetests[i].testprice * coursetests[i].testdiscount)/100; } %> <% }else{ %> <% } } %> <% if(test_fee>0){ %>
$ <%= test_fee %> <% if(coursetests[i].testdiscount !=0){ %> $<%= coursetests[i].testprice %> <% } %>
<% } %>
<% } } } %> <% if(allow_count == 0){ %> <% } %>
<% include ../footer.ejs%> <% include ../scripts.ejs %>