'.
"\n".''.
"\n".' # | '.
"\n".' Problem Title | '.
- "\n".' Resouse | '.
+ "\n".' Resource | '.
"\n".' Address | '.
"\n".'
';
@@ -289,6 +365,7 @@ sub AnalyzeProblem {
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)} &&
@@ -297,6 +374,7 @@ sub Decide {
}
+#restore the student submissions and finding the result
sub OpStatus {
my ($rid,$student)=@_;
my ($uname,$udom)=split(/\:/,$student);
@@ -538,7 +616,7 @@ sub StudentReport {
sub CreateTable {
my ($Hd, $Hid)=@_;
- if ($ENV{'form.showcsv'}) {
+ if ($ENV{'form.showcsv'}) {
if ( $Hd == 1 ) {
$r->print('
"'.$hash{'title_'.$Hid}.'","'.$hash{'src_'.$Hid}.'"');
}
@@ -573,6 +651,7 @@ sub CloseTable {
# ------------------------------------------- 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'}".
@@ -605,8 +684,8 @@ sub PreStatTable {
$Ptr .= ''.
' #Stdnts: Total Number of Students opened the problem.
'.
' Tries : Total Number of Tries for solving the problem.
'.
- ' Max : Maximunm Number of Tries for solving the problem.
'.
- ' Avg. : Average Number of the tries. [ Tries / #Stdnts ]
'.
+ ' Mod : Maximunm Number of Tries for solving the problem.
'.
+ ' Mean : 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'.
@@ -614,10 +693,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 - Avg.)^2)) / (#Stdnts-1)'.
+ '[ sqrt(sum((Xi - Mean)^2)) / (#Stdnts-1)'.
' where Xi denotes every student\'s tries ]
'.
' Skew. : Skewness of the students tries.'.
- ' [ (sqrt( sum((Xi - Avg.)^3) / #Stdnts)) / (S.D.^3) ]
'.
+ ' [ (sqrt( sum((Xi - Mean)^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 - '.
@@ -848,6 +927,7 @@ sub ExtractStudentData {
}
+
# ------------------------------------------------------------ Build page table
sub tracetable {
my ($rid,$beenhere)=@_;
@@ -995,7 +1075,6 @@ sub Build_Statistics {
@list = sort (@list);
-
&Discriminant();
$OpSel2='';
@@ -1135,6 +1214,7 @@ sub Cache_Statistics {
my @list = ();
my $Useful;
my $UnUseful;
+# $r->print(''."\n");
my %myHeader = reverse( %Header );
$Pos = $myHeader{$ENV{'form.sort'}};
if ($Pos > 0) {$Pos++;}
@@ -1295,6 +1375,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 {
@@ -1307,34 +1407,40 @@ sub ClassList {
$firstres=$hash{'map_start_/res/'.$ENV{'request.course.uri'}};
$lastres=$hash{'map_finish_/res/'.$ENV{'request.course.uri'}};
if (($firstres) && ($lastres)) {
- #my %result = &Apache::lonnet::dump('classlist',$sdom,$sname);
+# 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;
@@ -1387,10 +1493,12 @@ sub Title {
$r->rflush();
}
+
sub CreateForm {
$r->print("\n".'