--- loncom/interface/lonprintout.pm 2010/05/24 09:21:18 1.577 +++ loncom/interface/lonprintout.pm 2010/05/24 09:32:11 1.578 @@ -2,7 +2,7 @@ # The LearningOnline Network # Printout # -# $Id: lonprintout.pm,v 1.577 2010/05/24 09:21:18 foxr Exp $ +# $Id: lonprintout.pm,v 1.578 2010/05/24 09:32:11 foxr Exp $ # # Copyright Michigan State University Board of Trustees # @@ -201,9 +201,14 @@ sub generate_code_selector { if (((\$helper->{'VARS'}{'NUMBER_TO_PRINT_TOTAL'}+0) < 1) && !\$helper->{'VARS'}{'REUSE_OLD_CODES'} && !\$helper->{'VARS'}{'SINGLE_CODE'} && - !\$helper->{'VARS'}{'CODE_SELECTED_FROM_LIST'}) { + !\$helper->{'VARS'}{'CODE_SELECTED_FROM_LIST'} ) { + return "You need to specify the number of assignments to print"; } + if (((\$helper->{'VARS'}{'NUMBER_TO_PRINT_TOTAL'}+0) >= 1) && + (\$helper->{'VARS'}{'SINGLE_CODE'} ne '') ) { + return 'Specifying number of codes to print and a specific code is not compatible'; + } return undef; @@ -229,7 +234,7 @@ sub generate_code_selector { return &Apache::lonprintout::is_code_valid(\$helper->{'VARS'}{'SINGLE_CODE'}, \$helper->{'VARS'}{'CODE_OPTION'}); } elsif (\$helper->{'VARS'}{'SINGLE_CODE'} ne ''){ - return 'Specifying a code name is incompatible with what you have specified above'; + return 'Specifying a code name is incompatible with specifying number of codes.'; } else { return undef; # Other forces control us. } @@ -3733,6 +3738,10 @@ CHOOSE_STUDENTS1 !\$helper->{'VARS'}{'CODE_SELECTED_FROM_LIST'}) { return "You need to specify the number of assignments to print"; } + if (((\$helper->{'VARS'}{'NUMBER_TO_PRINT_TOTAL'}+0) >= 1) && + (\$helper->{'VARS'}{'SINGLE_CODE'} ne '') ) { + return 'Specifying number of codes to print and a specific code is not compatible'; + } return undef; @@ -3757,7 +3766,7 @@ CHOOSE_STUDENTS1 return &Apache::lonprintout::is_code_valid(\$helper->{'VARS'}{'SINGLE_CODE'}, \$helper->{'VARS'}{'CODE_OPTION'}); } elsif (\$helper->{'VARS'}{'SINGLE_CODE'} ne ''){ - return 'Specifying a code name is incompatible with what you have specified above'; + return 'Specifying a code name is incompatible specifying number of codes.'; } else { return undef; # Other forces control us. }