--- loncom/interface/lonwhatsnew.pm 2007/09/26 12:34:19 1.73
+++ loncom/interface/lonwhatsnew.pm 2013/03/05 23:42:37 1.105.2.5
@@ -1,5 +1,5 @@
#
-# $Id: lonwhatsnew.pm,v 1.73 2007/09/26 12:34:19 raeburn Exp $
+# $Id: lonwhatsnew.pm,v 1.105.2.5 2013/03/05 23:42:37 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -36,11 +36,13 @@ use Apache::lonlocal;
use Apache::loncoursedata();
use Apache::lonnavmaps();
use Apache::lonuserstate;
+use Apache::lonuserutils;
use Apache::Constants qw(:common :http);
use Time::Local;
use GDBM_File;
use lib '/home/httpd/lib/perl/';
use LONCAPA;
+use HTML::Entities;
#----------------------------
# handler
@@ -68,6 +70,9 @@ sub handler {
['vgr','abovethreshold',1],
['opa','haserrors',1],
['mdc','versionchanges',0],
+ ['vcl','newroles',1],
+ ['vcl','oldroles',1],
+ ['whn','crslogin',1],
) {
my ($perm,$key,$check_section) = @{ $perm_check };
my $scope = $env{'request.course.id'};
@@ -84,7 +89,7 @@ sub handler {
if ( ! $env{'request.course.fn'} || ! $checkallowed{'whatsnew'}) {
# Not in a course, or no whn priv in course
- $env{'user.error.msg'}="/adm/whatsnew::whn:0:0:Cannot display what's new page";
+ $env{'user.error.msg'}="/adm/whatsnew:whn:0:0:Cannot display what's new page";
return HTTP_NOT_ACCEPTABLE;
}
@@ -96,7 +101,7 @@ sub handler {
&Apache::lonhtmlcommon::clear_breadcrumbs();
&Apache::lonhtmlcommon::add_breadcrumb
({href=>'/adm/whatsnew',
- text=>"Display Action Items"});
+ text=>"What's New?"});
if (($command eq 'chgthreshold') && $checkallowed{'abovethreshold'}) {
&Apache::lonhtmlcommon::add_breadcrumb
({href=>'/adm/whatsnew?command=chgthreshold&refpage='.$refpage,
@@ -125,6 +130,27 @@ sub handler {
$r->print(&Apache::lonhtmlcommon::breadcrumbs
("What's New?",#'Course_Action_Items_Initialization'
));
+ } elsif ($command eq 'chgoldroleinterval' && $checkallowed{'oldroles'}) {
+ &Apache::lonhtmlcommon::add_breadcrumb
+ ({href=>'/adm/whatsnew?command=chgoldroleinterval&refpage='.$refpage,
+ text=>"Change interval"});
+ $r->print(&Apache::lonhtmlcommon::breadcrumbs
+ ("What's New?",#'Course_Action_Items_Intervals'
+ ));
+ } elsif ($command eq 'chgnewroleinterval' && $checkallowed{'newroles'}) {
+ &Apache::lonhtmlcommon::add_breadcrumb
+ ({href=>'/adm/whatsnew?command=chgnewroleinterval&refpage='.$refpage,
+ text=>"Change interval"});
+ $r->print(&Apache::lonhtmlcommon::breadcrumbs
+ ("What's New?",#'Course_Action_Items_Intervals'
+ ));
+ } elsif ($command eq 'chgcrslogininterval' && $checkallowed{'crslogin'}) {
+ &Apache::lonhtmlcommon::add_breadcrumb
+ ({href=>'/adm/whatsnew?command=chgcrslogininterval&refpage='.$refpage,
+ text=>"Change interval"});
+ $r->print(&Apache::lonhtmlcommon::breadcrumbs
+ ("What's New?",#'Course_Action_Items_Intervals'
+ ));
} else {
$r->print(&Apache::lonhtmlcommon::breadcrumbs
("What's New?",#'Course_Action_Items_Display'
@@ -152,17 +178,39 @@ sub display_main_box {
degdiff => 'Degree of difficulty',
numstudents => 'Total number of students with submissions',
);
-
- my %interval_titles = &Apache::lonlocal::texthash (
- -1 => "since start of $lctype",
- 2592000 => 'since last month',
- 604800 => 'since last week',
- 86400 => 'since yesterday',
+ my %versions = (
+ -1 => "version changes since start of $lctype",
+ 2592000 => 'version changes since last month',
+ 604800 => 'version changes since last week',
+ 86400 => 'version changes since yesterday',
+ );
+ my %newroles = (
+ -1 => "roles which have become active since start of $lctype",
+ 2592000 => 'roles which have become active since last month',
+ 604800 => 'roles which have become active since last week',
+ 86400 => 'roles which have become active since yesterday',
+ );
+ my %oldroles = (
+ -1 => "roles which expired since start of $lctype",
+ 2592000 => 'roles which expired since last month',
+ 604800 => 'roles which expired since last week',
+ 86400 => 'roles which expired since yesterday',
+ );
+ my %crslogins = (
+ -1 => 'last logins for anyone who has ever logged in',
+ 2592000 => 'last logins for users in last 30 days',
+ 604800 => 'last logins for users in last 7 days',
+ 86400 => 'last logins for users in last 24 hours',
+ );
+ my %interval_titles = (
+ versions => \%versions,
+ newroles => \%newroles,
+ oldroles => \%oldroles,
+ crslogin => \%crslogins,
);
-
my %initpage = &Apache::lonlocal::texthash (
firstres => "first resource in the $lctype",
- whatsnew => "what's new? page",
+ whatsnew => "What's New Page",
userpref => 'your general user preferences',
coursespecific => "specific setting for this $lctype",
);
@@ -175,12 +223,21 @@ sub display_main_box {
$cdom,$crs);
} elsif (($command eq 'chginterval')
&& $checkallowed->{'versionchanges'}) {
- &display_interval_config($r,$refpage,\%interval_titles);
+ &display_interval_config($r,$refpage,\%interval_titles,'versions');
} elsif (($command eq 'chgdisc')
&& $checkallowed->{'coursediscussion'}) {
&display_discussion_config($r,$refpage);
} elsif ($command eq 'courseinit') {
&courseinit_config($r,$refpage,\%initpage);
+ } elsif (($command eq 'chgnewroleinterval')
+ && $checkallowed->{'newroles'}) {
+ &display_interval_config($r,$refpage,\%interval_titles,'newroles');
+ } elsif (($command eq 'chgoldroleinterval')
+ && $checkallowed->{'oldroles'}) {
+ &display_interval_config($r,$refpage,\%interval_titles,'oldroles');
+ } elsif (($command eq 'chgcrslogininterval')
+ && $checkallowed->{'crslogin'}) {
+ &display_interval_config($r,$refpage,\%interval_titles,'crslogin');
} else {
&display_actions_box($r,$command,$refpage,\%threshold_titles,
\%interval_titles,\%initpage,$cdom,$crs,$checkallowed);
@@ -205,12 +262,15 @@ sub display_header {
my ($command,$checkallowed) = @_;
my $scripttag;
- unless ($command eq 'chgthreshold' || $command eq 'chginterval') {
+ unless ($command eq 'chgthreshold' || $command eq 'chginterval' ||
+ $command eq 'chgoldroleinterval' ||
+ $command eq 'chgnewroleinterval' || $command eq 'chgcrslogininterval') {
$scripttag = <<"END";
';
}
my $course_type=&Apache::loncommon::course_type();
- return &Apache::loncommon::start_page($course_type.' Action Items',
+ return &Apache::loncommon::start_page("What's New?",
$scripttag);
}
@@ -249,7 +360,7 @@ sub display_actions_box {
my $lctype = lc($crstype);
my %stulabel = (
'Course' => 'students',
- 'Group' => 'members',
+ 'Community' => 'members',
);
my %lt = &Apache::lonlocal::texthash(
'yacc' => 'You are accessing an invalid course',
@@ -271,7 +382,12 @@ sub display_actions_box {
my @warnings = ();
my $msgcount = 0;
my $critmsgcount = 0;
-
+ my $expirecount;
+ my %expired;
+ my $activecount;
+ my %activated;
+ my %loggedin;
+ my $logincount;
my %res_title = ();
my %show = ();
my $needitems = 0;
@@ -285,7 +401,7 @@ sub display_actions_box {
my %threshold = ();
my %pagedesc = &Apache::lonlocal::texthash (
firstres => 'First resource',
- whatsnew => "What's New? page",
+ whatsnew => "What's New Page",
userpref => 'user preference',
coursespecific => $lctype.' only',
default => 'default',
@@ -299,19 +415,30 @@ sub display_actions_box {
return;
}
+ my $header = '';
if ($refpage eq 'start') {
if (tie(my %bighash,'GDBM_File',$env{'request.course.fn'}.'.db',
&GDBM_READER(),0640)) {
- my $furl=$bighash{'first_url'};
+ my $furl=&HTML::Entities::encode($bighash{'first_url'},'"<>&');
untie(%bighash);
- $r->print(''.$lt{'gtfr'}.
- '
');
+ $header .= ''.$lt{'gtfr'}.
+ '
';
}
}
- $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).'
');
+ $r->print('
+ ' '); @@ -502,28 +716,51 @@ sub display_threshold_config { #------------------------------- sub display_interval_config { - my ($r,$refpage,$interval_titles) = @_; + my ($r,$refpage,$interval_titles,$context) = @_; + my $setting = 'interval'; + if ($context eq 'oldroles') { + $setting = 'oldroleinterval'; + } elsif ($context eq 'newroles') { + $setting = 'newroleinterval'; + } 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 '.$lctype.'.')); + $env{'request.course.id'},$setting); + if ($context eq 'oldroles') { + $r->print(' '.&mt('Choose the time window to use to display roles for which access to the '.$lctype.' expired.').' '); + } elsif ($context eq 'newroles') { + $r->print(' '.&mt('Choose the time window to use to display roles for which access to the '.$lctype.' became available.').' '); + } elsif ($context eq 'crslogin') { + $r->print(' '.&mt('Choose the time window to use to display the last login by a user in the '.$lctype).' '); + } else { + $r->print(' '.&mt('Choose the time window to use to display resources in the '.$lctype.' with version changes.').' '); + } unless ($current eq '') { - $r->print(' '.&mt('Current value is [_1]',''. - $$interval_titles{$current}.'.')); + if (ref($interval_titles->{$context}) eq 'HASH') { + $r->print(' '.&mt('Current value is "[_1]".',''. + $interval_titles->{$context}->{$current}.'').' '); + } } - $r->print(' + $r->print(' '); + &mt('Save').'" />'); return; } @@ -553,7 +790,13 @@ 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 'What's New?' page by a few seconds.").' '.&mt("Currently set to $current.")); + $r->print(' ' + .&mt('Choose whether or not to display a count of the number of new posts for each resource or discussion board which has unread posts.') + .' ' + .&mt("This can increase the time taken to gather data for the [_1]What's New Page[_2] by a few seconds.",'','') + .' ' + .&mt('Currently set to [_1].',''.$current.'.') + ); $r->print(' '); @@ -592,7 +835,7 @@ sub courseinit_config { 'anis' => 'and is set to display', 'padc' => 'Page display controlled by', 'chce' => 'Choose '.$lctype.' entry', - 'moce' => 'Modify '.$lctype.' entry', + 'moce' => 'Save', ); $r->print(<<"END"); $lt{'chwp'} @@ -653,27 +896,37 @@ sub display_launcher { my ($r,$action,$refpage,$checkallowed,$show,$headings,$res_title, $tograde,$ungraded,$bombs,$bombed,$changed,$warnings,$triggered, $newdiscussions,$unread,$msgcount,$newmsgs,$critmsgcount,$critmsgs, - $interval,$countunread) = @_; + $interval,$countunread,$expired,$expirecount,$activated,$activecount, + $crstype,$itemserror,$loggedin,$logincount) = @_; if ($$checkallowed{$action}) { - &start_box($r,$show,$headings,$action,$refpage,$action); + &start_box($r,$show,$headings,$action,$refpage); if ($$show{$action}) { if ($action eq 'handgrading') { # UNGRADED ITEMS - &display_handgrade($r,$tograde,$ungraded); + &display_handgrade($r,$tograde,$ungraded,$itemserror); } elsif ($action eq 'haserrors') { # BOMBS - &display_haserrors($r,$bombs,$bombed,$res_title); + &display_haserrors($r,$bombs,$bombed,$res_title,$itemserror); } elsif ($action eq 'versionchanges') { # VERSION CHANGES - &display_versionchanges($r,$changed,$res_title,$interval); + &display_versionchanges($r,$changed,$res_title,$interval->{'versions'},$itemserror); } elsif ($action eq 'abovethreshold') { # DEGDIFF/AV. TRIES TRIGGERS &display_abovethreshold($r,$refpage,$warnings,$triggered, - $res_title); + $res_title,$itemserror); } elsif ($action eq 'coursediscussion') { # UNREAD COURSE DISCUSSION &display_coursediscussion($r,$newdiscussions,$unread, - $countunread,$res_title); + $countunread,$res_title,$itemserror); } elsif ($action eq 'coursenormalmail') { # NORMAL MESSAGES &display_coursenormalmail($r,$msgcount,$newmsgs); } elsif ($action eq 'coursecritmail') { # CRITICAL MESSAGES &display_coursecritmail($r,$critmsgcount,$critmsgs); + } elsif ($action eq 'newroles') { # ACTIVATED ROLES + &display_rolechanges($r,$activecount,$activated,$interval->{'newroles'}, + $crstype); + } elsif ($action eq 'oldroles') { # EXPIRED ROLES + &display_rolechanges($r,$expirecount,$expired,$interval->{'oldroles'}, + $crstype); + } elsif ($action eq 'crslogin') { #LAST LOGIN + &display_crslogins($r,$logincount,$loggedin,$interval->{'crslogin'}, + $crstype); } } &end_box($r); @@ -686,6 +939,10 @@ sub getitems { $tograde,$bombs,$warnings,$threshold,$cdom,$crs,$res_title,$show, $starttime,$countunread) = @_; my $navmap = Apache::lonnavmaps::navmap->new(); + if (!defined($navmap)) { + my $itemserror = ''.&mt('An error occurred retrieving information about the course.').' '.&mt('It is recommended that you [_1]re-select the course[_2].','','').''; + return $itemserror; + } # force retrieve Resource to seed the part id cache we'll need it later my @allres=$navmap->retrieveResources(undef, sub {if ($_[0]->is_problem) { $_[0]->parts();} return 1;}); @@ -744,6 +1001,7 @@ sub getitems { } } + return; } sub check_discussions { @@ -823,6 +1081,9 @@ sub check_thresholds { if ($resource->handgrade($part) eq 'yes') { next; } + if ($resource->is_anonsurvey($part)) { + next; + } if ($resource->is_survey($part)) { next; } @@ -845,6 +1106,7 @@ sub check_thresholds { $av_attempts = $attempts/$users; $av_attempts = sprintf("%.2f",$av_attempts); } + &Apache::lonnet::statslog($symb,$part,$users,$av_attempts,$degdiff); if ((($degdiff ne '' && $degdiff >= $$threshold{'degdiff'}) || ($av_attempts ne '' && $av_attempts >= $$threshold{'av_attempts'})) && ($users >= $$threshold{'numstudents'})) { $stats{$part}{degdiff} = $degdiff; $stats{$part}{attempts} = $av_attempts; @@ -866,10 +1128,10 @@ sub check_thresholds { my $resettitle = 'title_'.&escape($symb."\0".$part); if (@parts > 1) { $$triggered{$symb}{text}[$partcount] = ' - | part - '.$part.' | '; +'.&mt('part - ').$part.' | '; } else { $$triggered{$symb}{text}[$partcount] = ' -single part | '; +'.&mt('single part').' | '; } $$triggered{$symb}{text}[$partcount] .= ''.$stats{$part}{users}.' | @@ -979,7 +1241,7 @@ sub process_reset { sub process_update { my ($uname,$udom,$threshold_titles) = @_; - my $setoutput = 'Changes to threshold(s) for problem tracking:|||
'.$$ungraded{$res}{title}.' | '.$$ungraded{$res}{count}.' | |||||||
'.$itemserror.' | ||||||||
'.$lt{'nopr'}.' | '. $$bombed{$bomb}{errorcount}.' | '); } + } elsif ($itemserror) { + $r->print('|||||||
'.$itemserror.' | ||||||||
'.$lt{'noer'}.' | ||||||||
'.$itemserror.' | ||||||||
'.$lt{'nopr'}.' | ||||||||
'. @@ -1253,15 +1745,160 @@ sub display_versionchanges { $$changed{$item}{'current'}.' | '. $$changed{$item}{'version'}.' | |||||||
'.$itemserror.' | ||||||||
' + .&mt('No '.$interval).' | ||||||||
'.$lt{'tich'}.' | '. + ''.$lt{'user'}.' | '. + ''.$lt{'role'}.' | '. + ''.$lt{'sec'}.' | '. + ''.$lt{'status'}.' | ||||
'.&Apache::lonlocal::locallocaltime($item).' | '. + ''.$link.' | '. + ''.$role.' | '. + ''.$section.' | '. + ''.$status.' | ||||
' + .&mt('There are no '.$interval).' | ||||||||
'.$lt{'number'}.' | '. + ''.$lt{'role'}.' | '. + ''.$lt{'sec'}; + my (%bylastname,%counts); + if (ref($loggedin) eq 'HASH') { + my @logins = sort { $b <=> $a } (keys(%{$loggedin})); + my $numlogin = 0; + foreach my $item (@logins) { + if (ref($loggedin->{$item}) eq 'ARRAY') { + foreach my $user (@{$loggedin->{$item}}) { + if (ref($user) eq 'HASH') { + my $section; + my $role = + &Apache::lonnet::plaintext($user->{'role'},$crstype); + my $status = &mt($user->{'status'}); + if ($user->{'section'} eq '') { + $section = &mt('none'); + } else { + $section = $user->{'section'}; + } + $counts{$user->{'role'}}{$section} ++; + my $uname = $user->{'uname'}; + my $udom = $user->{'udom'}; + my $fullname = &Apache::loncommon::plainname($uname,$udom,'lastname'); + my $link = + &Apache::loncommon::aboutmewrapper($fullname,$uname,$udom); + push(@{$bylastname{$fullname}}, + ' | '.$link.' | '. + ''.$role.' | '. + ''.$section.' | '); + } + } + } + } + my $table; + foreach my $person (sort(keys(%bylastname))) { + if (ref($bylastname{$person}) eq 'ARRAY') { + foreach my $item (@{$bylastname{$person}}) { + $numlogin ++; + my $css_class = $numlogin%2?' class="LC_odd_row"':''; + $table .= '|||
'.$counts{$role}{$sec}.' | '. + ''.$showrole.' | '. + ''.$sec.' | ||||||
'.$lt{'noup'}. - ' '.$interval.' | ||||||||
'. + &mt('There are no '.$interval). + ' | ||||||||
'.$itemserror.' | ||||||||
'.$lt{'noun'}.' | ||||||||
'.$mailcount. - '. | '. - $msg->{'shortsub'}.' | '. - $msg->{'from'}.':'.$msg->{'fromdom'}.' | '. - $msg->{'sendtime'}.' | |||||
'.$mailcount + .'. | ' + .$msg->{'shortsub'}.' | ' + .$msg->{'from'}.':'.$msg->{'fromdom'}.' | ' + .$msg->{'sendtime'}.' | |||||
'.
@@ -1411,24 +2051,34 @@ sub store_interval_setting {
my ($uname,$udom,$cid,$interval_titles) = @_;
my %interval_settings = ();
my $result;
- if (defined($env{'form.interval'})) {
- $interval_settings{$cid.':interval'} = $env{'form.interval'};
+ my $context = $env{'form.intervaltype'};
+ if ($env{'form.interval'} ne '') {
+ if ($context eq 'oldroles') {
+ $interval_settings{$cid.':oldroleinterval'} = $env{'form.interval'};
+ } elsif ($context eq 'newroles') {
+ $interval_settings{$cid.':newroleinterval'} = $env{'form.interval'};
+ } elsif ($context eq 'crslogin') {
+ $interval_settings{$cid.':crslogininterval'} = $env{'form.interval'};
+ } else {
+ $interval_settings{$cid.':interval'} = $env{'form.interval'};
+ }
my $outcome = &Apache::lonnet::put('nohist_whatsnew',
\%interval_settings,$udom,$uname);
if ($outcome eq 'ok') {
- $result = &mt('Interval set to version changes [_1]',
- ''.$$interval_titles{$env{'form.interval'}}.' '); - + if (ref($interval_titles->{$context}) eq 'HASH') { + $result = &Apache::lonhtmlcommon::confirm_success(&mt('New filter setting: [_1].',''. + $interval_titles->{$context}->{$env{'form.interval'}}.'').' '); + } } else { my $lctype = lc(&Apache::loncommon::course_type()); - &Apache::lonnet::logthis('Error saving whatsnew interval setting'. + &Apache::lonnet::logthis('Error saving whatsnew '.$context.' interval setting'. ' '.$outcome.' for '.$uname.':'.$udom.' in '.$lctype.' '.$cid); - $result = &mt('Unable to set interval to [_1] due to [_2].', - ''.$$interval_titles{$env{'form.interval'}}.'', - ''.$outcome.'. '); + $result = &Apache::lonhtmlcommon::confirm_success(&mt('Unable to set interval to [_1] due to [_2].', + ''.$interval_titles->{$context}->{$env{'form.interval'}}.'', + ''.$outcome.''),1); } } - return $result; + return &Apache::loncommon::confirmwrapper($result); } sub store_discussion_setting { @@ -1440,20 +2090,20 @@ sub store_discussion_setting { my $outcome = &Apache::lonnet::put('nohist_whatsnew', \%discussion_settings,$udom,$uname); if ($outcome eq 'ok') { - $result = &mt('Count unread posts in discussions display set to [_1]', - ''.$env{'form.countunread'}.' '); + $result = &Apache::lonhtmlcommon::confirm_success(&mt('Count unread posts in discussions display set to [_1]', + ''.&mt($env{'form.countunread'}).'').' '); } else { my $lctype = lc(&Apache::loncommon::course_type()); &Apache::lonnet::logthis('Error saving whatsnew countunread setting'. ' '.$outcome.' for '.$uname.':'.$udom.' in '.$lctype.' '.$cid); - $result = &mt('Unable to set "number unread posts display" to [_1]'. + $result = &Apache::lonhtmlcommon::confirm_success(&mt('Unable to set "number unread posts display" to [_1]'. ' due to [_2].', - ''.$env{'form.countunread'}.'', - ''.$outcome.'. '); + ''.&mt($env{'form.countunread'}).'', + ''.$outcome.''),1); } } - return $result; + return &Apache::loncommon::confirmwrapper($result); } sub store_courseinit_setting { @@ -1478,27 +2128,29 @@ sub store_courseinit_setting { \%courseinit_settings,$udom,$uname); if ($outcome eq 'ok') { if ($page_control eq 'global preferences') { - $result = &mt("Page displayed after role selection in $lctype now set by user's global preferences."); + $result = &Apache::lonhtmlcommon::confirm_success(&mt("Page displayed after role selection in $lctype now set by [_1]user's global preferences[_2].",'','')); } else { - $result = &mt('Page displayed after role selection in this '.$lctype.' set to [_2]',$lctype,$$initpage{$env{'form.courseinit_page'}}); + $result = &Apache::lonhtmlcommon::confirm_success(&mt('Page displayed after role selection in this '.$lctype.' set to [_1].' + ,''.$$initpage{$env{'form.courseinit_page'}}.'')); } } else { &Apache::lonnet::logthis('Error saving whatsnew courseinit '. 'setting: '.$outcome.' for '.$uname. ':'.$udom.' in '.$lctype.' '.$cid); if ($page_control eq 'global preferences') { - $result = &mt('Unable to set control of page display to [_1]'. + $result = &Apache::lonhtmlcommon::confirm_success(&mt('Unable to set control of page display to [_1]'. ' due to [_2].', ''.$page_control.'', - ''.$outcome.'. '); + ''.$outcome.''),1); } else { - $result = &mt('Unable to set page display, after role selection, for this '.$lctype.' to [_2] due to [_3]. ', - $$initpage{$env{'form.courseinit_page'}},$outcome); + $result = &Apache::lonhtmlcommon::confirm_success(&mt('Unable to set page display, after role selection, for this '.$lctype.' to [_1] due to [_2].' + ,''.$$initpage{$env{'form.courseinit_page'}}.'' + ,''.$outcome.''),1); } } } } - return $result; + return &Apache::loncommon::confirmwrapper($result); } sub start_box { @@ -1530,24 +2182,46 @@ sub start_box { if ($$show{$caller}) { $r->print(' | ||||||||
'.$lt{'chth'}.' | +'.$lt{'chth'}.' | |||||||
'.$lt{'chin'}.' | +'.$lt{'chin'}.' | |||||||
'.$lt{'chop'}.' | +'.$lt{'chop'}.' | +|||||||
'.$lt{'chin'}.' | +||||||||
'.$lt{'chin'}.' | ||||||||
'.$lt{'chin'}.' | +||||||||