--- loncom/interface/statistics/lonproblemanalysis.pm 2003/09/29 21:13:23 1.24
+++ loncom/interface/statistics/lonproblemanalysis.pm 2003/10/06 20:51:20 1.25
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: lonproblemanalysis.pm,v 1.24 2003/09/29 21:13:23 matthew Exp $
+# $Id: lonproblemanalysis.pm,v 1.25 2003/10/06 20:51:20 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;
@@ -42,48 +38,203 @@ use Apache::lonlocal;
sub BuildProblemAnalysisPage {
my ($r,$c)=@_;
$r->print('
'.&mt('Option Response Problem Analysis').'
');
+ $r->print(&CreateInterface());
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 $resource = &get_resource_from_symb($symb);
if (defined($resource)) {
- $r->print(''.
- # Oh this is dumb! Need to rewrite relative links
- # otherwise images (for example) will not show.
+ my %Data = &get_problem_data($resource->{'src'});
+ my $ORdata = $Data{$part.'.'.$resid};
+ ##
+ ## Render the problem for display
+ my $base;
+ ($base,undef) = ($resource->{'src'} =~ m|(.*/)[^/]*$|);
+ $base = "http://".$ENV{'SERVER_NAME'}.$base;
+ $r->print(''.
+ ''.
+ ''.
+# &Apache::loncommon::get_student_view
+# ($symb,$ENV{'user.name'},$ENV{'user.domain'},$ENV{'request.course.id'},'web').
&Apache::lonnet::ssi_body($resource->{'src'}).
- ' | ');
+ ' |
'.
+ '