version 1.90, 2004/09/29 14:38:35
|
version 1.91, 2004/10/04 19:10:26
|
Line 56 my @SubmitButtons = ({ name => 'PrevProb
|
Line 56 my @SubmitButtons = ({ name => 'PrevProb
|
{ name => 'ExcelOutput', |
{ name => 'ExcelOutput', |
text => 'Produce Excel Output' }); |
text => 'Produce Excel Output' }); |
|
|
|
|
sub BuildProblemAnalysisPage { |
sub BuildProblemAnalysisPage { |
my ($r,$c)=@_; |
my ($r,$c)=@_; |
# |
# |
Line 135 sub BuildProblemAnalysisPage {
|
Line 134 sub BuildProblemAnalysisPage {
|
my $resource = $current_problem->{'resource'}; |
my $resource = $current_problem->{'resource'}; |
$r->print('<h1>'.$resource->{'title'}.'</h1>'); |
$r->print('<h1>'.$resource->{'title'}.'</h1>'); |
$r->print('<h3>'.$resource->{'src'}.'</h3>'); |
$r->print('<h3>'.$resource->{'src'}.'</h3>'); |
$r->print(&Apache::lonstathelpers::render_resource($resource)); |
if ($ENV{'form.show_prob'} eq 'true') { |
|
$r->print(&Apache::lonstathelpers::render_resource($resource)); |
|
} |
$r->rflush(); |
$r->rflush(); |
my %Data = &Apache::lonstathelpers::get_problem_data |
my %Data = &Apache::lonstathelpers::get_problem_data |
($resource->{'src'}); |
($resource->{'src'}); |
Line 404 sub RadioResponseAnalysis {
|
Line 405 sub RadioResponseAnalysis {
|
} else { |
} else { |
$analysis_html .= '<h2>'. |
$analysis_html .= '<h2>'. |
&mt('The analysis you have selected is not supported at this time'). |
&mt('The analysis you have selected is not supported at this time'). |
'</h2>'; |
'</h2>'; |
} |
} |
$r->print($analysis_html); |
$r->print($analysis_html); |
} |
} |
Line 481 sub RR_Tries_Foil_Analysis {
|
Line 482 sub RR_Tries_Foil_Analysis {
|
} |
} |
} |
} |
} |
} |
my $title='Attempt '.$try; |
my $title='Attempt '.$try.' (N='.$total.')'; |
my $xlabel = $total.' Submissions'; |
my $xlabel = 'Foil Chosen'; |
$html.= &Apache::loncommon::DrawBarGraph($title, |
$html.= &Apache::loncommon::DrawBarGraph($title, |
$xlabel, |
$xlabel, |
'Percent Choosing', |
'Percent Choosing', |
Line 830 sub OR_time_analysis {
|
Line 831 sub OR_time_analysis {
|
> $starttime); |
> $starttime); |
} |
} |
$begin_index = $j; |
$begin_index = $j; |
while (++$j < scalar(@$performance_data)) { |
while ($j < scalar(@$performance_data)) { |
last if (&get_time_from_row($performance_data->[$j]) > $endtime); |
if (&get_time_from_row($performance_data->[$j]) > $endtime) { |
|
last; |
|
} else { |
|
$j++; |
|
} |
} |
} |
$end_index = $j; |
$end_index = $j; |
## |
## |
Line 924 sub OR_Foil_Time_Analysis {
|
Line 929 sub OR_Foil_Time_Analysis {
|
# |
# |
# Create the plot |
# Create the plot |
my $count = $end_index-$begin_index; |
my $count = $end_index-$begin_index; |
|
return ('No data','') if ($count <= 0); |
my $title; |
my $title; |
if ($count == 0) { |
if ($count == 0) { |
$title = 'no submissions'; |
$title = 'no submissions'; |
} elsif ($count == 1) { |
} elsif ($count == 1) { |
$title = 'one submission'; |
$title = 'one submission'; |
} else { |
} elsif ($count > 1) { |
$title = $count.' submissions'; |
$title = $count.' submissions'; |
} |
} |
my $correct_plot = &Apache::loncommon::DrawBarGraph($title, |
my $correct_plot = &Apache::loncommon::DrawBarGraph($title, |
Line 945 sub OR_Foil_Time_Analysis {
|
Line 951 sub OR_Foil_Time_Analysis {
|
$count = $end_index-$begin_index-$TimeData{'_correct'}; |
$count = $end_index-$begin_index-$TimeData{'_correct'}; |
if ($count == 0) { |
if ($count == 0) { |
$title = 'no submissions'; |
$title = 'no submissions'; |
|
} elsif ($count < 0) { |
|
return ($correct_plot,''); |
} elsif ($count == 1) { |
} elsif ($count == 1) { |
$title = 'one submission'; |
$title = 'one submission'; |
} else { |
} else { |
Line 956 sub OR_Foil_Time_Analysis {
|
Line 964 sub OR_Foil_Time_Analysis {
|
100, |
100, |
$plotcolors, |
$plotcolors, |
undef, |
undef, |
@plotdata); |
@plotdata); |
|
|
return ($correct_plot,$incorrect_plot); |
return ($correct_plot,$incorrect_plot); |
} |
} |
|
|
Line 1376 sub CreateInterface {
|
Line 1383 sub CreateInterface {
|
## |
## |
## |
## |
$Str .= '<td>'; |
$Str .= '<td>'; |
|
## |
|
my $showprob_checkbox = |
|
'<input type="checkbox" name="show_prob" value="true" '; |
|
if ($ENV{'form.show_prob'} eq 'true') { |
|
$showprob_checkbox .= 'checked '; |
|
} |
|
$showprob_checkbox.= ' />'; |
|
$Str.= '<nobr><label>'. |
|
&mt('Show problem [_1]',$showprob_checkbox). |
|
'</label></nobr><br />'; |
|
## |
my $analyze_selector = '<select name="AnalyzeOver" >'; |
my $analyze_selector = '<select name="AnalyzeOver" >'; |
$analyze_selector .= '<option value="Tries" '; |
$analyze_selector .= '<option value="Tries" '; |
if (! exists($ENV{'form.AnalyzeOver'}) || |
if (! exists($ENV{'form.AnalyzeOver'}) || |
Line 1388 sub CreateInterface {
|
Line 1406 sub CreateInterface {
|
$analyze_selector .= ' selected ' if ($ENV{'form.AnalyzeOver'} eq 'Time'); |
$analyze_selector .= ' selected ' if ($ENV{'form.AnalyzeOver'} eq 'Time'); |
$analyze_selector .= '>'.&mt('Time').'</option>'; |
$analyze_selector .= '>'.&mt('Time').'</option>'; |
$analyze_selector .= '</select>'; |
$analyze_selector .= '</select>'; |
$Str .= '<nobr>'. |
$Str .= '<nobr><label>'. |
&mt('Analyze Over [_1] [_2]', |
&mt('Analyze Over [_1] [_2]', |
$analyze_selector, |
$analyze_selector, |
&Apache::loncommon::help_open_topic('Analysis_Analyze_Over')). |
&Apache::loncommon::help_open_topic('Analysis_Analyze_Over')). |
'</nobr><br />'.$/; |
'</label></nobr><br />'.$/; |
## |
## |
my $numplots_selector = '<select name="NumPlots">'; |
my $numplots_selector = '<select name="NumPlots">'; |
if (! exists($ENV{'form.NumPlots'}) |
if (! exists($ENV{'form.NumPlots'}) |