version 1.44, 2006/07/27 23:24:19
|
version 1.45, 2006/07/28 01:04:45
|
Line 46 sub header {
|
Line 46 sub header {
|
|
|
sub choose_header { |
sub choose_header { |
my ($action) = @_; |
my ($action) = @_; |
|
my $notify_check = '/^note_[0-9]+$/'; |
my $scripttag = qq| |
my $scripttag = qq| |
<script language='javascript' type='text/javascript'> |
<script language='javascript' type='text/javascript'> |
<!-- |
<!-- |
Line 111 function process(calling,numauto,nummanu
|
Line 111 function process(calling,numauto,nummanu
|
checker = 0 |
checker = 0 |
} |
} |
} |
} |
|
if (calling == "notify") { |
|
var totalnote = 0; |
|
if (formName.notify[1].checked = true) { |
|
for (var i=0; i<formName.elements.length; i++) { |
|
var elementname = formName.elements[i].name; |
|
var check_name = elementname.match($notify_check); |
|
if (check_name != null) { |
|
if (formName.elements[i].checked) { |
|
totalnote ++; |
|
} |
|
} |
|
} |
|
if (totalnote > 0) { |
|
if (formName.notify[1].checked = true) { |
|
if (confirm("You have indicated that you do not want notification of roster changes messages to be sent, but "+totalnote+" have been checked as recipients.\\nClick 'OK' to erase all recipients, or 'Cancel'.")) { |
|
checker = 1; |
|
} else { |
|
checker = 0; |
|
} |
|
} |
|
} else { |
|
if (formName.notify[0].checked = true) { |
|
alert("You have indicated that you want notification of roster changes messages to be sent, but you have not selected any recipients."); |
|
checker = 0; |
|
} |
|
} |
|
} |
|
} |
if (calling == "viewclass") { |
if (calling == "viewclass") { |
var totcheck = 0 |
var totcheck = 0 |
var numchk = 0 |
var numchk = 0 |
Line 494 ENDTWO
|
Line 522 ENDTWO
|
$noteset = "OFF"; |
$noteset = "OFF"; |
} |
} |
my %dompersonnel = &Apache::lonnet::get_domain_roles($dom,['dc']); |
my %dompersonnel = &Apache::lonnet::get_domain_roles($dom,['dc']); |
foreach my $server (keys %dompersonnel) { |
foreach my $server (keys(%dompersonnel)) { |
foreach my $user (sort(keys %{$dompersonnel{$server}})) { |
foreach my $user (sort(keys(%{$dompersonnel{$server}}))) { |
my ($trole,$uname,$udom,$runame,$rudom,$rsec) = split(/:/,$user); |
my ($trole,$uname,$udom,$runame,$rudom,$rsec) = split(/:/,$user); |
if (!grep/^$uname:$udom$/,@domcoord) { |
if (!grep(/^$uname:$udom$/,@domcoord)) { |
push(@domcoord,$uname.':'.$udom); |
push(@domcoord,$uname.':'.$udom); |
} |
} |
} |
} |
Line 546 ENDTWO
|
Line 574 ENDTWO
|
next; |
next; |
} |
} |
if ($role eq 'cc') { |
if ($role eq 'cc') { |
unless (grep/^$user$/,@ccs) { |
unless (grep(/^$user$/,@ccs)) { |
if ($end && $end < $now) { |
if ($end && $end < $now) { |
$status{$user} = 'previous'; |
$status{$user} = 'previous'; |
} elsif ($start > $now) { |
} elsif ($start > $now) { |
Line 558 ENDTWO
|
Line 586 ENDTWO
|
my ($uname,$udom) = split(/:/,$user); |
my ($uname,$udom) = split(/:/,$user); |
$pname{$user} = |
$pname{$user} = |
&Apache::loncommon::plainname($uname,$udom); |
&Apache::loncommon::plainname($uname,$udom); |
if (grep/^$user$/,@notified) { |
if (grep(/^$user$/,@notified)) { |
$notifystate{$user} = 1; |
$notifystate{$user} = 1; |
} else { |
} else { |
$notifystate{$user} = 0; |
$notifystate{$user} = 0; |
Line 566 ENDTWO
|
Line 594 ENDTWO
|
} |
} |
} |
} |
} |
} |
my $notifyshow = @ccs; |
my $notifyshow = 0; |
my %lt = &Apache::lonlocal::texthash( |
my %lt = &Apache::lonlocal::texthash( |
name => 'Name', |
name => 'Name', |
usnm => 'username:domain', |
usnm => 'username:domain', |
Line 639 ENDTWO
|
Line 667 ENDTWO
|
</td> |
</td> |
</tr>"); |
</tr>"); |
} |
} |
if ($notifycount || @showdom > 0) { |
if (@ccs > 0 || @showdom > 0) { |
$r->print("<tr><td> </td></tr><tr><td>". |
$r->print("<tr><td> </td></tr><tr><td>"); |
&mt("Uncheck the 'Notification?' checkbox for each person who is to be removed from the list of recipients who are currently informed of roster changes whenever any adds or drops occur during the nightly enrollment check.").' '.&mt("To include individuals who are not currently recipients, simply check the 'Notification?' checkbox. Click 'Go' to store your changes.")." |
if ($notifycount) { |
|
$r->print(&mt("Uncheck the checkbox(es) to terminate notification for people currently informed of roster changes from the nightly enrollment update.<br />")); |
|
} |
|
if ((@ccs + @showdom) > $notifycount) { |
|
$r->print(&mt("Check the checkbox(es) to initiate notification for people not currently informed of roster changes from the nightly enrollment update.<br />")); |
|
} |
|
$r->print(&mt("Click 'Go' to store your changes.")." |
<br/> |
<br/> |
<table width=\"100%\" border=\"0\" cellspadding=\"2\" cellspacing=\"2\"> |
<table width=\"100%\" border=\"0\" cellspadding=\"2\" cellspacing=\"2\"> |
<tr> |
<tr> |