--- loncom/interface/statistics/lonproblemanalysis.pm 2003/09/29 21:09:27 1.23
+++ loncom/interface/statistics/lonproblemanalysis.pm 2003/10/09 22:10:02 1.28
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: lonproblemanalysis.pm,v 1.23 2003/09/29 21:09:27 matthew Exp $
+# $Id: lonproblemanalysis.pm,v 1.28 2003/10/09 22:10:02 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -24,16 +24,12 @@
#
# http://www.lon-capa.org/
#
-# (Navigate problems for statistical reports
-# YEAR=2002
-# 5/12,7/26,9/7,11/22 Behrouz Minaei
-#
-###
package Apache::lonproblemanalysis;
use strict;
use Apache::lonnet();
+use Apache::loncommon();
use Apache::lonhtmlcommon();
use Apache::loncoursedata();
use Apache::lonstatistics;
@@ -41,65 +37,252 @@ use Apache::lonlocal;
sub BuildProblemAnalysisPage {
my ($r,$c)=@_;
- $r->print(&mt('
Option Response Problem Analysis
'));
+ $r->print(''.&mt('Option Response Problem Analysis').'
');
+ $r->print(&CreateInterface());
+ #
+ my @Students = @Apache::lonstatistics::Students;
+ #
if (exists($ENV{'form.problemchoice'})) {
- # This is me getting around my own cleverness:
- &Apache::lonstatistics::MapSelect('Maps','multiple,all',5,
- undef);
+ $r->print('
');
+ &Apache::lonstatistics::Gather_Full_Student_Data($r);
#
- my ($symb,$id) = &get_problem_symb(
+ my ($symb,$part,$resid) = &get_problem_symb(
&Apache::lonnet::unescape($ENV{'form.problemchoice'})
);
- $r->print('
');
+ #
+# my ($firsttime,$lasttime) =
+# &Apache::loncoursedata::get_timestamp_data($symb,$resid);
+ #
my $resource = &get_resource_from_symb($symb);
if (defined($resource)) {
+ my %Data = &get_problem_data($resource->{'src'});
+ my $ORdata = $Data{$part.'.'.$resid};
+ ##
+ ## Render the problem
+ my $base;
+ ($base,undef) = ($resource->{'src'} =~ m|(.*/)[^/]*$|);
+ $base = "http://".$ENV{'SERVER_NAME'}.$base;
+ my $rendered_problem =
+ &Apache::lonnet::ssi_body($resource->{'src'});
+ $rendered_problem =~ s/