Skip to content

Commit

Permalink
Change references to global.conf in the comments to refer to site.con…
Browse files Browse the repository at this point in the history
…f or defaults.config as appropriate

All references to global.conf in comments within webwork2/ have been changed to point to the appropriate replacement file.
  • Loading branch information
dlglin committed Jun 19, 2012
1 parent 7ff7031 commit 987ec8f
Show file tree
Hide file tree
Showing 31 changed files with 72 additions and 81 deletions.
6 changes: 3 additions & 3 deletions bin/NPL-update
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
# 1) The NPL downloaded to your machine (the .pg files)
# 2) The environment variable WEBWORK_ROOT needs to be
# correctly defined (as with other scripts here).
# 3) Configuration for the NPL in global.conf needs to be
# done (basically just setting the path to the NPL files.
# 3) Configuration for the NPL in site.conf needs to be
# done (basically just setting the path to the NPL files).

#use strict;
use File::Find;
Expand Down Expand Up @@ -311,7 +311,7 @@ if(open(IN, "$libraryRoot/Textbooks")) {
close(IN);
} else{
print "Textbooks file was not found in library $libraryRoot. If the path to the problem library doesn't seem
correct, make modifications in webwork2/conf/global.conf (\$problemLibrary{root}). If that is correct then
correct, make modifications in webwork2/conf/site.conf (\$problemLibrary{root}). If that is correct then
updating from cvs should download the Textbooks file.\n";
}

Expand Down
12 changes: 6 additions & 6 deletions bin/addcourse
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ be granted professor privileges.
=item B<--db-layout>=I<LAYOUT>
The specified database layout will be used in place of the default specified in
F<global.conf>.
F<defaults.config>.
=item B<--users>=I<FILE>
Expand Down Expand Up @@ -98,18 +98,18 @@ eval "use lib '$webwork_dir/lib'"; die $@ if $@;
eval "use WeBWorK::CourseEnvironment"; die $@ if $@;

#################################################################
# The folloinwg code reads global.conf and extracts the remaining configuration
# The folloinwg code reads defaults.config and extracts the remaining configuration
# variables. There is no need to modify it.
#################################################################

# link to WeBWorK code libraries
eval "use lib '$webwork_dir/lib'"; die $@ if $@;
eval "use WeBWorK::CourseEnvironment"; die $@ if $@;

# grab course environment (by reading webwork2/conf/global.conf)
# grab course environment (by reading webwork2/conf/defaults.config)
my $ce = new WeBWorK::CourseEnvironment({ webwork_dir => $webwork_dir });

# set important configuration variables (from global.conf)
# set important configuration variables (from defaults.config)

my $webwork_url = $ce->{webwork_url}; # e.g. /webwork2
my $pg_dir = $ce->{pg_dir}; # e.g. /opt/webwork/pg
Expand All @@ -119,7 +119,7 @@ my $pg_dir = $ce->{pg_dir}; # e.g. /opt/webwork/pg
#################################################################
print "addcourse: WeBWorK server is starting\n";
print "addcourse: WeBWorK root directory set to $webwork_dir in webwork2/conf/webwork.apache2-config\n";
print "addcourse: The following locations and urls are set in webwork2/conf/global.conf\n";
print "addcourse: The following locations and urls are set in webwork2/conf/site.conf\n";
print "addcourse: PG root directory set to $pg_dir\n";
print "addcourse: WeBWorK server userID is ", $ce->{server_userID}, "\n";
print "addcourse: WeBWorK server groupID is ", $ce->{server_groupID}, "\n";
Expand Down Expand Up @@ -192,7 +192,7 @@ $ce = WeBWorK::CourseEnvironment->new({

if ($dbLayout) {
die "Database layout $dbLayout does not exist in the course environment.",
" (It must be defined in global.conf.)\n"
" (It must be defined in defaults.config.)\n"
unless exists $ce->{dbLayouts}->{$dbLayout};
} else {
# use default value
Expand Down
2 changes: 1 addition & 1 deletion bin/delcourse
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Specifies the password to use when connecting to the SQL server.
Specifies the name of the database to delete. (This is usually
"webwork_COURSENAME", but can be overridden by changing the database layout in
F<global.conf>.)
F<localOverrides.conf>.)
=back
Expand Down
2 changes: 1 addition & 1 deletion bin/wwapache2ctl.dist
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ WEBWORKROOT=$HOME/webwork2

# Change these only if you need to customize the locations
PID=$WEBWORKROOT/logs/httpd2.pid
CONFIG_GLOBAL=$WEBWORKROOT/conf/global.conf
CONFIG_GLOBAL=$WEBWORKROOT/conf/defaults.conf
CONFIG_DATABASE=$WEBWORKROOT/conf/database.conf
CONFIG_DEVEL=$WEBWORKROOT/conf/devel.apache2-config
CONFIG_DEVEL_SITE=$WEBWORKROOT/conf/devel-site.apache2-config
Expand Down
2 changes: 1 addition & 1 deletion bin/wwapachectl.dist
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ WEBWORKROOT=$HOME/webwork2

# Change these only if you need to customize the locations
PID=$WEBWORKROOT/logs/httpd.pid
CONFIG_GLOBAL=$WEBWORKROOT/conf/global.conf
CONFIG_GLOBAL=$WEBWORKROOT/conf/defaults.config
CONFIG_DATABASE=$WEBWORKROOT/conf/database.conf
CONFIG_DEVEL=$WEBWORKROOT/conf/devel.apache-config
CONFIG_DEVEL_SITE=$WEBWORKROOT/conf/devel-site.apache-config
Expand Down
28 changes: 10 additions & 18 deletions conf/README
Original file line number Diff line number Diff line change
@@ -1,34 +1,26 @@
Use the prelocal.conf and postlocal.conf files to make modifications.
Use the site.conf and localOverrides.conf files to make modifications.

The prelocal.conf file is read before the global.conf.dist file is processed. Non-local variables in this file
are then available for use in global.conf.dist.
site.conf contains global variables which are required for basic configuration.
defaults.config contains initial settings for many customizable options in WeBWorK. Do not edit defaults.config! It will be overridden next time you upgrade.

The postlocal.conf file is read after the global.conf.dist file is processed and will overright configurations in global.conf.dist
The localOverrides.conf file is read after the defaults.config file is processed and will overwrite configurations in defaults.config. Use this file to make changes to the settings in defaults.config, as it will be left alone when you upgrade.

This new configuration system should greatly simplify the process of
updating webwork2 since it is less likely
that one will need to modify the config files when upgrading. Default configurations or permissions for
new features will be defined in global.conf.dist and will allow automatic upgrades.

Overrides for these new features can be added later to postlocal.conf
new features will be defined in defaults.config and will allow automatic upgrades. You can override these at any point from localOverrides.conf.

FIRST TIME RECONFIGURATION

COPY prelocal.conf.dist to prelocal.conf.
COPY postlocal.conf.dist to postlocal.conf.
COPY site.conf.dist to site.conf.
COPY localOverrides.conf.dist to localOverrides.conf.

MODIFY prelocal.conf using the data from your global.conf file.
MODIFY site.conf using the data from your global.conf file for the entries contained within site.conf.
In particular you will need to fill in the server name, the
password for the database and any modifications you have made as to the
location of the temporary files directory. Notice that the location of the temporary files directory
is used to define several other related subdirectories, so this modification needs to be made
in prelocal.conf BEFORE the standard global.conf.dist file is read.
locations of various directories.

RENAME global.conf to global.save in order to make sure that the global.conf.dist is read.
Otherwise the global.conf file will be read instead of global.conf.dist and the behavior will be
as with the old system.
UPDATE localOverrides.conf to reflect any local customizations that you had made to global.conf.

INSPECT and possibly modify postlocal.conf to add any further local modifications that you had
made to your global.conf file.


5 changes: 2 additions & 3 deletions conf/authen_LTI.conf.dist
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#############################################################################
# authen_LTI.conf
# Configuration for using LTI authentication.
# To enable this file, uncomment the appropriate lines in localOverrides.conf
#############################################################################

# This first section enables LTI authentication. To enable failover to another
Expand Down Expand Up @@ -36,11 +37,9 @@ $authen{user_module} = [


################################################################################
# LTI Basic Authentication Parameters for global.conf
# LTI Basic Authentication Parameters
################################################################################

# The following parameters should be in global.conf:

################################################################################
# Reasonable Number of Problems for Late Adds to do per day to catch up
################################################################################
Expand Down
4 changes: 2 additions & 2 deletions conf/database.conf.dist
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ database.conf - define standard database layouts
=head1 SYNOPSIS
In global.conf:
In defaults.config:
include "conf/database.conf";
*dbLayout = $dbLayouts{layoutName};
Expand All @@ -34,7 +34,7 @@ used by WeBWorK. For more information on the format of a database layout,
consult the documentation for the WeBWorK::DB module.
A database layout is selected from the list of possible layouts by adding a
line like the one below to the F<global.conf> or F<course.conf> file.
line like the one below to the F<localOverrides.conf> or F<course.conf> file.
$dbLayoutName = "layoutName";
*dbLayout = $dbLayouts{$dbLayoutName};
Expand Down
2 changes: 1 addition & 1 deletion conf/defaults.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
################################################################################
# WeBWorK Online Homework Delivery System
# Copyright © 2000-2007 The WeBWorK Project, http://openwebwork.sf.net/
# $CVSHeader: webwork2/conf/global.conf.dist,v 1.225 2010/05/18 18:03:31 apizer Exp $
# $CVSHeader: webwork2/conf/defaults.config,v 1.225 2010/05/18 18:03:31 apizer Exp $
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of either: (a) the GNU General Public License as published by the
Expand Down
8 changes: 4 additions & 4 deletions conf/localOverrides.conf.dist
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
################################################################################
# WeBWorK Online Homework Delivery System
# Copyright © 2000-2007 The WeBWorK Project, http://openwebwork.sf.net/
# $CVSHeader: webwork2/conf/global.conf.dist,v 1.225 2010/05/18 18:03:31 apizer Exp $
# $CVSHeader: webwork2/conf/localOverrides.conf.dist,v 1.225 2010/05/18 18:03:31 apizer Exp $
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of either: (a) the GNU General Public License as published by the
Expand Down Expand Up @@ -174,7 +174,7 @@ $pg{displayModes} = [
$pg{options}{displayMode} = "images";

################################################################################
# Adding to the macro file search path. (Check with entries in global.conf before overriding)
# Adding to the macro file search path. (Check with entries in defaults.config before overriding)
################################################################################
# The list of directories searched by loadMacros() when it looks for a .pl file
# is defined in defaults.config.
Expand Down Expand Up @@ -227,7 +227,7 @@ $problemDefaults{max_attempts} = -1;
# Temporary hack for displaying the different versions of the editors
################################################################################
# These configurations can be placed in course.conf file to tune the behavior for individual courses
# The items below can be used to override the settings in global.conf.dist
# The items below can be used to override the settings in defaults.config
# One can also use $showeditors{classlisteditor1}=0; to override
# %showeditors = (
# classlisteditor1 => 1,
Expand All @@ -249,7 +249,7 @@ $problemDefaults{max_attempts} = -1;
# Directory for temporary files
################################################################################
# Location of web-accessible temporary files, such as equation images.
# Default which is set in global.conf.dist:
# Default which is set in defaults.config:
#$webworkDirs{htdocs_temp} = "$webworkDirs{htdocs}/tmp";
#$webworkURLs{htdocs_temp} = "$webworkURLs{htdocs}/tmp";

Expand Down
2 changes: 1 addition & 1 deletion conf/site.conf.dist
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
################################################################################
# WeBWorK Online Homework Delivery System
# Copyright © 2000-2007 The WeBWorK Project, http://openwebwork.sf.net/
# $CVSHeader: webwork2/conf/global.conf.dist,v 1.225 2010/05/18 18:03:31 apizer Exp $
# $CVSHeader: webwork2/conf/site.conf.dist,v 1.225 2010/05/18 18:03:31 apizer Exp $
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of either: (a) the GNU General Public License as published by the
Expand Down
2 changes: 1 addition & 1 deletion conf/webwork.apache-config.dist
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ $ENV{WEBWORK_ROOT} = $webwork_dir;
$WeBWorK::SeedCE{webwork_dir} = $webwork_dir;
$WeBWorK::Constants::WEBWORK_DIRECTORY = $webwork_dir;

# This code reads global.conf and extracts the remaining configuration
# This code reads defaults.config and extracts the remaining configuration
# variables. There is no need to modify it.
eval "use lib '$webwork_dir/lib'"; die $@ if $@;
eval "use WeBWorK::CourseEnvironment"; die $@ if $@;
Expand Down
8 changes: 4 additions & 4 deletions conf/webwork.apache2-config.dist
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,18 @@ $WeBWorK::Constants::WEBWORK_DIRECTORY = $webwork_dir;


#################################################################
# The following code reads global.conf and extracts the remaining configuration
# The following code reads defauls.config and extracts the remaining configuration
# variables. There is no need to modify it.
#################################################################

# link to WeBWorK code libraries
eval "use lib '$webwork_dir/lib'"; die $@ if $@;
eval "use WeBWorK::CourseEnvironment"; die $@ if $@;

# grab course environment (by reading webwork2/conf/global.conf)
# grab course environment (by reading webwork2/conf/defaults.config)
my $ce = new WeBWorK::CourseEnvironment({ webwork_dir => $webwork_dir });

# set important configuration variables (from global.conf)
# set important configuration variables (from defaults.config)

my $webwork_url = $ce->{webwork_url}; # e.g. /webwork2
my $pg_dir = $ce->{pg_dir}; # e.g. /opt/webwork/pg
Expand All @@ -83,7 +83,7 @@ my $webwork_courses_dir = $ce->{webwork_courses_dir}; # e.g. /opt/webwork/co
#################################################################
print "webwork.apache2-config: WeBWorK server is starting\n";
print "webwork.apache2-config: WeBWorK root directory set to $webwork_dir in webwork2/conf/webwork.apache2-config\n";
print "webwork.apache2-config: The following locations and urls are set in webwork2/conf/global.conf\n";
print "webwork.apache2-config: The following locations and urls are set in webwork2/conf/site.conf\n";
print "webwork.apache2-config: PG root directory set to $pg_dir\n";
print "webwork.apache2-config: WeBWorK server userID is ", $ce->{server_userID}, "\n";
print "webwork.apache2-config: WeBWorK server groupID is ", $ce->{server_groupID}, "\n";
Expand Down
2 changes: 1 addition & 1 deletion doc/devel/dont-forget
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Image generation alternatives:



global.conf:
defaults.config:
- the "root" of the modperl handler should be sent in from outside
- right now, it's in $webworkURLs{root}

Expand Down
2 changes: 1 addition & 1 deletion lib/WeBWorK/Authen/Cosign.pm
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use base qw/WeBWorK::Authen/;
WeBWorK::Authen::Cosign - Authentication plug in for cosign
to use: include in global.conf or course.conf
to use: include in localOverrides.conf or course.conf
$authen{user_module} = "WeBWorK::Authen::Cosign";
and add /webwork2 or /webwork2/courseName as a CosignProtected
Location
Expand Down
4 changes: 2 additions & 2 deletions lib/WeBWorK/Authen/Shibboleth.pm
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ This is basd on Cosign.pm
For documentation, please refer to http://webwork.maa.org/wiki/External_(Shibboleth)_Authentication
to use: include in global.conf or course.conf
to use: include in localOverrides.conf or course.conf
$authen{user_module} = "WeBWorK::Authen::Shibboleth";
and add /webwork2/courseName as a Shibboleth Protected
Location
if $r->ce->{shiboff} is set for a course, authentication reverts
to standard WeBWorK authentication.
add the following to global.conf to setup the Shibboleth
add the following to localOverrides.conf to setup the Shibboleth
$shibboleth{logout_script} = "/Shibboleth.sso/Logout"?return=".$server_root_url.$webwork_url; # return URL after logout
$shibboleth{session_header} = "Shib-Session-ID"; # the header to identify if there is an existing shibboleth session
Expand Down
2 changes: 1 addition & 1 deletion lib/WeBWorK/Authz.pm
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ the contents of the %permissionLevels hash in the course environment.
%permissionLevels maps text strings describing activities to numeric permission
levels. The definitive list of activities is contained in the default version of
%permissionLevels, in the file F<conf/global.conf.dist>.
%permissionLevels, in the file F<conf/defaults.config>.
A user is able to engage in an activity if their permission level is greater
than or equal to the level associated with the activity. If the level associated
Expand Down
4 changes: 2 additions & 2 deletions lib/WeBWorK/ContentGenerator.pm
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ sub content {
#$ce->{webworkURLs}->{stylesheet} = ($ce->{webworkURLs}->{htdocs})."/css/$theme.css"; # reset the style sheet
# the line above is clever -- but I think it is better to link directly to the style sheet from the system.template
# then the link between template and css is made in .template file instead of hard coded as above
# this means that the {stylesheet} option in global.conf is never used
# this means that the {stylesheet} option in defaults.config is never used
my $template = $self->can("templateName") ? $self->templateName : $ce->{defaultThemeTemplate};
my $templateFile = "$themesDir/$theme/$template.template";

Expand Down Expand Up @@ -992,7 +992,7 @@ sub footer(){
my $self = shift;
my $r = $self->r;
my $ce = $r->ce;
my $version = $ce->{WW_VERSION}||"unknown -- set version in global.conf.dist";
my $version = $ce->{WW_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 &#169; $copyright_years", "| version: $version |", CGI::a({-href=>"http://webwork.maa.org/"}, $r->maketext("The WeBWorK Project"), ));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ use constant DELETED => (1 << 3);
use constant MOVED => (1 << 4);

## for additional problib buttons
my %problib; ## filled in in global.conf
my %problib; ## This is configured in defaults.config
my %ignoredir = (
'.' => 1, '..' => 1, 'Library' => 1, 'CVS' => 1, 'tmpEdit' => 1,
'headers' => 1, 'macros' => 1, 'email' => 1, '.svn' => 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ use constant LIB2_DATA => {
};

## for additional problib buttons
my %problib; ## filled in in global.conf
my %problib; ## This is configured in defaults.conf
my %ignoredir = (
'.' => 1, '..' => 1, 'Library' => 1, 'CVS' => 1, 'tmpEdit' => 1,
'headers' => 1, 'macros' => 1, 'email' => 1, '.svn' => 1,
Expand Down
4 changes: 2 additions & 2 deletions lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ use Fcntl;

###########################################################
# This editor will edit problem files or set header files or files, such as course_info
# whose name is defined in the global.conf database
# whose name is defined in the defaults.config file
#
# Only files under the template directory ( or linked to this location) can be edited.
#
Expand Down Expand Up @@ -92,7 +92,7 @@ use Fcntl;
#
# file_type eq 'blank_problem'
# This is a special call which allows one to create and edit a new PG problem. The "stationery" source for this problem is
# stored in the conf/snippets directory and defined in global.conf by $webworkFiles{screenSnippets}{blankProblem}
# stored in the conf/snippets directory and defined in defauls.config by $webworkFiles{screenSnippets}{blankProblem}
#############################################################
# Requested actions -- these and the file_type determine the state of the module
# Save ---- action = save
Expand Down
4 changes: 2 additions & 2 deletions lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor2.pm
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ use Fcntl;

###########################################################
# This editor will edit problem files or set header files or files, such as course_info
# whose name is defined in the global.conf database
# whose name is defined in the defaults.config file
#
# Only files under the template directory ( or linked to this location) can be edited.
#
Expand Down Expand Up @@ -92,7 +92,7 @@ use Fcntl;
#
# file_type eq 'blank_problem'
# This is a special call which allows one to create and edit a new PG problem. The "stationery" source for this problem is
# stored in the conf/snippets directory and defined in global.conf by $webworkFiles{screenSnippets}{blankProblem}
# stored in the conf/snippets directory and defined in defaults.config by $webworkFiles{screenSnippets}{blankProblem}
#############################################################
# Requested actions -- these and the file_type determine the state of the module
# Save ---- action = save
Expand Down
Loading

0 comments on commit 987ec8f

Please sign in to comment.