--- loncom/interface/courseclassifier.pm 2015/05/13 19:30:13 1.21 +++ loncom/interface/courseclassifier.pm 2015/05/21 23:26:34 1.22 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Utilities for classifying courses based on institutional code # -# $Id: courseclassifier.pm,v 1.21 2015/05/13 19:30:13 raeburn Exp $ +# $Id: courseclassifier.pm,v 1.22 2015/05/21 23:26:34 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -575,15 +575,18 @@ function setElements() { } sub build_instcode_selectors { - my ($numtitles,$lasttitle,$cat_items,$codetitles,$cat_titles,$cat_order) = @_; + my ($numtitles,$lasttitle,$cat_items,$codetitles,$cat_titles,$cat_order,$official,$class,$id) = @_; my $output; my @standardnames = &Apache::loncommon::get_standard_codeitems(); if ($numtitles > 0) { my $style; - if ($env{'form.official'} eq 'off') { + if ($official eq 'off') { $style = ' style="display: none"'; } - $output .= '
'; + if ($id eq '') { + $id = 'instcodes'; + } + $output .= '
'; for (my $k=0; $k<$lasttitle-1; $k++) { my (@items,@unsorted); if (ref($cat_items->{$codetitles->[$k]}) eq 'ARRAY') { @@ -599,8 +602,11 @@ sub build_instcode_selectors { @longitems = @items; } $output .= '
'.$codetitles->[$k].'
'."\n". - ''.&mt('All').''."\n"; for (my $i=0; $i<@items; $i++) { if ($longitems[$i] eq '') { $longitems[$i] = $items[$i]; @@ -644,7 +650,7 @@ sub instcode_selectors { ''.&mt('No').'
'. &build_instcode_selectors($numtitles,$lasttitle,\%cat_items,$codetitles, - \%cat_titles,\%cat_order)."\n". + \%cat_titles,\%cat_order,$env{'form.official'})."\n". ''."\n". ''."\n"; }