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

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

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

Revision 1304 Revision 1365
1#!/usr/local/bin/webwork-perl 1#!/usr/local/bin/perl
2 2
3# This file provided the fundamental macros for the pg language 3# This file provided the fundamental macros for the pg language
4# These macros define the interface between the problems written by 4# These macros define the interface between the problems written by
5# the professor and the processing which occurs in the script 5# the professor and the processing which occurs in the script
6# processProblem.pl 6# processProblem.pl
309 my $col = shift; 309 my $col = shift;
310 if( $row == 0 && $col == 0 ){ 310 if( $row == 0 && $col == 0 ){
311 $vecnum += 1; 311 $vecnum += 1;
312 } 312 }
313 my $label = "ArRaY"."$number"."["."$vecnum".","."$row".","."$col"."]"; 313 my $label = "ArRaY"."$number"."["."$vecnum".","."$row".","."$col"."]";
314 eval(q!push(@main::KEPT_EXTRA_ANSWERS, $label)!);#put the labels into the hash to be caught later for recording purposes
314 $label; 315 $label;
315} 316}
316 317
317# ENDDOCUMENT must come at the end of every .pg file. 318# ENDDOCUMENT must come at the end of every .pg file.
318# It exports the resulting text of the problem, the text to be used in HTML header material 319# It exports the resulting text of the problem, the text to be used in HTML header material
376 $main::PG_FLAGS{'refreshCachedImages'} = $main::refreshCachedImages; 377 $main::PG_FLAGS{'refreshCachedImages'} = $main::refreshCachedImages;
377 $main::PG_FLAGS{'hintExists'} = $main::hintExists; 378 $main::PG_FLAGS{'hintExists'} = $main::hintExists;
378 $main::PG_FLAGS{'showHintLimit'} = $main::showHint; 379 $main::PG_FLAGS{'showHintLimit'} = $main::showHint;
379 $main::PG_FLAGS{'solutionExists'} = $main::solutionExists; 380 $main::PG_FLAGS{'solutionExists'} = $main::solutionExists;
380 $main::PG_FLAGS{ANSWER_ENTRY_ORDER} = \@main::PG_ANSWER_ENTRY_ORDER; 381 $main::PG_FLAGS{ANSWER_ENTRY_ORDER} = \@main::PG_ANSWER_ENTRY_ORDER;
382 $main::PG_FLAGS{KEPT_EXTRA_ANSWERS} = \@main::KEPT_EXTRA_ANSWERS;##need to keep array labels that don't call "RECORD_ANS_NAME"
381 $main::PG_FLAGS{ANSWER_PREFIX} = $main::ANSWER_PREFIX; 383 $main::PG_FLAGS{ANSWER_PREFIX} = $main::ANSWER_PREFIX;
382 # install problem grader 384 # install problem grader
383 if (defined($main::PG_FLAGS{PROBLEM_GRADER_TO_USE}) ) { 385 if (defined($main::PG_FLAGS{PROBLEM_GRADER_TO_USE}) ) {
384 # problem grader defined within problem -- no further action needed 386 # problem grader defined within problem -- no further action needed
385 } elsif ( defined( $main::envir{PROBLEM_GRADER_TO_USE} ) ) { 387 } elsif ( defined( $main::envir{PROBLEM_GRADER_TO_USE} ) ) {

Legend:
Removed from v.1304  
changed lines
  Added in v.1365

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9