--- loncom/interface/lonuserutils.pm 2010/11/15 17:37:47 1.109.2.9
+++ loncom/interface/lonuserutils.pm 2010/11/29 04:40:12 1.109.2.11
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Utility functions for managing LON-CAPA user accounts
#
-# $Id: lonuserutils.pm,v 1.109.2.9 2010/11/15 17:37:47 raeburn Exp $
+# $Id: lonuserutils.pm,v 1.109.2.11 2010/11/29 04:40:12 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1223,15 +1223,15 @@ sub setup_date_selectors {
sub get_dates_from_form {
- my ($startname,$endname) = @_;
+ my ($startname,$endname,$timezone) = @_;
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);
+ my $startdate = &Apache::lonhtmlcommon::get_date_from_form($startname,$timezone);
+ my $enddate = &Apache::lonhtmlcommon::get_date_from_form($endname,$timezone);
if ($env{'form.no_end_date'}) {
$enddate = 0;
}
@@ -4401,8 +4401,14 @@ sub upfile_drop_add {
}
}
if (!$cancreate{$usertype}) {
- $r->print('
'.
- &mt("[_1]: The user does not exist, and you are not permitted to create users of type: $longtypes{$usertype}.",''.$username.''));
+ my $showtype = $longtypes{$usertype};
+ if ($usertype eq 'unofficial') {
+ $r->print('
'.
+ &mt("[_1]: The user does not exist, and the new user's username must be an e-mail address.",''.$username.''));
+ } else {
+ $r->print('
'.
+ &mt("[_1]: The user does not exist, and you are not permitted to create users of type: [_2].",''.$username.'',$showtype));
+ }
next;
}
} else {