--- loncom/interface/loncoursegroups.pm 2008/10/21 14:29:39 1.79 +++ loncom/interface/loncoursegroups.pm 2008/10/22 17:39:05 1.80 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: loncoursegroups.pm,v 1.79 2008/10/21 14:29:39 bisitz Exp $ +# $Id: loncoursegroups.pm,v 1.80 2008/10/22 17:39:05 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1646,7 +1646,7 @@ END $$functions{$allfunctions[$i]}.'   '); } - $r->print('print(''. ' '); for (my $j=$halfnum; $j<@allfunctions; $j++) { @@ -1660,7 +1660,7 @@ END } $r->print(' - @@ -1669,7 +1669,7 @@ END '.$lt{'doyo'}.'  '); if ($action eq 'modify') { $r->print('  ('.&mt('Currently set to "[_1]"', - $$stored{'granularity'}).')'); + &mt($$stored{'granularity'})).')'); } $r->print(' @@ -1806,9 +1806,7 @@ sub sections_selection { sub access_date_settings { my ($r,$action,$formname,$stored,$image,$gpterm,$ucgpterm) = @_; - my %lt = &Apache::lonlocal::texthash( - 'sten' => "Default start and end dates for $gpterm access", - ); + my $sten = &mt("Default start and end dates for $gpterm access"); my $starttime = time; my $endtime = time+(6*30*24*60*60); # 6 months from now, approx if ($action eq 'modify') { @@ -1818,7 +1816,7 @@ sub access_date_settings { } } my ($table) = &date_setting_table($starttime,$endtime,$formname); - $r->print(&Apache::lonhtmlcommon::topic_bar($image,$lt{'sten'}).' + $r->print(&Apache::lonhtmlcommon::topic_bar($image,$sten).' '.$table.' '); return; @@ -1935,7 +1933,7 @@ sub print_current_settings { ygrs => "Your group selections - ", tfwa => "The following settings will apply to the group:", difn => 'Different collaborative tools
for different members:', - stda => 'Start date', + stda => 'Start date:', enda => 'End date:', ); my $showstart = &Apache::lonlocal::locallocaltime($startdate); @@ -1987,7 +1985,7 @@ sub print_current_settings { $r->print('
'); } if (@{$unavailable} > 0) { - $r->print(''.&mt('Unavailable for assignment:').''. + $r->print(''.&mt('Unavailable for assignment:').''. ''); my $rowcell = int(@{$unavailable}/2) + @{$unavailable}%2; for (my $j=0; $j<@{$unavailable}; $j++) { @@ -2005,9 +2003,10 @@ sub print_current_settings { $r->print('
'); } my $quota_text=&mt('[_1] Mb',$quota); + my $granu_text=&mt($granularity); $r->print(<<"END"); - $lt{'difn'} $granularity + $lt{'difn'} $granu_text $quota_text $lt{'stda'} $showstart
$lt{'enda'} $showend @@ -2067,10 +2066,10 @@ sub pick_new_members { $r->print('
'.$lt{'setf'}.' -    -
'); @@ -2512,10 +2511,10 @@ sub current_membership {
'.$lt{'curf'}.' -    -
@@ -2671,10 +2670,10 @@ sub check_uncheck_buttons {
'.$title.' -    -
@@ -2876,7 +2875,8 @@ sub member_privileges_form { 'members being added or modified, '. 'there are no optional privileges to set '. 'for specific members.', - 'algr' => 'All new group members will receive the same privileges.', 'ifex' => 'If previously expired members are being re-enabled, or '. + 'algr' => 'All new group members will receive the same privileges.', + 'ifex' => 'If previously expired members are being re-enabled, or '. 'if access for future members is being activated now, '. 'previously set privileges will be preserved.', 'asno' => 'As no group members are being added, '. @@ -2954,7 +2954,7 @@ sub member_privileges_form { $r->print(''); $r->print(''. ''); + &mt($tool).''); my $privcount = 0; foreach my $priv (@{$showboxes{$tool}}) { $privcount ++; @@ -2968,15 +2968,16 @@ sub member_privileges_form { } else { $r->print(''); if ($privcount < @{$showboxes{$tool}}) { if (@{$showboxes{$tool}} > 2) { @@ -3471,17 +3472,28 @@ sub process_membership { $r->print('
'); } if (@unchanged > 0) { - $r->print(&mt('No change occurred for the following users:
')); + $r->print(&mt('No change occurred for the following users:').'
'); foreach my $user (sort(@unchanged)) { $r->print($$userdata{$user}[$$idx{fullname}].' - '.$user.'
'); } $r->print('
'); } if ($roster_result eq 'ok') { - $r->print('
'.&mt('[_1] membership list updated.',$ucgpterm)); - $r->print('

'.&mt("Any currently logged in course users affected by the changes you made to group membership or privileges for the [_1] group will need to log out and log back in for their LON-CAPA sessions to reflect these changes.",$groupname).'

'); + $r->print('
' + .&mt($ucgpterm.' membership list updated.') + .'
'); + $r->print('

' + .&mt('Any currently logged in course users affected by the changes you made' + .' to group membership or privileges for the [_1] group will need to log out' + .' and log back in for their LON-CAPA sessions to reflect these changes.' + ,''.$groupname.'') + .'

' + ); } else { - $r->print('
'.&mt('An error occurred while updating the [_1] membership list -',$gpterm).$roster_result.'
'); + $r->print('
' + .&mt("An error occurred while updating the $gpterm membership list:") + .'
'.$roster_result + .'
'); } return; } @@ -3523,14 +3535,14 @@ sub automapping { $r->print(&Apache::lonhtmlcommon::topic_bar($image,$$lt{'endi'}).' '.$$lt{'gmma'}.':
'.$$lt{'adds'}.'
'.$$lt{'drops'}.'

'.$$lt{'auad'}.':  - '); + '); if ($action eq 'modify') { $r->print('    ('.$$lt{'curr'}.' '.$$lt{$add}.')'); } $r->print('
'.$$lt{'auex'}.':  - '); + '); if ($action eq 'modify') { $r->print('    ('.$$lt{'curr'}.' '.$$lt{$drop}.')'); } @@ -3747,7 +3759,9 @@ sub add_group_folder { my ($cdom,$cnum,$now,$groupname,$action,$description,$tools,$groupinfo, $gpterm,$ucgpterm,$crstype) = @_; if ($cdom eq '' || $cnum eq '') { - return &mt('Error: invalid course domain or number - group folder creation failed'); + return '' + .&mt('Error: invalid course domain or number - group folder creation failed.') + .''; } my ($outcome,$allgrpsmap,$grpmap,$boardsmap,$grppage,$warning); my $crspath = '/uploaded/'.$cdom.'/'.$cnum.'/'; @@ -3757,14 +3771,16 @@ sub add_group_folder { # check if group_allfolders.sequence exists. my $mapcontents = &Apache::lonnet::getfile($allgrpsmap); if ($mapcontents eq '-1') { #file does not exist; - my $grpstitle = &mt('[_1] [_2]s',$crstype,$ucgpterm); + my $grpstitle = &mt("$crstype $ucgpterm".'s'); my $topmap_url = '/'.$env{'course.'.$env{'request.course.id'}.'.url'}; $topmap_url =~ s|/+|/|g; if ($topmap_url =~ m|^/uploaded|) { $outcome = &map_updater($cdom,$cnum,'group_allfolders.sequence', 'toplevelgroup',$grpstitle,$topmap_url); } else { - $outcome = &mt('Non-standard course - folder for all groups not added.'); + $outcome = '' + .&mt('Non-standard course - folder for all groups not added.') + .''; } if ($outcome ne 'ok') { my $delresult = &release_folder_lock($cdom,$cnum,'group_allfolders'); @@ -3779,7 +3795,9 @@ sub add_group_folder { $warning = $delresult ; } } else { - $outcome = &mt('Could not obtain exclusive lock to check status of the folder for all groups. No group folder added.'); + $outcome = '' + .&mt('Could not obtain exclusive lock to check status of the folder for all groups. No group folder added.') + .''; return $outcome; } my $grpfolder = &mt($ucgpterm.' Folder - [_1]',$description); @@ -3855,7 +3873,10 @@ sub release_folder_lock { my @del_lock = ($folder_name."\0".'locked_folder'); my $dellockoutcome=&Apache::lonnet::del('coursegroups',\@del_lock,$cdom,$cnum); if ($dellockoutcome ne 'ok') { - return ('
'.&mt('Warning: failed to release lock for folder: [_1].',$folder_name).'
'); + return ('
' + .&mt('Warning: failed to release lock for folder: [_1].',''.$folder_name.'') + .'
' + ); } else { return 'ok'; } @@ -3870,12 +3891,16 @@ sub map_updater { my $newmapurl=&Apache::lonnet::finishuserfileupload($cnum,$cdom,$itemname, $newfile); if ($newmapurl !~ m|^/uploaded|) { - $outcome = &mt('Error uploading new folder.')." ($newfile): $newmapurl".'
'; + $outcome = '
' + .&mt('Error uploading new folder.')." ($newfile): $newmapurl" + .'
'; return $outcome; } my ($errtext,$fatal)=&LONCAPA::map::mapread($parentmap); if ($fatal) { - $outcome = &mt('Error reading contents of parent folder')." ($parentmap): $errtext".'
'; + $outcome = '
' + .&mt('Error reading contents of parent folder.')." ($parentmap): $errtext" + .'
'; return $outcome; } else { my $newidx=&LONCAPA::map::getresidx($newmapurl); @@ -3884,7 +3909,9 @@ sub map_updater { $LONCAPA::map::order[1+$#LONCAPA::map::order]=$newidx; my ($outtext,$errtext) = &LONCAPA::map::storemap($parentmap,1); if ($errtext) { - $outcome = &mt('Error saving updated parent folder')." ($parentmap): $errtext".'
'; + $outcome = '
' + .&mt('Error saving updated parent folder.')." ($parentmap): $errtext" + .'
'; return $outcome; } } @@ -3934,7 +3961,10 @@ sub parm_setter { } } } else { - $allresults = &mt('Parameters not set for [_1] because the resource was not recognized as part of the course',$url).'
'; + $allresults = '
' + .&mt('Parameters not set for [_1] because the resource was not recognized' + .' as part of the course.',''.$url.'') + .'
'; } return $allresults; }
'. - $tool.'
'); } - $r->print(qq| -
$$toolprivs{$tool}{$priv} - - -   - -

|); + $r->print( + '
'.&mt($$toolprivs{$tool}{$priv}).'' +.'' +.' ' +.' ' +.'' +.'

' + ); $r->print('