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

<?cs def:print_welcome_message() ?>
<table border="0" width="100%" >
<tr><td align="center">
<table width="75%" border="0"><tr><td ><?cs var:lang.admin_module_form.welcome_message ?></td></tr></table>
</td></tr>
</table>
<?cs /def ?>






<?cs def:print_radio(name, value, current_value, help) ?>
   <input type="radio" name="<?cs var:name ?>" value="<?cs var:value ?>" <?cs if:current_value==value ?>checked="checked"<?cs /if ?> title="<?cs var:lang.admin_module_form[name] ?> - <?cs var:help ?>" />
<?cs /def ?>



<?cs def:print_table_heading(text, html_help) ?>
<td class="table_heading" align="center"><?cs var:text ?>&nbsp;<?cs call:insert_help(html_help, "", lang.help_on_help, "help") ?></td>
<?cs /def ?>



<?cs def:print_submit_button() ?>
 <input type="submit" value="<?cs var:lang.submit_button ?>" title="<?cs var:lang.submit_help ?>" onclick="return window.confirm('<?cs var:lang.javascript_submit_confirm ?>')"/> 
<?cs /def ?>



<?cs def:print_modules() ?> 
<?cs with:lang=lang.admin_module_form ?>
<table border="0" width="100%" >
<tr><td align="center">
<table width="85%" border="0">
<tr><td  ><fieldset style="margin-bottom:2em; margin-top:2em"><div><?cs var:lang.general_instructions ?></div></fieldset></td></tr>

<tr><td colspan="1" class="instructions"><?cs var:lang.module_selection_instructions ?></td></tr>
<?cs if:is_template ?><tr><td><i><?cs var:lang.course_template_notes ?></i></td></tr><?cs /if ?>
<tr><td>
 <table cellpadding="4" cellspacing="0" border="1">

  <?cs ### 
       ### First, do 'standard modules' Assignments, Lectures, et. al 
       ### ?>  
  <tr>
      <?cs call:print_table_heading(lang.module_heading, "") ?>
      <?cs call:print_table_heading(lang.disable_help, "" ) ?>
      <?cs call:print_table_heading(lang.enable_hiding_help, "selecting_hide_unhide.html") ?>
      <?cs call:print_table_heading(lang.enable_no_hiding_help, "selecting_hide_unhide.html") ?>
  </tr>
  <?cs each:mod = module ?>
  <tr>
     <?cs set:helpfile = lang[name(mod)].helpfile ?>
     <td class="regheading"><?cs var:lang[name(mod)] ?><?cs call:insert_help(helpfile, "", lang.help_on_help, "help") ?></td>
    
    <?cs ### First radio button - "Disabled "   ### ?>
     <td align="center"><?cs call:print_radio(name(mod), #0, mod, lang.disable_help) ?></td>

    <?cs ### Second radio button - "Enable with hiding "   ### ?>
     <td align="center"><?cs call:print_radio(name(mod), #2, mod, lang.enable_hiding_help) ?></td>


    <?cs ### Third radio button - "Enable without hiding "  ### ?>
     <td align="center"><?cs call:print_radio(name(mod), #1, mod, lang.enable_no_hiding_help) ?></td>
  </tr>
  <?cs /each ?>


<?cs ### Do Grades Module ?>


 <?cs if:!is_template ?>
  <tr>
      <?cs call:print_table_heading(lang.module_heading, "") ?>    
      <?cs call:print_table_heading(lang.disable_help, "") ?>
      <?cs call:print_table_heading(lang.enable_excel_grades, "") ?>
      <?cs call:print_table_heading(lang.enable_web_grades, "") ?>
  </tr>

  <tr>
     <td class="regheading"><?cs var:lang.grades ?> <?cs call:insert_help(lang.grades.helpfile, "", lang.help_on_help, "help") ?></td>

     <?cs ### first radio button - Disabled  ## ?>
     <td align="center"><?cs call:print_radio("grades", #0, grades, lang.disable_help) ?></td>

     <?cs ### second radio button - enable, with Excel system ## ?>
    <td align="left">
       <?cs call:print_radio("grades", #1, grades, lang.excel_file) ?> <?cs var: lang.excel_file ?><br/>
       <?cs call:print_radio("grades", #3, grades, lang.gradequick_pdf) ?> <?cs var:lang.gradequick_pdf ?>
    </td>

    <?cs ### third radio button - enable, with web based system ## ?>
    <td align="center"><?cs call:print_radio("grades", #2, grades, lang.enable_web_grades) ?></td>
  </tr>



  <?cs ### 
       ### Do People, and Chat  (nohide) modules
       ### ?>  


  <tr>
      <?cs call:print_table_heading(lang.module_heading, "") ?>    
      <?cs call:print_table_heading(lang.disable_help, "") ?>
      <?cs call:print_table_heading(lang.enable_help, "") ?>
      <td>&nbsp;</td>
  </tr>


  <?cs each:mod = nohide_module ?>
  <tr>
     <?cs set:helpfile = lang[name(mod)].helpfile ?>
     <td class="regheading"><?cs var:lang[name(mod)] ?> <?cs call:insert_help(helpfile, "", lang.help_on_help, "help") ?></td>
  
     <?cs ## First radio button - Disable completely  ## ?>
     <td align="center"><?cs call:print_radio(name(mod), #0, mod, lang.disable_help) ?></td>


     <?cs ## Second radio button - simple Enable ## ?>
   <td align="center"><?cs call:print_radio(name(mod), #1, mod, lang.enable_help) ?></td>
   <td>&nbsp;</td>
  </tr> 
  <?cs /each ?>
<?cs /if ?>
 </table>
</td>
<td valign="middle">
 <?cs call:print_submit_button() ?>
</td>
</tr>
</table>
</td></tr></table>
<?cs /with ?>
<?cs /def ?>




<?cs def:print_text(label, name, value, max) ?>
 <tr>
   <td class="regheading"><?cs var:label ?></td>
   <td><input type="text" name="<?cs var:name ?>" value="<?cs var:value ?>" title="<?cs var:course.help ?>" size="20" maxlength="<?cs var:max ?>" /></td>
 </tr>
<?cs /def ?>




<?cs def:print_course_title() ?>
<?cs with:lang=lang.admin_module_form ?>
<table border="0" width="100%" >
<tr><td align="center">
<table width="75%">
<tr><td colspan="2" class="instructions"><?cs var:lang.course_info_instructions ?></td></tr>
<?cs if:!is_standalone ?>
   <tr><td  colspan="2" class="instructions"><?cs var:lang.semester_notes ?></td></tr>
<?cs /if ?>


<tr>
    <td align="right">
    <table cellpadding="4" cellspacing="0" border="0">
       <?cs call:print_text(lang.course_code_label, "course", course_no, max_course_no ) ?>
       <?cs call:print_text(lang.course_title_label, "title", course_title, max_title ) ?>
       <?cs call:print_text(lang.instructor_label, "instructor", instructor, max_instructor ) ?>
       <?cs call:print_text(lang.semester_label, "semester", semester, max_semester ) ?>
    </table>
   </td>
   <td valign="middle" align="left">
     <?cs call:print_submit_button() ?>
   </td>
</tr>
</table>
</td></tr>
</table>
<?cs /with ?>
<?cs /def ?>



<?cs def:print_classroom_locking_options() ?>
<?cs with:lang=lang.admin_module_form ?>
<table border="0" width="100%" >
<tr><td align="center">
<table width="75%" border="0" cellpadding="0">
<tr><td colspan="2" class="instructions"><?cs var:lang.classroom_locking_instructions ?></td>
    <td rowspan="2" valign="middle">
     <?cs call:print_submit_button() ?>
    </td>
</tr>
    <tr>
      <td align="center"><input type="radio" name="lock" value="1" <?cs if:classroom_locked ?>checked="checked"<?cs /if ?> title="<?cs var:lang.lock_classroom ?>" /><?cs var:lang.lock_classroom?>
          <input type="radio" name="lock" value="0" title="<?cs var:lang.unlock_classroom ?>" <?cs if:!classroom_locked ?>checked="checked"<?cs /if ?> /><?cs var:lang.unlock_classroom ?>
     </td>
    </tr>
</table>
</td></tr></table>
<?cs /with ?>
<?cs /def ?>








<?cs def:print_message_options() ?>
<?cs with:lang=lang.admin_module_form ?>
<table border="0" width="100%" >
<tr><td align="center">
<table width="75%" border="0" cellpadding="0">
<tr><td colspan="2" class="instructions"><?cs var:lang.message_option_instructions ?></td>
    <td rowspan="9" valign="middle">
     <?cs call:print_submit_button() ?>
    </td>
</tr>
<tr><td colspan="3">&nbsp;</td></tr>
   <tr>
     <td style="width:40%" class="instructions"><fieldset><?cs var:lang.spell_check_instructions ?></fieldset></td>
     <td align="center" valign="middle">
        <table border="0">
         <tr>
           <td><input type="radio" name="spell" value="1" <?cs if:spell_check_enabled_in_classroom ?>checked="checked"<?cs /if ?> title="<?cs var:lang.enable_spell ?>" /><?cs var:lang.enable_spell?></td>
           <td><input type="radio" name="spell" value="0" title="<?cs var:lang.disable_spell ?>" <?cs if:!spell_check_enabled_in_classroom ?>checked="checked"<?cs /if ?> /><?cs var:lang.disable_spell ?></td>
         </tr>
        </table>
   </td>
   </tr>
<tr><td colspan="3">&nbsp;</td></tr>

   <tr>
    <td style="width:40%" class="instructions"><fieldset><?cs var:lang.font_instructions ?></fieldset></td>
    <td align="center" valign="middle">
      <table border="0">
      <tr>
         <td><input type="radio" name="fixed_font" value="0" <?cs if:!fixed_font_enabled ?>checked="checked"<?cs /if ?> title="" /><?cs var:lang.use_proportional_font ?></td>
      </tr>
      <tr>
         <td><pre><input type="radio" name="fixed_font" value="1" <?cs if:fixed_font_enabled ?>checked="checked"<?cs /if ?> title="" /><?cs var:lang.use_fixed_width_font ?></pre></td>
      </tr>
      </table>
    </td>
   </tr>

<tr><td colspan="3">&nbsp;</td></tr>

   <tr>
    <td style="width:40%" class="instructions">
     <fieldset>
       <?cs var:lang.emoticon_instructions ?>
       <img src="<?cs var:image_path ?>icon_smile.gif" alt="" />
       <img src="<?cs var:image_path ?>icon_lol.gif" alt="" />
       <img src="<?cs var:image_path ?>icon_exclaim.gif" alt="" />
       <img src="<?cs var:image_path ?>icon_question.gif" alt="" />
     </fieldset>
   </td>
    <td align="center" valign="middle">
      <table border="0">
      <tr>
         <td><input type="radio" name="emoticons_disabled" value="0" <?cs if:!emoticons_disabled ?>checked="checked"<?cs /if ?> title="" /><?cs var:lang.enable_emoticons ?></td>
         <td><input type="radio" name="emoticons_disabled" value="1" <?cs if:emoticons_disabled ?>checked="checked"<?cs /if ?> title="" /><?cs var:lang.disable_emoticons ?></td>
      </tr>
      </table>
    </td>
   </tr>



<?cs if:allow_editor_width_selection ?>
<tr><td colspan="3">&nbsp;</td></tr>

   <tr>
    <td style="width:40%" class="instructions">
     <fieldset>
       <?cs var:lang.editor_width_instructions ?>
     </fieldset>
   </td>
    <td align="center" valign="middle">
      <table border="0">
      <tr>
         <td><input type="radio" name="editor_width" value="0" <?cs if:current_editor_width_selection == #0 ?>checked="checked"<?cs /if ?> title="" /><?cs var:lang.standard_width_label ?>&nbsp;<?cs var:editor_width.0 ?></td>
      </tr>
      <tr>
         <td><input type="radio" name="editor_width" value="1" <?cs if:current_editor_width_selection == #1 ?>checked="checked"<?cs /if ?> title="" /><?cs var:lang.medium_width_label ?>&nbsp;<?cs var:editor_width.1 ?></td>
      </tr>
      <tr>
         <td><input type="radio" name="editor_width" value="2" <?cs if:current_editor_width_selection == #2 ?>checked="checked"<?cs /if ?> title="" /><?cs var:lang.large_width_label ?>&nbsp;<?cs var:editor_width.2 ?></td>
      </tr>
      <tr>
         <td><input type="radio" name="editor_width" value="3" <?cs if:current_editor_width_selection == #3 ?>checked="checked"<?cs /if ?> title="" /><?cs var:lang.xlarge_width_label ?>&nbsp;<?cs var:editor_width.3 ?></td>
      </tr>
      </table>
    </td>
   </tr>
<?cs /if ?>


</table>
</td></tr></table>
<?cs /with ?>
<?cs /def ?>




<?cs call:html_heading() ?>
   <head>
      <title><?cs var:lang.admin_module_form.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"  />
   <script type="text/javascript">
  function openwindow(some_url,winname)
  {
  var new_window = window.open(some_url, winname,'menubar=0,toolbar=0,status=0,scrollbars=yes,resizable=yes,width=350,height=150');
  new_window.focus();
  }
 </script>
  </head>
<?cs call:define_body() ?>
<?cs call:print_course_heading(back_url, lang.admin_module_form.back_button_title) ?>

<?cs if:!modules_enabled ?>
   <?cs call:print_welcome_message() ?>
<?cs /if ?>

 

<div><form method="post" action="admin_write_config">
 <div>
   <input type="hidden" name="id" value="<?cs var:Query.id ?>" />
   <input type="hidden" name="crs" value="<?cs var:Query.crs ?>" />
 </div>

 <?cs call:print_modules() ?>

 <div style="margin-top:3em">    
   <?cs call:print_classroom_locking_options() ?>
 </div>


<div style="margin-top:3em">    
 <?cs call:print_course_title() ?>
</div>

<?cs if:spell_check_enabled_on_server ?>
 <div style="margin-top:3em">    
   <?cs call:print_message_options() ?>
 </div>
<?cs /if ?>

 </form>
</div>
</body>
</html>
<?cs call:runtime() ?>
