From:['.localtime($ConceptData{'Int.$k'}).
+# '] To: ['.localtime($ConceptData{'Int.'.($k+1)}).
+# "]
$Correct
$Wrong
";#
+
+ $Str .= "\n".'
';
+
+# $r->print($Str);
+
+ if ( $Max > 1 ) {
+ $Max += (10 - $Max % 10);
+ $Max = int($Max);
+ } else { $Max = 1; }
+
+
+ my $Titr=($ConceptData{'Interval'}>1) ? $Src.'_interval_'.($k+1) : $Src;
+# $GData=$Titr.'&Concepts'.'&'.'Answers'.'&'.$Max.'&'.$P_No.'&'.$data1.'&'.$data2;
+ $GData="$Titr&Concepts&Answers&$Max&$P_No&".
+ (join(',',@data1)).'&'.(join(',',@data2));
+
+ $r->print('');
+}
+
+
+sub AnalyzeProblem {
+ # selecting the number of intervals
+ my $OpSel='';
+ my $CurInt = $ENV{'form.interval'};
+ if ($CurInt eq '') {$CurMap = '1';}
+ my $Ptr = 'Select number of intervals'."\n".
+ ''."\n";
+ $r->print( $Ptr );
+
+ #the table of option response problems
+ $r->print(' Option Response Problems in this course:
');
+ my $Str = "\n".'
'.
+ "\n".'
'.
+ "\n".'
#
'.
+ "\n".'
Problem Title
'.
+ "\n".'
Resouse
'.
+ "\n".'
Address
'.
+ "\n".'
';
+
+ my $P_No=1;
+ foreach (sort keys %OpResp) {
+ my ($rid,$part)=split(/\:/,$OpResp{$_});
+ my $Temp = ''.$hash{'title_'.$rid}.'';
+ $Str .= "\n"."
".
+ "\n"."
$P_No
".
+ "\n"."
".$Temp."
".
+ "\n"."
".$hash{'src_'.$rid}."
".
+ "\n"."
".''.'
'.
+ "\n"."
";
+ $P_No++;
+ }
+ $Str .= "\n".'
';
+ $Str .= "\n".'';
+ $r->print($Str);
+ $r->rflush();
+}
+
+
+sub Decide {
+ #deciding the true or false answer belongs to each interval
+ my ($type,$foil,$time)=@_;
+ my $k=0;
+ while ($time>$ConceptData{'Int.'.($k+1)} &&
+ $k<$ConceptData{'Interval'}) {$k++;}
+ $ConceptData{"$foil_to_concept{$foil}.$k.$type"}++;
+}
+
+
+#restore the student submissions and finding the result
+sub OpStatus {
+ my ($rid,$student)=@_;
+ my ($uname,$udom)=split(/\:/,$student);
+ my $code='U';
+ $rid=~/(\d+)\.(\d+)/;
+ my $symb=&Apache::lonnet::declutter($hash{'map_id_'.$1}).'___'.$2.'___'.
+ &Apache::lonnet::declutter($hash{'src_'.$rid});
+ my %reshash=&Apache::lonnet::restore($symb,$cid,$udom,$uname);
+ my @True = ();
+ my @False = ();
+ my $flag=0;
+ if ($reshash{'version'}) {
+ my $tries=0;
+ &Apache::lonhomework::showhash(%Answer);
+ for (my $version=1;$version<=$reshash{'version'};$version++) {
+ my $time=$reshash{"$version:timestamp"};
+
+ foreach my $key (sort(split(/\:/,$reshash{$version.':keys'}))) {
+ if (($key=~/\.(\w+)\.(\w+)\.submission$/)) {
+ my $Id1 = $1; my $Id2 = $2;
+ #check if this is a repeat submission, if so skip it
+ if ($reshash{"$version:resource.$Id1.previous"}) { next; }
+ #if no solved this wasn't a real submission, ignore it
+ if (!defined($reshash{"$version:resource.$Id1.solved"})) {
+ &Apache::lonxml::debug("skipping ");
+ next;
+ }
+ my $Resp = $reshash{"$version:$key"};
+ my %submission=&Apache::lonnet::str2hash($Resp);
+ foreach (keys %submission) {
+ my $Ansr = $Answer{"$Id1.$Id2.foil.value.$_"};
+ if ($submission{$_}) {
+ if ($submission{$_} eq $Ansr) {
+ &Decide("true",$_,$time );
+ }
+ else {&Decide("false",$_,$time );}
+ }
+ }
+ }
+ }
+ }
+ }
+}
#------- Processing upperlist and lowerlist according to each problem
@@ -113,7 +380,7 @@ sub ProcessDisc {
} while ( $Prb eq $Temp && $nIdx < $Count );
# $Proc{$Temp}=($Sum1/$nStud).':'.$nStud;
$Proc{$Temp}=($Sum1/$nStud).':'.($Sum2/$nStud);
-# $r->print("$nIdx) $Temp --> ($nStud) $Proc{$Temp} ");
+# $r->print("$nIdx) $Temp --> ($nStud) $Proc{$Temp} ");
$Sum1=0;
$Sum2=0;
$nStud=0;
@@ -279,11 +546,17 @@ sub StudentReport {
}
sub CreateTable {
+ my ($Hd, $Hid)=@_;
+ if ($ENV{'form.showcsv'}) {
+ if ( $Hd == 1 ) {
+ $r->print(' "'.$hash{'title_'.$Hid}.'","'.$hash{'src_'.$Hid}.'"');
+ }
+ return;
+ }
my $ColNo=0;
foreach (keys(%Header)){
$ColNo++;
}
- my ($Hd, $Hid)=@_;
if ( $Hd == 1 ) {
$r->print(' '.$hash{'title_'.$Hid}.'');
@@ -300,12 +573,16 @@ sub CreateTable {
}
sub CloseTable {
+ if ($ENV{'form.showcsv'}) {
+ return;
+ }
$r->print("\n".''."\n");
$r->rflush();
}
# ------------------------------------------- Prepare Statistics Table
sub PreStatTable {
+
my $CacheDB = "/home/httpd/perl/tmp/$ENV{'user.name'}".
"_$ENV{'user.domain'}_$cid\_statistics.db";
my $GraphDB = "/home/httpd/perl/tmp/$ENV{'user.name'}".
@@ -338,8 +615,8 @@ sub PreStatTable {
$Ptr .= '
'.
' #Stdnts: Total Number of Students opened the problem. '.
' Tries : Total Number of Tries for solving the problem. '.
- ' Mod : Maximunm Number of Tries for solving the problem. '.
- ' Mean : Average Number of the tries. [ Tries / #Stdnts ] '.
+ ' Max : Maximunm Number of Tries for solving the problem. '.
+ ' Avg. : Average Number of the tries. [ Tries / #Stdnts ] '.
' #YES : Number of students solved the problem correctly. '.
' #yes : Number of students solved the problem by override. '.
' %Wrng : Percentage of students tried to solve the problem but'.
@@ -347,10 +624,10 @@ sub PreStatTable {
# ' DoDiff : Degree of Difficulty of the problem. [ Tries/(#YES+#yes+0.1) ] '. Kashy formula
' DoDiff : Degree of Difficulty of the problem. [ 1 - ((#YES+#yes) / Tries) ] '. #Gerd formula
' S.D. : Standard Deviation of the tries.'.
- '[ sqrt(sum((Xi - Mean)^2)) / (#Stdnts-1)'.
+ '[ sqrt(sum((Xi - Avg.)^2)) / (#Stdnts-1)'.
' where Xi denotes every student\'s tries ] '.
' Skew. : Skewness of the students tries.'.
- ' [ (sqrt( sum((Xi - Mean)^3) / #Stdnts)) / (S.D.^3) ] '.
+ ' [ (sqrt( sum((Xi - Avg.)^3) / #Stdnts)) / (S.D.^3) ] '.
' Dis.F. : Discrimination Factor: A Standard for '.
'evaluating the problem according to a Criterion '.
' [Applied Criterion in %27 Upper Students - '.
@@ -362,6 +639,11 @@ sub PreStatTable {
'
';
$r->print($Ptr);
+
+ $r->print('Output CSV format: print(' checked'); }
+ $r->print('>');
+
$r->rflush();
if ((-e "$CacheDB")&&($ENV{'form.sort'} ne 'Recalculate Statistics')) {
@@ -386,24 +668,7 @@ sub PreStatTable {
}
}
-#33333
-# my $c=0;
-# foreach (sort keys %OpResp) {
-# $r->print(' '.$c.$_.' ====== '.$OpResp{$_});
-# my $count=$#students+1;
-# for (my $n=0;$n<1;$n++){
-# my ($sname,$sdom)=$students[$n];
-# my $Prob=$OpResp{$_};
-##my $userview=&Apache::lonnet::ssi($hash{'src_'.$ResId});
-# $r->print(' '.$Prob.$sname.$sdom.$cid.
-# ' '.&Apache::loncommon::get_previous_attempt($Prob,$sname,$sdom,$cid));
-# #$r->print(' '.$Prob.$sname. ' *** '.&Apache::lonnet::ssi($hash{'src_'.$Prob}));
-# }
-# $c++;
-# }
-
- #$r->print('Total instances of the problems : '.($p_count*($#students+1)));
-
+# $r->print('Total instances of the problems : '.($p_count*($#students+1)));
untie(%CachData);
untie(%GraphDat);
}
@@ -447,7 +712,6 @@ sub usection {
# ------ Dump the Student's DB file and handling the data for statistics table
-
sub ExtractStudentData {
my $student=shift;
my ($sname,$sdom) = split( /\:/, $student );
@@ -466,7 +730,7 @@ sub ExtractStudentData {
my $TotParCr = 0;
my $Wrongs;
my %TempHash;
- my $Version;
+ my $Version;
my $LatestVersion;
my $SecLimit;
my $MapLimit;
@@ -478,7 +742,8 @@ sub ExtractStudentData {
$ResId=~/(\d+)\.(\d+)/;
my $MapId=$1;
my $PrbId=$2;
- my $Map = &Apache::lonnet::declutter( $hash{'map_id_'.$MapId} );
+ my $MapOrg = $hash{'map_id_'.$MapId};
+ my $Map = &Apache::lonnet::declutter($MapOrg);
if ( $CurMap ne 'All Maps' ) {
my ( $ResMap, $NameMap ) = split(/\=/,$CurMap);
if ( $Map ne $ResMap ) { next; }
@@ -501,36 +766,20 @@ sub ExtractStudentData {
#my $Part=&Apache::lonnet::metadata($meta,$_.'.part');
}
}
-
+ &Apache::lonnet::declutter( $hash{'src_'.$ResId} );
+ my $URI = $hash{'src_'.$ResId};
my $Prob = $Map.'___'.$PrbId.'___'.
- &Apache::lonnet::declutter( $hash{'src_'.$ResId} );
+ &Apache::lonnet::declutter($URI);
$Code='U';
$Tries = 0;
$ParCr = 0;
$Wrongs = 0;
- $LatestVersion = $result{"version:$Prob"};
-
+ $LatestVersion = $result{"version:$Prob"};
if ( $LatestVersion ) {
for ( my $Version=1; $Version<=$LatestVersion; $Version++ ) {
my $vkeys = $result{"$Version:keys:$Prob"};
my @keys = split(/\:/,$vkeys);
-
foreach my $Key (@keys) {
-#333333333
-# if ($OpResp{$PrOrd}) {
-# if (($Key=~/\.(\w+)\.submission$/)) {
-# my $Resp = $result{"$Version:$Prob:$Key"};
-# $r->print(' '.$Prob.' '.$sname.' '.$PrOrd.' '.$Key.' '.$Resp.'');
-# $r->rflush();
-#
-# my %submission=&Apache::lonnet::str2hash($Resp);
-# my $cb=0;
-# foreach (sort keys %submission) {
-# $r->print(' '.$cb.')'.$_.' ... '.$submission{$_});
-# $cb++;
-# }
-# }
-# }
if (($Key=~/\.(\w+)\.solved$/) && ($Key!~/^\d+\:/)) {
my $Part = $1;
$Tries = $result{"$Version:$Prob:resource.$Part.tries"};
@@ -575,7 +824,7 @@ sub ExtractStudentData {
$DisF = sprintf( "%.4f", $Fac );
}
else {$DisF = $Fac;}
-# $DisF .= '+'.$TempHash{"$part.Time"};
+# $DisF .= '+'.$TempHash{"$part.Time"};33333333
$TimeTot += $TempHash{"$part.Time"};
$Dis .= $TempHash{$part.'.PrOrd'}.'='.$DisF.'+'.$Yes;
$ptr .= "&$TempHash{$part.'.Tries'}".
@@ -656,9 +905,8 @@ sub tracetable {
foreach my $K(split(/\,/,&Apache::lonnet::metadata($meta,'packages'))) {
if ($K=~/^optionresponse\_($Part)\_(\w+)$/) {
#$r->print(' '.$_.'...'.$P_Order.'---'.$Part);
- $OpResp{$P_Order+1}=$frid;
+ $OpResp{$P_Order}="$frid:$Part";
}
-
}
}
}
@@ -680,7 +928,7 @@ sub tracetable {
foreach (split(/\,/,&Apache::lonnet::metadata($meta,'packages'))) {
if ($_=~/^optionresponse\_($Part)\_(\w+)$/) {
#$r->print(' '.$_.'...'.$P_Order.'---'.$Part);
- $OpResp{$P_Order+1}=$rid;
+ $OpResp{$P_Order}="$rid:$Part";;
}
}
@@ -709,7 +957,8 @@ sub MySort {
}
}
-sub Build_Statistics {
+sub Create_PrgWin {
+#----------- Create progress
$r->print(<
popwin=open('','popwin','width=400,height=100');
@@ -724,15 +973,29 @@ sub Build_Statistics {
ENDPOP
$r->rflush();
-# ---------------------------- Gathering the Data of students' tries
- my $index;
- for ($index=0;$index<=$#students;$index++) {
+}
+
+
+sub Update_PrgWin {
#----------- update progress
- $r->print('');
- $r->rflush();
+ my $index = shift;
+ $r->print('');
+ $r->rflush();
+}
+sub Close_PrgWin {
+#--------------------- close Progress Line
+ $r->print('');
+ $r->rflush();
+}
+
+sub Build_Statistics {
+ &Create_PrgWin();
+# ---------------------------- Gathering the Data of students' tries
+ for (my $index=0;$index<=$#students;$index++) {
+ &Update_PrgWin($index);
&ExtractStudentData($students[$index]);
}
@@ -742,7 +1005,6 @@ ENDPOP
@list = sort (@list);
-
&Discriminant();
$OpSel2='';
@@ -790,7 +1052,7 @@ ENDPOP
$Temp = ''.$hash{'title_'.$ResId}.$Dummy.'';
-
+
my $res = &Apache::lonnet::declutter($hash{'src_'.$ResId});
my $urlres=$res;
@@ -840,7 +1102,7 @@ ENDPOP
$Skewness += $Dif*$Dif*$Dif;
}
$Skewness /= $StdNo;
- $Skewness /= $StdDev*$StdDev*$StdDev;
+ $Skewness /= $StdDev*$StdDev*$StdDev;
}
#--------------------- Compute the Discrimination Factors
@@ -857,10 +1119,11 @@ ENDPOP
my $SD = sprintf( "%.1f", $StdDev );
my $DoD = sprintf( "%.2f", $DoDiff );
my $Sk = sprintf( "%.1f", $Skewness );
- my $join = $PrOrd.'&'.$Temp.'&'.$StdNo.'&'.
+ my $join = $lpr[$i].'&'.$Temp.'&'.$StdNo.'&'.
$TotalTries.'&'.$MxTries.'&'.$Avg.'&'.
$YES.'&'.$Override.'&'.$Wrng.'&'.$DoD.'&'.
- $SD.'&'.$Sk.'&'.$_D1.'&'.$_D2.'&'.$Prob;
+ $SD.'&'.$Sk.'&'.$_D1.'&'.$_D2.'&'.
+ $Prob;
$CachData{($p_count-1)}=$join;
$urlres=~/^(\w+)\/(\w+)/;
@@ -874,9 +1137,7 @@ ENDPOP
}
&CloseTable();
}
-#--------------------- close Progress Line
- $r->print('');
- $r->rflush();
+ &Close_PrgWin();
}
sub Cache_Statistics {
@@ -884,6 +1145,8 @@ sub Cache_Statistics {
my $Useful;
my $UnUseful;
my %myHeader = reverse( %Header );
+ #&Apache::lonnet::delenv('form_');
+ #&Apache::lonnet::delenv('test');
$Pos = $myHeader{$ENV{'form.sort'}};
if ($Pos > 0) {$Pos++;}
$p_count = 0;
@@ -931,7 +1194,28 @@ sub TableRow {
my ($Str,$Idx,$RealIdx)=@_;
my($PrOrd,$Temp,$StdNo,$TotalTries,$MxTries,$Avg,$YES,$Override,
$Wrng,$DoD,$SD,$Sk,$_D1,$_D2,$Prob)=split(/\&/,$Str);
- my $Ptr = "\n".'
' );
+ $r->print("\n".$Ptr.'' );
+ }
$GraphDat{$RealIdx}=$DoD.':'.$Wrng;
}
# ------------------------------------------- Prepare data for Graphical chart
sub GetGraphData {
- my $Tag = shift;
+ my $ylab = shift;
my $Col;
my $data='';
my $count = 0;
@@ -971,12 +1250,12 @@ sub GetGraphData {
foreach (keys %GraphDat) {delete $GraphDat{$_};}
if (-e "$GraphDB") {
if (tie(%GraphDat,'GDBM_File',"$GraphDB",&GDBM_READER,0640)) {
- if ( $Tag eq 'DoDiff Graph' ) {
- $Tag = 'Degree-of-Difficulty';
+ if ( $ylab eq 'DoDiff Graph' ) {
+ $ylab = 'Degree-of-Difficulty';
$Col = 0;
}
else {
- $Tag = 'Wrong-Percentage';
+ $ylab = 'Wrong-Percentage';
$Col = 1;
}
foreach (sort NumericSort keys %GraphDat) {
@@ -986,11 +1265,15 @@ sub GetGraphData {
$data .= $inf.',';
$count++;
}
+ if ( $Max > 1 ) {
+ $Max += (10 - $Max % 10);
+ $Max = int($Max);
+ }
+ else { $Max = 1; }
untie(%GraphDat);
my $Course = $ENV{'course.'.$cid.'.description'};
$Course =~ s/\ /"_"/eg;
- $GData=$Course.'&'.$Tag.'&'.$Max.'&'.$count.'&'.$data;
-
+ $GData=$Course.'&'.'Problems'.'&'.$ylab.'&'.$Max.'&'.$count.'&'.$data;
}
else {
$r->print("Unable to tie hash to db file");
@@ -1011,6 +1294,7 @@ sub initial {
undef %GraphDat;
undef %DiscFac;
undef %OpResp;
+ undef %ConceptData;
undef $CurMap;
undef $CurSec;
undef $CurStu;
@@ -1022,6 +1306,26 @@ sub initial {
$HWN=$P_Order;
}
+# my $CacheDB = "/home/httpd/perl/tmp/$ENV{'user.name'}".
+# "_$ENV{'user.domain'}_$cid\_classlist.db";
+# if (-e "$CacheDB") {
+# if (tie(%students,'GDBM_File',"$CacheDB",&GDBM_READER,0640)) {
+# &CachClassList();
+# }
+# else {
+# $r->print("Unable to tie hash to db file");
+# }
+# }
+# else {
+# if (tie(%students,'GDBM_File',$CacheDB,&GDBM_WRCREAT,0640)) {
+# &MakeClassList();
+# }
+# else {
+# $r->print("Unable to tie hash to db file");
+# }
+# }
+# untie(%students);
+
sub ClassList {
@@ -1034,35 +1338,38 @@ sub ClassList {
$firstres=$hash{'map_start_/res/'.$ENV{'request.course.uri'}};
$lastres=$hash{'map_finish_/res/'.$ENV{'request.course.uri'}};
if (($firstres) && ($lastres)) {
-# ----------------------------------------------------------------- Render page
- my $classlst=&Apache::lonnet::reply
- ('dump:'.$cdom.':'.$cnum.':classlist',$chome);
+# my %students = &Apache::lonnet::dump('classlist',$cdom,$cnum);
+# $Apache::lonxml::debug=1;
+# &Apache::lonhomework::showhash(%students);
+# $Apache::lonxml::debug=0;
+# my $StudNo = 0;
+# my $now=time;
+# my ($temp)=keys(%students);
+# unless ($temp=~/^error\:/) {
+# foreach my $KeyPoint(sort keys(%students)) {
+ my $classlst=&Apache::lonnet::reply('dump:'.$cdom.':'.$cnum.':classlist',$chome);
my $StudNo = 0;
my $now=time;
unless ($classlst=~/^error\:/) {
- foreach (sort split(/\&/,$classlst)) {
- my ($name,$value)=split(/\=/,$_);
+ foreach my $KeyPoint(sort split(/\&/,$classlst)) {
+ my ($name,$value)=split(/\=/,$KeyPoint);
my ($end,$start)=split(/\:/,&Apache::lonnet::unescape($value));
- $name=&Apache::lonnet::unescape($name);
- my ($sname,$sdom)=split(/\:/,$name);
my $active=1;
my $Status=$ENV{'form.status'};
$Status = ($Status) ? $Status : 'Active';
if ( ( ($end) && $now > $end ) &&
( ($Status eq 'Active') ) ) { $active=0; }
+
if ( ($Status eq 'Expired') &&
($end == 0 || $now < $end) ) { $active=0; }
+
if ($active) {
my $thisindex=$#students+1;
$name=&Apache::lonnet::unescape($name);
$students[$thisindex]=$name;
my ($sname,$sdom)=split(/\:/,$name);
- #my %reply=&Apache::lonnet::idrget($sdom,$sname);
- #my $reply=&Apache::lonnet::reply('get:'.$sdom.':'.$sname.
- # ':environment:lastname&generation&firstname&middlename',
- # &Apache::lonnet::homeserver($sname,$sdom));
my $ssec=&usection($sdom,$sname,$cid,$Status);
- if ($ssec==-1) {next;}
+ if ($ssec==-1 || $ssec eq 'adm' ) {next;}
$ssec=($ssec) ? $ssec : '(none)';
#$ssec=(int($ssec)) ? int($ssec) : $ssec;
$section{$ssec}=$ssec;
@@ -1086,66 +1393,160 @@ sub ClassList {
# $r->print(' '.$c.')'.$_.' ... '.$mapsort{$_});
# $c++;
# }
+# my $c=1;
+# foreach (sort keys %OpResp) {
+# $r->print(' '.$c.')'.$_.' ... '.$OpResp{$_}.' ... '.$hash{'src_'.$OpResp{$_}});
+# $c++;
+# }
+
}
# ------------------------------------------------------------- End render page
else {
$r->print('
Undefined course sequence
');
}
- &MapSecOptions();
}
-sub Menu {
- my $InpStr = $ENV{'form.sort'};
- if ( $InpStr eq 'DoDiff Graph' || $InpStr eq '%Wrong Graph' ) {
- &GetGraphData($InpStr);
- $r->print('');
+sub ClassListnew {
+
+ &GetStatus();
+
+ $cid=$ENV{'request.course.id'};
+ my $chome=$ENV{'course.'.$cid.'.home'};
+ my ($cdom,$cnum)=split(/\_/,$cid);
+# ----------------------- Get first and last resource, see if there is anything
+ $firstres=$hash{'map_start_/res/'.$ENV{'request.course.uri'}};
+ $lastres=$hash{'map_finish_/res/'.$ENV{'request.course.uri'}};
+ if (($firstres) && ($lastres)) {
+
+ my %students = &Apache::lonnet::dump('classlist',$cdom,$cnum);
+ my $StudNo = 0;
+ my $now=time;
+ my ($temp)=keys(%students);
+ unless ($temp=~/^error\:/) {
+ foreach (sort keys(%students)) {
+ my ($name,$value)=split(/\=/,$_);
+ my ($end,$start)=split(/\:/,&Apache::lonnet::unescape($value));
+ $name=&Apache::lonnet::unescape($name);
+ my ($sname,$sdom)=split(/\:/,$name);
+ my $active=1;
+ my $Status=$ENV{'form.status'};
+ $Status = ($Status) ? $Status : 'Active';
+ if ( ( ($end) && $now > $end ) &&
+ ( ($Status eq 'Active') ) ) { $active=0; }
+ if ( ($Status eq 'Expired') &&
+ ($end == 0 || $now < $end) ) { $active=0; }
+ if ($active) {
+ my $thisindex=$#students+1;
+ $name=&Apache::lonnet::unescape($name);
+ $students[$thisindex]=$name;
+ my ($sname,$sdom)=split(/\:/,$name);
+ #my %reply=&Apache::lonnet::idrget($sdom,$sname);
+ #my $reply=&Apache::lonnet::reply('get:'.$sdom.':'.$sname.
+ # ':environment:lastname&generation&firstname&middlename',
+ # &Apache::lonnet::homeserver($sname,$sdom));
+ my $ssec=&usection($sdom,$sname,$cid,$Status);
+# if ($ssec==-1 ) {next;}
+ if ($ssec==-1 || $ssec eq 'adm' ) {next;}
+ $ssec=($ssec) ? $ssec : '(none)';
+ #$ssec=(int($ssec)) ? int($ssec) : $ssec;
+ $section{$ssec}=$ssec;
+ if ($CurSec eq 'All Sections' || $ssec eq $CurSec) {
+ $students[$StudNo]=$name;
+ $StuBox{$sname}=$sdom;
+ }
+ $StudNo++;
+ }
+ }
+ }
+ else {
+ $r->print('
Could not access course data
');
+ }
+ $r->print("Total number of students : ".($#students+1));
+ $r->rflush();
+# --------------- Find all assessments and put them into some linear-like order
+ &tracetable($firstres,'&'.$lastres.'&');
}
+
+# ------------------------------------------------------------- End render page
else {
- $r->print('LON-CAPA Statistics');
+ $r->print('