From 86be5c0c1fa52ca39ee17d55e3a72319306c4659 Mon Sep 17 00:00:00 2001 From: Michael Gage Date: Fri, 7 Sep 2012 07:07:55 -0400 Subject: [PATCH] Add a VERSION file for PG. In order to reach it cleanly there needs to be a link PG_VERSION in webwork2/ to the file pg/VERSION. --- PG_VERSION | 1 + conf/defaults.config | 4 +++- lib/WeBWorK/ContentGenerator.pm | 5 +++-- 3 files changed, 7 insertions(+), 3 deletions(-) create mode 120000 PG_VERSION diff --git a/PG_VERSION b/PG_VERSION new file mode 120000 index 0000000000..adae9e58c6 --- /dev/null +++ b/PG_VERSION @@ -0,0 +1 @@ +../pg/VERSION \ No newline at end of file diff --git a/conf/defaults.config b/conf/defaults.config index 114b695da9..e36eb7640c 100644 --- a/conf/defaults.config +++ b/conf/defaults.config @@ -29,7 +29,9 @@ # file, you can put a directive in localOverrides.conf. include("conf/site.conf"); -include("VERSION"); +include("VERSION"); # get WW version +include("PG_VERSION"); # get PG VERSION -- # these addresses are fragile. Should we change the way include() works? + ################################################################################ # site.conf should contain basic information about directories and URLs on # your server diff --git a/lib/WeBWorK/ContentGenerator.pm b/lib/WeBWorK/ContentGenerator.pm index d5657a8cb5..cf01662328 100644 --- a/lib/WeBWorK/ContentGenerator.pm +++ b/lib/WeBWorK/ContentGenerator.pm @@ -1019,10 +1019,11 @@ sub footer(){ my $self = shift; my $r = $self->r; my $ce = $r->ce; - my $version = $ce->{WW_VERSION}||"unknown -- set version in defaults.config"; + my $ww_version = $ce->{WW_VERSION}||"unknown -- set version in defaults.config"; + my $pg_version = $ce->{PG_VERSION}||"unknown -- set version in defaults.config"; my $copyright_years = $ce->{WW_COPYRIGHT_YEARS}||"1996-2011"; print CGI::p({-id=>"last-modified"}, $r->maketext("Page generated at [_1]", timestamp($self))); - print CGI::div({-id=>"copyright"}, "WeBWorK © $copyright_years", "| version: $version |", CGI::a({-href=>"http://webwork.maa.org/"}, $r->maketext("The WeBWorK Project"), )); + print CGI::div({-id=>"copyright"}, "WeBWorK © $copyright_years", "| ww_version: $ww_version | pg_version: $pg_version|", CGI::a({-href=>"http://webwork.maa.org/"}, $r->maketext("The WeBWorK Project"), )); return "" }