Skip to content

Commit

Permalink
Remove webwork2/PG_VERSION file and references to it in the PG code.
Browse files Browse the repository at this point in the history
$ce->{PG_VERSION} is now obtained directly from the file pg/VERSION via a special exception which
allows CourseEnvironment to read that file.  (Normally CourseEnvironment only has access to files in webwork2. )
  • Loading branch information
mgage committed Oct 6, 2019
1 parent d1629ee commit 90f70e5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
5 changes: 0 additions & 5 deletions PG_VERSION

This file was deleted.

9 changes: 4 additions & 5 deletions conf/defaults.config
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,10 @@
# file, you can put a directive in localOverrides.conf.

include("conf/site.conf");
include("VERSION"); # get WW version
#include("PG_VERSION");
# The version of PG is now obtained from pg/VERSION
# using code inside CourseEnvironment.pm
# include can only read files under the webwork2 directory
include("VERSION"); # get WW version
# The version of PG is now obtained from the file pg/VERSION
# using code added to CourseEnvironment.pm
# with this one exception include can only read files under the webwork2 directory

################################################################################
# site.conf should contain basic information about directories and URLs on
Expand Down
4 changes: 2 additions & 2 deletions lib/WeBWorK/CourseEnvironment.pm
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,10 @@ sub new {
}
# # We'll get the pg version here and read it into the safe symbol table
if (-r $PG_version_file){
#print STDERR ( "\n\nread PG_version file $PG_version_file\n\n");
#print STDERR ( "\n\nread PG_version file $PG_version_file\n\n");
my $PG_version_file_contents = readFile($PG_version_file)//'';
$safe->reval($PG_version_file_contents);
#print STDERR ("\n contents: $PG_version_file_contents");
#print STDERR ("\n contents: $PG_version_file_contents");

no strict 'refs';
my %symbolHash2 = %{$safe->root."::"};
Expand Down

0 comments on commit 90f70e5

Please sign in to comment.