--- loncom/interface/lonwhatsnew.pm 2007/02/27 22:16:02 1.68 +++ loncom/interface/lonwhatsnew.pm 2007/03/02 22:16:47 1.70 @@ -1,5 +1,5 @@ # -# $Id: lonwhatsnew.pm,v 1.68 2007/02/27 22:16:02 raeburn Exp $ +# $Id: lonwhatsnew.pm,v 1.70 2007/03/02 22:16:47 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -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(''."\n". - ''."\n". - ''."\n". + ''."\n". + ''."\n". + ''."\n". &Apache::loncommon::end_data_table_header_row()); foreach my $type (@thresholditems) { my $parameter = $env{'request.course.id'}.':threshold_'.$type; @@ -522,7 +521,7 @@ sub display_interval_config {    @@ -557,7 +556,7 @@ function toggle_countunread(choice) { document.discussionswitch.submit(); } '); - $r->print('
'.&mt('Choose whether or not to display a count of the number of new posts for each resource or bulletin board which has unread posts.').'
'.&mt('This can increase the time taken to gather data for the [_1] page by a few seconds.',"What's New?").'  '.&mt('Currently set to [_1].',''.$current.'')); + $r->print('
'.&mt('Choose whether or not to display a count of the number of new posts for each resource or bulletin board which has unread posts.').'
'.&mt("This can increase the time taken to gather data for the 'What's New?' page by a few seconds.").'  '.&mt("Currently set to $current.")); $r->print('

@@ -654,13 +653,13 @@ sub curr_courseinit { } sub display_launcher { - my ($r,$action,$refpage,$checkallowed,$tabbg,$show,$headings,$res_title, + my ($r,$action,$refpage,$checkallowed,$show,$headings,$res_title, $tograde,$ungraded,$bombs,$bombed,$changed,$warnings,$triggered, $newdiscussions,$unread,$msgcount,$newmsgs,$critmsgcount,$critmsgs, $interval,$countunread) = @_; if ($$checkallowed{$action}) { - &start_box($r,$tabbg,$show,$headings,$action,$refpage,$action); + &start_box($r,$show,$headings,$action,$refpage,$action); if ($$show{$action}) { if ($action eq 'handgrading') { # UNGRADED ITEMS &display_handgrade($r,$tograde,$ungraded); @@ -1303,7 +1302,7 @@ sub display_coursediscussion { my $css_class = $rowNum%2?' class="LC_odd_row"':''; my $lastpost = &Apache::lonnavmaps::timeToHumanString( $$unread{$ressymb}{'lastpost'}); - $r->print(''); + $r->print(''); if ($countunread eq 'on') { my $unreadnum = $$unread{$ressymb}{'unreadcount'}; $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,8 +240,8 @@ END #------------------------------- sub display_actions_box { - my ($r,$tabbg,$command,$refpage,$threshold_titles,$interval_titles, - $initpage,$cdom,$crs,$checkallowed) = @_; + 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'}; @@ -312,7 +311,7 @@ sub display_actions_box { $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('or for all your courses.',$refpage).'

'); if ($command eq 'reset') { $result = &process_reset($cdom,$crs); @@ -429,7 +428,7 @@ sub display_actions_box { if ($displayed == $halfway) { $r->print('
 '); } - &display_launcher($r,$actionitem,$refpage,$checkallowed,$tabbg,\%show,\%headings,\%res_title,\@tograde,\%ungraded,\@bombs,\%bombed,\%changed,\@warnings,\%triggered,\@newdiscussions,\%unread,$msgcount,\@newmsgs,$critmsgcount,\@critmsgs,$interval,$countunread); + &display_launcher($r,$actionitem,$refpage,$checkallowed,\%show,\%headings,\%res_title,\@tograde,\%ungraded,\@bombs,\%bombed,\%changed,\@warnings,\%triggered,\@newdiscussions,\%unread,$msgcount,\@newmsgs,$critmsgcount,\@critmsgs,$interval,$countunread); $displayed ++; } } @@ -451,7 +450,7 @@ sub display_actions_box { #------------------------------- sub display_threshold_config { - my ($r,$refpage,$tabbg,$threshold_titles,$cdom,$crs) = @_; + my ($r,$refpage,$threshold_titles,$cdom,$crs) = @_; my $uname = $env{'user.name'}; my $udom = $env{'user.dom'}; my $cid = $env{'request.course.id'}; @@ -471,9 +470,9 @@ sub display_threshold_config { $r->print('
'. &Apache::loncommon::start_data_table(). &Apache::loncommon::start_data_table_header_row(). - '
Threshold NameCurrent valueChange?'.&mt('Threshold Name').''.&mt('Current value').''.&mt('Change?').' '.$forum_title.' '.$type.' '.$forum_title.' '.&mt($type).' '.$lastpost.''. @@ -1506,7 +1505,7 @@ sub store_courseinit_setting { } sub start_box { - my ($r,$tabbg,$show,$heading,$caller,$refpage) = @_; + my ($r,$show,$heading,$caller,$refpage) = @_; my %lt = &Apache::lonlocal::texthash( chth => 'Change thresholds?', chin => 'Change interval?', @@ -1515,11 +1514,13 @@ sub start_box { my $showhide; if ($$show{$caller}) { $showhide = 'Hide'; + 'display_'.$caller.",'hide'".');">'. + &mt('Hide').''; } else { $showhide = 'Show'; + 'display_'.$caller.",'show'".');">'. + &mt('Show').''; } $r->print('