--- loncom/interface/loncreatecourse.pm 2005/01/20 16:30:52 1.75
+++ loncom/interface/loncreatecourse.pm 2005/04/07 06:56:23 1.78
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Create a course
#
-# $Id: loncreatecourse.pm,v 1.75 2005/01/20 16:30:52 albertel Exp $
+# $Id: loncreatecourse.pm,v 1.78 2005/04/07 06:56:23 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -86,7 +86,7 @@ sub readfile {
# ============================================================ Write a userfile
sub writefile {
- (my $courseid, my $which,$ENV{'form.output'})=@_;
+ (my $courseid, my $which,$env{'form.output'})=@_;
my %crsdata=&Apache::lonnet::coursedescription($courseid);
return &Apache::lonnet::finishuserfileupload(
$crsdata{'num'},$crsdata{'domain'},
@@ -238,7 +238,7 @@ sub copycoursefiles {
sub print_course_creation_page {
my $r=shift;
- my $defdom=$ENV{'request.role.domain'};
+ my $defdom=$env{'request.role.domain'};
my %host_servers = &Apache::loncommon::get_library_servers($defdom);
my $course_home = '
$lt{'irsp'}
@@ -547,11 +557,6 @@ $lt{'nccl'}
-
-
@@ -567,8 +572,8 @@ ENDDOCUMENT
sub create_course {
my $r=shift;
- my $ccuname=$ENV{'form.ccuname'};
- my $ccdomain=$ENV{'form.ccdomain'};
+ my $ccuname=$env{'form.ccuname'};
+ my $ccdomain=$env{'form.ccdomain'};
$ccuname=~s/\W//g;
$ccdomain=~s/\W//g;
@@ -580,26 +585,27 @@ sub create_course {
my $autharg;
my $authtype;
- if ($ENV{'form.login'} eq 'krb') {
+ if ($env{'form.login'} eq 'krb') {
$authtype = 'krb';
- $authtype .=$ENV{'form.krbver'};
- $autharg = $ENV{'form.krbarg'};
- } elsif ($ENV{'form.login'} eq 'int') {
+ $authtype .=$env{'form.krbver'};
+ $autharg = $env{'form.krbarg'};
+ } elsif ($env{'form.login'} eq 'int') {
$authtype ='internal';
- if ((defined($ENV{'form.intarg'})) && ($ENV{'form.intarg'})) {
- $autharg = $ENV{'form.intarg'};
+ if ((defined($env{'form.intarg'})) && ($env{'form.intarg'})) {
+ $autharg = $env{'form.intarg'};
}
- } elsif ($ENV{'form.login'} eq 'loc') {
+ } elsif ($env{'form.login'} eq 'loc') {
$authtype = 'localauth';
- if ((defined($ENV{'form.locarg'})) && ($ENV{'form.locarg'})) {
- $autharg = $ENV{'form.locarg'};
+ if ((defined($env{'form.locarg'})) && ($env{'form.locarg'})) {
+ $autharg = $env{'form.locarg'};
}
}
my $logmsg;
+ my $html=&Apache::lonxml::xmlbegin();
my $bodytag=&Apache::loncommon::bodytag('Create a New Course');
$r->print(<
+$html
The LearningOnline Network with CAPA
@@ -609,38 +615,39 @@ ENDENHEAD
my $args = {
ccuname => $ccuname,
ccdomain => $ccdomain,
- cdescr => $ENV{'form.title'},
- curl => $ENV{'form.topmap'},
- course_domain => $ENV{'request.role.domain'},
- course_home => $ENV{'form.course_home'},
- nonstandard => $ENV{'form.nonstandard'},
- crscode => $ENV{'form.crscode'},
- clonecourse => $ENV{'form.clonecourse'},
- clonedomain => $ENV{'form.clonedomain'},
- crsid => $ENV{'form.crsid'},
- curruser => $ENV{'user.name'},
- crssections => $ENV{'form.crssections'},
- crsxlist => $ENV{'form.crsxlist'},
- autoadds => $ENV{'form.autoadds'},
- autodrops => $ENV{'form.autodrops'},
- notify => $ENV{'form.notify'},
- no_end_date => $ENV{'form.no_end_date'},
- showphotos => $ENV{'form.showphotos'},
+ cdescr => $env{'form.title'},
+ curl => $env{'form.topmap'},
+ course_domain => $env{'request.role.domain'},
+ course_home => $env{'form.course_home'},
+ nonstandard => $env{'form.nonstandard'},
+ crscode => $env{'form.crscode'},
+ clonecourse => $env{'form.clonecourse'},
+ clonedomain => $env{'form.clonedomain'},
+ crsid => $env{'form.crsid'},
+ curruser => $env{'user.name'},
+ crssections => $env{'form.crssections'},
+ crsxlist => $env{'form.crsxlist'},
+ autoadds => $env{'form.autoadds'},
+ autodrops => $env{'form.autodrops'},
+ notify_owner => $env{'form.notify_owner'},
+ notify_dc => $env{'form.notify_dc'},
+ no_end_date => $env{'form.no_end_date'},
+ showphotos => $env{'form.showphotos'},
authtype => $authtype,
autharg => $autharg,
enrollstart => $enrollstart,
enrollend => $enrollend,
startaccess => $startaccess,
endaccess => $endaccess,
- setpolicy => $ENV{'form.setpolicy'},
- setcontent => $ENV{'form.setcontent'},
- reshome => $ENV{'form.reshome'},
- setkeys => $ENV{'form.setkeys'},
- keyauth => $ENV{'form.keyauth'},
- disresdis => $ENV{'form.disresdis'},
- disablechat => $ENV{'form.disablechat'},
- openall => $ENV{'form.openall'},
- firstres => $ENV{'form.firstres'}
+ setpolicy => $env{'form.setpolicy'},
+ setcontent => $env{'form.setcontent'},
+ reshome => $env{'form.reshome'},
+ setkeys => $env{'form.setkeys'},
+ keyauth => $env{'form.keyauth'},
+ disresdis => $env{'form.disresdis'},
+ disablechat => $env{'form.disablechat'},
+ openall => $env{'form.openall'},
+ firstres => $env{'form.firstres'}
};
#
@@ -662,33 +669,24 @@ ENDENHEAD
}
# Check the proposed home server for the course
my %host_servers = &Apache::loncommon::get_library_servers
- ($ENV{'request.role.domain'});
- if (! exists($host_servers{$ENV{'form.course_home'}})) {
+ ($env{'request.role.domain'});
+ if (! exists($host_servers{$env{'form.course_home'}})) {
$r->print(&mt('Invalid home server for course').': '.
- $ENV{'form.course_home'}.'