[LON-CAPA-cvs] cvs: loncom /homework grades.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Mon, 10 Jan 2005 18:56:20 -0000
albertel Mon Jan 10 13:56:20 2005 EDT
Modified files:
/loncom/homework grades.pm
Log:
- BUG#3758, when underspecifying the info for grading we need to yeel about it
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.236 loncom/homework/grades.pm:1.237
--- loncom/homework/grades.pm:1.236 Wed Dec 15 14:09:35 2004
+++ loncom/homework/grades.pm Mon Jan 10 13:56:19 2005
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.236 2004/12/15 19:09:35 albertel Exp $
+# $Id: grades.pm,v 1.237 2005/01/10 18:56:19 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -3979,14 +3979,28 @@
if (!$symb) {return '';}
my $default_form_data=&defaultFormData($symb,$url);
$r->print(&scantron_form_start().$default_form_data);
- my $warning=&scantron_warning_screen('Validate Records');
- $r->print(<<STUFF);
+ if ( $ENV{'form.selectpage'} eq '' ||
+ $ENV{'form.scantron_selectfile'} eq '' ||
+ $ENV{'form.scantron_format'} eq '' ) {
+ $r->print("<p>You have forgetten to specify some information. Please go Back and try again.</p>");
+ if ( $ENV{'form.selectpage'} eq '') {
+ $r->print('<p><font color="red">You have not selected a Sequence to grade</font></p>');
+ }
+ if ( $ENV{'form.scantron_selectfile'} eq '') {
+ $r->print('<p><font color="red">You have not selected a file that contains the student\'s response data.</font></p>');
+ }
+ if ( $ENV{'form.scantron_format'} eq '') {
+ $r->print('<p><font color="red">You have not selected a the format of the student\'s response data.</font></p>');
+ }
+ } else {
+ my $warning=&scantron_warning_screen('Validate Records');
+ $r->print(<<STUFF);
$warning
<input type="submit" name="submit" value="Validate Records" />
<input type="hidden" name="command" value="scantron_validate" />
-</form>
STUFF
- $r->print("<br />".&show_grading_menu_form($symb,$url)."</body></html>");
+ }
+ $r->print("</form><br />".&show_grading_menu_form($symb,$url)."</body></html>");
return '';
}