--- loncom/interface/statistics/lonstudentassessment.pm 2006/04/08 06:59:44 1.136 +++ loncom/interface/statistics/lonstudentassessment.pm 2012/10/02 18:13:30 1.170 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: lonstudentassessment.pm,v 1.136 2006/04/08 06:59:44 albertel Exp $ +# $Id: lonstudentassessment.pm,v 1.170 2012/10/02 18:13:30 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -51,6 +51,7 @@ package Apache::lonstudentassessment; use strict; use Apache::lonstatistics(); +use Apache::lonquickgrades(); use Apache::lonhtmlcommon(); use Apache::loncommon(); use Apache::loncoursedata; @@ -61,6 +62,9 @@ use Apache::lonmsgdisplay(); use Time::HiRes; use Spreadsheet::WriteExcel; use Spreadsheet::WriteExcel::Utility(); +use lib '/home/httpd/lib/perl/'; +use LONCAPA; + ####################################################### ####################################################### @@ -147,6 +151,7 @@ sub BuildStudentAssessmentPage { 'chartoutputmode' => 'scalar', 'chartoutputdata' => 'scalar', 'Section' => 'array', + 'Groups' => 'array', 'StudentData' => 'array', 'Maps' => 'array'); &Apache::loncommon::store_course_settings('chart',\%Saveable_Parameters); @@ -162,6 +167,9 @@ sub BuildStudentAssessmentPage { &Apache::lonstatistics::DisplayClasslist($r); return; } + $r->print(&Apache::lonhtmlcommon::breadcrumbs('Chart','Chart_Description:Chart_Sections:Chart_Student_Data:Chart_Enrollment_Status:Chart_Sequences:Chart_Output_Formats:Chart_Output_Data')); + &Apache::lonquickgrades::startGradeScreen($r,'chart'); + # # Print out the HTML headers for the interface # This also parses the output mode selector @@ -226,6 +234,7 @@ sub BuildStudentAssessmentPage { $output_student->($r,$student); } # Call the "finish" routine selected above + &Apache::lonquickgrades::endGradeScreen($r); $finish->($r); # return; @@ -244,14 +253,14 @@ sub next_and_previous_buttons { if (defined($previous)) { my $sname = $previous->{'username'}.':'.$previous->{'domain'}; $previousbutton .= ''; } else { $previousbutton .= ''; + &mt('Previous Student').'" disabled="disabled" />'; } # # Build the next student link @@ -260,19 +269,19 @@ sub next_and_previous_buttons { if (defined($next)) { my $sname = $next->{'username'}.':'.$next->{'domain'}; $nextbutton .= ''; } else { $nextbutton .= ''; + &mt('Next Student').'" disabled="disabled" />'; } # # Build the 'all students' button my $all = ''; - $all .= ''; $Str .= $previousbutton.(' 'x5).$all.(' 'x5).$nextbutton; @@ -314,14 +323,22 @@ the chart page. ####################################################### sub CreateInterface { my $Str = ''; - $Str .= &Apache::lonhtmlcommon::breadcrumbs(undef,'Chart'); -# $Str .= &CreateLegend(); $Str .= ''."\n"; $Str .= ''; - $Str .= ''; - $Str .= ''; - $Str .= ''; - $Str .= ''; + $Str .= ''; + $Str .= ''; + $Str .= ''; + $Str .= ''; + $Str .= ''; $Str .= ''; @@ -333,6 +350,8 @@ sub CreateInterface { $Str .= ''."\n"; $Str .= '
'.&mt('Sections').''.&mt('Student Data').''.&mt('Enrollment Status').''.&mt('Sequences and Folders').''.&mt('Sections').''. + &Apache::loncommon::help_open_topic("Chart_Sections"). + ''.&mt('Groups').''. + ''.&mt('Student Data').''. + &Apache::loncommon::help_open_topic("Chart_Student_Data"). + ''.&mt('Access Status').''. + &Apache::loncommon::help_open_topic("Chart_Enrollment_Status"). + ''.&mt('Sequences and Folders').''. + &Apache::loncommon::help_open_topic("Chart_Sequences"). + ''.&mt('Output Format').''. &Apache::loncommon::help_open_topic("Chart_Output_Formats"). '
'."\n"; $Str .= &Apache::lonstatistics::SectionSelect('Section','multiple',5); $Str .= ''; + $Str .= &Apache::lonstatistics::GroupSelect('Group','multiple',5); + $Str .= ''; $Str .= &Apache::lonstatistics::StudentDataSelect('StudentData','multiple', 5,undef); $Str .= ''."\n"; @@ -345,19 +364,15 @@ sub CreateInterface { $Str .= &CreateAndParseOutputDataSelector(); $Str .= '
'."\n"; - $Str .= ''; - $Str .= ' 'x5; $Str .= ''; $Str .= ' 'x5; $Str .= ''; - $Str .= ' 'x5; - $Str .= - &mt('Status [_1]', - ''); - $Str .= '
'; + $Str .= '

' + .'' + .'

'; return $Str; } @@ -530,7 +545,7 @@ my @OutputDataOptions = summary_table => 1, maximum_row => 0, ignore_weight => 1, - shortdesc => 'Number of Problem Parts completed successfully.', + shortdesc => 'Number of Problem Parts completed successfully', longdesc => 'The Number of Problem Parts completed successfully and '. 'the maximum possible for each student', }, @@ -538,7 +553,7 @@ my @OutputDataOptions = sub HTMLifyOutputDataDescriptions { my $Str = ''; - $Str .= "

Output Data

\n"; + $Str .= '

'.&mt('Output Data').'

'."\n"; $Str .= "
\n"; foreach my $option (@OutputDataOptions) { $Str .= '
'.$option->{'name'}.'
'; @@ -647,28 +662,30 @@ sub html_initialize { &Apache::lonstatistics::selected_sequences_with_assessments(); if (! ref($navmap)) { # Unable to get data, so bail out - $r->print("

". - &mt('Unable to retrieve course information.'). - '

'); + $r->print('

' + .&mt('Unable to retrieve course information.') + .'

'); } # If we're showing links, show a checkbox to open in new # windows. if ($show_links ne 'no') { + my $labeltext = &mt('Show links in new window'); $r->print(<new_window = true; -

NEW_WINDOW_CHECKBOX } # $r->print("

".$env{'course.'.$env{'request.course.id'}.'.description'}. - "  ".localtime(time)."

"); + "  ".&Apache::lonlocal::locallocaltime(time).""); # if ($chosen_output->{'base'} !~ /^final table/) { - $r->print("

".$chosen_output->{'shortdesc'}."

"); + $r->print("

".&mt($chosen_output->{'shortdesc'})."

"); } my $Str = "
\n";
     # First, the @StudentData fields need to be listed
@@ -696,8 +713,8 @@ NEW_WINDOW_CHECKBOX
                 $width{$symb}->{'width_sum'} += 1;            
             }
 	    $total_count += &count_parts($navmap,$seq);
-            # Use 3 digits for the sum
-            $width{$symb}->{'width_sum'} += 3;
+            # Use 6 digits for the sum
+            $width{$symb}->{'width_sum'} += 6;
         }
         # Compute width of maximum
         if ($chosen_output->{'sequence_max'}) {
@@ -705,8 +722,8 @@ NEW_WINDOW_CHECKBOX
                 # One digit for the '/'
                 $width{$symb}->{'width_sum'} +=1;
             }
-            # Use 3 digits for the total
-            $width{$symb}->{'width_sum'}+=3;
+            # Use 6 digits for the total
+            $width{$symb}->{'width_sum'}+=6;
         }
 	#
         if ($chosen_output->{'every_problem'}) {
@@ -730,11 +747,9 @@ NEW_WINDOW_CHECKBOX
     $total_sum_width = length($total_count)+1;
     $Str .= "    total
\n"; $Str .= "
";
-    $r->print($Str);
-    $r->rflush();
 
     $r->print(<
+