--- loncom/interface/loncommon.pm 2006/07/07 19:34:20 1.425 +++ loncom/interface/loncommon.pm 2006/07/17 19:47:20 1.429 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.425 2006/07/07 19:34:20 albertel Exp $ +# $Id: loncommon.pm,v 1.429 2006/07/17 19:47:20 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1918,12 +1918,20 @@ sub get_related_words { return (); } my @Words=(); + my $count=0; if (exists($thesaurus_db{$keyword})) { # The first element is the number of times # the word appears. We do not need it now. - (undef,@Words) = (split(/:/,$thesaurus_db{$keyword})); - for (my $i=0;$i<=$#Words;$i++) { - ($Words[$i],undef)= split(/\,/,$Words[$i]); + my (undef,@RelatedWords) = (split(/:/,$thesaurus_db{$keyword})); + my (undef,$mostfrequentcount)=split(/\,/,$RelatedWords[0]); + my $threshold=$mostfrequentcount/10; + foreach my $possibleword (@RelatedWords) { + my ($word,$wordcount)=split(/\,/,$possibleword); + if ($wordcount>$threshold) { + push(@Words,$word); + $count++; + if ($count>10) { last; } + } } } untie %thesaurus_db; @@ -3125,7 +3133,9 @@ sub standard_css { h1, h2, h3, th { font-family: $sans } a:focus { color: red; background: yellow } table.thinborder { border-collapse: collapse; } -table.thinborder tr th, table.thinborder tr td { border-style: solid; border-width: 1px} +table.thinborder tr th { border-style: solid; border-width: 1px; background: $tabbg;} +table.thinborder tr td { border-style: solid; border-width: 1px} + form, .inline { display: inline; } .center { text-align: center; } .LC_filename {font-family: $mono;} @@ -3176,7 +3186,7 @@ table#LC_title_bar td { table#LC_title_bar td.LC_title_bar_who { background: $tabbg; color: $font; - font: medium $sans; + font: small $sans; text-align: right; } span.LC_title_bar_title { @@ -3265,6 +3275,7 @@ td.LC_menubuttons_img { table.LC_data_table, table.LC_mail_list { border: 1px solid #000000; border-collapse: separate; + border-spacing: 1px; } .LC_data_table_dense { font-size: small; @@ -3963,7 +3974,7 @@ sub simple_error_page { my ($add_class) = @_; $row_count++; my $css_class = ($row_count % 2)?'':'LC_even_row'; - my $css_class = (join(' ',$css_class,$add_class)); + $css_class = (join(' ',$css_class,$add_class)); return ''."\n";; }