Skip to content

Commit d5f2eb7

Browse files
committed
fix a small bug in code from PR 1018, which prevented course/system wide changes from working if not problem specific css file load was in use
1 parent b0e0c7f commit d5f2eb7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/WeBWorK/ContentGenerator/Problem.pm

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2285,7 +2285,10 @@ sub output_CSS {
22852285
# or via a setting of $ce->{pg}->{specialPGEnvironmentVars}->{extra_css_files}
22862286
# which can be set in course.conf (the value should be an anon array).
22872287
my $pg = $self->{pg};
2288-
if ( defined( $pg->{flags}{extra_css_files} ) ) {
2288+
if ( defined( $pg->{flags}{extra_css_files} ) ||
2289+
( defined( $ce->{pg}->{specialPGEnvironmentVars}->{extra_css_files} ) &&
2290+
scalar( @{$ce->{pg}->{specialPGEnvironmentVars}->{extra_css_files}} ) > 0 )
2291+
) {
22892292
my $baseDir = $ce->{webwork_htdocs_url};
22902293
my $webwork_dir = $WeBWorK::Constants::WEBWORK_DIRECTORY;
22912294
my $cssFile;

0 commit comments

Comments
 (0)