version 1.150.2.4, 2010/02/12 15:11:08
|
version 1.153, 2009/05/17 22:49:42
|
Line 248 sub next_and_previous_buttons {
|
Line 248 sub next_and_previous_buttons {
|
if (defined($previous)) { |
if (defined($previous)) { |
my $sname = $previous->{'username'}.':'.$previous->{'domain'}; |
my $sname = $previous->{'username'}.':'.$previous->{'domain'}; |
$previousbutton .= '<input type="button" value="'. |
$previousbutton .= '<input type="button" value="'. |
&mt('Previous Student ([_1])', |
'Previous Student ('. |
$previous->{'username'}.':'.$previous->{'domain'}). |
$previous->{'username'}.'@'.$previous->{'domain'}.')'. |
'" onclick="document.Statistics.SelectedStudent.value='. |
'" onclick="document.Statistics.SelectedStudent.value='. |
"'".$sname."'".';'. |
"'".$sname."'".';'. |
'document.Statistics.submit();" />'; |
'document.Statistics.submit();" />'; |
} else { |
} else { |
$previousbutton .= '<input type="button" value="'. |
$previousbutton .= '<input type="button" value="'. |
&mt('Previous student').'" disabled="disabled" />'; |
'Previous student (none)'.'" />'; |
} |
} |
# |
# |
# Build the next student link |
# Build the next student link |
Line 264 sub next_and_previous_buttons {
|
Line 264 sub next_and_previous_buttons {
|
if (defined($next)) { |
if (defined($next)) { |
my $sname = $next->{'username'}.':'.$next->{'domain'}; |
my $sname = $next->{'username'}.':'.$next->{'domain'}; |
$nextbutton .= '<input type="button" value="'. |
$nextbutton .= '<input type="button" value="'. |
&mt('Next Student ([_1])', |
'Next Student ('. |
$next->{'username'}.':'.$next->{'domain'}). |
$next->{'username'}.'@'.$next->{'domain'}.')'. |
'" onclick="document.Statistics.SelectedStudent.value='. |
'" onclick="document.Statistics.SelectedStudent.value='. |
"'$sname'".';'. |
"'".$sname."'".';'. |
'document.Statistics.submit();" />'; |
'document.Statistics.submit();" />'; |
} else { |
} else { |
$nextbutton .= '<input type="button" value="'. |
$nextbutton .= '<input type="button" value="'. |
&mt('Next student').'" disabled="disabled" />'; |
'Next student (none)'.'" />'; |
} |
} |
# |
# |
# Build the 'all students' button |
# Build the 'all students' button |
my $all = ''; |
my $all = ''; |
$all .= '<input type="button" value="'.&mt('All Students').'" '. |
$all .= '<input type="button" value="All Students" '. |
'" onclick="document.Statistics.SelectedStudent.value='. |
'" onclick="document.Statistics.SelectedStudent.value='. |
"''".';'.'document.Statistics.submit();" />'; |
"''".';'.'document.Statistics.submit();" />'; |
$Str .= $previousbutton.(' 'x5).$all.(' 'x5).$nextbutton; |
$Str .= $previousbutton.(' 'x5).$all.(' 'x5).$nextbutton; |
Line 327 sub CreateInterface {
|
Line 327 sub CreateInterface {
|
'</td>'; |
'</td>'; |
$Str .= '<td align="center"><b>'.&mt('Groups').'</b>'. |
$Str .= '<td align="center"><b>'.&mt('Groups').'</b>'. |
'</td>'; |
'</td>'; |
$Str .= '<td align="center"><b>'.&mt('Student Data').'</b>'. |
$Str .= '<td align="center"><b>'.&mt('Student Data</b>'). |
&Apache::loncommon::help_open_topic("Chart_Student_Data"). |
&Apache::loncommon::help_open_topic("Chart_Student_Data"). |
'</td>'; |
'</td>'; |
$Str .= '<td align="center"><b>'.&mt('Access Status').'</b>'. |
$Str .= '<td align="center"><b>'.&mt('Access Status').'</b>'. |
Line 361 sub CreateInterface {
|
Line 361 sub CreateInterface {
|
$Str .= &CreateAndParseOutputDataSelector(); |
$Str .= &CreateAndParseOutputDataSelector(); |
$Str .= '</td></tr>'."\n"; |
$Str .= '</td></tr>'."\n"; |
$Str .= '</table>'."\n"; |
$Str .= '</table>'."\n"; |
$Str .= '<p>'. |
$Str .= '<input type="submit" name="Generate Chart" value="'. |
&mt('Status:').' '. |
&mt('Generate Chart').'" />'; |
'<input type="text" name="stats_status" size="60" value="" readonly="readonly" />'. |
$Str .= ' 'x5; |
'</p>'; |
|
$Str .= '<input type="submit" name="selectstudent" value="'. |
$Str .= '<input type="submit" name="selectstudent" value="'. |
&mt('Select One Student').'" />'; |
&mt('Select One Student').'" />'; |
$Str .= ' 'x5; |
$Str .= ' 'x5; |
$Str .= '<input type="submit" name="ClearCache" value="'. |
$Str .= '<input type="submit" name="ClearCache" value="'. |
&mt('Clear Caches').'" />'; |
&mt('Clear Caches').'" />'; |
$Str .= '<p>'. |
$Str .= ' 'x5; |
'<input type="submit" name="Generate Chart"'. |
$Str .= |
' value="'.&mt('Generate Chart').'" />'. |
&mt('Status [_1]', |
'</p>'; |
'<input type="text" name="stats_status" size="60" value="" readonly="readonly" />'); |
|
$Str .= '<br />'; |
return $Str; |
return $Str; |
} |
} |
|
|
Line 547 my @OutputDataOptions =
|
Line 546 my @OutputDataOptions =
|
summary_table => 1, |
summary_table => 1, |
maximum_row => 0, |
maximum_row => 0, |
ignore_weight => 1, |
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 '. |
longdesc => 'The Number of Problem Parts completed successfully and '. |
'the maximum possible for each student', |
'the maximum possible for each student', |
}, |
}, |
Line 555 my @OutputDataOptions =
|
Line 554 my @OutputDataOptions =
|
|
|
sub HTMLifyOutputDataDescriptions { |
sub HTMLifyOutputDataDescriptions { |
my $Str = ''; |
my $Str = ''; |
$Str .= '<h2>'.&mt('Output Data').'</h2>'."\n"; |
$Str .= "<h2>Output Data</h2>\n"; |
|
|
$Str .= "<dl>\n"; |
$Str .= "<dl>\n"; |
foreach my $option (@OutputDataOptions) { |
foreach my $option (@OutputDataOptions) { |
$Str .= ' <dt>'.$option->{'name'}.'</dt>'; |
$Str .= ' <dt>'.$option->{'name'}.'</dt>'; |
Line 665 sub html_initialize {
|
Line 663 sub html_initialize {
|
&Apache::lonstatistics::selected_sequences_with_assessments(); |
&Apache::lonstatistics::selected_sequences_with_assessments(); |
if (! ref($navmap)) { |
if (! ref($navmap)) { |
# Unable to get data, so bail out |
# Unable to get data, so bail out |
$r->print('<p class="LC_error">'. |
$r->print("<h3>". |
&mt('Unable to retrieve course information.'). |
&mt('Unable to retrieve course information.'). |
'</p>'); |
'</h3>'); |
} |
} |
|
|
# If we're showing links, show a checkbox to open in new |
# If we're showing links, show a checkbox to open in new |
Line 684 NEW_WINDOW_CHECKBOX
|
Line 682 NEW_WINDOW_CHECKBOX
|
|
|
# |
# |
$r->print("<h3>".$env{'course.'.$env{'request.course.id'}.'.description'}. |
$r->print("<h3>".$env{'course.'.$env{'request.course.id'}.'.description'}. |
" ".&Apache::lonlocal::locallocaltime(time)."</h3>"); |
" ".localtime(time)."</h3>"); |
# |
# |
if ($chosen_output->{'base'} !~ /^final table/) { |
if ($chosen_output->{'base'} !~ /^final table/) { |
$r->print("<h3>".&mt($chosen_output->{'shortdesc'})."</h3>"); |
$r->print("<h3>".&mt($chosen_output->{'shortdesc'})."</h3>"); |
Line 715 NEW_WINDOW_CHECKBOX
|
Line 713 NEW_WINDOW_CHECKBOX
|
$width{$symb}->{'width_sum'} += 1; |
$width{$symb}->{'width_sum'} += 1; |
} |
} |
$total_count += &count_parts($navmap,$seq); |
$total_count += &count_parts($navmap,$seq); |
# Use 3 digits for the sum |
# Use 6 digits for the sum |
$width{$symb}->{'width_sum'} += 3; |
$width{$symb}->{'width_sum'} += 6; |
} |
} |
# Compute width of maximum |
# Compute width of maximum |
if ($chosen_output->{'sequence_max'}) { |
if ($chosen_output->{'sequence_max'}) { |
Line 724 NEW_WINDOW_CHECKBOX
|
Line 722 NEW_WINDOW_CHECKBOX
|
# One digit for the '/' |
# One digit for the '/' |
$width{$symb}->{'width_sum'} +=1; |
$width{$symb}->{'width_sum'} +=1; |
} |
} |
# Use 3 digits for the total |
# Use 6 digits for the total |
$width{$symb}->{'width_sum'}+=3; |
$width{$symb}->{'width_sum'}+=6; |
} |
} |
# |
# |
if ($chosen_output->{'every_problem'}) { |
if ($chosen_output->{'every_problem'}) { |
Line 887 sub html_outputstudent {
|
Line 885 sub html_outputstudent {
|
$ratio .= ' '; |
$ratio .= ' '; |
} |
} |
if ($chosen_output->{'sequence_sum'} && $score ne ' ') { |
if ($chosen_output->{'sequence_sum'} && $score ne ' ') { |
my $score .= sprintf("%3.0f",$score); |
my $score .= sprintf("%3.2f",$score); |
$ratio .= (' 'x(3-length($score))).$score; |
$ratio .= (' 'x(6-length($score))).$score; |
} elsif($chosen_output->{'sequence_sum'}) { |
} elsif($chosen_output->{'sequence_sum'}) { |
$ratio .= ' 'x3; |
$ratio .= ' 'x6; |
} |
} |
if ($chosen_output->{'sequence_max'}) { |
if ($chosen_output->{'sequence_max'}) { |
if ($chosen_output->{'sequence_sum'}) { |
if ($chosen_output->{'sequence_sum'}) { |
$ratio .= '/'; |
$ratio .= '/'; |
} |
} |
$ratio .= sprintf("%3.0f",$seq_max); |
my $sequence_total=sprintf("%3.2f",$seq_max); |
|
$ratio .= $sequence_total.(' 'x(6-length($sequence_total))); |
} |
} |
# |
# |
if (! $chosen_output->{'every_problem'}) { |
if (! $chosen_output->{'every_problem'}) { |
Line 930 sub html_outputstudent {
|
Line 929 sub html_outputstudent {
|
if (! defined($score)) { |
if (! defined($score)) { |
$score = ' ' x $total_sum_width; |
$score = ' ' x $total_sum_width; |
} else { |
} else { |
$score = sprintf("%.0f",$score); |
$score = sprintf("%.2f",$score); |
$score = (' 'x(3-length($score))).$score; |
$score = (' 'x(6-length($score))).$score; |
} |
} |
$Str .= ' '.' 'x($total_sum_width-length($score)).$score.' / '.$max; |
$Str .= ' '.' 'x($total_sum_width-length($score)).$score.' / '.$max; |
$Str .= " \n"; |
$Str .= " \n"; |
Line 996 sub StudentAverageTotal {
|
Line 995 sub StudentAverageTotal {
|
sub SingleStudentTotal { |
sub SingleStudentTotal { |
return if (! defined($navmap)); |
return if (! defined($navmap)); |
my $student = &Apache::lonstatistics::current_student(); |
my $student = &Apache::lonstatistics::current_student(); |
my $Str = '<h3>'.&mt('Summary table for [_1] ([_2])', |
my $Str = '<h3>'.&mt('Summary table for [_1] ([_2]@[_3])', |
$student->{'fullname'}, |
$student->{'fullname'}, |
$student->{'username'}.':'.$student->{'domain'}).'</h3>'; |
$student->{'username'},$student->{'domain'}).'</h3>'; |
$Str .= $/; |
$Str .= $/; |
$Str .= &Apache::loncommon::start_data_table()."\n"; |
$Str .= &Apache::loncommon::start_data_table()."\n"; |
$Str .= |
$Str .= |
Line 1179 sub excel_initialize {
|
Line 1178 sub excel_initialize {
|
# |
# |
# Put the date in there too |
# Put the date in there too |
$excel_sheet->write($header_row,$cols_output++, |
$excel_sheet->write($header_row,$cols_output++, |
&mt('Compiled on [_1]',&Apache::lonlocal::locallocaltime(time)),$format->{'h3'}); |
'Compiled on '.localtime(time),$format->{'h3'}); |
# |
# |
$cols_output = 0; |
$cols_output = 0; |
$excel_sheet->write($description_row,$cols_output++, |
$excel_sheet->write($description_row,$cols_output++, |
&mt($chosen_output->{'shortdesc'}), |
$chosen_output->{'shortdesc'}, |
$format->{'b'}); |
$format->{'b'}); |
# |
# |
$cols_output = 0; |
$cols_output = 0; |
Line 1261 sub excel_initialize {
|
Line 1260 sub excel_initialize {
|
$formula_data{$symb}->{'Excel:scorecol'}=$cols_output; |
$formula_data{$symb}->{'Excel:scorecol'}=$cols_output; |
if ($chosen_output->{'base'} eq 'parts correct total') { |
if ($chosen_output->{'base'} eq 'parts correct total') { |
$excel_sheet->write($resource_name_row,$cols_output++, |
$excel_sheet->write($resource_name_row,$cols_output++, |
&mt('parts correct'), |
'parts correct', |
$format->{'bold'}); |
$format->{'bold'}); |
} elsif ($chosen_output->{'sequence_sum'}) { |
} elsif ($chosen_output->{'sequence_sum'}) { |
if ($chosen_output->{'correct'}) { |
if ($chosen_output->{'correct'}) { |
# Only reporting the number correct, so do not call it score |
# Only reporting the number correct, so do not call it score |
$excel_sheet->write($resource_name_row,$cols_output++, |
$excel_sheet->write($resource_name_row,$cols_output++, |
&mt('sum'), |
'sum', |
$format->{'bold'}); |
$format->{'bold'}); |
} else { |
} else { |
$excel_sheet->write($resource_name_row,$cols_output++, |
$excel_sheet->write($resource_name_row,$cols_output++, |
&mt('score'), |
'score', |
$format->{'bold'}); |
$format->{'bold'}); |
} |
} |
} |
} |
Line 1281 sub excel_initialize {
|
Line 1280 sub excel_initialize {
|
($first_data_row,$cols_output-1); |
($first_data_row,$cols_output-1); |
if ($chosen_output->{'sequence_max'}) { |
if ($chosen_output->{'sequence_max'}) { |
$excel_sheet->write($resource_name_row,$cols_output, |
$excel_sheet->write($resource_name_row,$cols_output, |
&mt('maximum'), |
'maximum', |
$format->{'bold'}); |
$format->{'bold'}); |
$formula_data{$symb}->{'Excel:maxcell'} = |
$formula_data{$symb}->{'Excel:maxcell'} = |
&Spreadsheet::WriteExcel::Utility::xl_rowcol_to_cell |
&Spreadsheet::WriteExcel::Utility::xl_rowcol_to_cell |
Line 1295 sub excel_initialize {
|
Line 1294 sub excel_initialize {
|
} |
} |
} |
} |
if ($chosen_output->{'grand_total'}) { |
if ($chosen_output->{'grand_total'}) { |
$excel_sheet->write($resource_name_row,$cols_output++,&mt('Total'), |
$excel_sheet->write($resource_name_row,$cols_output++,'Total', |
$format->{'bold'}); |
$format->{'bold'}); |
} |
} |
if ($chosen_output->{'grand_maximum'}) { |
if ($chosen_output->{'grand_maximum'}) { |
$excel_sheet->write($resource_name_row,$cols_output++,&mt('Max. Total'), |
$excel_sheet->write($resource_name_row,$cols_output++,'Max. Total', |
$format->{'bold'}); |
$format->{'bold'}); |
} |
} |
$total_formula = $excel_sheet->store_formula($total_formula_string); |
$total_formula = $excel_sheet->store_formula($total_formula_string); |
Line 1390 sub excel_initialize {
|
Line 1389 sub excel_initialize {
|
if ($chosen_output->{'summary_table'}) { |
if ($chosen_output->{'summary_table'}) { |
$cols_output = 0; |
$cols_output = 0; |
$excel_sheet->write($summary_header_row,$cols_output++, |
$excel_sheet->write($summary_header_row,$cols_output++, |
&mt('Summary Table'),$format->{'bold'}); |
'Summary Table',$format->{'bold'}); |
if ($chosen_output->{'maximum_row'}) { |
if ($chosen_output->{'maximum_row'}) { |
$excel_sheet->write($summary_header_row,$cols_output++, |
$excel_sheet->write($summary_header_row,$cols_output++, |
&mt('Maximum'),$format->{'bold'}); |
'Maximum',$format->{'bold'}); |
} |
} |
$excel_sheet->write($summary_header_row,$cols_output++, |
$excel_sheet->write($summary_header_row,$cols_output++, |
&mt('Average'),$format->{'bold'}); |
'Average',$format->{'bold'}); |
$excel_sheet->write($summary_header_row,$cols_output++, |
$excel_sheet->write($summary_header_row,$cols_output++, |
&mt('Median'),$format->{'bold'}); |
'Median',$format->{'bold'}); |
$excel_sheet->write($summary_header_row,$cols_output++, |
$excel_sheet->write($summary_header_row,$cols_output++, |
&mt('Std Dev'),$format->{'bold'}); |
'Std Dev',$format->{'bold'}); |
my $row = $summary_header_row+1; |
my $row = $summary_header_row+1; |
foreach my $seq (@sequences) { |
foreach my $seq (@sequences) { |
my $symb = $seq->symb; |
my $symb = $seq->symb; |
Line 1714 END
|
Line 1713 END
|
$sequence_row.='"",'x$count; |
$sequence_row.='"",'x$count; |
if ($chosen_output->{'sequence_sum'}) { |
if ($chosen_output->{'sequence_sum'}) { |
if($chosen_output->{'correct'}) { |
if($chosen_output->{'correct'}) { |
$resource_row .= '"'.&mt('sum').'",'; |
$resource_row .= '"sum",'; |
} else { |
} else { |
$resource_row .= '"'.&mt('score').'",'; |
$resource_row .= '"score",'; |
} |
} |
} |
} |
if ($chosen_output->{'sequence_max'}) { |
if ($chosen_output->{'sequence_max'}) { |
$sequence_row.= '"",'; |
$sequence_row.= '"",'; |
$resource_row .= '"'.&mt('maximum possible').'",'; |
$resource_row .= '"maximum possible",'; |
} |
} |
} |
} |
if ($chosen_output->{'grand_total'}) { |
if ($chosen_output->{'grand_total'}) { |
$sequence_row.= '"",'; |
$sequence_row.= '"",'; |
$resource_row.= '"'.&mt('Total').'",'; |
$resource_row.= '"Total",'; |
} |
} |
if ($chosen_output->{'grand_maximum'}) { |
if ($chosen_output->{'grand_maximum'}) { |
$sequence_row.= '"",'; |
$sequence_row.= '"",'; |
$resource_row.= '"'.&mt('Maximum').'",'; |
$resource_row.= '"Maximum",'; |
} |
} |
chomp($sequence_row); |
chomp($sequence_row); |
chomp($resource_row); |
chomp($resource_row); |