--- loncom/interface/lonparmset.pm 2003/10/10 16:56:16 1.133 +++ loncom/interface/lonparmset.pm 2003/11/17 20:56:30 1.135 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set parameters for assessments # -# $Id: lonparmset.pm,v 1.133 2003/10/10 16:56:16 www Exp $ +# $Id: lonparmset.pm,v 1.135 2003/11/17 20:56:30 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -518,20 +518,6 @@ sub print_td { $r->print(''."\n"); } -sub get_env_multiple { - my ($name) = @_; - my @values; - if (defined($ENV{$name})) { - # exists is it an array - if (ref($ENV{$name})) { - @values=@{ $ENV{$name} }; - } else { - $values[0]=$ENV{$name}; - } - } - return(@values); -} - =pod =item B: Given the course data hash, extractResourceInformation extracts lots of information about the course's resources into a variety of hashes. @@ -693,9 +679,9 @@ sub assessparms { $udom=$ENV{'form.udom'}; unless ($udom) { $udom=$r->dir_config('lonDefDomain'); } - my @pscat=&get_env_multiple('form.pscat'); + my @pscat=&Apache::loncommon::get_env_multiple('form.pscat'); my $pschp=$ENV{'form.pschp'}; - my @psprt=&get_env_multiple('form.psprt'); + my @psprt=&Apache::loncommon::get_env_multiple('form.psprt'); if (!@psprt) { $psprt[0]='0'; } my $showoptions=$ENV{'form.showoptions'}; @@ -1301,8 +1287,8 @@ ENDTABLEHEADFOUR my $showtitle=$maptitles{$maptitle}.($maptitle!~/^uploaded/?' ['.$maptitle.']':''); $r->print(<

-Set Defaults for All Resources in $foldermap
-$showtitle
+Set Defaults for All Resources in $foldermap
+$showtitle
Specifically for ENDMAPONE if ($uname) { @@ -1310,17 +1296,17 @@ ENDMAPONE ('firstname','middlename','lastname','generation', 'id')); my $person=$name{'firstname'}.' '.$name{'middlename'}.' ' .$name{'lastname'}.' '.$name{'generation'}; - $r->print(&mt("User")." $uname \($person\) ". + $r->print(&mt("User")." $uname \($person\) ". &mt('in')." \n"); } else { - $r->print("".&mt('all').' '.&mt('users in')." \n"); + $r->print("".&mt('all').' '.&mt('users in')." \n"); } - if ($csec) {$r->print(&mt("Section")." $csec ". + if ($csec) {$r->print(&mt("Section")." $csec ". &mt('of')." \n")}; - $r->print("$coursename
"); - $r->print("

\n"); + $r->print("$coursename
"); + $r->print("\n"); #---------------------------------------------------------------- print table $r->print('

'); $r->print(''); @@ -1384,21 +1370,20 @@ ENDMAPONE my $setdef=&mt("Set Defaults for All Resources in Course"); $r->print(<

$setdef - -$coursename
+$coursename
ENDMAPONE if ($uname) { my %name=&Apache::lonnet::userenvironment($udom,$uname, ('firstname','middlename','lastname','generation', 'id')); my $person=$name{'firstname'}.' '.$name{'middlename'}.' ' .$name{'lastname'}.' '.$name{'generation'}; - $r->print(" ".&mt("User")." $uname \($person\) \n"); + $r->print(" ".&mt("User")." $uname \($person\) \n"); } else { - $r->print("".&mt("ALL")." ".&mt("USERS")." \n"); + $r->print(" ".&mt("ALL")." ".&mt("USERS")." \n"); } - if ($csec) {$r->print(&mt("Section")." $csec\n")}; - $r->print("

\n"); + if ($csec) {$r->print(&mt("Section")." $csec\n")}; + $r->print("\n"); #---------------------------------------------------------------- print table $r->print('

'.&mt('Parameter Name').'
'); $r->print('');
'.&mt('Parameter Name').'