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

<?cs def:print_export_data_form() ?>
<div>
  <br />
  <br />
  <form id="export_form" method="post" action="grade_book_export_save">
  <input type="hidden" name="nextUrl" value="" />
  <input type="hidden" name="save_option" value="" />
  <input type="hidden" name="crs" value="<?cs var:Query.crs ?>" />
  <input type="hidden" name="id" value="<?cs var:Query.id ?>" />
  <?cs if:export_button ?>
  <table width="100%">
   <tr>
     <td align="center" colspan="2"><?cs var:lang.grade_book_export.download_label ?> <?cs call:insert_help("gradebook_help.html", "Export", "", "gradebook_help") ?></td>
   </tr>
   <tr>
     <td align="right"><input type="button" title="<?cs var:lang.grade_book_export.tab_file_help ?>" value="<?cs var:lang.grade_book_export.tab_file ?>" onclick="getNextUrl('', 'tab')" />&nbsp;&nbsp;</td>
     <td>&nbsp;&nbsp;<input type="button" title="<?cs var:lang.grade_book_export.csv_file_help ?>" value="<?cs var:lang.grade_book_export.csv_file ?>" onclick="getNextUrl('', 'csv')" /></td>
   </tr>
  </table>
  <?cs /if ?>
  </form>
  <br />
  <br />
  <br />
  <br />
  <br />
  <br />
</div> 
<?cs /def ?>


<?cs ###########################
     # HTML starts here
     ###########################
?>
<?cs call:html_heading() ?>
   <head>
      <title><?cs var:course_title ?> <?cs var:lang.grade_configure.scale_heading ?></title>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
   <meta http-equiv="Cache-Control" content="No-Cache" />
   <meta http-equiv="EXPIRES" content="Mon, 22 Jul 1997 11:12:01 GMT" />
   <meta http-equiv="PRAGMA" content="No-Cache" />

   <link rel="StyleSheet" href="<?cs var:image_path ?>grade_tab_menu.css" type="text/css"  />
   <script type="text/javascript" src="<?cs var:image_path ?>form_validation.js">
   </script>
    <script type="text/javascript">
     function getNextUrl(url, some)
     {
           var myform = document.getElementById('export_form');
           myform.nextUrl.value = url;
	   if(some.length >0)
              myform.save_option.value = some;
	   else
              myform.save_option.value = "no";
		
           myform.submit();
    }
   </script>


</head>


<?cs call:define_body() ?> 
<div id="container">
<?cs call:print_course_heading(back_url, lang.grade_book_menu_util.goback) ?>
<div>
<br />
<br />
  <?cs call:grade_menu()  ?>
</div>
<div id="content">
<?cs call:print_export_data_form() ?>
</div>
</div>
</body>
</html>
<?cs call:runtime() ?>
