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



<?cs def:print_student_row(oneStudent, i) ?>
  <?cs set:evenval = i % #2 ?>
  <?cs if:evenval == #0 ?>
   <tr class="quiz_even">
  <?cs else ?>
     <tr>
  <?cs /if ?>

    <td class="quiz_font" ><?cs var:oneStudent.id ?></td>
      <td nowrap="nowrap"><?cs var:oneStudent.name ?></td>
     
      <?cs set:cols_count = #0 ?>
      <?cs each:this = oneStudent.score ?>
           <td class="quiz_font" align="right"> 
             <?cs var:this.earn_points ?>
       <?cs set:cols_count = cols_count + #1 ?>
      </td>
     <?cs /each ?>

     <?cs if:max_cols && max_cols - cols_count > 0 ?>
	    <?cs set:padding = max_cols - cols_count ?>
		<?cs loop:x= #1, #padding, #1 ?>
		 <td>&nbsp;</td> 
		<?cs /loop ?>
	 <?cs /if ?>


         <td class="quiz_font"><?cs var:oneStudent.total ?></td>
         <td class="quiz_font" ><?cs var:oneStudent.grade ?></td>
 </tr>
<?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 call:print_course_heading(back_url, lang.grades_view.goback) ?>
<br />
<br />

<table width="100%">
  <tr><td align="center">
  <table class="black_border">
   <tr class="white_bg"><td align="center">
 
   <br />
    <table border="0" width="100%" cellspacing="0" cellpadding="5">
       <?cs set:number = #0 ?>
       <?cs each:this = st ?>
          <?cs call:print_student_row(this, number) ?>
          <?cs set:number = number + #1 ?>
       <?cs /each ?> 
    </table>
   </td></tr>
  </table>



</td></tr>
</table>
</body>
</html>
<?cs call:runtime() ?>
