version 1.115, 2010/02/02 05:56:09
|
version 1.117, 2010/03/21 14:15:58
|
Line 3403 sub results_header_row {
|
Line 3403 sub results_header_row {
|
if ($rolefilter eq 'Any') { |
if ($rolefilter eq 'Any') { |
$description .= &mt('All users with co-author roles in domain',$showfilter); |
$description .= &mt('All users with co-author roles in domain',$showfilter); |
} else { |
} else { |
$description .= &mt('All co-authors in domain with [_1] roles',$rolefilter); |
$description .= &mt('All co-authors in domain with [_1] roles',$rolefilter); |
} |
} |
} |
} |
} elsif (($env{'form.roletype'} eq 'course') || |
} elsif (($env{'form.roletype'} eq 'course') || |
Line 4527 sub update_user_list {
|
Line 4527 sub update_user_list {
|
} elsif ($choice eq 'chgsec') { |
} elsif ($choice eq 'chgsec') { |
my (@newsecs,$revresult,$nochg,@retained); |
my (@newsecs,$revresult,$nochg,@retained); |
if (($role ne 'cc') && ($role ne 'co')) { |
if (($role ne 'cc') && ($role ne 'co')) { |
@newsecs = split(/,/,$env{'form.newsecs'}); |
my @secs = sort(split(/,/,$env{'form.newsecs'})); |
|
if (@secs) { |
|
my %curr_groups = &Apache::longroup::coursegroups(); |
|
foreach my $sec (@secs) { |
|
next if (($sec =~ /\W/) || ($sec eq 'none') || |
|
(exists($curr_groups{$sec}))); |
|
push(@newsecs,$sec); |
|
} |
|
} |
} |
} |
# remove existing section if not to be retained. |
# remove existing section if not to be retained. |
if (!$env{'form.retainsec'}) { |
if (!$env{'form.retainsec'}) { |
Line 4884 function setSections(formname,crstype) {
|
Line 4892 function setSections(formname,crstype) {
|
} else { |
} else { |
numsplit = newsecs.split(/,/g); |
numsplit = newsecs.split(/,/g); |
} |
} |
for (var i=0; i<numsplit.length; i++) { |
for (var m=0; m<numsplit.length; m++) { |
var newsec = numsplit[i]; |
var newsec = numsplit[m]; |
newsec = newsec.replace(trimleading,''); |
newsec = newsec.replace(trimleading,''); |
newsec = newsec.replace(trimtrailing,''); |
newsec = newsec.replace(trimtrailing,''); |
if (re2.test(newsec) == true) { |
if (re2.test(newsec) == true) { |
Line 4894 function setSections(formname,crstype) {
|
Line 4902 function setSections(formname,crstype) {
|
if (newsec != '') { |
if (newsec != '') { |
var isnew = 1; |
var isnew = 1; |
if (fromexisting != null) { |
if (fromexisting != null) { |
for (var m=0; m<fromexisting.length; m++) { |
for (var n=0; n<fromexisting.length; n++) { |
if (newsec == fromexisting[m]) { |
if (newsec == fromexisting[n]) { |
isnew = 0; |
isnew = 0; |
} |
} |
} |
} |
Line 4942 function setSections(formname,crstype) {
|
Line 4950 function setSections(formname,crstype) {
|
} |
} |
} |
} |
if ((validsecstr != '') && (validsecstr != null)) { |
if ((validsecstr != '') && (validsecstr != null)) { |
if (numsec > 0) { |
if ((sections == '') || (sections == null)) { |
sections = sections + "," + validsecstr; |
|
} else { |
|
sections = validsecstr; |
sections = validsecstr; |
|
} else { |
|
sections = sections + "," + validsecstr; |
} |
} |
} |
} |
formname.elements[num+2].value = sections; |
formname.elements[num+2].value = sections; |