|
1 | 1 | ################################################################################
|
2 | 2 | # WeBWorK Online Homework Delivery System
|
3 | 3 | # Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/
|
4 |
| -# $CVSHeader: webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor/Assigner.pm,v 1.20 2004/04/05 03:56:05 sh002i Exp $ |
| 4 | +# $CVSHeader: webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor/Assigner.pm,v 1.21 2004/05/24 01:43:36 mschmitt Exp $ |
5 | 5 | #
|
6 | 6 | # This program is free software; you can redistribute it and/or modify it under
|
7 | 7 | # the terms of either: (a) the GNU General Public License as published by the
|
@@ -53,17 +53,19 @@ sub body {
|
53 | 53 | {@viewable_sections = @{$ce->{viewable_sections}->{$user}};}
|
54 | 54 | if (defined @{$ce->{viewable_recitations}->{$user}})
|
55 | 55 | {@viewable_recitations = @{$ce->{viewable_recitations}->{$user}};}
|
56 |
| - foreach my $student (@Users){ |
57 |
| - my $keep = 0; |
58 |
| - foreach my $sec (@viewable_sections){ |
59 |
| - if ($student->section() eq $sec){$keep = 1;} |
60 |
| - } |
61 |
| - foreach my $rec (@viewable_recitations){ |
62 |
| - if ($student->section() eq $rec){$keep = 1;} |
| 56 | + if (@viewable_sections or @viewable_recitations){ |
| 57 | + foreach my $student (@Users){ |
| 58 | + my $keep = 0; |
| 59 | + foreach my $sec (@viewable_sections){ |
| 60 | + if ($student->section() eq $sec){$keep = 1;} |
| 61 | + } |
| 62 | + foreach my $rec (@viewable_recitations){ |
| 63 | + if ($student->section() eq $rec){$keep = 1;} |
| 64 | + } |
| 65 | + if ($keep) {push @myUsers, $student;} |
63 | 66 | }
|
64 |
| - if ($keep) {push @myUsers, $student;} |
| 67 | + @Users = @myUsers; |
65 | 68 | }
|
66 |
| - @Users = @myUsers; |
67 | 69 | ## End Mark's Edits
|
68 | 70 |
|
69 | 71 |
|
|
0 commit comments