--- loncom/interface/lonstatistics.pm 2003/05/29 21:38:32 1.72 +++ loncom/interface/lonstatistics.pm 2003/06/16 15:54:58 1.77 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: lonstatistics.pm,v 1.72 2003/05/29 21:38:32 matthew Exp $ +# $Id: lonstatistics.pm,v 1.77 2003/06/16 15:54:58 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -519,10 +519,8 @@ sub PrepareCourseData { my $name_length = length($seq->{'title'}); my $num_parts = $seq->{'num_assess_parts'}; # - # The number of columns needed for the summation text: - # " 1/5" = 1+3 columns, " 10/99" = 1+5 columns - my $sum_length = 1+1+2*(length($num_parts)); - my $num_col = $num_parts+$sum_length; + # Use 3 digits for each the sum and total, which means 7 total... + my $num_col = $num_parts+7; if ($num_col < $name_length) { $num_col = $name_length; } @@ -807,6 +805,8 @@ sub DisplayClasslist { my @Fields = ('fullname','username','domain','id','section'); # my $Str=''; + # "Click" is asinine but it is probably not my place to change the world. + $Str .= '<h2>Click on a users name to view their chart</h2>'; $Str .= '<table border="0"><tr><td bgcolor="#777777">'."\n"; $Str .= '<table border="0" cellpadding="3"><tr bgcolor="#e6ffff">'."\n"; foreach my $field (@Fields) { @@ -857,32 +857,27 @@ sub CreateMainMenu { # my $Str = ''; # - $Str .= '<table border="0"><tbody><tr>'."\n"; - $Str .= '<td></td>'."\n"; - $Str .= '<td></td>'."\n"; - $Str .= '<td align="center"><b>Select a Report</b></td>'."\n"; - $Str .= '<tr>'."\n"; - # - $Str .= '<td align="center">'. - '<input type="submit" name="Refresh" value="Update Display" />'. - "</td>\n"; - $Str .= '<td align="center">'. - '<input type="submit" name="ClearCache" value="Clear Caches" />'. - "</td>\n"; - # - $Str .= '<td align="center">'; - $Str .= '<select name="reportSelected" >'."\n"; - foreach (sort(keys(%$reports))) { - $Str .= '<option value="'.$_.'"'; - if($current eq $_) { - $Str .= ' selected'; - } - $Str .= '>'.$reports->{$_}.'</option>'."\n"; - } - $Str .= '</select></td>'."\n"; - # - $Str .= '</tr></tbody></table>'."\n"; - $Str .= '<hr>'."\n"; + $Str = '<input type="hidden" name="reportSelected" value="'.$current.'">'; +# $Str .= '<table border="0"><tbody><tr>'."\n"; +# $Str .= '<td align="center"><b>Report:</b></td>'."\n"; +# $Str .= '<td align="center">'; +# $Str .= '<select name="reportSelected" '. +# 'onchange="document.Statistics.submit()">'."\n"; +# foreach (sort(keys(%$reports))) { +# $Str .= '<option value="'.$_.'"'; +# if($current eq $_) { +# $Str .= ' selected'; +# } +# $Str .= '>'.$reports->{$_}.'</option>'."\n"; +# } +# $Str .= '</select></td>'."\n"; +# # +# $Str .= '<td>'.(' 'x30).'</td>'; +# $Str .= '<td align="center">'. +# '<input type="submit" name="ClearCache" value="Clear Caches" />'. +# "</td>\n"; +# $Str .= '</tr></tbody></table>'."\n"; +# $Str .= '<hr>'."\n"; # return $Str; } @@ -974,8 +969,8 @@ END my %reports = ('classlist' => 'Class list', 'problem_statistics' => 'Problem Statistics', 'student_assessment' => 'Problem Status Chart', - 'percentage' => 'Correct-problems Plot', - 'option_response' => 'Option Response Analysis', +# 'percentage' => 'Correct-problems Plot', +# 'option_response' => 'Option Response Analysis', # 'activitylog' => 'Activity Log', ); $r->print(&CreateMainMenu($ENV{'form.status'}, @@ -993,8 +988,6 @@ END &Apache::lonstudentassessment::BuildStudentAssessmentPage($r,$c); } elsif($GoToPage eq 'DoDiffGraph' || $GoToPage eq 'PercentWrongGraph') { # &Apache::lonproblemstatistics::BuildGraphicChart($r,$c); - } elsif($GoToPage eq 'classlist') { - &DisplayClasslist($r); } elsif($GoToPage eq 'Correct-problems Plot') { # &Apache::lonpercentage::BuildPercentageGraph($r,$c); }