--- loncom/interface/lonparmset.pm 2020/01/15 00:38:38 1.522.2.26.2.1 +++ loncom/interface/lonparmset.pm 2022/03/23 17:29:29 1.522.2.28.4.3 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set parameters for assessments # -# $Id: lonparmset.pm,v 1.522.2.26.2.1 2020/01/15 00:38:38 raeburn Exp $ +# $Id: lonparmset.pm,v 1.522.2.28.4.3 2022/03/23 17:29:29 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -831,7 +831,7 @@ sub valout { sub plink { - my ($type,$dis,$value,$marker,$return,$call)=@_; + my ($type,$dis,$value,$marker,$return,$call,$extra)=@_; my $winvalue=$value; unless ($winvalue) { if ((&isdateparm($type)) || (&is_specialstring($type))) { @@ -850,13 +850,13 @@ sub plink { my $valout = &valout($value,$type,1); my $unencmarker = $marker; foreach my $item (\$type, \$dis, \$winvalue, \$marker, \$return, \$call, - \$hour, \$min, \$sec) { + \$hour, \$min, \$sec, \$extra) { $$item = &HTML::Entities::encode($$item,'"<>&'); $$item =~ s/\'/\\\'/g; } return '
\n".&mt("Full Name").": ". - $name{'firstname'}.' '.$name{'middlename'}.' ' - .$name{'lastname'}.' '.$name{'generation'}. - "\n".&mt('Student/Employee ID').": ".$name{'id'}.'
'; - } - @usersgroups = &Apache::lonnet::get_users_groups( - $udom,$uname,$env{'request.course.id'}); - if (@usersgroups > 0) { - unless (grep(/^\Q$cgroup\E$/,@usersgroups)) { - $cgroup = $usersgroups[0]; + $message .= "\n
\n".&mt('Full Name').': ' + .$name{'firstname'}.' '.$name{'middlename'}.' ' + .$name{'lastname'}.' '.$name{'generation'} + ."\n".&mt('Student/Employee ID').': '.$name{'id'}.'
' + .&mt('Changes for [quant,_1,parameter] saved.',$totalstored) + .'' .&mt('Changes can take up to 10 minutes before being active for all students.') .&Apache::loncommon::help_open_topic('Caching') .'
'.&mt('No parameter changes saved.').'
'; + if ($uhome eq 'no_host') { + $message .= &mt('Changes for [quant,_1,user-specific parameter] not saved because the username or ID was invalid.', + $totalskippeduser); + } elsif ($env{'form.userroles'} eq 'any') { + $message .= &mt('Changes for [quant,_1,user-specific parameter] not saved because the user does not have a course role.', + $totalskippeduser); + } else { + $message .= &mt('Changes for [quant,_1,user-specific parameter] not saved because the user is not a student.', + $totalskippeduser); + } + $message .= '
'.&mt('Shifting all dates such that [_1] becomes [_2]', - &Apache::lonlocal::locallocaltime($env{'form.timebase'}), - &Apache::lonlocal::locallocaltime($timeshifted)).'
'. + &mt("Shift dates set just for your section/group(s), such that [_1] becomes [_2]", + &Apache::lonlocal::locallocaltime($env{'form.timebase'}), + &Apache::lonlocal::locallocaltime($timeshifted)). + '
'. + &mt("Shift dates set just for your section, such that [_1] becomes [_2]", + &Apache::lonlocal::locallocaltime($env{'form.timebase'}), + &Apache::lonlocal::locallocaltime($timeshifted)). + '
'.&mt('Shifting all dates such that [_1] becomes [_2]', + &Apache::lonlocal::locallocaltime($env{'form.timebase'}), + &Apache::lonlocal::locallocaltime($timeshifted)). + '