[system] / trunk / webwork-modperl / lib / WeBWorK / ContentGenerator.pm Repository:
ViewVC logotype

Diff of /trunk/webwork-modperl/lib/WeBWorK/ContentGenerator.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 396 Revision 397
128 128
129# Perform substitution in a template file and print it. This should be called 129# Perform substitution in a template file and print it. This should be called
130# for all content generators that are creating HTML output, and is called by 130# for all content generators that are creating HTML output, and is called by
131# default by the &go method. 131# default by the &go method.
132sub template { 132sub template {
133 my ($self, $templateFile) = @_; 133 my ($self, $templateFile) = (shift, shift);
134 my $r = $self->{r}; 134 my $r = $self->{r};
135 my $courseEnvironment = $self->{courseEnvironment}; 135 my $courseEnvironment = $self->{courseEnvironment};
136 136
137 open(TEMPLATE, $templateFile) or die "Couldn't open template $templateFile"; 137 open(TEMPLATE, $templateFile) or die "Couldn't open template $templateFile";
138 my @template = <TEMPLATE>; 138 my @template = <TEMPLATE>;
162 162
163 $self->pre_header_initialize(@_); 163 $self->pre_header_initialize(@_);
164 $self->header(@_); return OK if $r->header_only; 164 $self->header(@_); return OK if $r->header_only;
165 $self->initialize(@_); 165 $self->initialize(@_);
166 166
167 $self->template($courseEnvironment->{templates}->{system}); 167 $self->template($courseEnvironment->{templates}->{system}, @_);
168 168
169 return OK; 169 return OK;
170} 170}
171 171
1721; 1721;

Legend:
Removed from v.396  
changed lines
  Added in v.397

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9