version 1.87, 2011/05/21 01:29:43
|
version 1.88, 2011/05/22 21:53:52
|
Line 569 sub output_category_table {
|
Line 569 sub output_category_table {
|
# |
# |
my @order=split(/\,/,$categories{'order'}); |
my @order=split(/\,/,$categories{'order'}); |
# |
# |
|
my %performance=&dumpdata($navmaps); |
my $maxpos=$#order; |
my $maxpos=$#order; |
for (my $i=0;$i<=$maxpos;$i++) { |
for (my $i=0;$i<=$maxpos;$i++) { |
my ($value,$weight)=&output_and_calc_category($r,$cangrade,$navmaps,$order[$i],$i,$maxpos,%categories); |
my ($value,$weight)=&output_and_calc_category($r,$cangrade,$navmaps,$order[$i],$i,$maxpos,\%performance,%categories); |
$sum+=$value*$weight; |
$sum+=$value*$weight; |
$total+=$weight; |
$total+=$weight; |
} |
} |
Line 603 sub output_category_table_header {
|
Line 604 sub output_category_table_header {
|
# |
# |
|
|
sub output_and_calc_category { |
sub output_and_calc_category { |
my ($r,$cangrade,$navmaps,$id,$currentpos,$maxpos,%categories)=@_; |
my ($r,$cangrade,$navmaps,$id,$currentpos,$maxpos,$performance,%categories)=@_; |
my $value=0; |
my $value=0; |
my $weight=0; |
my $weight=0; |
my $iconpath = &Apache::loncommon::lonhttpdurl($r->dir_config('lonIconsURL') . "/"); |
my $iconpath = &Apache::loncommon::lonhttpdurl($r->dir_config('lonIconsURL') . "/"); |
Line 646 ENDMOVE
|
Line 647 ENDMOVE
|
$r->print('<td><ul>'); |
$r->print('<td><ul>'); |
foreach my $contentid (split(/\,/,$categories{$id.'_content'})) { |
foreach my $contentid (split(/\,/,$categories{$id.'_content'})) { |
$r->print('<li>'); |
$r->print('<li>'); |
$r->print(&Apache::lonnet::gettitle($contentid)); |
$r->print(&Apache::lonnet::gettitle($contentid).' '.$$performance{$contentid}); |
if ($cangrade) { |
if ($cangrade) { |
$r->print(' <a href="javascript:storecmd(\'delcont_'.$id.'______'.$contentid.'\');">'.&mt('Delete').'</a>'); |
$r->print(' <a href="javascript:storecmd(\'delcont_'.$id.'______'.$contentid.'\');">'.&mt('Delete').'</a>'); |
} |
} |