--- loncom/interface/lonwhatsnew.pm 2006/01/06 21:52:19 1.44 +++ loncom/interface/lonwhatsnew.pm 2007/03/02 20:58:32 1.69 @@ -1,5 +1,5 @@ # -# $Id: lonwhatsnew.pm,v 1.44 2006/01/06 21:52:19 albertel Exp $ +# $Id: lonwhatsnew.pm,v 1.69 2007/03/02 20:58:32 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -39,6 +39,8 @@ use Apache::lonuserstate; use Apache::Constants qw(:common :http); use Time::Local; use GDBM_File; +use lib '/home/httpd/lib/perl/'; +use LONCAPA; #---------------------------- # handler @@ -100,28 +102,33 @@ sub handler { ({href=>'/adm/whatsnew?command=chgthreshold&refpage='.$refpage, text=>"Change thresholds"}); $r->print(&Apache::lonhtmlcommon::breadcrumbs - (undef,"What's New?",'Course_Action_Items_Thresholds')); + ("What's New?",#'Course_Action_Items_Thresholds' + )); } elsif (($command eq 'chginterval') && $checkallowed{'versionchanges'} ) { &Apache::lonhtmlcommon::add_breadcrumb ({href=>'/adm/whatsnew?command=chginterval&refpage='.$refpage, text=>"Change interval"}); $r->print(&Apache::lonhtmlcommon::breadcrumbs - (undef,"What's New?",'Course_Action_Items_Intervals')); + ("What's New?",#'Course_Action_Items_Intervals' + )); } elsif (($command eq 'chgdisc') && $checkallowed{'coursediscussion'}) { &Apache::lonhtmlcommon::add_breadcrumb ({href=>'/adm/whatsnew?command=chgdisc&refpage='.$refpage, text=>"Change discussion display"}); $r->print(&Apache::lonhtmlcommon::breadcrumbs - (undef,"What's New?",'Course_Action_Items_Intervals')); + ("What's New?",#'Course_Action_Items_Intervals' + )); } elsif ($command eq 'courseinit') { &Apache::lonhtmlcommon::add_breadcrumb ({href=>'/adm/whatsnew?command=courseinit&refpage='.$refpage, text=>"Course initialization preference"}); $r->print(&Apache::lonhtmlcommon::breadcrumbs - (undef,"What's New?",'Course_Action_Items_Initialization')); + ("What's New?",#'Course_Action_Items_Initialization' + )); } else { $r->print(&Apache::lonhtmlcommon::breadcrumbs - (undef,"What's New?",'Course_Action_Items_Display')); + ("What's New?",#'Course_Action_Items_Display' + )); } &display_main_box($r,$command,$refpage,\%checkallowed); return OK; @@ -137,7 +144,7 @@ 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('
');
my %threshold_titles = &Apache::lonlocal::texthash (
@@ -147,24 +154,24 @@ sub display_main_box {
);
my %interval_titles = &Apache::lonlocal::texthash (
- -1 => 'since start of course',
+ -1 => "since start of $lctype",
2592000 => 'since last month',
604800 => 'since last week',
86400 => 'since yesterday',
);
my %initpage = &Apache::lonlocal::texthash (
- firstres => 'first resource in the course',
+ firstres => "first resource in the $lctype",
whatsnew => "what's new? page",
userpref => 'your general user preferences',
- coursespecific => 'specific setting for this course',
+ coursespecific => "specific setting for this $lctype",
);
my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'};
my $crs = $env{'course.'.$env{'request.course.id'}.'.num'};
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'}) {
@@ -175,15 +182,15 @@ 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();
$r->print(< |