version 1.8, 2004/06/09 17:01:55
|
version 1.13, 2004/11/23 07:02:32
|
Line 30 use Apache::lonlocal;
|
Line 30 use Apache::lonlocal;
|
use Apache::londropadd; |
use Apache::londropadd; |
use LONCAPA::Enrollment; |
use LONCAPA::Enrollment; |
use lib '/home/httpd/lib/perl'; |
use lib '/home/httpd/lib/perl'; |
use localenroll; |
|
|
|
sub print_course_selection_page { |
sub print_course_selection_page { |
my ($r,$tasklongref) = @_; |
my ($r,$tasklongref) = @_; |
my $dom = $ENV{'user.domain'}; |
my $dom = $ENV{'request.role.domain'}; |
my %lt=&Apache::lonlocal::texthash( |
my %lt=&Apache::lonlocal::texthash( |
'csae' => "Course settings for automated enrollment", |
'csae' => "Course settings for automated enrollment", |
'unst' => "Unlike standard LON-CAPA course parameters, such as course description, feedback addresses, and top level map, which are displayed and/or modified using the 'Course Environment Parameters' screen, settings that control automated enrollment based on classlist data available from your institution's student information system are handled differently. Automated enrollment settings fall into two groups: (a) settings that can be modified by a Course Coordinator using the Automated Enrollment Manager and (b) settings that may only be modified by a Domain Coordinator via the 'View/Modify Course settings' menu accessed from this page.", |
'unst' => "Unlike standard LON-CAPA course parameters, such as course description, feedback addresses, and top level map, which are displayed and/or modified using the 'Course Environment Parameters' screen, settings that control automated enrollment based on classlist data available from your institution's student information system are handled differently. Automated enrollment settings fall into two groups: (a) settings that can be modified by a Course Coordinator using the Automated Enrollment Manager and (b) settings that may only be modified by a Domain Coordinator via the 'View/Modify Course settings' menu accessed from this page.", |
Line 100 ENDBLOCK
|
Line 99 ENDBLOCK
|
unless ($code =~m/^___\d+$/) { $showcode = $code; } |
unless ($code =~m/^___\d+$/) { $showcode = $code; } |
if ($item =~ m/^($dom)_(\w+)$/) { |
if ($item =~ m/^($dom)_(\w+)$/) { |
$crs = $2; |
$crs = $2; |
$description = $courseIDs{$item}; |
if ($courseIDs{$item} =~ /^([^:]*):/) { |
|
$description = &Apache::lonnet::unescape($1); |
|
} else { |
|
$description = &Apache::lonnet::unescape($courseIDs{$item}); |
|
} |
# Get course owner |
# Get course owner |
my %settings = &Apache::lonnet::get('environment',['internal.courseowner'],$dom,$crs); |
my %settings = &Apache::lonnet::get('environment',['internal.courseowner'],$dom,$crs); |
if ( defined($settings{'internal.courseowner'}) ) { |
if ( defined($settings{'internal.courseowner'}) ) { |
Line 126 sub print_course_modification_page {
|
Line 129 sub print_course_modification_page {
|
my %enrollvar = (); |
my %enrollvar = (); |
my $javascript_validations; |
my $javascript_validations; |
my $course = ''; |
my $course = ''; |
my $dom = $ENV{'user.domain'}; |
my $dom = $ENV{'request.role.domain'}; |
if ( defined($ENV{'form.course'}) ) { |
if ( defined($ENV{'form.course'}) ) { |
$course = $ENV{'form.course'}; |
$course = $ENV{'form.course'}; |
} |
} |
Line 197 all settings except course code, course
|
Line 200 all settings except course code, course
|
} else { |
} else { |
$enrollvar{$1} = localtime($settings{$item}); |
$enrollvar{$1} = localtime($settings{$item}); |
} |
} |
} elsif ($1 eq "courseowner" || $1 eq "authtype" || $1 eq "autharg" || $1 eq "sectionnums" || $1 eq "coursecode") { |
} elsif ($1 eq "courseowner" || $1 eq "authtype" || $1 eq "autharg" || $1 eq "sectionnums" || $1 eq "coursecode" || $1 eq "crosslistings") { |
$enrollvar{$1} = $settings{$item}; |
$enrollvar{$1} = $settings{$item}; |
} |
} |
|
} elsif ($item =~ m/^default_enrollment_(start|end)_date$/) { |
|
if ( ($1 eq 'end') && ($settings{$item} == 0) ) { |
|
$enrollvar{$item} = $lt{'noen'}; |
|
} elsif ( ($1 eq 'start') && ($settings{$item} eq '') ) { |
|
$enrollvar{$item} = 'When enrolled'; |
|
} else { |
|
$enrollvar{$item} = localtime($settings{$item}); |
|
} |
} |
} |
} |
} |
|
|
Line 234 all settings except course code, course
|
Line 245 all settings except course code, course
|
my $numlocalcc = @local_ccs; |
my $numlocalcc = @local_ccs; |
my $bodytag=&Apache::loncommon::bodytag(&mt("Modify Course Settings")); |
my $bodytag=&Apache::loncommon::bodytag(&mt("Modify Course Settings")); |
my $helplink=&Apache::loncommon::help_open_topic('Modify_Course',&mt("Help on Modifying Courses")); |
my $helplink=&Apache::loncommon::help_open_topic('Modify_Course',&mt("Help on Modifying Courses")); |
my $defdom=$ENV{'request.role.domain'}; |
my ($krbdef,$krbdefdom)=&Apache::loncommon::get_kerberos_defaults($dom); |
my ($krbdef,$krbdefdom)=&Apache::loncommon::get_kerberos_defaults($defdom); |
|
my $curr_authtype = ''; |
my $curr_authtype = ''; |
my $curr_authfield = ''; |
my $curr_authfield = ''; |
if ($enrollvar{'authtype'} =~ /^krb/) { |
if ($enrollvar{'authtype'} =~ /^krb/) { |
Line 476 sub modify_course {
|
Line 486 sub modify_course {
|
$newattr{'authtype'} = $ENV{'form.login'}; |
$newattr{'authtype'} = $ENV{'form.login'}; |
$newattr{'authtype'} .= $ENV{'form.krbver'}; |
$newattr{'authtype'} .= $ENV{'form.krbver'}; |
$newattr{'autharg'} = $ENV{'form.krbarg'}; |
$newattr{'autharg'} = $ENV{'form.krbarg'}; |
$newattr{'autharg'} =~ tr/a-z/A-Z/; |
|
} elsif ($ENV{'form.login'} eq 'int') { |
} elsif ($ENV{'form.login'} eq 'int') { |
$newattr{'authtype'} ='internal'; |
$newattr{'authtype'} ='internal'; |
if ((defined($ENV{'form.intarg'})) && ($ENV{'form.intarg'})) { |
if ((defined($ENV{'form.intarg'})) && ($ENV{'form.intarg'})) { |
Line 509 sub modify_course {
|
Line 518 sub modify_course {
|
$newattr{'coursecode'}=$ENV{'form.coursecode'}; |
$newattr{'coursecode'}=$ENV{'form.coursecode'}; |
unless ( $newattr{'coursecode'} eq $currattr{'coursecode'} ) { |
unless ( $newattr{'coursecode'} eq $currattr{'coursecode'} ) { |
$changecode = 1; |
$changecode = 1; |
|
my $courseid_entry = &Apache::lonnet::escape($dom.'_'.$crs).'='.&Apache::lonnet::escape($description).'='.&Apache::lonnet::escape($ENV{'form.coursecode'}); |
|
&Apache::lonnet::courseidput($dom,$courseid_entry,&Apache::lonnet::homeserver($crs,$dom)); |
} |
} |
} |
} |
|
|
Line 717 sub handler {
|
Line 728 sub handler {
|
'autharg' => 'Default authentication parameter', |
'autharg' => 'Default authentication parameter', |
'autoadds' => 'Automated adds', |
'autoadds' => 'Automated adds', |
'autodrops' => 'Automated drops', |
'autodrops' => 'Automated drops', |
'autostart' => 'Date of first enrollment', |
'autostart' => 'Date of first automated enrollment', |
'autoend' => 'Date of last enrollment', |
'autoend' => 'Date of last automated enrollment', |
|
'default_enrollment_start_date' => 'Date of first student access', |
|
'default_enrollment_end_date' => 'Date of last student access', |
'coursecode' => 'Official course code', |
'coursecode' => 'Official course code', |
'courseowner' => "Username of course owner (\@$dom)", |
'courseowner' => "Username of course owner (\@$dom)", |
'notifylist' => 'Course Coordinators to be notified of enrollment changes', |
'notifylist' => 'Course Coordinators to be notified of enrollment changes', |