| 1 | ################################################################################ |
1 | ################################################################################ |
| 2 | # WeBWorK Online Homework Delivery System |
2 | # WeBWorK Online Homework Delivery System |
| 3 | # Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/ |
3 | # Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/ |
| 4 | # $CVSHeader: webwork-modperl/lib/WeBWorK/ContentGenerator/CourseAdmin.pm,v 1.3 2004/04/29 22:22:33 sh002i Exp $ |
4 | # $CVSHeader: webwork-modperl/lib/WeBWorK/ContentGenerator/CourseAdmin.pm,v 1.4 2004/05/05 22:02:12 sh002i Exp $ |
| 5 | # |
5 | # |
| 6 | # This program is free software; you can redistribute it and/or modify it under |
6 | # This program is free software; you can redistribute it and/or modify it under |
| 7 | # the terms of either: (a) the GNU General Public License as published by the |
7 | # the terms of either: (a) the GNU General Public License as published by the |
| 8 | # Free Software Foundation; either version 2, or (at your option) any later |
8 | # Free Software Foundation; either version 2, or (at your option) any later |
| 9 | # version, or (b) the "Artistic License" which comes with this package. |
9 | # version, or (b) the "Artistic License" which comes with this package. |
| … | |
… | |
| 293 | $sources{$ce2->{dbLayouts}->{sql}->{$table}->{source}}++; |
293 | $sources{$ce2->{dbLayouts}->{sql}->{$table}->{source}}++; |
| 294 | } |
294 | } |
| 295 | my $source; |
295 | my $source; |
| 296 | if (keys %sources > 1) { |
296 | if (keys %sources > 1) { |
| 297 | foreach my $curr (keys %sources) { |
297 | foreach my $curr (keys %sources) { |
| 298 | $source = $curr if @{ $sources{$curr} } > @{ $sources{$source} }; |
298 | $source = $curr if not defined $source or |
|
|
299 | $sources{$curr} > $sources{$source}; |
| 299 | } |
300 | } |
| 300 | } else { |
301 | } else { |
| 301 | ($source) = keys %sources; |
302 | ($source) = keys %sources; |
| 302 | } |
303 | } |
| 303 | $source; |
304 | $source; |