[system] / trunk / webwork / system / system_webwork_setup.pl Repository:
ViewVC logotype

Diff of /trunk/webwork/system/system_webwork_setup.pl

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

Revision 1520 Revision 1521
31$system_setup_mode = undef; 31$system_setup_mode = undef;
32$mainDir = undef; 32$mainDir = undef;
33$perlPath = undef; 33$perlPath = undef;
34$cgiURL = undef; 34$cgiURL = undef;
35$htmlURL = undef; 35$htmlURL = undef;
36$htmlDir = undef;
36$groupName = undef; 37$groupName = undef;
37$update_stuff_in_courses = undef; 38$update_stuff_in_courses = undef;
38$chgrp_files_and_dirs = undef; 39$chgrp_files_and_dirs = undef;
39$chmod_files_and_dirs = undef; 40$chmod_files_and_dirs = undef;
40$local_preprocessor = undef; 41$local_preprocessor = undef;
122In order for generated HTML to be able to invoke CGI scripts, WeBWorK 123In order for generated HTML to be able to invoke CGI scripts, WeBWorK
123needs to know the URL which points to the main WeBWorK system cgi 124needs to know the URL which points to the main WeBWorK system cgi
124subdirectory. If both static HTML and CGIs reside on the same host 125subdirectory. If both static HTML and CGIs reside on the same host
125(which is true in most cases), you can omit the http://hostname section 126(which is true in most cases), you can omit the http://hostname section
126of the URL, but make sure the leading slash is present. 127of the URL, but make sure the leading slash is present.
128
129};
130
131my $HTML_DIR_TEXT = q{
132
133The directory containing the WeBWorK system HTML files is known as the system
134HTML directory. In order to dynamically generate system-wide public resources, I
135need to know the location of the system HTML directory for this installation.
127 136
128}; 137};
129 138
130my $HTML_URL_TEXT = q{ 139my $HTML_URL_TEXT = q{
131 140
251 } 260 }
252 } 261 }
253 $cgiURL .= "/" unless $cgiURL =~ m"/$"; # ensure trailing slash 262 $cgiURL .= "/" unless $cgiURL =~ m"/$"; # ensure trailing slash
254} 263}
255print "CGI URL is: $cgiURL\n"; 264print "CGI URL is: $cgiURL\n";
265
266#################### system HTML directory
267
268unless(defined $htmlDir) {
269 page($HTML_DIR_TEXT);
270 $htmlDir = questionString("Where is the WeBWorK system HTML directory?", "${mainDir}../system_html/");
271 $htmlDir .= '/' unless $htmlDir =~ m|/$|; # ensure trailing slash
272}
273print "We'll use $htmlDir as WeBWorK's system HTML directory.\n";
256 274
257#################### HTML URL 275#################### HTML URL
258 276
259unless(defined $htmlURL) { 277unless(defined $htmlURL) {
260 page($HTML_URL_TEXT); 278 page($HTML_URL_TEXT);
398} 416}
399 417
400print "done fixing #! and \"use\" lines.\n\n"; 418print "done fixing #! and \"use\" lines.\n\n";
401 419
402#################### write webworkConfig.pm file 420#################### write webworkConfig.pm file
403# uses: $mainDir, $cgiURL, $htmlURL 421# uses: $mainDir, $cgiURL, $htmlDir, $htmlURL
404 422
405print "Writing lib/webworkConfig.pm file...\n"; 423print "Writing lib/webworkConfig.pm file...\n";
406open CONFIG_FILE, ">${mainDir}lib/webworkConfig.pm"; 424open CONFIG_FILE, ">${mainDir}lib/webworkConfig.pm";
407print CONFIG_FILE<<END_OF_CONFIG_FILE; 425print CONFIG_FILE<<END_OF_CONFIG_FILE;
408package Global; 426package Global;
421# scripts are found in the directory referred to by \$cgiWebworkURL, which is 439# scripts are found in the directory referred to by \$cgiWebworkURL, which is
422# usually webwork/system/cgi. 440# usually webwork/system/cgi.
423\$cgiDebugMode = 0; 441\$cgiDebugMode = 0;
424 442
425\$mainDirectory = "$mainDir"; 443\$mainDirectory = "$mainDir";
444\$htmlWebworkDir = "$htmlDir";
426\$htmlWebworkURL = "$htmlURL"; 445\$htmlWebworkURL = "$htmlURL";
427\$cgiWebworkURL = "$cgiURL"; 446\$cgiWebworkURL = "$cgiURL";
428\$cgiWebworkURL .= "cgi-scripts/" unless \$cgiDebugMode; 447\$cgiWebworkURL .= "cgi-scripts/" unless \$cgiDebugMode;
429 448
4301; 4491;
445# Copyright (c) 1995-2001 WeBWorK Team, University of Rochester 464# Copyright (c) 1995-2001 WeBWorK Team, University of Rochester
446# All rights reserved 465# All rights reserved
447################################################################################ 466################################################################################
448 467
449use lib '${mainDir}lib/'; 468use lib '${mainDir}lib/';
469use lib '${mainDir}courseScripts/';
450 470
4511; 4711;
452END_OF_INIT_FILE 472END_OF_INIT_FILE
453 close INIT_FILE; 473 close INIT_FILE;
454} 474}

Legend:
Removed from v.1520  
changed lines
  Added in v.1521

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9