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

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

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

Revision 2150 Revision 2151
106 $templateDirectory, 106 $templateDirectory,
107 $scriptDirectory, 107 $scriptDirectory,
108 $externalTTHPath, 108 $externalTTHPath,
109 ); 109 );
110 110
111sub _dangerousMacros_init { #use %envir instead of variables such as $macroDirectory -- not sure why -- perhaps variables haven't been unpacked yet. 111sub _dangerousMacros_init { #use envir instead of local variables?
112 $macroDirectory = eval('$main::envir{macroDirectory}') ; 112 $macroDirectory = eval('$main::envir{macroDirectory}') ;
113 $courseScriptsDirectory = eval('$main::envir{courseScriptsDirectory}'); 113 $courseScriptsDirectory = eval('$main::envir{courseScriptsDirectory}');
114 $templateDirectory = eval('$main::envir{templateDirectory}'); 114 $templateDirectory = eval('$main::envir{templateDirectory}');
115 $scriptDirectory = eval('$main::envir{scriptDirectory}'); 115 $scriptDirectory = eval('$main::envir{scriptDirectory}');
116 $externalTTHPath = eval('$main::envir{externalTTHPath}'); 116 $externalTTHPath = eval('$main::envir{externalTTHPath}');
254 # macros are searched for first in the $macroDirectory of the course 254 # macros are searched for first in the $macroDirectory of the course
255 # and then in the webwork $courseScripts directory. 255 # and then in the webwork $courseScripts directory.
256 256
257 my $macro_file_loaded = defined($init_subroutine) && defined(&$init_subroutine); 257 my $macro_file_loaded = defined($init_subroutine) && defined(&$init_subroutine);
258 warn "dangerousMacros: macro init $init_subroutine_name defined |$init_subroutine| |$macro_file_loaded|" if $debugON; 258 warn "dangerousMacros: macro init $init_subroutine_name defined |$init_subroutine| |$macro_file_loaded|" if $debugON;
259 warn "for $fileName <br>courseScriptsDirectory = $courseScriptsDirectory";
260 warn "macroDirectory is $macroDirectory";
259 unless ($macro_file_loaded) { 261 unless ($macro_file_loaded) {
260 #print STDERR "loadMacros: loading macro file $fileName\n"; 262 #print STDERR "loadMacros: loading macro file $fileName\n";
261 if (-r "$macroDirectory$fileName") { 263 if (-r "$macroDirectory$fileName") {
262 compile_file("$macroDirectory$fileName"); 264 compile_file("$macroDirectory$fileName");
263 265

Legend:
Removed from v.2150  
changed lines
  Added in v.2151

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9