';
}
}
@@ -763,7 +788,7 @@ sub build_posting_display {
my $origindex='0.';
my $numoldver=0;
if ($contrib{$idx.':replyto'}) {
- if ( (($ENV{'environment.threadeddiscussion'}) && (($sortposts eq '') || ($sortposts eq 'ascdate'))) || ($sortposts eq 'thread') || ($outputtarget eq 'export')) {
+ if ( (($ENV{'environment.threadeddiscussion'}) && ($sortposts eq '')) || ($sortposts eq 'thread') || ($outputtarget eq 'export')) {
# this is a follow-up message
$original[$idx]=$original[$contrib{$idx.':replyto'}];
$$depth[$idx]=$$depth[$contrib{$idx.':replyto'}]+1;
@@ -949,16 +974,16 @@ sub build_posting_display {
$contrib{$idx.':sendername'},$contrib{$idx.':senderdomain'},$ressymb);
}
if ($$dischash{$readkey}=~/\.$idx\./) {
- $ctlink = ''.&mt('Mark unread').'? ';
+ $ctlink = '';
} else {
- $ctlink = ''.&mt('Mark read').'? ';
+ $ctlink = '';
}
}
#figure out at what position this needs to print
}
if ($outputtarget eq 'export' || $message) {
my $thisindex=$idx;
- if ( (($ENV{'environment.threadeddiscussion'}) && (($sortposts eq '') || ($sortposts eq 'ascdate'))) || ($sortposts eq 'thread') || ($outputtarget eq 'export')) {
+ if ( (($ENV{'environment.threadeddiscussion'}) && ($sortposts eq '')) || ($sortposts eq 'thread') || ($outputtarget eq 'export')) {
$thisindex=$origindex.substr('00'.$$replies[$$depth[$idx]],-2,2);
}
$$alldiscussion{$thisindex}=$idx;
@@ -1016,6 +1041,7 @@ sub build_posting_display {
my $cc_regexp = $roleregexp.':[^:]*:'.$statusregexp;
if ($role =~ /$cc_regexp/) {
$$shown{$idx} = 1;
+ last;
}
} elsif ($role =~ /^$rolematch$/) {
$$shown{$idx} = 1;
@@ -1410,8 +1436,9 @@ END
my $latexHelp=&Apache::loncommon::helpLatexCheatsheet();
my $htmlheader=&Apache::lonhtmlcommon::htmlareaheaders();
my $send=&mt('Send');
+ my $html=&Apache::lonxml::xmlbegin();
$r->print(<
+$html
The LearningOnline Network with CAPA
@@ -1635,8 +1662,9 @@ sub print_display_options {
$currtogg = $lt{'toggon'};
$disctogg = 'toggon';
}
+ my $html=&Apache::lonxml::xmlbegin();
$r->print(<
+$html
$lt{'dido'}
@@ -1727,18 +1755,18 @@ $lt{'sdpf'} $lt{'prca'}
$l
$lt{'disa'}
$lt{$discdisp}
-
$lt{'chgt'} "$dispchangeA"
+
- $lt{'chgt'} "$dispchangeB"
+
$lt{'npmr'}
$lt{$discmark}
-
$lt{'chgt'} "$markchange"
+
$lt{'dotm'}
$lt{$disctogg}
-
$lt{'chgt'} "$toggchange"
+
@@ -1776,30 +1804,13 @@ sub print_sortfilter_options {
my $section_sel = '';
my $numsections = 0;
my $numvisible = 5;
- my ($classlist) = &Apache::loncoursedata::get_classlist(
- $ENV{'request.course.id'},
- $ENV{'course.'.$ENV{'request.course.id'}.'.domain'},
- $ENV{'course.'.$ENV{'request.course.id'}.'.num'});
-
- my $sec_index = &Apache::loncoursedata::CL_SECTION();
- my $status_index = &Apache::loncoursedata::CL_STATUS();
my %sectioncount = ();
- while (my ($student,$data) = each %$classlist) {
- my ($section,$status) = ($data->[$sec_index],
- $data->[$status_index]);
- unless ($section eq '' || $section =~ /^\s*$/) {
- if (!defined($sectioncount{$section})) {
- $sectioncount{$section} = 1;
- $numsections ++;
- } else {
- $sectioncount{$section} ++;
- }
- }
- }
-
- if ($ENV{'request.course.sec'} !~ /^\s*$/) {
- @sections = ($ENV{'request.course.sec'});
- $numvisible = 1;
+
+ $numsections = &Apache::loncommon::get_sections($ENV{'course.'.$ENV{'request.course.id'}.'.domain'},$ENV{'course.'.$ENV{'request.course.id'}.'.num'},\%sectioncount);
+
+ if ($ENV{'request.course.sec'} !~ /^\s*$/) { #Restrict section choice to current section
+ @sections = ('all',$ENV{'request.course.sec'});
+ $numvisible = 2;
} else {
@sections = sort {$a cmp $b} keys(%sectioncount);
unshift(@sections,'all'); # Put 'all' at the front of the list
@@ -1834,12 +1845,36 @@ sub print_sortfilter_options {
my %role_types = ();
my %status_types = ();
&sort_filter_names(\%sort_types,\%role_types,\%status_types);
-
+ my $html=&Apache::lonxml::xmlbegin();
$r->print(<
+$html
$lt{'diso'}
+
$bodytag
@@ -1963,8 +1998,9 @@ sub print_showposters {
}
}
}
+ my $html=&Apache::lonxml::xmlbegin();
$r->print(<
+$html
$lt{'diso'}
@@ -1991,7 +2027,7 @@ END
next;
} else {
$count ++;
- $r->print('
'.$count.'
'.$last.', '.$first.' ('.$uname.','.$udom.')
'.$postcounts{$_}.'
');
+ $r->print('
'.$count.'
'.$last.', '.$first.' ('.$uname.','.$udom.')
'.$postcounts{$_}.'
');
}
}
}
@@ -2072,17 +2108,20 @@ sub get_post_attachments {
return;
}
-sub fail_redirect {;
+sub fail_redirect {
my ($r,$feedurl) = @_;
if ($feedurl=~/^\/adm\//) { $feedurl.='?register=1' };
+ my $logo=&Apache::loncommon::lonhttpdurl('/adm/lonIcons/lonlogos.gif');
+ my $html=&Apache::lonxml::xmlbegin();
$r->print (<
-Feedback not sent
+$html
+
+Feedback not sent
-
+Sorry, no recipients ... Continue
@@ -2160,15 +2199,17 @@ sub redirect_back {
}
}
$feedurl=&Apache::lonenc::check_encrypt($feedurl);
+ my $logo=&Apache::loncommon::lonhttpdurl('/adm/lonIcons/lonlogos.gif');
+ my $html=&Apache::lonxml::xmlbegin();
$r->print (<
+$html
Feedback sent
-
+
$typestyle
Sent $sendsomething message(s), and $sendposts post(s).
$status
@@ -2190,9 +2231,11 @@ sub no_redirect_back {
my ($r,$feedurl) = @_;
my $nofeed=&mt('Sorry, no feedback possible on this resource ...');
my $continue=&mt('Continue');
+ my $html=&Apache::lonxml::xmlbegin();
$r->print (<
-Feedback not sent
+$html
+
+Feedback not sent
ENDNOREDIR
@@ -2201,10 +2244,11 @@ ENDNOREDIR
&Apache::lonenc::check_encrypt($feedurl).'">');
}
$feedurl=&Apache::lonenc::check_encrypt($feedurl);
+ my $logo=&Apache::loncommon::lonhttpdurl('/adm/lonIcons/lonlogos.gif');
$r->print (<
-
+$nofeed $continue
@@ -2219,23 +2263,25 @@ sub screen_header {
unless (($ENV{'form.replydisc'}) || ($ENV{'form.editdisc'})) {
if (($feedurl=~/^\/res\//) && ($feedurl!~/^\/res\/adm/)) {
$msgoptions=
- '
'.
- &mt('Feedback to resource author').'
';
+ '';
}
if (&feedback_available(1)) {
$msgoptions.=
- ' '.
- &mt('Question about resource content');
+ '';
}
if (&feedback_available(0,1)) {
$msgoptions.=
- ' '.
- &mt('Question/Comment/Feedback about course content');
+ '';
}
if (&feedback_available(0,0,1)) {
$msgoptions.=
- ' '.
- &mt('Question/Comment/Feedback about course policy');
+ '';
}
}
if ($ENV{'request.course.id'}) {
@@ -2243,17 +2289,17 @@ sub screen_header {
&Apache::lonnet::allowed('pch',
$ENV{'request.course.id'}.
($ENV{'request.course.sec'}?'/'.$ENV{'request.course.sec'}:''))) {
- $discussoptions=' '.
&mt('Contribution to course discussion of resource');
- $discussoptions.=' '.
+ $discussoptions.=' ';
}
}
- if ($msgoptions) { $msgoptions='
'.&mt('Sending Messages').'
'.$msgoptions; }
+ if ($msgoptions) { $msgoptions='
'.&mt('Sending Messages').'
'.$msgoptions; }
if ($discussoptions) {
- $discussoptions='
'.&mt('Discussion Contributions').'
'.$discussoptions; }
+ $discussoptions='
'.&mt('Discussion Contributions').'
'.$discussoptions; }
return $msgoptions.$discussoptions;
}
@@ -2534,9 +2580,11 @@ sub show_preview {
my $subject=&clear_out_html($ENV{'form.subject'});
$subject=~s/\n/\ /g;
$subject=&Apache::lontexconvert::msgtexconverted($subject);
- $r->print('
'.
- 'Subject: '.$subject.'
'.
- $message.'
');
+ my $html=&Apache::lonxml::xmlbegin();
+ $r->print($html.''.
+ '
'.
+ 'Subject: '.$subject.'
'.
+ $message.'
');
}
sub generate_preview_button {
@@ -2568,8 +2616,9 @@ sub modify_attachments {
&extract_attachments($attachmenturls,$idx,$numoldver,\$msg,\%attachments,\%currattach,$currdelold);
}
&Apache::lonenc::check_encrypt(\$symb);
+ my $html=&Apache::lonxml::xmlbegin();
$r->print(<
+$html
Managing Attachments