--- loncom/interface/lonuserutils.pm 2008/05/09 17:55:25 1.53 +++ loncom/interface/lonuserutils.pm 2008/05/12 17:52:08 1.54 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Utility functions for managing LON-CAPA user accounts # -# $Id: lonuserutils.pm,v 1.53 2008/05/09 17:55:25 raeburn Exp $ +# $Id: lonuserutils.pm,v 1.54 2008/05/12 17:52:08 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -925,8 +925,15 @@ sub setup_date_selectors { sub get_dates_from_form { - my $startdate = &Apache::lonhtmlcommon::get_date_from_form('startdate'); - my $enddate = &Apache::lonhtmlcommon::get_date_from_form('enddate'); + my ($startname,$endname) = @_; + if ($startname eq '') { + $startname = 'startdate'; + } + if ($endname eq '') { + $endname = 'enddate'; + } + my $startdate = &Apache::lonhtmlcommon::get_date_from_form($startname); + my $enddate = &Apache::lonhtmlcommon::get_date_from_form($endname); if ($env{'form.no_end_date'}) { $enddate = 0; }