--- loncom/interface/Attic/londropadd.pm 2002/04/17 13:55:35 1.27
+++ loncom/interface/Attic/londropadd.pm 2002/04/26 18:59:00 1.31
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to drop and add students in courses
#
-# $Id: londropadd.pm,v 1.27 2002/04/17 13:55:35 matthew Exp $
+# $Id: londropadd.pm,v 1.31 2002/04/26 18:59:00 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -104,6 +104,35 @@ sub modifystudent {
}
}
+# ============ build a domain and server selection form
+sub domain_form {
+ my ($defdom) = @_;
+ # Set up domain and server selection forms
+ #
+ # Get the domains
+ my @domains = &Apache::loncommon::get_domains();
+ # build up the menu information to be passed to
+ # &Apache::loncommon::linked_select_forms
+ my %select_menus;
+ foreach my $dom (@domains) {
+ # set up the text for this domain
+ $select_menus{$dom}->{'text'}= $dom;
+ # we want a choice of 'default' as the default in the second menu
+ $select_menus{$dom}->{'default'}= 'default';
+ $select_menus{$dom}->{'select2'}->{'default'} = 'default';
+ # Now build up the other items in the second menu
+ my %servers = &Apache::loncommon::get_home_servers($dom);
+ foreach my $server (keys(%servers)) {
+ $select_menus{$dom}->{'select2'}->{$server}
+ = "$server $servers{$server}";
+ }
+ }
+ my $result = &Apache::loncommon::linked_select_forms
+ ('studentform',' with home server ',$defdom,
+ 'lcdomain','lcserver',\%select_menus);
+ return $result;
+}
+
# ============================================================== Menu Phase One
sub menu_phase_one {
my $r=shift;
@@ -146,7 +175,7 @@ to this page if the data selected is ins
-
@@ -155,36 +184,45 @@ ENDPICK
sub javascript_validations {
my ($krbdefdom)=@_;
+ my %param = ( formname => 'studentform',
+ kerb_def_dom => $krbdefdom );
+ my $authheader = &Apache::loncommon::authform_header(%param);
return (< 'document.studentform');
+ my $krbform = &Apache::loncommon::authform_kerberos(%param);
+ my $intform = &Apache::loncommon::authform_internal(%param);
+ my $locform = &Apache::loncommon::authform_local(%param);
+ my $domform = &domain_form($defdom);
$r->print(<
@@ -415,22 +419,16 @@ sub phase_two_end {
Login Type
Note: this will not take effect if the user already exists