--- loncom/interface/lonwhatsnew.pm 2006/11/23 00:02:38 1.64 +++ loncom/interface/lonwhatsnew.pm 2008/03/18 22:00:28 1.76 @@ -1,5 +1,5 @@ # -# $Id: lonwhatsnew.pm,v 1.64 2006/11/23 00:02:38 banghart Exp $ +# $Id: lonwhatsnew.pm,v 1.76 2008/03/18 22:00:28 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -99,28 +99,28 @@ sub handler { text=>"Display Action Items"}); if (($command eq 'chgthreshold') && $checkallowed{'abovethreshold'}) { &Apache::lonhtmlcommon::add_breadcrumb - ({href=>'/adm/whatsnew?command=chgthreshold&refpage='.$refpage, + ({href=>'/adm/whatsnew?command=chgthreshold&refpage='.$refpage, text=>"Change thresholds"}); $r->print(&Apache::lonhtmlcommon::breadcrumbs ("What's New?",#'Course_Action_Items_Thresholds' )); } elsif (($command eq 'chginterval') && $checkallowed{'versionchanges'} ) { &Apache::lonhtmlcommon::add_breadcrumb - ({href=>'/adm/whatsnew?command=chginterval&refpage='.$refpage, + ({href=>'/adm/whatsnew?command=chginterval&refpage='.$refpage, text=>"Change interval"}); $r->print(&Apache::lonhtmlcommon::breadcrumbs ("What's New?",#'Course_Action_Items_Intervals' )); } elsif (($command eq 'chgdisc') && $checkallowed{'coursediscussion'}) { &Apache::lonhtmlcommon::add_breadcrumb - ({href=>'/adm/whatsnew?command=chgdisc&refpage='.$refpage, + ({href=>'/adm/whatsnew?command=chgdisc&refpage='.$refpage, text=>"Change discussion display"}); $r->print(&Apache::lonhtmlcommon::breadcrumbs ("What's New?",#'Course_Action_Items_Intervals' )); } elsif ($command eq 'courseinit') { &Apache::lonhtmlcommon::add_breadcrumb - ({href=>'/adm/whatsnew?command=courseinit&refpage='.$refpage, + ({href=>'/adm/whatsnew?command=courseinit&refpage='.$refpage, text=>"Course initialization preference"}); $r->print(&Apache::lonhtmlcommon::breadcrumbs ("What's New?",#'Course_Action_Items_Initialization' @@ -144,7 +144,6 @@ sub display_main_box { my ($r,$command,$refpage,$checkallowed) = @_; my $domain=&Apache::loncommon::determinedomain(); my $function = &Apache::loncommon::get_users_function(); - my $tabbg=&Apache::loncommon::designparm($function.'.tabbg',$domain); my $lctype = lc(&Apache::loncommon::course_type()); $r->print('
');
@@ -172,7 +171,7 @@ sub display_main_box {
if (($command eq 'chgthreshold')
&& $checkallowed->{'abovethreshold'}) {
- &display_threshold_config($r,$refpage,$tabbg,\%threshold_titles,
+ &display_threshold_config($r,$refpage,\%threshold_titles,
$cdom,$crs);
} elsif (($command eq 'chginterval')
&& $checkallowed->{'versionchanges'}) {
@@ -183,7 +182,7 @@ sub display_main_box {
} elsif ($command eq 'courseinit') {
&courseinit_config($r,$refpage,\%initpage);
} else {
- &display_actions_box($r,$tabbg,$command,$refpage,\%threshold_titles,
+ &display_actions_box($r,$command,$refpage,\%threshold_titles,
\%interval_titles,\%initpage,$cdom,$crs,$checkallowed);
}
my $end_page = &Apache::loncommon::end_page();
@@ -241,11 +240,8 @@ END
#-------------------------------
sub display_actions_box {
- my ($r,$tabbg,$command,$refpage,$threshold_titles,$interval_titles,
- $initpage,$cdom,$crs,$checkallowed) = @_;
- my $rowColor1 = "#ffffff";
- my $rowColor2 = "#eeeeee";
-
+ my ($r,$command,$refpage,$threshold_titles,$interval_titles,$initpage,
+ $cdom,$crs,$checkallowed) = @_;
my $udom = $env{'user.domain'};
my $uname = $env{'user.name'};
my $cid = $env{'request.course.id'};
@@ -299,7 +295,7 @@ sub display_actions_box {
my $currinit = $pagedesc{$initdisp}.' ('.$pagedesc{$initcontrol}.')';
unless ($cid) {
- $r->print(' '); + $r->print(' '.$lt{'yacc'}.' '); return; } @@ -308,14 +304,22 @@ sub display_actions_box { &GDBM_READER(),0640)) { my $furl=$bighash{'first_url'}; untie(%bighash); - $r->print(''.$lt{'gtfr'}. - ''); + $r->print(''.$lt{'gtfr'}. + ' '); } } - $r->print(&mt('Page set to be displayed after you have selected a role in this '.$lctype). - '. '); + $r->print(&mt('Page set to be displayed after you have selected a role in this '.$lctype).'.' + .' ' + .&mt('Currently: [_1]',$currinit) + .'. ' +# &mt('Change for just this '.$lctype.'',$refpage).' '. +# &mt('or for all your courses.',$refpage).' '); + .&mt('Change for just [_1]this course[_2]' + .' or for all [_3]your courses[_2].' + ,'' + ,'' + ,'') + .' '); if ($command eq 'reset') { $result = &process_reset($cdom,$crs); @@ -330,9 +334,9 @@ sub display_actions_box { my $store_result=&store_display_settings($uname,$udom,$cid,$checkallowed); unless ($store_result eq 'ok') { - &Apache::lonnet::logthis('Error storing whatsnew settings: '. + &Apache::lonnet::logthis('Error saving whatsnew settings: '. $store_result.' for '.'user '.$uname.':'.$udom.' in '.$lctype.' '.$cid); - $result .= &mt('Unable to store visibility settings due to [_1]', + $result .= &mt('Unable to save visibility settings due to [_1]', $store_result); } @@ -396,7 +400,7 @@ sub display_actions_box { } if ($needitems) { - &getitems(\%unread,\%ungraded,\%bombed,\%triggered,\%changed,\@newdiscussions,\@tograde,\@bombs,\@warnings,$rowColor1,$rowColor2,\%threshold,$cdom,$crs,\%res_title,\%show,$starttime,$countunread); + &getitems(\%unread,\%ungraded,\%bombed,\%triggered,\%changed,\@newdiscussions,\@tograde,\@bombs,\@warnings,\%threshold,$cdom,$crs,\%res_title,\%show,$starttime,$countunread); } if ($show{'coursenormalmail'}) { $msgcount = &getnormalmail(\@newmsgs); @@ -415,7 +419,7 @@ sub display_actions_box { } } - $r->print('
|