Header Files More Information
There are two PG header files, the set header and the hardcopy header. The set header is displayed on the homework set screen to the right of the problem list. The hardcopy header is included in hardcopy output at the start of the problem set.
See Site Info, Login Info, Course Info for information on customizable files which are used to display information for the whole WeBWorK site, on a course login page and on a course front page.
In current versions of WeBWorK the default is to use the same file for both headers, webwork2/conf/snippets/setHeader.pg
. This file is designed so that is renders in both HTML-based display modes (when used onscreen) and TeX mode (when used in hardcopy). However, some people prefer to use separate files since the information given, while often similar, is usually different (e.g. you probably want to list the Student Name on the hardcopy output, but not onscreen) and the output formats are different. Also while some people are happy using the default headers that come with the WeBWorK system, most will want to write either a default header to use with all their assignments or to write different headers for each assignment. We explain these options below.
Default settings in the global.conf
file
Usually global.conf
is found in the /opt/webwork/webwork2/conf
directory. This file is only editable by a WeBWorK administrator. The relevant pieces of code in global.conf
are:
# The setHeader preceeds each set in hardcopy output. It is a PG file. # This is the default file which is used if a specific files is not selected $webworkFiles{hardcopySnippets}{setHeader} = "$webworkDirs{conf}/snippets/setHeader.pg"; # hardcopySetHeader.pg", #$webworkFiles{hardcopySnippets}{setHeader} = "$courseDirs{templates}/ASimpleHardCopyHeaderFile.pg"; # An alternate default header file
and
# The set header is displayed on the problem set page. It is a PG file. # This is the default file which is used if a specific files is not selected $webworkFiles{screenSnippets}{setHeader} = "$webworkDirs{conf}/snippets/setHeader.pg"; # screenSetHeader.pg" #$webworkFiles{screenSnippets}{setHeader} = "$courseDirs{templates}/ASimpleScreenHeaderFile.pg"; # An alternate default header file
Either header file can be overridden on a per-homework set basis. To do so, go to the Hmwk Set Editor and click the number of problems to the right of the homework set name.
These two configuration variables control the site-wide defaults:
- hardcopy header
- Variable:
$webworkFiles{hardcopySnippets}{setHeader}
- Default file:
conf/snippets/setHeader.pg
- set header
- Variable:
$webworkFiles{screenSnippets}{setHeader}
- Default file:
conf/snippets/setHeader.pg
You can change the values of these variables in global.conf
or override them in course.conf
for a particular course.