--- loncom/interface/lonwhatsnew.pm 2006/05/31 14:25:02 1.57 +++ loncom/interface/lonwhatsnew.pm 2006/06/03 21:28:07 1.59 @@ -1,5 +1,5 @@ # -# $Id: lonwhatsnew.pm,v 1.57 2006/05/31 14:25:02 raeburn Exp $ +# $Id: lonwhatsnew.pm,v 1.59 2006/06/03 21:28:07 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -145,7 +145,7 @@ sub display_main_box { my $domain=&Apache::loncommon::determinedomain(); my $function = &Apache::loncommon::get_users_function(); my $tabbg=&Apache::loncommon::designparm($function.'.tabbg',$domain); - my $lctype = lc($env{'course.'.$env{'request.course.id'}.'.type'}); + my $lctype = lc(&Apache::loncommon::course_type()); $r->print('
');
my %threshold_titles = &Apache::lonlocal::texthash (
@@ -228,8 +228,9 @@ END
';
}
- return &Apache::loncommon::start_page(&mt('[_1] Action Items',
- $env{'course.'.$env{'request.course.id'}.'.type'}),$scripttag);
+ my $course_type=&Apache::loncommon::course_type();
+ return &Apache::loncommon::start_page($course_type.' Action Items',
+ $scripttag);
}
#-------------------------------
@@ -248,7 +249,7 @@ sub display_actions_box {
my $udom = $env{'user.domain'};
my $uname = $env{'user.name'};
my $cid = $env{'request.course.id'};
- my $crstype = $env{'course.'.$cid.'.type'};
+ my $crstype = &Apache::loncommon::course_type();
my $lctype = lc($crstype);
my %stulabel = (
'Course' => 'students',
@@ -315,9 +316,9 @@ sub display_actions_box {
' '); } } - $r->print(&mt('Page set to be displayed after you have selected a role in this [_1]',$lctype). + $r->print(&mt('Page set to be displayed after you have selected a role in this '.$lctype). '. '); if ($command eq 'reset') { @@ -372,7 +373,10 @@ sub display_actions_box { &get_curr_thresholds(\%threshold,$uname,$udom,$cid,$cdom,$crs); } - $headings{'abovethreshold'} = &mt('Problems with av. attempts').' ≥ '.$threshold{'av_attempts'}.' '.&mt('or deg. difficulty').' ≥ '.$threshold{'degdiff'}.' '.&mt('and total number of [_1] with submissions',$stulabel{$crstype}).' ≥ '.$threshold{'numstudents'}; + $headings{'abovethreshold'} = + &mt('Problems with av. attempts ≥ [_1] or deg. difficulty ≥ [_2] and total number of '.$stulabel{$crstype}.' with submissions ≥ [_3]', + $threshold{'av_attempts'},$threshold{'degdiff'}, + $threshold{'numstudents'}); my @actionorder = ('handgrading','haserrors','abovethreshold','versionchanges','coursediscussion','coursenormalmail','coursecritmail'); @@ -530,10 +534,10 @@ sub display_threshold_config { sub display_interval_config { my ($r,$refpage,$interval_titles) = @_; - my $lctype = lc($env{'course.'.$env{'request.course.id'}.'.type'}); + my $lctype = lc(&Apache::loncommon::course_type()); my $current = &get_current($env{'user.name'},$env{'user.domain'}, $env{'request.course.id'},'interval'); - $r->print(' '.&mt('Choose the time window to use for display of version changes for resources in the [_1].',$lctype)); + $r->print(' '.&mt('Choose the time window to use for display of version changes for resources in the '.$lctype.'.')); unless ($current eq '') { $r->print(' '.&mt('Current value is [_1]',''. $$interval_titles{$current}.'.')); @@ -612,7 +616,7 @@ sub courseinit_config { my ($control,$current) = &curr_courseinit(); my @chgstate = ('userpref','coursespecific'); my @chgentry = ('firstres','whatsnew'); - my $lctype = lc($env{'course.'.$env{'request.course.id'}.'.type'}); + my $lctype = lc(&Apache::loncommon::course_type()); my %lt = &Apache::lonlocal::texthash( 'chwp' => "Choose which page will be displayed when you enter this $lctype after selecting a role.", 'cuva' => 'Current value is determined by', @@ -1265,7 +1269,7 @@ sub display_versionchanges { sub display_coursediscussion { my ($r,$newdiscussions,$unread,$countunread,$res_title,$rowColor1, $rowColor2) = @_; - my $lctype = lc($env{'course.'.$env{'request.course.id'}.'.type'}); + my $lctype = lc(&Apache::loncommon::course_type()); my %lt = &Apache::lonlocal::texthash( 'loca' => 'Location', 'type' => 'Type', @@ -1324,7 +1328,7 @@ sub display_coursediscussion { sub display_coursenormalmail { my ($r,$msgcount,$newmsgs,$rowColor1,$rowColor2) = @_; my $rowColor; - my $lctype = lc($env{'course.'.$env{'request.course.id'}.'.type'}); + my $lctype = lc(&Apache::loncommon::course_type()); if ($msgcount > 0) { $r->print(' | |||
'.&mt('Number').' | '.&mt('Subject').' | '.&mt('Sender').' | '.&mt('Date/Time').' |
'.&mt('No new [_1] messages',$lctype).' | |||
'.&mt('No new '.$lctype.' messages').' | |||
'.&mt('Number').' | '.&mt('Subject').' | '.&mt('Sender').' | '.&mt('Date/Time').' |
'.&mt('No unread critical messages in [_1]',$lctype).' | |||
'.&mt('No unread critical messages in '.$lctype).' |