[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 1169 Revision 1225
14use strict; 14use strict;
15use warnings; 15use warnings;
16use Apache::Constants qw(:common); 16use Apache::Constants qw(:common);
17use CGI qw(); 17use CGI qw();
18use URI::Escape; 18use URI::Escape;
19use WeBWorK::Authz;
19use WeBWorK::DB; 20use WeBWorK::DB;
20use WeBWorK::Utils qw(readFile); 21use WeBWorK::Utils qw(readFile);
21use WeBWorK::Authz;
22 22
23################################################################################ 23################################################################################
24# This is a very unruly file, so I'm going to use very large comments to divide 24# This is a very unruly file, so I'm going to use very large comments to divide
25# it into logical sections. 25# it into logical sections.
26################################################################################ 26################################################################################
65# * any "template escapes" defined in the system template and supported by 65# * any "template escapes" defined in the system template and supported by
66# the subclass. Generic implementations of &title and &body are provided. 66# the subclass. Generic implementations of &title and &body are provided.
67# 67#
68sub go { 68sub go {
69 my $self = shift; 69 my $self = shift;
70
70 my $r = $self->{r}; 71 my $r = $self->{r};
71 my $courseEnvironment = $self->{ce}; 72 my $courseEnvironment = $self->{ce};
72 73
73 $self->pre_header_initialize(@_) if $self->can("pre_header_initialize"); 74 $self->pre_header_initialize(@_) if $self->can("pre_header_initialize");
74 $self->header(@_); 75 $self->header(@_);
75 return OK if $r->header_only; 76 return OK if $r->header_only;
76 77
77 $self->initialize(@_) if $self->can("initialize"); 78 $self->initialize(@_) if $self->can("initialize");
78 $self->template($courseEnvironment->{templates}->{system}, @_); 79 $self->template($courseEnvironment->{templates}->{system}, @_);
79 80
80 return OK; 81 return OK;
81} 82}
82 83
83# template(STRING, @otherArguments) - parse a template, looking for escapes of 84# template(STRING, @otherArguments) - parse a template, looking for escapes of
84# the form <!--#NAME ARG1="FOO" ARG2="BAR"--> and calling a member function NAME 85# the form <!--#NAME ARG1="FOO" ARG2="BAR"--> and calling a member function NAME

Legend:
Removed from v.1169  
changed lines
  Added in v.1225

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9