-
-
-
-
-
-
-
-
-
- Threshold Name |
- Current value |
- Change? |
- ');
- my $rowNum =0;
+ $r->print('
| |
-
+ $r->print(&Apache::loncommon::end_data_table()."\n".
+ '
');
@@ -529,24 +607,45 @@ sub display_threshold_config {
#-------------------------------
sub display_interval_config {
- my ($r,$refpage,$interval_titles) = @_;
- my $lctype = lc($env{'course.'.$env{'request.course.id'}.'.type'});
+ 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 [_1].',$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.').' ');
+ } 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('
');
@@ -677,36 +776,37 @@ sub curr_courseinit {
}
sub display_launcher {
- my ($r,$action,$refpage,$checkallowed,$tabbg,$rowColor1,$rowColor2,$show,
- $headings,$res_title,$tograde,$ungraded,$bombs,$bombed,$changed,
- $warnings,$triggered,$newdiscussions,$unread,$msgcount,$newmsgs,
- $critmsgcount,$critmsgs,$interval,$countunread) = @_;
+ my ($r,$action,$refpage,$checkallowed,$show,$headings,$res_title,
+ $tograde,$ungraded,$bombs,$bombed,$changed,$warnings,$triggered,
+ $newdiscussions,$unread,$msgcount,$newmsgs,$critmsgcount,$critmsgs,
+ $interval,$countunread,$expired,$expirecount,$activated,$activecount,
+ $crstype) = @_;
if ($$checkallowed{$action}) {
- &start_box($r,$tabbg,$show,$headings,$action,$refpage);
+ &start_box($r,$show,$headings,$action,$refpage,$action);
if ($$show{$action}) {
if ($action eq 'handgrading') { # UNGRADED ITEMS
- &display_handgrade($r,$tograde,$rowColor1,$rowColor2,
- $ungraded);
+ &display_handgrade($r,$tograde,$ungraded);
} elsif ($action eq 'haserrors') { # BOMBS
- &display_haserrors($r,$bombs,$rowColor1,$rowColor2,$bombed,
- $res_title);
+ &display_haserrors($r,$bombs,$bombed,$res_title);
} elsif ($action eq 'versionchanges') { # VERSION CHANGES
- &display_versionchanges($r,$changed,$res_title,$rowColor1,
- $rowColor2,$interval);
-
+ &display_versionchanges($r,$changed,$res_title,$interval->{'versions'});
} elsif ($action eq 'abovethreshold') { # DEGDIFF/AV. TRIES TRIGGERS
&display_abovethreshold($r,$refpage,$warnings,$triggered,
- $res_title);
+ $res_title);
} elsif ($action eq 'coursediscussion') { # UNREAD COURSE DISCUSSION
&display_coursediscussion($r,$newdiscussions,$unread,
- $countunread,$res_title,$rowColor1,$rowColor2);
+ $countunread,$res_title);
} elsif ($action eq 'coursenormalmail') { # NORMAL MESSAGES
- &display_coursenormalmail($r,$msgcount,$newmsgs,$rowColor1,
- $rowColor2);
+ &display_coursenormalmail($r,$msgcount,$newmsgs);
} elsif ($action eq 'coursecritmail') { # CRITICAL MESSAGES
- &display_coursecritmail($r,$critmsgcount,$critmsgs,$rowColor1,
- $rowColor2);
+ &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);
}
}
&end_box($r);
@@ -716,8 +816,8 @@ sub display_launcher {
sub getitems {
my ($unread,$ungraded,$bombed,$triggered,$changed,$newdiscussions,
- $tograde,$bombs,$warnings,$rowColor1,$rowColor2,$threshold,$cdom,$crs,
- $res_title,$show,$starttime,$countunread) = @_;
+ $tograde,$bombs,$warnings,$threshold,$cdom,$crs,$res_title,$show,
+ $starttime,$countunread) = @_;
my $navmap = Apache::lonnavmaps::navmap->new();
# force retrieve Resource to seed the part id cache we'll need it later
my @allres=$navmap->retrieveResources(undef,
@@ -735,7 +835,6 @@ sub getitems {
$cdom,$crs);
}
- my $warningnum = 0;
foreach my $resource (@allres) {
my $result = '';
my $applies = 0;
@@ -744,6 +843,10 @@ sub getitems {
%{$$ungraded{$symb}} = ();
%{$$triggered{$symb}} = ();
$$triggered{$symb}{numparts} = 0;
+ if ($resource->encrypted()) {
+ $$triggered{$symb}{'enclink'} = $resource->link();
+ $$triggered{$symb}{'encsymb'} = $resource->shown_symb();
+ }
my $title = $resource->compTitle();
$$res_title{$symb} = $title;
my $ressymb = $resource->wrap_symb();
@@ -769,9 +872,8 @@ sub getitems {
# Maxtries and degree of difficulty for problem parts, unless handgradeable
if ($$show{'abovethreshold'}) {
- $warningnum = &check_thresholds($resource,$symb,\%resourcetracker,
- $triggered,$threshold,$warnings,
- $warningnum,$rowColor1,$rowColor2);
+ &check_thresholds($resource,$symb,\%resourcetracker,
+ $triggered,$threshold,$warnings);
}
}
@@ -786,12 +888,17 @@ sub check_discussions {
%{$$unread{$ressymb}} = ();
$$unread{$ressymb}{'title'} = $title;
$$unread{$ressymb}{'symb'} = $symb;
+ if ($resource->encrypted()) {
+ $$unread{$ressymb}{'enclink'} = $resource->link();
+ $$unread{$ressymb}{'encsymb'} = $resource->shown_symb();
+ }
push(@{$newdiscussions}, $ressymb);
$$unread{$ressymb}{'lastpost'} = $resource->last_post_time();
if ($countunread eq 'on') {
- $$unread{$ressymb}{'unreadcount'} = $resource->unread_discussion();
+ $$unread{$ressymb}{'unreadcount'} =
+ $resource->discussion_info('unread');
}
}
@@ -812,7 +919,11 @@ sub check_handgraded {
if (@ungraded > 0) {
$$ungraded{$symb}{count} = scalar(@ungraded);
$$ungraded{$symb}{title} = $title;
- push(@{$tograde}, $symb);
+ if ($resource->encrypted()) {
+ $$ungraded{$symb}{'enclink'} = $resource->link();
+ $$ungraded{$symb}{'encsymb'} = $resource->shown_symb();
+ }
+ push(@{$tograde},$symb);
}
}
}
@@ -835,14 +946,12 @@ sub check_bombed {
}
sub check_thresholds {
- my ($resource,$symb,$resourcetracker,$triggered,$threshold,$warnings,
- $warningnum,$rowColor1,$rowColor2) = @_;
+ my ($resource,$symb,$resourcetracker,$triggered,$threshold,$warnings) = @_;
# Compile maxtries and degree of difficulty for problem parts, unless handgradeable
my @parts = @{$resource->parts()};
my %stats;
my %lastreset = ();
my $warning = 0;
- my $rowColor;
foreach my $part (@parts) {
if ($resource->handgrade($part) eq 'yes') {
next;
@@ -881,46 +990,42 @@ sub check_thresholds {
}
}
if ($warning) {
- if ($warningnum%2 == 1) {
- $rowColor = $rowColor1;
- } else {
- $rowColor = $rowColor2;
- }
- $$triggered{$symb}{rowColor} = $rowColor;
$$triggered{$symb}{title} = $resource->title;
+ my $partcount = 0;
+ @{$$triggered{$symb}{text}} = ();
foreach my $part (@parts) {
if (exists($stats{$part}{users})) {
my $resetname = 'reset_'.&escape($symb."\0".$part);
my $resettitle = 'title_'.&escape($symb."\0".$part);
- if ($$triggered{$symb}{numparts}) {
- $$triggered{$symb}{text} .= ' |
');
+ $r->print('
| ');
} else {
- $r->print(' '.$lt{'nopr'}.'
| ');
+ $r->print(''.$lt{'nopr'}.' | ');
}
}
sub display_versionchanges {
- my ($r,$changed,$res_title,$rowColor1,$rowColor2,$interval) = @_;
+ my ($r,$changed,$res_title,$interval) = @_;
my %lt = &Apache::lonlocal::texthash(
'reso' => 'Resource',
'revd' => 'Last revised',
'newv' => 'New version',
'veru' => 'Version used',
- 'noup' => 'No updated versions',
+ 'noup' => 'No',
);
- my $rowColor;
if (keys(%{$changed}) > 0) {
- $r->print(''.$lt{'reso'}.' | '.$lt{'revd'}.' | '.$lt{'newv'}.' | '.$lt{'veru'}.' | ');
-
-
+ $r->print(''.
+ $lt{'reso'}.' | '.$lt{'revd'}.' | '.
+ $lt{'newv'}.' | '.
+ $lt{'veru'}.' | ');
my @changes = sort { &cmp_title($a,$b,$res_title) } keys(%{$changed});
my $changenum = 0;
foreach my $item (@changes) {
- if ($changenum %2 == 1) {
- $rowColor = $rowColor1;
- } else {
- $rowColor = $rowColor2;
- }
+ $changenum ++;
+ my $css_class = $changenum%2?' class="LC_odd_row"':'';
my ($map,$id,$url)=&Apache::lonnet::decode_symb($item);
my $linkurl=&Apache::lonnet::clutter($url);
$linkurl .= '?symb='.&escape($item);
- $r->print(''.$$res_title{$item}.' | '.$$changed{$item}{'revdate'}.' | '.$$changed{$item}{'current'}.' | '.$$changed{$item}{'version'}.' | ');
- $changenum ++;
+ $r->print(''.
+ $$res_title{$item}.' | '.
+ $$changed{$item}{'revdate'}.' | '.
+ $$changed{$item}{'current'}.' | '.
+ $$changed{$item}{'version'}.' | ');
+ }
+ } else {
+ $r->print(''.$lt{'noup'}.
+ ' '.$interval.' | ');
+ }
+ return;
+}
+
+sub display_rolechanges {
+ my ($r,$chgcount,$changed,$interval,$crstype) = @_;
+ my $now = time();
+ my %lt = &Apache::lonlocal::texthash(
+ 'user' => 'User',
+ 'tich' => 'Time of change',
+ 'role' => 'Role',
+ 'sec' => 'Section',
+ 'status' => 'Status',
+ 'norc' => 'There are no ',
+ );
+ if ($chgcount) {
+ $r->print(''.
+ ''.$lt{'tich'}.' | '.
+ ''.$lt{'user'}.' | '.
+ ''.$lt{'role'}.' | '.
+ ''.$lt{'sec'}.' | '.
+ ''.$lt{'status'}.' | ');
+ if (ref($changed) eq 'HASH') {
+ my @changes = sort { $b <=> $a } (keys(%{$changed}));
+ my $changenum = 0;
+ foreach my $item (@changes) {
+ if (ref($changed->{$item}) eq 'ARRAY') {
+ foreach my $chg (@{$changed->{$item}}) {
+ if (ref($chg) eq 'HASH') {
+ my $section;
+ my $role =
+ &Apache::lonnet::plaintext($chg->{'role'},$crstype);
+ my $status = &mt($chg->{'status'});
+ if ($chg->{'section'} eq '') {
+ $section = &mt('none');
+ } else {
+ $section = $chg->{'section'};
+ }
+ my $uname = $chg->{'uname'};
+ my $udom = $chg->{'udom'};
+ $changenum ++;
+ my $css_class = $changenum%2?' class="LC_odd_row"':'';
+ my $link =
+ &Apache::loncommon::aboutmewrapper(&Apache::loncommon::plainname($uname,$udom),$uname,$udom);
+ $r->print(''.
+ ''.&Apache::lonlocal::locallocaltime($item).' | '.
+ ''.$link.' | '.
+ ''.$role.' | '.
+ ''.$section.' | '.
+ ''.$status.' | ');
+ }
+ }
+ }
+ }
}
} else {
- $r->print(' '.$lt{'noup'}.' '.$interval.'
| ');
+ $r->print(''.$lt{'norc'}.
+ ' '.$interval.' | ');
}
return;
}
sub display_coursediscussion {
- my ($r,$newdiscussions,$unread,$countunread,$res_title,$rowColor1,
- $rowColor2) = @_;
- my $lctype = lc($env{'course.'.$env{'request.course.id'}.'.type'});
+ my ($r,$newdiscussions,$unread,$countunread,$res_title) = @_;
+ my $lctype = lc(&Apache::loncommon::course_type());
my %lt = &Apache::lonlocal::texthash(
'loca' => 'Location',
'type' => 'Type',
@@ -1273,97 +1660,97 @@ sub display_coursediscussion {
'noun' => 'No unread posts in '.$lctype.' discussions',
'tmlp' => 'Time of last post',
);
- my $rowColor;
if (@{$newdiscussions} > 0) {
- $r->print(''.$lt{'loca'}.
- ' | '.$lt{'type'}.
- '');
+ $r->print(' | '.
+ $lt{'loca'}.' | '.
+ $lt{'type'}.' | ');
if ($countunread eq 'on') {
- $r->print(''.$lt{'tmlp'}.' | '.
- ''.$lt{'numn'}.
- ' | ');
+ $r->print(''.$lt{'tmlp'}.' | '.
+ ''.$lt{'numn'}.' | ');
} else {
- $r->print(''.$lt{'tmlp'}.
- ' | ');
+ $r->print(''.$lt{'tmlp'}.' | ');
}
$r->print(" \n");
@{$newdiscussions} = sort { &cmp_title($a,$b,$res_title) }
@{$newdiscussions};
my $rowNum = 0;
foreach my $ressymb (@{$newdiscussions}) {
+ $rowNum ++;
my $forum_title = $$unread{$ressymb}{'title'};
my $type = 'Resource';
my $feedurl=&Apache::lonfeedback::get_feedurl($ressymb);
+ my $disclink = $feedurl.'?symb='.$$unread{$ressymb}{symb};
if ($feedurl =~ /bulletinboard/) {
$type = 'Bulletin Board';
}
- if ($rowNum %2 == 1) {
- $rowColor = $rowColor1;
- } else {
- $rowColor = $rowColor2;
+ if ($$unread{$ressymb}{'enclink'}) {
+ $disclink = $$unread{$ressymb}{'enclink'}.'?symb='.$$unread{$ressymb}{'encsymb'};
}
+ my $css_class = $rowNum%2?' class="LC_odd_row"':'';
my $lastpost = &Apache::lonnavmaps::timeToHumanString(
$$unread{$ressymb}{'lastpost'});
- $r->print(''.$forum_title.' | '.$type.' | ');
+ $r->print(' '.$forum_title.' | '.&mt($type).' | ');
if ($countunread eq 'on') {
my $unreadnum = $$unread{$ressymb}{'unreadcount'};
- $r->print(''.$lastpost.' | '.
- '',$unreadnum.' | ');
+ $r->print(''.$lastpost.' | '.
+ $unreadnum.' | ');
} else {
- $r->print(''.$lastpost.' | ');
+ $r->print(''.$lastpost.' | ');
}
$r->print(" \n");
- $rowNum ++;
}
} else {
- $r->print(' '.
- $lt{'noun'}.'
| ');
+ $r->print(''.$lt{'noun'}.' | ');
}
}
sub display_coursenormalmail {
- my ($r,$msgcount,$newmsgs,$rowColor1,$rowColor2) = @_;
- my $rowColor;
- my $lctype = lc($env{'course.'.$env{'request.course.id'}.'.type'});
+ my ($r,$msgcount,$newmsgs) = @_;
+ my $lctype = lc(&Apache::loncommon::course_type());
if ($msgcount > 0) {
- $r->print(''.&mt('Number').' | '.&mt('Subject').' | '.&mt('Sender').' | '.&mt('Date/Time').' | ');
- my $rowNum = 0;
- my $mailcount = 1;
+ $r->print(''.
+ &mt('Number').' | '.&mt('Subject').' | '.
+ &mt('Sender').' | '.
+ &mt('Date/Time').' | ');
+ my $mailcount = 0;
foreach my $msg (@{$newmsgs}) {
- if ($rowNum %2 == 1) {
- $rowColor = $rowColor1;
- } else {
- $rowColor = $rowColor2;
- }
- $r->print(''.$mailcount.'. | '.$msg->{'shortsub'}.' | '.$msg->{'from'}.'@'.$msg->{'fromdom'}.' | '.$msg->{'sendtime'}.' | ');
- $rowNum ++;
$mailcount ++;
+ my $css_class = $mailcount%2?' class="LC_odd_row"':'';
+ $r->print(''.$mailcount
+ .'. | '
+ .$msg->{'shortsub'}.' | '
+ .$msg->{'from'}.':'.$msg->{'fromdom'}.' | '
+ .$msg->{'sendtime'}.' | ');
}
} else {
- $r->print(' '.&mt('No new [_1] messages',$lctype).'
| ');
+ $r->print(''.
+ &mt('No new '.$lctype.' messages').' | ');
}
}
sub display_coursecritmail {
- my ($r,$critmsgcount,$critmsgs,$rowColor1,$rowColor2) = @_;
- my $rowColor;
- my $lctype = lc($env{'course.'.$env{'request.course.id'}.'.type'});
+ my ($r,$critmsgcount,$critmsgs) = @_;
+ my $lctype = lc(&Apache::loncommon::course_type());
if ($critmsgcount > 0) {
- $r->print(''.&mt('Number').' | '.&mt('Subject').' | '.&mt('Sender').' | '.&mt('Date/Time').' | ');
- my $rowNum = 0;
- my $mailcount = 1;
+ $r->print(''.
+ &mt('Number').' | '.&mt('Subject').' | '.
+ &mt('Sender').' | '.
+ &mt('Date/Time').' | ');
+ my $mailcount = 0;
foreach my $msg (@{$critmsgs}) {
- if ($rowNum %2 == 1) {
- $rowColor = $rowColor1;
- } else {
- $rowColor = $rowColor2;
- }
- $r->print(''.$mailcount.'. | '.$msg->{'shortsub'}.' | '.$msg->{'from'}.'@'.$msg->{'fromdom'}.' | '.$msg->{'sendtime'}.' | ');
- $rowNum ++;
$mailcount ++;
+ my $css_class = $mailcount%2?' class="LC_odd_row"':'';
+ $r->print(''.$mailcount.
+ '. | '.
+ $msg->{'shortsub'}.' | '.
+ $msg->{'from'}.':'.$msg->{'fromdom'}.' | '.
+ $msg->{'sendtime'}.' | ');
}
} else {
- $r->print(' '.&mt('No unread critical messages in [_1]',$lctype).'
| ');
+ $r->print(''.
+ &mt('No unread critical messages in '.$lctype).
+ ' | ');
}
}
@@ -1382,7 +1769,7 @@ sub get_display_settings {
if ($tmp=~ /^(con_lost|error|no_such_host)/i) {
%settings = ();
unless ($tmp =~ /^error: 2 /) {
- my $lctype = lc($env{'course.'.$env{'request.course.id'}.'.type'});
+ my $lctype = lc(&Apache::loncommon::course_type());
&Apache::lonnet::logthis('Error retrieving whatsnew settings: '.
$tmp.' for '.$uname.':'.$udom.' for '.$lctype.': '.$cid);
}
@@ -1415,20 +1802,28 @@ 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'};
+ } 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 = &mt('New filter setting: [_1].',''.
+ $interval_titles->{$context}->{$env{'form.interval'}}.'').' ';
+ }
} else {
- my $lctype = lc($env{'course.'.$env{'request.course.id'}.'.type'});
- &Apache::lonnet::logthis('Error storing whatsnew interval setting'.
+ my $lctype = lc(&Apache::loncommon::course_type());
+ &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'}}.'',
+ ''.$interval_titles->{$context}->{$env{'form.interval'}}.'',
''.$outcome.'. ');
}
}
@@ -1445,15 +1840,15 @@ sub store_discussion_setting {
\%discussion_settings,$udom,$uname);
if ($outcome eq 'ok') {
$result = &mt('Count unread posts in discussions display set to [_1]',
- ''.$env{'form.countunread'}.' ');
+ ''.&mt($env{'form.countunread'}).'').' ';
} else {
- my $lctype = lc($env{'course.'.$env{'request.course.id'}.'.type'});
- &Apache::lonnet::logthis('Error storing whatsnew countunread setting'.
+ 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]'.
' due to [_2].',
- ''.$env{'form.countunread'}.'',
+ ''.&mt($env{'form.countunread'}).'',
''.$outcome.'. ');
}
}
@@ -1477,17 +1872,17 @@ sub store_courseinit_setting {
}
}
if ($page_control) {
- my $lctype = lc($env{'course.'.$env{'request.course.id'}.'.type'});
+ my $lctype = lc(&Apache::loncommon::course_type());
my $outcome = &Apache::lonnet::put('nohist_whatsnew',
\%courseinit_settings,$udom,$uname);
if ($outcome eq 'ok') {
if ($page_control eq 'global preferences') {
- $result = &mt("Page displayed after role selection in [_1] now set by user's global preferences.",$lctype);
+ $result = &mt("Page displayed after role selection in $lctype now set by user's global preferences.");
} else {
- $result = &mt('Page displayed after role selection in this [_1] set to [_2]',$lctype,$$initpage{$env{'form.courseinit_page'}});
+ $result = &mt('Page displayed after role selection in this '.$lctype.' set to [_2]',$lctype,$$initpage{$env{'form.courseinit_page'}});
}
} else {
- &Apache::lonnet::logthis('Error storing whatsnew courseinit '.
+ &Apache::lonnet::logthis('Error saving whatsnew courseinit '.
'setting: '.$outcome.' for '.$uname.
':'.$udom.' in '.$lctype.' '.$cid);
if ($page_control eq 'global preferences') {
@@ -1496,7 +1891,7 @@ sub store_courseinit_setting {
''.$page_control.'',
''.$outcome.'. ');
} else {
- $result = &mt('Unable to set page display, after role selection, for this [_1] to [_2] due to [_3]. ',$lctype,
+ $result = &mt('Unable to set page display, after role selection, for this '.$lctype.' to [_2] due to [_3]. ',
$$initpage{$env{'form.courseinit_page'}},$outcome);
}
}
@@ -1506,7 +1901,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,54 +1910,61 @@ 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('
-
+
-
-
-
-
-
-
- '.$$heading{$caller}.' |
- '.$showhide.' |
-
-
- |
- ');
+ '.$$heading{$caller}.' |
+ '.$showhide.' |
+ ');
if (($caller eq 'abovethreshold') && ($$show{$caller})) {
if ($$show{$caller}) {
$r->print('
- '.$lt{'chth'}.' |
+
');
}
} elsif (($caller eq 'versionchanges') && ($$show{$caller})) {
if ($$show{$caller}) {
$r->print('
- '.$lt{'chin'}.' |
+
');
}
} elsif ($caller eq 'coursediscussion') {
if ($$show{$caller}) {
$r->print('
- '.$lt{'chop'}.' |
+
+ ');
+ }
+ } elsif (($caller eq 'newroles') && ($$show{$caller})) {
+ if ($$show{$caller}) {
+ $r->print('
+
+
+ ');
+ }
+ } elsif (($caller eq 'oldroles') && ($$show{$caller})) {
+ if ($$show{$caller}) {
+ $r->print('
+
+
');
}
}
- $r->print('
+ $r->print('
-
-
+
+
');
return;
}
@@ -1570,9 +1972,6 @@ sub start_box {
sub end_box {
my ($r) = shift;
$r->print('
-
- |
-
|
| |