
<?cs def:print_course_row(label, value) ?>
  <tr>
    <th align="right"><?cs var:label ?></td>
    <td><?cs var:value ?></td>
  </tr>
<?cs /def ?>

<?cs def:print_course(course) ?>
  <table border="1">
  <tr><td> 
  <table>
  <tr><td>Subdir:</td><td><?cs var:course.course_subdir ?> </td></tr>
  <tr><td>Id:</td><td><?cs var:course.course_dir ?> </td></tr>
  <tr><td>SIS_ID:</td><td><?cs var:course.course_org ?> </td></tr>
  <tr><td>Course No:</td><td><?cs var:course.course_no ?> </td></tr>
  <tr><td>Title:</td><td><?cs var:course.course_title ?> </td></tr>
  <tr><td>Term:</td><td><?cs var:course.course_semester ?> </td></tr>
  </table>
 </td></tr>
 <tr><td>
   <table>
   <tr><td> Added User Information </td></tr>
    <?cs set:num = #0 ?>
   <?cs each:user = course.users ?>
    <tr><td><?cs var:user.first ?> <?cs var:user.last ?> <?cs var:user.id ?> <?cs var:user.username ?> <?cs var:user.group ?> <?cs var:user.add_state ?> <?cs var:user.central_state ?> </td></tr> 
    <?cs set:num = num + #1 ?>
   <?cs /each ?>
    <tr><td><?cs var:num ?> New users were added to this course</td></tr>
   </table>
   <br />
   <br />
  </td></tr>
 </table>
<br />
<br />
<?cs /def ?>

<?cs def:summary_course(course) ?>
 <?cs call:print_course(course) ?>
<?cs /def ?>

<?cs def:print_content() ?>
 <?cs if:ctr_total ?>
     <?cs each:this = ctr ?>
       <?cs call:summary_course(this) ?>
     <?cs /each ?>
<?cs /if ?>
<?cs /def ?>

<html>
   <head>
      <title>update courses</title>
  </head>
<body>
  <?cs call:print_content() ?>
</body>
</html>

