| … | |
… | |
| 150 | } else { |
150 | } else { |
| 151 | warn "Couldn't read file $filePath"; |
151 | warn "Couldn't read file $filePath"; |
| 152 | } |
152 | } |
| 153 | return \%assocArray; |
153 | return \%assocArray; |
| 154 | } |
154 | } |
|
|
155 | |
|
|
156 | ################################################################################ |
|
|
157 | # routines for listing various types of files |
|
|
158 | ################################################################################ |
|
|
159 | |
|
|
160 | # list classlist files |
|
|
161 | sub getCSVList { |
|
|
162 | my ($self) = @_; |
|
|
163 | my $ce = $self->{ce}; |
|
|
164 | my $dir = $ce->{courseDirs}->{templates}; |
|
|
165 | return grep { not m/^\./ and m/\.lst$/ and -f "$dir/$_" } WeBWorK::Utils::readDirectory($dir); |
|
|
166 | } |
|
|
167 | |
|
|
168 | sub getDefList { |
|
|
169 | my ($self) = @_; |
|
|
170 | my $ce = $self->{ce}; |
|
|
171 | my $dir = $ce->{courseDirs}->{templates}; |
|
|
172 | return $self->read_dir($dir, qr/.*\.def/); |
|
|
173 | } |
|
|
174 | |
| 155 | ## Template Escapes ## |
175 | ## Template Escapes ## |
| 156 | |
176 | |
| 157 | sub links { |
177 | sub links { |
| 158 | my $self = shift; |
178 | my $self = shift; |
| 159 | # FIXME these links are being placed in ContentGenerator.pm |
179 | # FIXME these links are being placed in ContentGenerator.pm |