version 1.20, 2006/05/01 05:57:26
|
version 1.24, 2006/05/11 20:05:03
|
Line 260 sub movemsg {
|
Line 260 sub movemsg {
|
|
|
sub discourse { |
sub discourse { |
my $r=shift; |
my $r=shift; |
my $classlist = &Apache::loncoursedata::get_classlist(); |
my ($classlist,$keylist) = &Apache::loncoursedata::get_classlist(); |
my ($classgroups,$studentgroups) = |
my ($classgroups,$studentgroups) = |
&Apache::loncoursedata::get_group_memberships($classlist); |
&Apache::loncoursedata::get_group_memberships($classlist,$keylist); |
my %lt=&Apache::lonlocal::texthash('cfa' => 'Check All', |
my %lt=&Apache::lonlocal::texthash('cfa' => 'Check All', |
'cfs' => 'Check Section/Group', |
'cfs' => 'Check Section/Group', |
'cfn' => 'Uncheck All'); |
'cfn' => 'Uncheck All'); |
Line 318 ENDDISHEADER
|
Line 318 ENDDISHEADER
|
if (keys(%coursepersonnel) > 0) { |
if (keys(%coursepersonnel) > 0) { |
$r->print('<h3>Non-students</h3>'); |
$r->print('<h3>Non-students</h3>'); |
$r->print(&Apache::loncommon::start_data_table()); |
$r->print(&Apache::loncommon::start_data_table()); |
$r->print(&Apache::loncommon::start_data_table_row()); |
$r->print('<tr><th>Name</th><th>Username:Domain</th><th>Role</th></tr>'); |
$r->print('<th>Name</th><th>Username:Domain</th><th>Role</th>'); |
foreach my $role (sort(keys(%coursepersonnel))) { |
$r->print(&Apache::loncommon::end_data_table_row()); |
foreach my $user (split(/\,/,$coursepersonnel{$role})) { |
foreach my $role (sort keys %coursepersonnel) { |
my ($puname,$pudom)=split(/\:/,$user); |
foreach (split(/\,/,$coursepersonnel{$role})) { |
|
my ($puname,$pudom)=split(/\:/,$_); |
|
$r->print(&Apache::loncommon::start_data_table_row()); |
$r->print(&Apache::loncommon::start_data_table_row()); |
$r->print('<td><label>'. |
$r->print('<td><label>'. |
'<input type="checkbox" name="send_to_&&&&&&_'. |
'<input type="checkbox" name="send_to_&&&&&&_'. |
$puname.':'.$pudom.'" /> '. |
$puname.':'.$pudom.'" /> '. |
&Apache::loncommon::plainname($puname,$pudom). |
&Apache::loncommon::plainname($puname,$pudom). |
'</label></td>'. |
'</label></td>'. |
'<td>('.$_.'),</td><td><i>'.$role.'</i></td>'); |
'<td>('.$user.'),</td><td><i>'.$role.'</i></td>'); |
$r->print(&Apache::loncommon::end_data_table_row()); |
$r->print(&Apache::loncommon::end_data_table_row()); |
} |
} |
} |
} |
Line 339 ENDDISHEADER
|
Line 337 ENDDISHEADER
|
if (keys(%{$classlist}) > 0) { |
if (keys(%{$classlist}) > 0) { |
$r->print('<h3>Students</h3>'); |
$r->print('<h3>Students</h3>'); |
$r->print(&Apache::loncommon::start_data_table()); |
$r->print(&Apache::loncommon::start_data_table()); |
$r->print(&Apache::loncommon::start_data_table_row()); |
$r->print('<tr><th>Name</th><th>Username:Domain</th><th>Section</th><th>Groups</th></tr>'); |
$r->print('<th>Name</th><th>Username:Domain</th><th>Section</th><th>Groups</th>'); |
|
$r->print(&Apache::loncommon::end_data_table_row()); |
|
my $sort = sub { |
my $sort = sub { |
my $aname=lc($classlist->{$a}[&Apache::loncoursedata::CL_FULLNAME()]); |
my $aname=lc($classlist->{$a}[&Apache::loncoursedata::CL_FULLNAME()]); |
if (!$aname) { $aname=$a; } |
if (!$aname) { $aname=$a; } |
Line 360 ENDDISHEADER
|
Line 356 ENDDISHEADER
|
next if ($status ne 'Active'); |
next if ($status ne 'Active'); |
next if ($env{'request.course.sec'} && |
next if ($env{'request.course.sec'} && |
$section ne $env{'request.course.sec'}); |
$section ne $env{'request.course.sec'}); |
my @studentsgroups = &Apache::loncoursedata::get_students_groups( |
my @studentsgroups = |
$student,$status,$classgroups); |
&Apache::loncoursedata::get_students_groups($student,$status, |
|
$classgroups); |
my $grouplist = join(', ',@studentsgroups); |
my $grouplist = join(', ',@studentsgroups); |
my $key = 'send_to_&&&'.$section.'&&&_'.$student; |
my $key = 'send_to_&&&'.$section.'&&&_'.$student; |
if (! defined($fullname) || $fullname eq '') {$fullname = $sname;} |
if (! defined($fullname) || $fullname eq '') {$fullname = $sname;} |
Line 377 ENDDISHEADER
|
Line 374 ENDDISHEADER
|
$groupcount.'" />'); |
$groupcount.'" />'); |
if (defined($env{'form.group'})) { |
if (defined($env{'form.group'})) { |
if ($env{'form.group'} eq $group) { |
if ($env{'form.group'} eq $group) { |
$checked = 'checked=checked'; |
$checked = 'checked="checked"'; |
} |
} |
} |
} |
} |
} |
Line 904 sub compout {
|
Line 901 sub compout {
|
} |
} |
my $citation=&displayresource(%content); |
my $citation=&displayresource(%content); |
if ($env{'form.recdom'}) { $defdom=$env{'form.recdom'}; } |
if ($env{'form.recdom'}) { $defdom=$env{'form.recdom'}; } |
$r->print( |
if ($env{'form.text'}) { $dismsg=$env{'form.text'}; } |
|
if ($env{'form.subject'}) { $dissub=$env{'form.subject'}; } |
|
$r->print( |
'<form action="/adm/email" name="compemail" method="post"'. |
'<form action="/adm/email" name="compemail" method="post"'. |
' enctype="multipart/form-data">'."\n". |
' enctype="multipart/form-data">'."\n". |
'<input type="hidden" name="sendmail" value="on" />'."\n". |
'<input type="hidden" name="sendmail" value="on" />'."\n". |
Line 1357 END
|
Line 1356 END
|
|
|
my ($setuname,$setudom,$title) = |
my ($setuname,$setudom,$title) = |
&parse_block_record($$records{$record}); |
&parse_block_record($$records{$record}); |
$title = &HTML::Entities::encode($title,'"<>'); |
$title = &HTML::Entities::encode($title,'"<>&'); |
my $settername = &Apache::loncommon::plainname($setuname,$setudom); |
my $settername = &Apache::loncommon::plainname($setuname,$setudom); |
$r->print(&Apache::loncommon::start_data_table_row()); |
$r->print(&Apache::loncommon::start_data_table_row()); |
$r->print(<<"END"); |
$r->print(<<"END"); |
Line 1657 sub header {
|
Line 1656 sub header {
|
$r->print(&Apache::loncommon::start_page('Communication and Messages', |
$r->print(&Apache::loncommon::start_page('Communication and Messages', |
$extra)); |
$extra)); |
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
$r->print(&Apache::lonhtmlcommon::breadcrumbs |
(undef,($title?$title:'Communication and Messages'))); |
(($title?$title:'Communication and Messages'))); |
|
|
} |
} |
|
|
Line 1905 sub handler {
|
Line 1904 sub handler {
|
['display','replyto','forward','markread','markdel','markunread', |
['display','replyto','forward','markread','markdel','markunread', |
'sendreply','compose','sendmail','critical','recname','recdom', |
'sendreply','compose','sendmail','critical','recname','recdom', |
'recordftf','sortedby','block','folder','startdis','interdis', |
'recordftf','sortedby','block','folder','startdis','interdis', |
'showcommentbaseurl','dismode','group']); |
'showcommentbaseurl','dismode','group','subject','text']); |
$sqs='&sortedby='.$env{'form.sortedby'}; |
$sqs='&sortedby='.$env{'form.sortedby'}; |
|
|
# ------------------------------------------------------ They checked for email |
# ------------------------------------------------------ They checked for email |