');
- for (my $k=0; $k<$lasttitle-1; $k++) {
- my (@items,@unsorted);
- if (ref($cat_items{$codetitles[$k]}) eq 'ARRAY') {
- @unsorted = @{$cat_items{$codetitles[$k]}};
- }
- &Apache::courseclassifier::sort_cats($k,\%cat_order,\@codetitles,\@unsorted,\@items);
- my @longitems;
- if (defined($cat_titles{$codetitles[$k]})) {
- foreach my $item (@items) {
- push(@longitems,$cat_titles{$codetitles[$k]}{$item});
- }
- } else {
- @longitems = @items;
- }
- $r->print(''.$codetitles[$k].' '."\n".
- ' | ');
- }
- $r->print(''.$codetitles[$lasttitle-1].' '."\n".
- ''."\n".
- ' |