From: Mike G. v. a. <we...@ma...> - 2008-06-27 01:02:59
|
Log Message: ----------- Allow file paths to be shown if user has high enough permissionLeve Tags: ---- rel-2-4-patches Modified Files: -------------- pg/macros: PGbasicmacros.pl Revision Data ------------- Index: PGbasicmacros.pl =================================================================== RCS file: /webwork/cvs/system/pg/macros/PGbasicmacros.pl,v retrieving revision 1.47.2.2.2.2 retrieving revision 1.47.2.2.2.3 diff -Lmacros/PGbasicmacros.pl -Lmacros/PGbasicmacros.pl -u -r1.47.2.2.2.2 -r1.47.2.2.2.3 --- macros/PGbasicmacros.pl +++ macros/PGbasicmacros.pl @@ -1791,7 +1791,14 @@ $points = 'pt' if $problemValue == 1; ## Prepare header for the problem grep($inlist{$_}++,@{ $envir->{'PRINT_FILE_NAMES_FOR'} }); - if ( defined($inlist{$envir->{studentLogin}}) and ($inlist{$envir->{studentLogin}} > 0) ) { + my $permissionLevel = $envir->{permissionLevel}; + my $PRINT_FILE_NAMES_PERMISSION_LEVEL = $envir->{'PRINT_FILE_NAMES_PERMISSION_LEVEL'}; + my $studentLogin = $envir->{studentLogin}; + my $print_path_name_flag = + (defined($permissionLevel) && defined($PRINT_FILE_NAMES_PERMISSION_LEVEL) && $permissionLevel >= $PRINT_FILE_NAMES_PERMISSION_LEVEL) + || ( defined($inlist{ $studentLogin }) and ( $inlist{ $studentLogin }>0 ) ) ; + + if ( $print_path_name_flag ) { $out = &M3("{\\bf ${probNum}. {\\footnotesize ($problemValue $points) $TeXFileName}}\\newline ", " \\begin{rawhtml} ($problemValue $points) <B>$l2hFileName</B><BR>\\end{rawhtml}", "($problemValue $points) <B>$fileName</B><BR>" |