[system] / trunk / pg / macros / PGbasicmacros.pl Repository:
ViewVC logotype

Diff of /trunk/pg/macros/PGbasicmacros.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 6010 Revision 6051
1000 my $permissionLevel = PG_restricted_eval(q!$main::envir{permissionLevel}!); 1000 my $permissionLevel = PG_restricted_eval(q!$main::envir{permissionLevel}!);
1001 my $PRINT_FILE_NAMES_PERMISSION_LEVEL = (PG_restricted_eval(q!defined( $main::envir{'PRINT_FILE_NAMES_PERMISSION_LEVEL'} )!))? 1001 my $PRINT_FILE_NAMES_PERMISSION_LEVEL = (PG_restricted_eval(q!defined( $main::envir{'PRINT_FILE_NAMES_PERMISSION_LEVEL'} )!))?
1002 PG_restricted_eval(q!$main::envir{'PRINT_FILE_NAMES_PERMISSION_LEVEL'}!) : 10000; # protect against undefined values 1002 PG_restricted_eval(q!$main::envir{'PRINT_FILE_NAMES_PERMISSION_LEVEL'}!) : 10000; # protect against undefined values
1003 my $printHintForInstructor = $permissionLevel >= $PRINT_FILE_NAMES_PERMISSION_LEVEL; 1003 my $printHintForInstructor = $permissionLevel >= $PRINT_FILE_NAMES_PERMISSION_LEVEL;
1004 my $showHint = PG_restricted_eval(q!$main::showHint!); 1004 my $showHint = PG_restricted_eval(q!$main::showHint!);
1005 my $displayHint = PG_restricted_eval(q!$envir{'displayHintsQ'}!); 1005 my $displayHint = PG_restricted_eval(q!$main::envir{'displayHintsQ'}!);
1006 PG_restricted_eval(q!$main::hintExists =1!); 1006 PG_restricted_eval(q!$main::hintExists =1!);
1007 PG_restricted_eval(q!$main::numOfAttempts = 0 unless defined($main::numOfAttempts);!); 1007 PG_restricted_eval(q!$main::numOfAttempts = 0 unless defined($main::numOfAttempts);!);
1008 my $attempts = PG_restricted_eval(q!$main::numOfAttempts!); 1008 my $attempts = PG_restricted_eval(q!$main::numOfAttempts!);
1009 1009
1010 if ($displayMode eq 'TeX') { 1010 if ($displayMode eq 'TeX') {
1012 $out = join(' ', "$BR(Show the student hint after $showHint attempts: ) $BR",@in); 1012 $out = join(' ', "$BR(Show the student hint after $showHint attempts: ) $BR",@in);
1013 } else { 1013 } else {
1014 $out = ''; # do nothing since hints are not available for download for students 1014 $out = ''; # do nothing since hints are not available for download for students
1015 } 1015 }
1016 } elsif ($printHintForInstructor) { # always print hints for instructor types 1016 } elsif ($printHintForInstructor) { # always print hints for instructor types
1017 $out = join(' ', "$BR( Show the student hint after $showHint attempts: )$BR $BBOLD HINT: $EBOLD ", @in); 1017 $out = join(' ', "$BR( Show the student hint after $showHint attempts. The current number of attempts is $attempts. )$BR $BBOLD HINT: $EBOLD ", @in);
1018 } elsif ( $displayHint and ( $attempts > $showHint )) { 1018 } elsif ( $displayHint and ( $attempts > $showHint )) {
1019 1019
1020 ## the second test above prevents a hint being shown if a doctored form is submitted 1020 ## the second test above prevents a hint being shown if a doctored form is submitted
1021 1021
1022 $out = join(' ',@in); 1022 $out = join(' ',@in);

Legend:
Removed from v.6010  
changed lines
  Added in v.6051

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9