| 1 | ################################################################################ |
1 | ################################################################################ |
| 2 | # WeBWorK Online Homework Delivery System |
2 | # WeBWorK Online Homework Delivery System |
| 3 | # Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/ |
3 | # Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/ |
| 4 | # $CVSHeader: webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm,v 1.26 2004/03/23 22:59:53 sh002i Exp $ |
4 | # $CVSHeader: webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm,v 1.29 2004/05/06 21:53:41 jj Exp $ |
| 5 | # |
5 | # |
| 6 | # This program is free software; you can redistribute it and/or modify it under |
6 | # This program is free software; you can redistribute it and/or modify it under |
| 7 | # the terms of either: (a) the GNU General Public License as published by the |
7 | # the terms of either: (a) the GNU General Public License as published by the |
| 8 | # Free Software Foundation; either version 2, or (at your option) any later |
8 | # Free Software Foundation; either version 2, or (at your option) any later |
| 9 | # version, or (b) the "Artistic License" which comes with this package. |
9 | # version, or (b) the "Artistic License" which comes with this package. |
| … | |
… | |
| 136 | my $problemNumber = $r->urlpath->arg("problemID"); |
136 | my $problemNumber = $r->urlpath->arg("problemID"); |
| 137 | |
137 | |
| 138 | # if we got to initialize(), then saveFileChanges was not called in pre_header_initialize(). |
138 | # if we got to initialize(), then saveFileChanges was not called in pre_header_initialize(). |
| 139 | # therefore we call it here: |
139 | # therefore we call it here: |
| 140 | $self->saveFileChanges($setName, $problemNumber); |
140 | $self->saveFileChanges($setName, $problemNumber); |
|
|
141 | } |
|
|
142 | |
|
|
143 | sub title { |
|
|
144 | my $self = shift; |
|
|
145 | my $r = $self->r; |
|
|
146 | my $problemNumber = $r->urlpath->arg("problemID"); |
|
|
147 | my $file_type = $self->{'file_type'} || ''; |
|
|
148 | return "Set Header" if($file_type eq 'set_header'); |
|
|
149 | return "Course Information" if($file_type eq 'course_info'); |
|
|
150 | return 'Problem ' . $r->{urlpath}->name; |
| 141 | } |
151 | } |
| 142 | |
152 | |
| 143 | sub body { |
153 | sub body { |
| 144 | my ($self) = @_; |
154 | my ($self) = @_; |
| 145 | my $r = $self->r; |
155 | my $r = $self->r; |