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

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

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

Revision 2103 Revision 2104
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.8 2004/05/07 23:13:44 sh002i Exp $ 4# $CVSHeader: webwork-modperl/lib/WeBWorK/ContentGenerator/CourseAdmin.pm,v 1.9 2004/05/08 02:01:13 gage 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.
302 CGI::th({class=>"LeftHeader"}, "SQL Admin Password:"), 302 CGI::th({class=>"LeftHeader"}, "SQL Admin Password:"),
303 CGI::td(CGI::password_field("add_sql_password", $add_sql_password, 25)), 303 CGI::td(CGI::password_field("add_sql_password", $add_sql_password, 25)),
304 ); 304 );
305 print CGI::Tr( 305 print CGI::Tr(
306 CGI::th({class=>"LeftHeader"}, "SQL Database Name:"), 306 CGI::th({class=>"LeftHeader"}, "SQL Database Name:"),
307 CGI::td(
307 CGI::td(CGI::textfield("add_sql_database", $add_sql_database, 25)), 308 CGI::textfield("add_sql_database", $add_sql_database, 25),
309 CGI::br(),
310 CGI::small("Leave blank to use the name ", CGI::tt("webwork_COURSENAME"), "."),
311 ),
308 ); 312 );
309 print CGI::Tr( 313 print CGI::Tr(
310 CGI::th({class=>"LeftHeader"}, "WeBWorK Host:"), 314 CGI::th({class=>"LeftHeader"}, "WeBWorK Host:"),
311 CGI::td( 315 CGI::td(
312 CGI::textfield("add_sql_wwhost", $add_sql_wwhost || "localhost", 25), 316 CGI::textfield("add_sql_wwhost", $add_sql_wwhost || "localhost", 25),
378 push @errors, "You must select a database layout."; 382 push @errors, "You must select a database layout.";
379 } else { 383 } else {
380 if (exists $ce->{dbLayouts}->{$add_dbLayout}) { 384 if (exists $ce->{dbLayouts}->{$add_dbLayout}) {
381 if ($add_dbLayout eq "sql") { 385 if ($add_dbLayout eq "sql") {
382 push @errors, "You must specify the SQL admin username." if $add_sql_username eq ""; 386 push @errors, "You must specify the SQL admin username." if $add_sql_username eq "";
383 push @errors, "You must specify the SQL admin password." if $add_sql_password eq ""; 387 #push @errors, "You must specify the SQL admin password." if $add_sql_password eq "";
384 push @errors, "You must specify the SQL confirm_delete_course." if $add_sql_database eq ""; 388 #push @errors, "You must specify the SQL database name." if $add_sql_database eq "";
385 push @errors, "You must specify the WeBWorK host." if $add_sql_wwhost eq ""; 389 push @errors, "You must specify the WeBWorK host." if $add_sql_wwhost eq "";
386 } elsif ($add_dbLayout eq "gdbm") { 390 } elsif ($add_dbLayout eq "gdbm") {
387 push @errors, "You must specify the GDBM global user ID." if $add_gdbm_globalUserID eq ""; 391 push @errors, "You must specify the GDBM global user ID." if $add_gdbm_globalUserID eq "";
388 } 392 }
389 } else { 393 } else {
434 if ($add_dbLayout eq "sql") { 438 if ($add_dbLayout eq "sql") {
435 $dbOptions{host} = $add_sql_host if $add_sql_host ne ""; 439 $dbOptions{host} = $add_sql_host if $add_sql_host ne "";
436 $dbOptions{port} = $add_sql_port if $add_sql_port ne ""; 440 $dbOptions{port} = $add_sql_port if $add_sql_port ne "";
437 $dbOptions{username} = $add_sql_username; 441 $dbOptions{username} = $add_sql_username;
438 $dbOptions{password} = $add_sql_password; 442 $dbOptions{password} = $add_sql_password;
439 $dbOptions{database} = $add_sql_database; 443 $dbOptions{database} = $add_sql_database || "webwork_$add_courseID";
440 $dbOptions{wwhost} = $add_sql_wwhost; 444 $dbOptions{wwhost} = $add_sql_wwhost;
441 } 445 }
442 446
443 my @users; 447 my @users;
444 if ($add_initial_userID ne "") { 448 if ($add_initial_userID ne "") {

Legend:
Removed from v.2103  
changed lines
  Added in v.2104

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9