--- loncom/interface/loncommon.pm 2020/02/19 23:36:09 1.1075.2.127.6.2 +++ loncom/interface/loncommon.pm 2020/05/22 21:56:54 1.1075.2.127.6.3 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.1075.2.127.6.2 2020/02/19 23:36:09 raeburn Exp $ +# $Id: loncommon.pm,v 1.1075.2.127.6.3 2020/05/22 21:56:54 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -15184,12 +15184,17 @@ sub construct_course { # Open all assignments # if ($args->{'openall'}) { + my $opendate = time; + if ($args->{'openallfrom'} =~ /^\d+$/) { + $opendate = $args->{'openallfrom'}; + } my $storeunder=$$crsudom.'_'.$$crsunum.'.0.opendate'; - my %storecontent = ($storeunder => time, + my %storecontent = ($storeunder => $opendate, $storeunder.'.type' => 'date_start'); - - $outcome .= &mt('Opening all assignments').': '.&Apache::lonnet::cput - ('resourcedata',\%storecontent,$$crsudom,$$crsunum).$linefeed; + $outcome .= &mt('All assignments open starting [_1]', + &Apache::lonlocal::locallocaltime($opendate)).': '. + &Apache::lonnet::cput + ('resourcedata',\%storecontent,$$crsudom,$$crsunum).$linefeed; } # # Set first page