[system] / branches / rel-2-3-dev / webwork2 / lib / WeBWorK / ContentGenerator / Instructor / SetMaker.pm Repository:
ViewVC logotype

Diff of /branches/rel-2-3-dev/webwork2/lib/WeBWorK/ContentGenerator/Instructor/SetMaker.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 2945 Revision 2946
75## pg file. 75## pg file.
76## 76##
77 77
78sub get_library_sets { 78sub get_library_sets {
79 my $top = shift; my $dir = shift; 79 my $top = shift; my $dir = shift;
80 my @lis = readDirectory($dir); my @pgdirs; 80 # ignore directories that give us an error
81 my @lis = eval { readDirectory($dir) };
82 if ($@) {
83 warn $@;
84 return (0);
85 }
81 return (0) if grep /^=library-ignore$/, @lis; 86 return (0) if grep /^=library-ignore$/, @lis;
82 87
88 my @pgdirs;
89
83 my $pgcount = scalar(grep { m/\.pg$/ and (not m/(Header|-text)\.pg$/) and -f "$dir/$_"} @lis); 90 my $pgcount = scalar(grep { m/\.pg$/ and (not m/(Header|-text)\.pg$/) and -f "$dir/$_"} @lis);
84 my $others = scalar(grep { (!m/\.pg$/ || m/(Header|-text)\.pg$/) && 91 my $others = scalar(grep { (!m/\.pg$/ || m/(Header|-text)\.pg$/) &&
85 !m/(\.(tmp|bak)|~)$/ && -f "$dir/$_" } @lis); 92 !m/(\.(tmp|bak)|~)$/ && -f "$dir/$_" } @lis);
86 93
87 my @dirs = grep {!$ignoredir{$_} and -d "$dir/$_"} @lis; 94 my @dirs = grep {!$ignoredir{$_} and -d "$dir/$_"} @lis;

Legend:
Removed from v.2945  
changed lines
  Added in v.2946

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9