--- loncom/homework/grades.pm 2007/11/13 01:14:32 1.488 +++ loncom/homework/grades.pm 2007/11/13 01:47:36 1.489 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Grading handler # -# $Id: grades.pm,v 1.488 2007/11/13 01:14:32 albertel Exp $ +# $Id: grades.pm,v 1.489 2007/11/13 01:47:36 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -4901,52 +4901,48 @@ sub scantron_selectphase { # Chunk of form to prompt for a file to grade and how: - $result.= <<SCANTRONFORM; - <table width="100%" border="0"> - <tr> - <td bgcolor="#777777"> - <form method="post" enctype="multipart/form-data" action="/adm/grades" name="scantron_process"> - <input type="hidden" name="command" value="scantron_warning" /> - $default_form_data - <table width="100%" border="0"> - <tr bgcolor="#e6ffff"> - <td colspan="2"> - <b>Specify file and which Folder/Sequence to grade</b> - </td> - </tr> - <tr bgcolor="#ffffe6"> - <td> Sequence to grade: </td><td> $sequence_selector </td> - </tr> - <tr bgcolor="#ffffe6"> - <td> Filename of scoring office file: </td><td> $file_selector </td> - </tr> - <tr bgcolor="#ffffe6"> - <td> Format of data file: </td><td> $format_selector </td> - </tr> - <tr bgcolor="#ffffe6"> - <td> Saved CODEs to validate against: </td><td> $CODE_selector</td> - </tr> - <tr bgcolor="#ffffe6"> - <td> Each CODE is only to be used once:</td><td> $CODE_unique </td> - </tr> - <tr bgcolor="#ffffe6"> + $result.= ' + <br /> + <form method="post" enctype="multipart/form-data" action="/adm/grades" name="scantron_process"> + <input type="hidden" name="command" value="scantron_warning" /> + '.$default_form_data.' + '.&Apache::loncommon::start_data_table('LC_scantron_action').' + '.&Apache::loncommon::start_data_table_header_row().' + <th colspan="2"> + Specify file and which Folder/Sequence to grade + </th> + '.&Apache::loncommon::end_data_table_header_row().' + '.&Apache::loncommon::start_data_table_row().' + <td> Sequence to grade: </td><td> '.$sequence_selector.' </td> + '.&Apache::loncommon::end_data_table_row().' + '.&Apache::loncommon::start_data_table_row().' + <td> Filename of scoring office file: </td><td> '.$file_selector.' </td> + '.&Apache::loncommon::end_data_table_row().' + '.&Apache::loncommon::start_data_table_row().' + <td> Format of data file: </td><td> '.$format_selector.' </td> + '.&Apache::loncommon::end_data_table_row().' + '.&Apache::loncommon::start_data_table_row().' + <td> Saved CODEs to validate against: </td><td> '.$CODE_selector.' </td> + '.&Apache::loncommon::end_data_table_row().' + '.&Apache::loncommon::start_data_table_row().' + <td> Each CODE is only to be used once:</td><td> '.$CODE_unique.' </td> + '.&Apache::loncommon::end_data_table_row().' + '.&Apache::loncommon::start_data_table_row().' <td> Options: </td> <td> <label><input type="checkbox" name="scantron_options_redo" value="redo_skipped"/> Do only previously skipped records</label> <br /> <label><input type="checkbox" name="scantron_options_ignore" value="ignore_corrections"/> Remove all existing corrections</label> <br /> <label><input type="checkbox" name="scantron_options_hidden" value="ignore_hidden"/> Skip hidden resources when grading</label> </td> - </tr> - <tr bgcolor="#ffffe6"> + '.&Apache::loncommon::end_data_table_row().' + '.&Apache::loncommon::start_data_table_row().' <td colspan="2"> <input type="submit" value="Grading: Validate Scantron Records" /> </td> - </tr> - </table> - </form> - </td> - </tr> -SCANTRONFORM + '.&Apache::loncommon::end_data_table_row().' + '.&Apache::loncommon::end_data_table().' + </form> +'; $r->print($result); @@ -4955,18 +4951,17 @@ SCANTRONFORM # Chunk of form to prompt for a scantron file upload. - $r->print(<<SCANTRONFORM); - <tr> - <td bgcolor="#777777"> - <table width="100%" border="0"> - <tr bgcolor="#e6ffff"> + $r->print(' + <br /> + '.&Apache::loncommon::start_data_table('LC_scantron_action').' + '.&Apache::loncommon::start_data_table_header_row().' + <th> + Specify a Scantron data file to upload. + </th> + '.&Apache::loncommon::end_data_table_header_row().' + '.&Apache::loncommon::start_data_table_row().' <td> - <b>Specify a Scantron data file to upload.</b> - </td> - </tr> - <tr bgcolor="#ffffe6"> - <td> -SCANTRONFORM +'); my $default_form_data=&defaultFormData(&get_symb($r,1)); my $cdom= $env{'course.'.$env{'request.course.id'}.'.domain'}; my $cnum= $env{'course.'.$env{'request.course.id'}.'.num'}; @@ -4992,47 +4987,38 @@ SCANTRONFORM </form> UPLOAD - $r->print(<<SCANTRONFORM); + $r->print(' </td> - </tr> - </table> - </td> - </tr> -SCANTRONFORM + '.&Apache::loncommon::end_data_table_row().' + '.&Apache::loncommon::end_data_table().' +'); } # Chunk of the form that prompts to view a scoring office file, # corrected file, skipped records in a file. - $r->print(<<SCANTRONFORM); - <tr> - <td bgcolor="#777777"> - <form action='/adm/grades' name='scantron_download'> - $default_form_data - <input type="hidden" name="command" value="scantron_download" /> - <table width="100%" border="0"> - <tr bgcolor="#e6ffff"> - <td> - <b>Download a scoring office file</b> - </td> - </tr> - <tr bgcolor="#ffffe6"> - <td> Filename of scoring office file: $file_selector </td> - </tr> - <tr bgcolor="#ffffe6"> - <td> + $r->print(' + <br /> + <form action="/adm/grades" name="scantron_download"> + '.$default_form_data.' + <input type="hidden" name="command" value="scantron_download" /> + '.&Apache::loncommon::start_data_table('LC_scantron_action').' + '.&Apache::loncommon::start_data_table_header_row().' + <th> + Download a scoring office file + </th> + '.&Apache::loncommon::end_data_table_header_row().' + '.&Apache::loncommon::start_data_table_row().' + <td> Filename of scoring office file: '.$file_selector.' + <br /> <input type="submit" value="Download: Show List of Associated Files" /> - </td> - </tr> - </table> - </form> - </td> - </tr> -SCANTRONFORM + '.&Apache::loncommon::end_data_table_row().' + '.&Apache::loncommon::end_data_table().' + </form> + <br /> +'); - $r->print('<tr><td bgcolor="#777777">'); &Apache::lonpickcode::code_list($r,2); - $r->print('</td></tr></table>'); $r->print($grading_menu_button); return }