--- loncom/interface/lonstatistics.pm 2002/05/13 13:50:45 1.15
+++ loncom/interface/lonstatistics.pm 2002/05/13 15:01:54 1.16
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# (Publication Handler
#
-# $Id: lonstatistics.pm,v 1.15 2002/05/13 13:50:45 minaeibi Exp $
+# $Id: lonstatistics.pm,v 1.16 2002/05/13 15:01:54 minaeibi Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -135,13 +135,13 @@ sub InitAnalysis {
sub Interval {
- my $symb=shift;
+ my ($rid,$part,$symb)=@_;
my $Int=$ConceptData{"Interval"};
- my $due = &Apache::lonnet::EXT('resource.0.duedate',$symb)+1;
- my $opn = &Apache::lonnet::EXT('resource.0.opendate',$symb);
+ my $due = &Apache::lonnet::EXT('resource.$part.duedate',$symb)+1;
+ my $opn = &Apache::lonnet::EXT('resource.$part.opendate',$symb);
my $add=int(($due-$opn)/$Int);
-# $r->print("
$opn, to $due add=$add int=$Int");
- #$r->rflush();
+#$r->print("
$opn, to $due add=$add int=$Int");
+#$r->rflush();
$ConceptData{"Int.0"}=$opn;
for (my $i=1;$i<$Int;$i++) {
$ConceptData{"Int.$i"}=$opn+$i*$add;
@@ -176,11 +176,10 @@ sub ShowOpGraph {
ENDPOP
- &Create_PrgWin();
- &Update_PrgWin("Starting to analyze problem");
- my $rid=substr($InpStr,8);
+ my ($rid,$part)=split(/\:/,substr($InpStr,8));
$ConceptData{"Interval"}=$Int_No;
- &Interval(&InitAnalysis($rid,$students[0]));
+ my $symb=&InitAnalysis($rid,$students[0]);
+ &Interval($rid,$part,$symb);
my $URI = $hash{'src_'.$rid};
my $Src = $hash{'title_'.$rid};
$Src =~ s/\ /"_"/eg;
@@ -190,9 +189,10 @@ ENDPOP
$tmp =~ s/" less than "/eg;
$r->print("
Concept $n:$tmp");
}
-
$r->rflush();
+ &Create_PrgWin();
+ &Update_PrgWin("Starting to analyze problem");
for (my $index=0;$index<=$#students;$index++) {
&Update_PrgWin($index);
&OpStatus($rid,$students[$index]);
@@ -264,6 +264,7 @@ sub DrawGraph {
# $Max = int($Max);
# }
# else { $Max = 1; }
+
my $Titr=($ConceptData{'Interval'}>1) ? $Src.'_interval_'.$k : $Src;
$GData=$Titr.'&'.'Answers'.'&'.$Max.'&'.$P_No.'&'.$data1.'&'.$data2;
if($ConceptData{'Interval'}>1){
@@ -319,13 +320,14 @@ sub AnalyzeProblem {
my $P_No=1;
foreach (sort keys %OpResp) {
- my $Temp = ''.$hash{'title_'.$OpResp{$_}}.'';
+ my ($rid,$part)=split(/\:/,$OpResp{$_});
+ my $Temp = ''.$hash{'title_'.$rid}.'';
$Str .= "\n"."