--- loncom/interface/Attic/londropadd.pm 2007/08/29 04:12:33 1.168 +++ loncom/interface/Attic/londropadd.pm 2007/10/11 02:16:25 1.172 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to drop and add students in courses # -# $Id: londropadd.pm,v 1.168 2007/08/29 04:12:33 raeburn Exp $ +# $Id: londropadd.pm,v 1.172 2007/10/11 02:16:25 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -262,8 +262,9 @@ sub print_upload_manager_header { $password_choice = 'int'; } # - my $javascript_validations=&javascript_validations('auth',$krbdefdom, - $password_choice); + my $javascript_validations = + &javascript_validations('auth',$krbdefdom,$password_choice,undef, + $env{'request.role.domain'}); my $checked=(($env{'form.noFirstLine'})?' checked="checked" ':''); $r->print('
'."\n".' '. + ''. + $clicker_options{$clickerchg}.' '.$lt{'clicker'}."\n". + ' | '."\n"); + +# Photo display on or off? if ($env{'course.'.$env{'request.course.id'}.'.internal.showphoto'}) { my %photo_options = &Apache::lonlocal::texthash( 'on' => 'Show', @@ -1462,6 +1499,9 @@ END ' '."\n"); } $r->print(" \n"); + +# Done with the HTML header line + } elsif ($mode eq 'csv') { # # Open a file @@ -1514,6 +1554,9 @@ END "active groups","email address"], $format->{'bold'}); } + +# Done with header lines in all formats + # # Sort the students my %index; @@ -1622,6 +1665,19 @@ END$active_groups | '.$clickers.' | '); + } else { + $r->print(''); + } + +# Photos + if ($env{'course.'.$env{'request.course.id'}. '.internal.showphoto'}) { if ($displayphotos eq 'on') { @@ -2701,14 +2757,19 @@ sub handler { my @search = ('srchterm','srchby','srchin','srchtype','srchdomain'); my ($jsback,$elements) = &Apache::loncreateuser::crumb_utilities(); my $jscript = ''; + &Apache::loncreateuser::restore_prev_selections(); + my $srch; + foreach my $item (@search) { + $srch->{$item} = $env{'form.'.$item}; + } + if ($env{'form.state'} eq 'gotusername') { - my $srch; - foreach my $item (@search) { - $srch->{$item} = $env{'form.'.$item}; - } if ($env{'form.phase'} eq 'get_user_info') { my ($currstate,$response,$forcenewuser,$results) = &Apache::loncreateuser::user_search_result($srch); + if ($env{'form.currstate'} eq 'modify') { + $currstate = $env{'form.currstate'}; + } if ($currstate eq 'select') { $r->print(&header()); &Apache::lonhtmlcommon::add_breadcrumb @@ -2752,7 +2813,7 @@ sub handler { &print_enroll_single_student_form($r,$jscript,$ccuname, $ccdomain,$srch); } else { - &get_student_username_domain_form($r,$elements); + &get_student_username_domain_form($r,$elements,undef,$srch); } } elsif ($env{'form.state'} eq 'enrolling') { $r->print(&header($jscript)); @@ -2773,7 +2834,7 @@ sub handler { 'Course_Add_Student')); &enroll_single_student($r,\@search); } else { - &get_student_username_domain_form($r,$elements); + &get_student_username_domain_form($r,$elements,undef,$srch); } } elsif ($env{'form.action'} eq 'classlist' && $permission->{'view'}) { $r->print(&header()); |
---|