--- loncom/interface/lonmodifycourse.pm 2006/02/10 23:36:47 1.21 +++ loncom/interface/lonmodifycourse.pm 2006/07/18 21:52:01 1.27 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # automated enrollment course setup handler # -# $Id: lonmodifycourse.pm,v 1.21 2006/02/10 23:36:47 albertel Exp $ +# $Id: lonmodifycourse.pm,v 1.27 2006/07/18 21:52:01 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -35,6 +35,7 @@ use Apache::lonlocal; use Apache::londropadd; use LONCAPA::Enrollment; use lib '/home/httpd/lib/perl'; +use LONCAPA; sub print_course_selection_page { my ($r,$tasklongref) = @_; @@ -50,7 +51,7 @@ sub print_course_selection_page { ); # Determine the courses - my %courseIDs = &Apache::lonnet::courseiddump($dom,'.',1,'.','.','.'); + my %courseIDs = &Apache::lonnet::courseiddump($dom,'.',1,'.','.','.',undef,undef,'.'); &print_header($r,$tasklongref); $r->print(< @@ -61,8 +62,8 @@ sub print_course_selection_page {

$lt{'ccrs'}: "; + $ownertable .= ""; } else { $ownertable .= ""; } @@ -531,7 +563,7 @@ sub modify_course { } } if ($changeowner == 1 || $changecode == 1) { - my $courseid_entry = &Apache::lonnet::escape($dom.'_'.$crs).'='.&Apache::lonnet::escape($description).':'.&Apache::lonnet::escape($env{'form.coursecode'}).':'.&Apache::lonnet::escape($env{'form.courseowner'}); + my $courseid_entry = &escape($dom.'_'.$crs).'='.&escape($description).':'.&escape($env{'form.coursecode'}).':'.&escape($env{'form.courseowner'}); &Apache::lonnet::courseidput($dom,$courseid_entry,&Apache::lonnet::homeserver($crs,$dom)); } @@ -645,7 +677,6 @@ sub modify_course { sub print_header { my ($r,$tasklongref,$description,$javascriptref) = @_; my %lt =&Apache::lonlocal::texthash( - 'vmcs' => 'View/Modify Course Settings', 'chco' => 'Choose a course', 'main' => 'Main Menu', 'comg' => 'Course Manager', @@ -658,7 +689,7 @@ sub print_header { $description = $lt{'comg'}; } my $page = ''; - my $bodytag=&Apache::loncommon::bodytag($lt{'vmcs'}); + if ($action eq 'start') { $page = "$lt{'chco'}"; } else { @@ -670,21 +701,16 @@ sub print_header { $page .= " -> ".$$tasklongref{$action}.""; } } - my $html=&Apache::lonxml::xmlbegin(); - $r->print(" -$html - -"); + + my $js; if ($action eq 'display') { - $r->print(" -"); + $js = ''; } + $r->print(&Apache::loncommon::start_page('View/Modify Course Settings', + $js)); $r->print(<The LearningOnline Network with CAPA - -$bodytag
@@ -700,18 +726,14 @@ ENDTHIS } sub print_footer { - my $r = shift; - $r->print(< - - -ENDBASE + my ($r) = @_; + $r->print('
'.&Apache::loncommon::end_page()); return; } sub check_course { my ($dom,$course) = @_; - my %courseIDs = &Apache::lonnet::courseiddump($dom,'.',1,'.','.','.'); + my %courseIDs = &Apache::lonnet::courseiddump($dom,'.',1,'.','.','.',undef,undef,'.'); foreach my $key (sort keys %courseIDs) { if ($key =~ m/^($dom)_(\w+)$/) { if ($2 eq $course) { @@ -747,7 +769,7 @@ sub handler { 'default_enrollment_start_date' => 'Date of first student access', 'default_enrollment_end_date' => 'Date of last student access', 'coursecode' => 'Official course code', - 'courseowner' => "Username of course owner (\@$dom)", + 'courseowner' => "Username:domain of course owner", 'notifylist' => 'Course Coordinators to be notified of enrollment changes', 'sectionnums' => 'Course section number(:groupID)', 'crosslistings' => 'Crosslisted class(:groupID)',