diff --git a/conf/defaults.config b/conf/defaults.config index 3b502d49b9..1264c97aa6 100644 --- a/conf/defaults.config +++ b/conf/defaults.config @@ -1101,18 +1101,19 @@ $webservices = { # The items below can be placed in localOverrides.conf override the settings in this file # One can also use $showeditors{classlisteditor1}=0; to override a setting. %showeditors = ( - classlisteditor1 => 1, - classlisteditor2 => 0, + classlisteditor1 => 0, + classlisteditor2 => 1, - homeworkseteditor1 => 1, - homeworkseteditor2 => 0, + homeworkseteditor1 => 0, + homeworkseteditor2 => 1, librarybrowser1 => 1, librarybrowser2 => 0, librarybrowser3 => 0, - pgproblemeditor1 => 1, - pgproblemeditor2 => 0, + pgproblemeditor1 => 0, + pgproblemeditor2 => 1, + pgproblemeditor3 => 1, ); ############################################################################### diff --git a/lib/WeBWorK/ContentGenerator.pm b/lib/WeBWorK/ContentGenerator.pm index 13a5dc45ce..7565742645 100644 --- a/lib/WeBWorK/ContentGenerator.pm +++ b/lib/WeBWorK/ContentGenerator.pm @@ -492,7 +492,20 @@ sub content { # 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"; - + unless (-r $templateFile) { #hack to prevent disaster when missing theme directory + if (-r "$themesDir/math4/$template.template") { + $templateFile = "$themesDir/math4/$template.template"; + warn "Theme $theme is not one of the available themes. ". + "Please check the theme configuration ". + "in the files localOverrides.conf, course.conf and ". + "simple.conf and on the course configuration page.\n" + } else { + die "Neither the theme $theme nor the defaultTheme math4 are available. ". + "Please notify your site administrator that the structure of the ". + "themes directory needs attention."; + + } + } template($templateFile, $self); } @@ -1020,8 +1033,8 @@ sub footer(){ my $self = shift; my $r = $self->r; my $ce = $r->ce; - my $ww_version = $ce->{WW_VERSION}||"unknown -- set ww version in defaults.config"; - my $pg_version = $ce->{PG_VERSION}||"unknown -- set pg version in defaults.config"; + my $ww_version = $ce->{WW_VERSION}||"unknown -- set ww version VERSION"; + my $pg_version = $ce->{PG_VERSION}||"unknown -- set pg version PG_VERSION link to ../pg/VERSION"; my $theme = $ce->{defaultTheme}||"unknown -- set defaultTheme in localOverides.conf"; my $copyright_years = $ce->{WW_COPYRIGHT_YEARS}||"1996-2011"; print CGI::div({-id=>"last-modified"}, $r->maketext("Page generated at [_1]", timestamp($self)));