<?cs include:"util.cs" ?>

<?cs def:print_heading() ?>
   <tr class="headcellbg">
    <td class="regheading"><?cs var:lang.grades_info.std_name ?></td>
    <td class="regheading"><?cs var:lang.grades_info.opened ?></td>
  </tr>
<?cs /def ?>

<?cs def:print_row(student, number) ?>
  <?cs set:even = number % #2 ?>
  <?cs if:even == #0 ?>
   <tr class="quiz_even">
  <?cs else ?>
   <tr>
  <?cs /if ?>
  <td class="quiz_font"><?cs var:student.name ?></td>
  <td class="quiz_font"><?cs var:student.time ?></td>
  </tr>
<?cs /def ?> 
    

<?cs def:print_table() ?>
   <table border="0" cellspacing="0" cellpadding="8">
   <?cs call:print_heading() ?>
   <?cs set:number = #0 ?>
   <?cs each:this = std ?>
      <?cs call:print_row(this, number) ?>
      <?cs set:number = number + #1 ?>
   <?cs /each ?>
  </table>
<?cs /def ?>

<?cs def:print_who() ?>
   <div class="sub_title">
     <?cs var:lang.grades_info.who ?>
   </div>
<?cs /def ?> 
 
<?cs ###########################
     # HTML starts here
     ###########################
?>
<?cs call:html_heading() ?>
   <head>
      <title><?cs var:course_title ?></title>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
   <link rel="StyleSheet" href="<?cs var:image_path ?>common.css" type="text/css"  />
   <link rel="StyleSheet" href="<?cs var:image_path ?>grades.css" type="text/css"  />
  </head>
<?cs call:define_body() ?> 
<?cs if:back_url ?>
<?cs call:print_course_heading(back_url, lang.grades_info.goback) ?>
<?cs else ?>
 <?cs call:course_info() ?> 
<?cs /if ?>
<table width="100%">
 <tr><td align="center">
 <br /><br />
  <?cs call:print_who() ?>
    <table class="black_border">
      <tr class="white_bg">
       <td>
         <?cs call:print_table() ?>
       </td>
     </tr>
   </table>
 </td></tr>
</table>
</body>
</html>
<?cs call:runtime() ?>

