--- loncom/interface/Attic/londropadd.pm 2006/05/11 20:09:47 1.142 +++ loncom/interface/Attic/londropadd.pm 2006/08/08 19:02:04 1.147 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to drop and add students in courses # -# $Id: londropadd.pm,v 1.142 2006/05/11 20:09:47 raeburn Exp $ +# $Id: londropadd.pm,v 1.147 2006/08/08 19:02:04 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -39,6 +39,7 @@ use Apache::Constants qw(:common :http R use Spreadsheet::WriteExcel; use Apache::lonstathelpers(); use Apache::lonlocal; +use Apache::longroup; ############################################################### ############################################################### @@ -77,7 +78,7 @@ sub modifystudent { } elsif ( ((!$section) && (!$csec)) || ($section ne $csec) ) { my (undef,$end,$start)=split(/\_/,$roles{$course}); my $now=time; - # if this is an active role + # if this is an active role if (!($start && ($now<$start)) || !($end && ($now>$end))) { my $reply=&Apache::lonnet::modifystudent # dom name id mode pass f m l g @@ -176,11 +177,11 @@ sub print_main_menu { permission => $grp_manage_permission, url => '/adm/coursegroups?refpage=enrl&action=modify', }, - { text => 'Delete an existing group', - help => 'Course_Delete_Group', - permission => $grp_manage_permission, - url => '/adm/coursegroups?refpage=enrl&action=delete', - }, +# { text => 'Delete an existing group', +# help => 'Course_Delete_Group', +# permission => $grp_manage_permission, +# url => '/adm/coursegroups?refpage=enrl&action=delete', +# }, { text => 'Enter an existing group', help => 'Course_Display_Group', permission => $grp_view_permission, @@ -1171,7 +1172,7 @@ sub print_html_classlist { if (! exists($env{'form.sortby'})) { $env{'form.sortby'} = 'username'; } - if ($env{'form.Status'} !~ /^(Any|Expired|Active)$/) { + if ($env{'form.Status'} !~ /^(Any|Expired|Active|Future)$/) { $env{'form.Status'} = 'Active'; } my $status_select = &Apache::lonhtmlcommon::StatusOptions @@ -1382,6 +1383,9 @@ END if($statusmode eq 'Expired') { print $CSVfile '"'.&mt('Students with expired roles').'"'."\n"; } + if($statusmode eq 'Future') { + print $CSVfile '"'.&mt('Students with future roles').'"'."\n"; + } if ($statusmode eq 'Any') { print $CSVfile '"'.join('","',map { &Apache::loncommon::csv_translate(&mt($_)) @@ -1641,7 +1645,7 @@ sub print_modify_student_form { my $date_table = &date_setting_table($starttime,$endtime); # if (! exists($env{'form.Status'}) || - $env{'form.Status'} !~ /^(Any|Expired|Active)$/) { + $env{'form.Status'} !~ /^(Any|Expired|Active|Future)$/) { $env{'form.Status'} = 'crap'; } # Make sure student is enrolled in course @@ -1936,7 +1940,7 @@ sub show_drop_list { my $cdom = $env{'course.'.$cid.'.domain'}; my $cnum = $env{'course.'.$cid,'.num'}; my ($classgroups) = &Apache::loncoursedata::get_group_memberships( - $classlist,$cdom,$cnum); + $classlist,$keylist,$cdom,$cnum); # my $action = "drop"; $r->print(<