--- loncom/homework/grades.pm 2005/02/12 03:43:06 1.245 +++ loncom/homework/grades.pm 2005/02/12 15:18:41 1.246 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # The LON-CAPA Grading handler # -# $Id: grades.pm,v 1.245 2005/02/12 03:43:06 albertel Exp $ +# $Id: grades.pm,v 1.246 2005/02/12 15:18:41 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2651,26 +2651,26 @@ sub split_part_type { # #--- Javascript to handle csv upload sub csvupload_javascript_reverse_associate { + my $error1=&mt('You need to specify the username or ID'); + my $error2=&mt('You need to specify at least one grading field'); return(<3) { foundsomething=1; } } - if ((founduname==0 && foundID==0) || founddomain==0) { - alert('You need to specify the domain and either the username or ID'); - return; + if (founduname==0 && foundID==0) { + alert('$error1'); + return; } if (foundsomething==0) { - alert('You need to specify at least one grading field'); - return; + alert('$error2'); + return; } vf.submit(); } @@ -2761,7 +2761,7 @@ to this page if the data selected is ins - +