| 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/CourseAdmin.pm,v 1.22 2004/06/24 20:54:52 sh002i Exp $ |
4 | # $CVSHeader: webwork-modperl/lib/WeBWorK/ContentGenerator/CourseAdmin.pm,v 1.23 2004/07/10 16:06:59 sh002i 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. |
| … | |
… | |
| 161 | $self->SUPER::header; |
161 | $self->SUPER::header; |
| 162 | } |
162 | } |
| 163 | } |
163 | } |
| 164 | |
164 | |
| 165 | # sends: |
165 | # sends: |
|
|
166 | # |
| 166 | # HTTP/1.1 200 OK |
167 | # HTTP/1.1 200 OK |
| 167 | # Date: Fri, 09 Jul 2004 19:05:55 GMT |
168 | # Date: Fri, 09 Jul 2004 19:05:55 GMT |
| 168 | # Server: Apache/1.3.27 (Unix) mod_perl/1.27 |
169 | # Server: Apache/1.3.27 (Unix) mod_perl/1.27 |
| 169 | # Content-Disposition: attachment; filename="mth143_database.xml" |
170 | # Content-Disposition: attachment; filename="mth143_database.xml" |
| 170 | # Connection: close |
171 | # Connection: close |
| … | |
… | |
| 172 | |
173 | |
| 173 | sub content { |
174 | sub content { |
| 174 | my ($self) = @_; |
175 | my ($self) = @_; |
| 175 | my $method_to_call = $self->{method_to_call}; |
176 | my $method_to_call = $self->{method_to_call}; |
| 176 | if (defined $method_to_call and $method_to_call eq "do_export_database") { |
177 | if (defined $method_to_call and $method_to_call eq "do_export_database") { |
|
|
178 | print "<!-- Ϸĩ½ōú -->\n"; |
|
|
179 | print "<!-- Those were some high-bit characters to convince Safari that we really do want this saved as a file. -->\n"; |
| 177 | $self->do_export_database; |
180 | $self->do_export_database; |
| 178 | } else { |
181 | } else { |
| 179 | $self->SUPER::content; |
182 | $self->SUPER::content; |
| 180 | } |
183 | } |
| 181 | } |
184 | } |