| 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/Instructor/SetMaker.pm,v 1.23 2004/08/04 17:31:22 jj Exp $ |
4 | # $CVSHeader: webwork-modperl/lib/WeBWorK/ContentGenerator/Instructor/SetMaker.pm,v 1.24 2004/08/28 02:09:16 jj 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. |
| … | |
… | |
| 27 | use strict; |
27 | use strict; |
| 28 | use warnings; |
28 | use warnings; |
| 29 | |
29 | |
| 30 | use CGI::Pretty qw(); |
30 | use CGI::Pretty qw(); |
| 31 | use WeBWorK::Form; |
31 | use WeBWorK::Form; |
| 32 | use WeBWorK::Utils qw(readDirectory max); |
32 | use WeBWorK::Utils qw(readDirectory max sortByName); |
| 33 | use WeBWorK::Utils::Tasks qw(renderProblems); |
33 | use WeBWorK::Utils::Tasks qw(renderProblems); |
| 34 | |
34 | |
| 35 | require WeBWorK::Utils::ListingDB; |
35 | require WeBWorK::Utils::ListingDB; |
| 36 | |
36 | |
| 37 | use constant MAX_SHOW_DEFAULT => 20; |
37 | use constant MAX_SHOW_DEFAULT => 20; |
| … | |
… | |
| 763 | |
763 | |
| 764 | |
764 | |
| 765 | ############# List of local sets |
765 | ############# List of local sets |
| 766 | |
766 | |
| 767 | my @all_set_defs = $db->listGlobalSets; |
767 | my @all_set_defs = $db->listGlobalSets; |
| 768 | @all_set_defs = sort @all_set_defs; |
768 | @all_set_defs = sortByName(undef, @all_set_defs); |
| 769 | |
769 | |
| 770 | if ($use_previous_problems) { |
770 | if ($use_previous_problems) { |
| 771 | @pg_files = @all_past_list; |
771 | @pg_files = @all_past_list; |
| 772 | } else { |
772 | } else { |
| 773 | $first_shown = 0; |
773 | $first_shown = 0; |