| … | |
… | |
| 25 | |
25 | |
| 26 | # These libraries contain files which must at least be available, even though |
26 | # These libraries contain files which must at least be available, even though |
| 27 | # only Global.pm is actively used. |
27 | # only Global.pm is actively used. |
| 28 | |
28 | |
| 29 | use lib "/Users/gage/webwork/system/lib/", "/Users/gage/webwork/system/courseScripts/"; |
29 | use lib "/Users/gage/webwork/system/lib/", "/Users/gage/webwork/system/courseScripts/"; |
|
|
30 | |
| 30 | my $WEBWORKDIRECTORY = '/Users/gage/webwork/'; |
31 | my $WEBWORKDIRECTORY = '/Users/gage/webwork/'; |
| 31 | my $COURSESCRIPTSDIRECTORY = "/Users/gage/webwork/system/courseScripts/"; |
32 | my $COURSESCRIPTSDIRECTORY = "/Users/gage/webwork/system/courseScripts/"; |
| 32 | my $PGTRANSLATOR = "PGtranslator5.pm"; |
33 | my $PGTRANSLATOR = "PGtranslator5.pm"; |
| 33 | |
34 | |
| 34 | my $COURSETEMPDIRECTORY = '/Users/gage/Sites/demoCoursetmp/'; |
35 | my $COURSETEMPDIRECTORY = '/Users/gage/Sites/rochester_problibtmp/'; |
| 35 | my $COURSETEMPURL = 'http://webwork-db.math.rochester.edu/~gage/demoCoursetmp'; |
36 | my $COURSETEMPURL = '/~gage/rochester_problibtmp'; |
| 36 | |
37 | |
| 37 | |
38 | |
| 38 | |
39 | |
| 39 | my $PASSWORD = 'geometry'; |
40 | my $PASSWORD = 'geometry'; |
| 40 | ############################################################################### |
41 | ############################################################################### |
| 41 | |
42 | |
| 42 | BEGIN{ |
43 | BEGIN{ |
| 43 | my $GLOBAL_INIT = "/Users/gage/webwork/system/lib/Global.pm"; |
44 | my $GLOBAL_INIT = "/Users/gage/webwork/system/lib/Global.pm"; |
| 44 | print "Opening $GLOBAL_INIT\n"; |
45 | print "Opening $GLOBAL_INIT\n"; |
|
|
46 | require "/Users/gage/webwork/system/lib/webworkConfig.pm" or croak 'webworkConfig.pm'; |
| 45 | require $GLOBAL_INIT or die $GLOBAL_INIT; |
47 | require $GLOBAL_INIT or croak $GLOBAL_INIT; |
| 46 | import Global; |
48 | import Global; |
| 47 | } |
49 | } |
| 48 | |
50 | $Global::cgiURL='foo'; |
| 49 | |
51 | |
| 50 | |
52 | |
| 51 | require $PGTRANSLATOR or die "Can't open $PGTRANSLATOR"; |
53 | require $PGTRANSLATOR or die "Can't open $PGTRANSLATOR"; |
| 52 | |
54 | |
| 53 | ############################################################################### |
55 | ############################################################################### |
| … | |
… | |
| 83 | |
85 | |
| 84 | my $displayMode = 'HTML_tth'; |
86 | my $displayMode = 'HTML_tth'; |
| 85 | |
87 | |
| 86 | my $PG_PL = "${courseScriptsDirectory}PG.pl"; |
88 | my $PG_PL = "${courseScriptsDirectory}PG.pl"; |
| 87 | my $DANGEROUS_MACROS_PL = "${courseScriptsDirectory}dangerousMacros.pl"; |
89 | my $DANGEROUS_MACROS_PL = "${courseScriptsDirectory}dangerousMacros.pl"; |
| 88 | my @MODULE_LIST = ( "Exporter", "DynaLoader", "GD", "WWPlot", "Fun", |
90 | my @MODULE_LIST = ( "Exporter", "DynaLoader", "GD", "WWPlot", "Fun", |
| 89 | "Circle", "Label", "PGrandom", "Units", "Hermite", |
91 | "Circle", "Label", "PGrandom", "Units", "Hermite", |
| 90 | "List", "Match","Multiple", "Select", "AlgParser", |
92 | "List", "Match","Multiple", "Select", "AlgParser", |
| 91 | "AnswerHash", "Fraction", "VectorField", "Complex1", |
93 | "AnswerHash", "Fraction", "VectorField", "Complex1", |
| 92 | "Complex", "MatrixReal1", "Matrix","Distributions", |
94 | "Complex", "MatrixReal1", "Matrix","Distributions", |
| 93 | "Regression" |
95 | "Regression" |
| 94 | ); |
96 | ); |
| 95 | my @EXTRA_PACKAGES = ( "AlgParserWithImplicitExpand", "Expr", |
97 | my @EXTRA_PACKAGES = ( "AlgParserWithImplicitExpand", "Expr", |
| 96 | "ExprWithImplicitExpand", "AnswerEvaluator", |
98 | "ExprWithImplicitExpand", "AnswerEvaluator", |
| 97 | "AnswerEvaluatorMaker" |
99 | |
| 98 | |
100 | ); |
| 99 | ); |
|
|
| 100 | |
101 | |
| 101 | my $INITIAL_MACRO_PACKAGES; |
102 | my $INITIAL_MACRO_PACKAGES; |
| 102 | unless (defined ($main::do_not_preload_macros) && $main::do_not_preload_macros == 1) { |
103 | unless (defined ($main::do_not_preload_macros) && $main::do_not_preload_macros == 1) { |
|
|
104 | |
| 103 | $INITIAL_MACRO_PACKAGES = <<END_OF_TEXT; |
105 | $INITIAL_MACRO_PACKAGES = <<END_OF_TEXT; |
| 104 | DOCUMENT(); |
106 | DOCUMENT(); |
| 105 | loadMacros( |
107 | loadMacros( |
| 106 | "PGbasicmacros.pl", |
108 | "PGbasicmacros.pl", |
| 107 | "PGchoicemacros.pl", |
109 | "PGchoicemacros.pl", |
| 108 | "PGanswermacros.pl", |
110 | "PGanswermacros.pl", |
| 109 | "PGnumericalmacros.pl", |
111 | "PGnumericalmacros.pl", |
| 110 | "PGgraphmacros.pl", |
112 | "PGgraphmacros.pl", |
| 111 | "PGauxiliaryFunctions.pl", |
113 | "PGauxiliaryFunctions.pl", |
| 112 | "PGmatrixmacros.pl", |
114 | "PGmatrixmacros.pl", |
| 113 | "PGcomplexmacros.pl", |
115 | "PGcomplexmacros.pl", |
| 114 | "PGstatisticsmacros.pl" |
116 | "PGstatisticsmacros.pl" |
| 115 | |
117 | |
| 116 | ); |
118 | ); |
| 117 | |
119 | |
| 118 | ENDDOCUMENT(); |
120 | ENDDOCUMENT(); |
| 119 | |
121 | |
| 120 | END_OF_TEXT |
122 | END_OF_TEXT |
| 121 | } else { |
123 | } else { |
| 122 | $INITIAL_MACRO_PACKAGES = <<END_OF_TEXT; |
124 | $INITIAL_MACRO_PACKAGES = <<END_OF_TEXT; |
| 123 | DOCUMENT(); |
125 | DOCUMENT(); |
| 124 | loadMacros( |
126 | loadMacros( |
| 125 | # "PGbasicmacros.pl", |
127 | # "PGbasicmacros.pl", |
| 126 | # "PGchoicemacros.pl", |
128 | # "PGchoicemacros.pl", |
| 127 | # "PGanswermacros.pl", |
129 | # "PGanswermacros.pl", |
| 128 | # "PGnumericalmacros.pl", |
130 | # "PGnumericalmacros.pl", |
| 129 | # "PGgraphmacros.pl", |
131 | # "PGgraphmacros.pl", |
| 130 | # "PGauxiliaryFunctions.pl", |
132 | # "PGauxiliaryFunctions.pl", |
| 131 | # "PGmatrixmacros.pl", |
133 | # "PGmatrixmacros.pl", |
| 132 | # "PGcomplexmacros.pl", |
134 | # "PGcomplexmacros.pl", |
| 133 | # "PGstatisticsmacros.pl" |
135 | # "PGstatisticsmacros.pl" |
| 134 | |
136 | |
| 135 | ); |
137 | ); |
| 136 | |
138 | |
| 137 | ENDDOCUMENT(); |
139 | ENDDOCUMENT(); |
| 138 | |
140 | |
| 139 | END_OF_TEXT |
141 | END_OF_TEXT |
| 140 | |
142 | |
| 141 | |
143 | |
| 142 | } |
144 | } |
| 143 | |
145 | #print $INITIAL_MACRO_PACKAGES; |
| 144 | ############################################################################### |
146 | ############################################################################### |
| 145 | # |
147 | # |
| 146 | ############################################################################### |
148 | ############################################################################### |
| 147 | |
149 | |
| 148 | ############################################################################### |
150 | ############################################################################### |
| … | |
… | |
| 165 | ############################################################################### |
167 | ############################################################################### |
| 166 | |
168 | |
| 167 | print STDERR "Begin intitalization\n"; |
169 | print STDERR "Begin intitalization\n"; |
| 168 | my $dummy_envir = { courseScriptsDirectory => $courseScriptsDirectory, |
170 | my $dummy_envir = { courseScriptsDirectory => $courseScriptsDirectory, |
| 169 | displayMode => $displayMode, |
171 | displayMode => $displayMode, |
| 170 | macroDirectory => $macroDirectory}; |
172 | macroDirectory => $macroDirectory, |
|
|
173 | cgiURL => 'foo_cgiURL'}; |
| 171 | my $pt = new PGtranslator5; #pt stands for problem translator; |
174 | my $pt = new PGtranslator5; #pt stands for problem translator; |
| 172 | $pt ->rh_directories( { courseScriptsDirectory => $courseScriptsDirectory, |
175 | $pt ->rh_directories( { courseScriptsDirectory => $courseScriptsDirectory, |
| 173 | macroDirectory => $macroDirectory, |
176 | macroDirectory => $macroDirectory, |
| 174 | scriptDirectory => $scriptDirectory , |
177 | scriptDirectory => $scriptDirectory , |
| 175 | templateDirectory => $templateDirectory, |
178 | templateDirectory => $templateDirectory, |