| 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.25 2004/08/18 01:41:39 sh002i Exp $ |
4 | # $CVSHeader: webwork2/lib/WeBWorK/ContentGenerator/CourseAdmin.pm,v 1.26 2004/08/31 01:15:53 dpvc 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. |
| … | |
… | |
| 182 | |
182 | |
| 183 | sub content { |
183 | sub content { |
| 184 | my ($self) = @_; |
184 | my ($self) = @_; |
| 185 | my $method_to_call = $self->{method_to_call}; |
185 | my $method_to_call = $self->{method_to_call}; |
| 186 | if (defined $method_to_call and $method_to_call eq "do_export_database") { |
186 | if (defined $method_to_call and $method_to_call eq "do_export_database") { |
| 187 | print "<!-- Ϸĩ½ōú -->\n"; |
187 | print "<!-- ؆˸͖۵ -->\n"; |
| 188 | print "<!-- Those were some high-bit characters to convince Safari that we really do want this saved as a file. -->\n"; |
188 | print "<!-- Those were some high-bit characters to convince Safari that we really do want this saved as a file. -->\n"; |
| 189 | $self->do_export_database; |
189 | $self->do_export_database; |
| 190 | } else { |
190 | } else { |
| 191 | $self->SUPER::content; |
191 | $self->SUPER::content; |
| 192 | } |
192 | } |
| … | |
… | |
| 795 | print CGI::p( |
795 | print CGI::p( |
| 796 | "If the course's database layout (indicated in parentheses above) is " |
796 | "If the course's database layout (indicated in parentheses above) is " |
| 797 | . CGI::b("sql") . ", supply the SQL connections information requested below." |
797 | . CGI::b("sql") . ", supply the SQL connections information requested below." |
| 798 | ); |
798 | ); |
| 799 | |
799 | |
| 800 | print CGI::start_table({class=>"FormLayout"}); |
800 | print CGI::start_table({class=>"FormLayout"}); |
| 801 | print CGI::Tr(CGI::td({colspan=>2}, |
801 | print CGI::Tr(CGI::td({colspan=>2}, |
| 802 | "Enter the user ID and password for an SQL account with sufficient permissions to delete an existing database." |
802 | "Enter the user ID and password for an SQL account with sufficient permissions to delete an existing database." |
| 803 | ) |
803 | ) |
| 804 | ); |
804 | ); |
| 805 | print CGI::Tr( |
805 | print CGI::Tr( |
| 806 | CGI::th({class=>"LeftHeader"}, "SQL Admin Username:"), |
806 | CGI::th({class=>"LeftHeader"}, "SQL Admin Username:"), |
| 807 | CGI::td(CGI::textfield("delete_sql_username", $delete_sql_username, 25)), |
807 | CGI::td(CGI::textfield("delete_sql_username", $delete_sql_username, 25)), |
| 808 | ); |
808 | ); |
| 809 | print CGI::Tr( |
809 | print CGI::Tr( |
| 810 | CGI::th({class=>"LeftHeader"}, "SQL Admin Password:"), |
810 | CGI::th({class=>"LeftHeader"}, "SQL Admin Password:"), |
| 811 | CGI::td(CGI::password_field("delete_sql_password", $delete_sql_password, 25)), |
811 | CGI::td(CGI::password_field("delete_sql_password", $delete_sql_password, 25)), |
| 812 | ); |
812 | ); |
| 813 | |
813 | |
| 814 | #print CGI::Tr(CGI::td({colspan=>2}, |
814 | #print CGI::Tr(CGI::td({colspan=>2}, |
| 815 | # "The optionial SQL settings you enter below must match the settings in the DBI source" |
815 | # "The optionial SQL settings you enter below must match the settings in the DBI source" |
| 816 | # . " specification " . CGI::tt($dbi_source) . ". Replace " . CGI::tt("COURSENAME") |
816 | # . " specification " . CGI::tt($dbi_source) . ". Replace " . CGI::tt("COURSENAME") |
| 817 | # . " with the course name you entered above." |
817 | # . " with the course name you entered above." |
| 818 | # ) |
818 | # ) |
| 819 | #); |
819 | #); |
| 820 | print CGI::Tr( |
820 | print CGI::Tr( |
| 821 | CGI::th({class=>"LeftHeader"}, "SQL Server Host:"), |
821 | CGI::th({class=>"LeftHeader"}, "SQL Server Host:"), |
| 822 | CGI::td( |
822 | CGI::td( |
| 823 | CGI::textfield("delete_sql_host", $delete_sql_host, 25), |
823 | CGI::textfield("delete_sql_host", $delete_sql_host, 25), |
| 824 | CGI::br(), |
824 | CGI::br(), |
| 825 | CGI::small("Leave blank to use the default host."), |
825 | CGI::small("Leave blank to use the default host."), |
| 826 | ), |
826 | ), |
| 827 | ); |
827 | ); |
| 828 | print CGI::Tr( |
828 | print CGI::Tr( |
| 829 | CGI::th({class=>"LeftHeader"}, "SQL Server Port:"), |
829 | CGI::th({class=>"LeftHeader"}, "SQL Server Port:"), |
| 830 | CGI::td( |
830 | CGI::td( |
| 831 | CGI::textfield("delete_sql_port", $delete_sql_port, 25), |
831 | CGI::textfield("delete_sql_port", $delete_sql_port, 25), |
| 832 | CGI::br(), |
832 | CGI::br(), |
| 833 | CGI::small("Leave blank to use the default port."), |
833 | CGI::small("Leave blank to use the default port."), |
| 834 | ), |
834 | ), |
| 835 | ); |
835 | ); |
| 836 | |
836 | |
| 837 | print CGI::Tr( |
837 | print CGI::Tr( |
| 838 | CGI::th({class=>"LeftHeader"}, "SQL Database Name:"), |
838 | CGI::th({class=>"LeftHeader"}, "SQL Database Name:"), |
| 839 | CGI::td( |
839 | CGI::td( |
| 840 | CGI::textfield("delete_sql_database", $delete_sql_database, 25), |
840 | CGI::textfield("delete_sql_database", $delete_sql_database, 25), |
| 841 | CGI::br(), |
841 | CGI::br(), |
| 842 | CGI::small("Leave blank to use the name ", CGI::tt("webwork_COURSENAME"), "."), |
842 | CGI::small("Leave blank to use the name ", CGI::tt("webwork_COURSENAME"), "."), |
| 843 | ), |
843 | ), |
| 844 | ); |
844 | ); |
| 845 | print CGI::end_table(); |
845 | print CGI::end_table(); |
| 846 | |
846 | |
| 847 | print CGI::p({style=>"text-align: center"}, CGI::submit("delete_course", "Delete Course")); |
847 | print CGI::p({style=>"text-align: center"}, CGI::submit("delete_course", "Delete Course")); |
| 848 | |
848 | |
| 849 | print CGI::end_form(); |
849 | print CGI::end_form(); |
| 850 | } |
850 | } |