version 1.15, 2002/05/13 13:50:45
|
version 1.23, 2002/05/30 13:09:13
|
Line 30
|
Line 30
|
# 5/5,7/9,7/25/1,8/11,9/13,9/26,10/5,10/9,10/22,10/26 Behrouz Minaei |
# 5/5,7/9,7/25/1,8/11,9/13,9/26,10/5,10/9,10/22,10/26 Behrouz Minaei |
# 11/1,11/4,11/16,12/14,12/16,12/18,12/20,12/31 Behrouz Minaei |
# 11/1,11/4,11/16,12/14,12/16,12/18,12/20,12/31 Behrouz Minaei |
# YEAR=2002 |
# YEAR=2002 |
# 1/22,2/1,2/6,2/25,3/2,3/6,3/17,3/21,3/22,3/26,4/7,5/6,5/12 Behrouz Minaei |
# 1/22,2/1,2/6,2/25,3/2,3/6,3/17,3/21,3/22,3/26,4/7,5/6 Behrouz Minaei |
|
# 5/12,5/14,5/15,5/19,5/26 Behrouz Minaei |
# |
# |
### |
### |
|
|
Line 84 my %Header = (0,"Homework Sets Order",1,
|
Line 85 my %Header = (0,"Homework Sets Order",1,
|
4,"Mean",5,"#YES",6,"#yes",7,"%Wrng",8,"DoDiff", |
4,"Mean",5,"#YES",6,"#yes",7,"%Wrng",8,"DoDiff", |
9,"S.D.",10,"Skew.",11,"D.F.1st",12,"D.F.2nd"); |
9,"S.D.",10,"Skew.",11,"D.F.1st",12,"D.F.2nd"); |
my %Answer = (); |
my %Answer = (); |
my @shown; |
|
|
|
|
sub unescape { |
|
my $str=shift; |
|
$str =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/eg; |
|
return $str; |
|
} |
|
|
|
sub Activity { |
|
my $file="/home/minaeibi/minaei"; |
|
my $userid='billskat'; |
|
$r->print("<br>Using $file"); |
|
$r->rflush(); |
|
open(FILEID, "<$file"); |
|
my $line; |
|
my @allaccess; |
|
while ($line=<FILEID>) { |
|
my ($time,$machine,$what)=split(':',$line); |
|
#$r->print("time=$time machine=$machine:-> $what\n"); |
|
#$r->rflush(); |
|
$what=&unescape($what); |
|
my @accesses=split('&',$what); |
|
foreach my $access (@accesses) { |
|
my ($date,$resource,$who,$domain,$post,@posts)=split(':',$access); |
|
if ($who ne $userid) { next; } |
|
#if (!$resource) { next; } |
|
push (@allaccess,unescape($access)); |
|
#print $machine; |
|
} |
|
} |
|
@allaccess=sort(@allaccess); |
|
my $Count=0; |
|
foreach my $access (@allaccess) { |
|
my ($date,$resource,$who,$domain,$post,@posts)=split(':',$access); |
|
$Count++; |
|
# $r->print("$Count ".localtime($date)." $who $resource\n"); |
|
$r->print("<br>$Count) $date: $who --> $resource"); |
|
$r->rflush(); |
|
if ($post) { |
|
$r->print("<br><b>Sent data ".join(':',unescape(@posts)).'</b>'); |
|
} |
|
} |
|
} |
|
|
|
|
|
|
sub InitAnalysis { |
sub InitAnalysis { |
my ($rid, $student)=@_; |
my ($rid, $student)=@_; |
Line 116 sub InitAnalysis {
|
Line 161 sub InitAnalysis {
|
chop($conc); |
chop($conc); |
|
|
@Concepts=split(/\@/,$conc); |
@Concepts=split(/\@/,$conc); |
my $show=''; |
|
foreach my $elm (@{$Answer{"$parts.shown"}}) { |
|
$show.="$elm@"; |
|
} |
|
chop($show); |
|
@shown=split(/\@/,$show); |
|
# $r->print("<br> shown:".$show); |
|
# $r->rflush(); |
|
|
|
foreach my $concept (@{$Answer{"$parts.concepts"}}) { |
foreach my $concept (@{$Answer{"$parts.concepts"}}) { |
foreach my $foil (@{$Answer{"$parts.concept.$concept"}}) { |
foreach my $foil (@{$Answer{"$parts.concept.$concept"}}) { |
$foil_to_concept{$foil} = $concept; |
$foil_to_concept{$foil} = $concept; |
|
#$ConceptData{$foil} = $Answer{"$parts.foil.value.$foil"}; |
} |
} |
} |
} |
return $symb; |
return $symb; |
Line 135 sub InitAnalysis {
|
Line 172 sub InitAnalysis {
|
|
|
|
|
sub Interval { |
sub Interval { |
my $symb=shift; |
my ($rid,$part,$symb)=@_; |
my $Int=$ConceptData{"Interval"}; |
my $Int=$ConceptData{"Interval"}; |
my $due = &Apache::lonnet::EXT('resource.0.duedate',$symb)+1; |
my $due = &Apache::lonnet::EXT('resource.$part.duedate',$symb)+1; |
my $opn = &Apache::lonnet::EXT('resource.0.opendate',$symb); |
my $opn = &Apache::lonnet::EXT('resource.$part.opendate',$symb); |
my $add=int(($due-$opn)/$Int); |
my $add=int(($due-$opn)/$Int); |
# $r->print("<br> $opn, to $due add=$add int=$Int"); |
|
#$r->rflush(); |
|
$ConceptData{"Int.0"}=$opn; |
$ConceptData{"Int.0"}=$opn; |
for (my $i=1;$i<$Int;$i++) { |
for (my $i=1;$i<$Int;$i++) { |
$ConceptData{"Int.$i"}=$opn+$i*$add; |
$ConceptData{"Int.$i"}=$opn+$i*$add; |
Line 158 sub Interval {
|
Line 193 sub Interval {
|
|
|
|
|
sub ShowOpGraph { |
sub ShowOpGraph { |
|
|
my ($InpStr, $Int_No)=@_; |
my ($InpStr, $Int_No)=@_; |
|
my ($rid,$part)=split(/\:/,substr($InpStr,8)); |
$r->print(<<ENDPOP); |
|
<script language="JavaScript"> |
|
|
|
function display(name) { |
|
document.forms.displayform.elements.dis.value=name; |
|
window.status=name; |
|
} |
|
function cleardisplay() { |
|
document.forms.displayform.elements.dis.value=''; |
|
window.status='No Concept in particular'; |
|
} |
|
|
|
</script> |
|
ENDPOP |
|
|
|
&Create_PrgWin(); |
|
&Update_PrgWin("Starting to analyze problem"); |
|
my $rid=substr($InpStr,8); |
|
$ConceptData{"Interval"}=$Int_No; |
$ConceptData{"Interval"}=$Int_No; |
&Interval(&InitAnalysis($rid,$students[0])); |
#Initialize the option response true answers |
|
my $symb=&InitAnalysis($rid,$students[0]); |
|
#compute the intervals |
|
&Interval($rid,$part,$symb); |
my $URI = $hash{'src_'.$rid}; |
my $URI = $hash{'src_'.$rid}; |
my $Src = $hash{'title_'.$rid}; |
my $Src = $hash{'title_'.$rid}; |
$Src =~ s/\ /"_"/eg; |
$Src =~ s/\ /"_"/eg; |
$r->print('<br><b>'.$URI.'</b>'); |
$r->print('<br><b>'.$URI.'</b>'); |
for (my $n=1; $n<=$#Concepts+1; $n++ ) { |
|
my $tmp=$Concepts[$n-1]; |
|
$tmp =~ s/</" less than "/eg; |
|
$r->print("<br><b>Concept $n</b>:$tmp"); |
|
} |
|
|
|
$r->rflush(); |
$r->rflush(); |
|
|
|
#Java script Progress window |
|
&Create_PrgWin(); |
|
&Update_PrgWin("Starting to analyze problem"); |
for (my $index=0;$index<=$#students;$index++) { |
for (my $index=0;$index<=$#students;$index++) { |
&Update_PrgWin($index); |
&Update_PrgWin($index); |
&OpStatus($rid,$students[$index]); |
&OpStatus($rid,$students[$index]); |
} |
} |
&Close_PrgWin(); |
&Close_PrgWin(); |
|
|
|
$r->print('<br>'); |
|
for (my $k=0; $k<$Int_No; $k++ ) { |
|
&DrawGraph($k,$Src); |
|
} |
|
for (my $k=0; $k<$Int_No; $k++ ) { |
|
&DrawTable($k); |
|
} |
#$Apache::lonxml::debug=1; |
#$Apache::lonxml::debug=1; |
#&Apache::lonhomework::showhash(%ConceptData); |
#&Apache::lonhomework::showhash(%ConceptData); |
#$Apache::lonxml::debug=0; |
#$Apache::lonxml::debug=0; |
|
|
for (my $k=0; $k<$Int_No; $k++ ) { |
|
my $data1=''; |
|
my $data2=''; |
|
&DrawGraph(&AdjustData($k).'+'.$Src.'+'.($k+1)); |
|
} |
|
my $Answ=&Apache::lonnet::ssi($URI); |
my $Answ=&Apache::lonnet::ssi($URI); |
$r->print("<br><b>Here you can see the Problem:</b><br>$Answ"); |
$r->print("<br><b>Here you can see the Problem:</b><br>$Answ"); |
} |
} |
|
|
sub AdjustData { |
|
|
sub DrawTable { |
my $k=shift; |
my $k=shift; |
my $Max=0; |
my $Max=0; |
my @data1; |
my @data1; |
my @data2; |
my @data2; |
|
my $Correct=0; |
|
my $Wrong=0; |
for (my $n=0; $n<=$#Concepts; $n++ ) { |
for (my $n=0; $n<=$#Concepts; $n++ ) { |
my $tmp=$Concepts[$n]; |
my $tmp=$Concepts[$n]; |
$data1[$n]=$ConceptData{"$tmp.$k.true"}; |
$data1[$n]=$ConceptData{"$tmp.$k.true"}; |
|
$Correct+=$data1[$n]; |
$data2[$n]=$ConceptData{"$tmp.$k.false"}; |
$data2[$n]=$ConceptData{"$tmp.$k.false"}; |
|
$Wrong+=$data2[$n]; |
my $Sum=$data1[$n]+$data2[$n]; |
my $Sum=$data1[$n]+$data2[$n]; |
if ( $Max<$Sum ) {$Max=$Sum;} |
if ( $Max<$Sum ) {$Max=$Sum;} |
} |
} |
Line 229 sub AdjustData {
|
Line 251 sub AdjustData {
|
$data2[$n]+=$Max-($data1[$n]+$data2[$n]); |
$data2[$n]+=$Max-($data1[$n]+$data2[$n]); |
} |
} |
} |
} |
return join(',',@data1).'+'. |
my $P_No = $#data1+1; |
join(',',@data2).'+'. |
# $r->print('<br><b>From: ['.localtime($ConceptData{'Int.'.($k-1)}). |
$Max.'+'.($#data1+1); |
# '] To: ['.localtime($ConceptData{"Int.$k"}).']</b>'); |
} |
my $Str = "\n".'<table border=2>'. |
|
"\n".'<tr>'. |
|
"\n".'<th> # </th>'. |
|
"\n".'<th> Concept </th>'. |
|
"\n".'<th> Correct </th>'. |
|
"\n".'<th> Wrong </th>'. |
|
"\n".'</tr>'; |
|
|
|
for (my $n=0; $n<=$#Concepts; $n++ ) { |
|
$Str .= "\n"."<tr>". |
|
"\n"."<td>".($n+1)."</td>". |
|
"\n"."<td bgcolor=#FFFFDD> ".$Concepts[$n]." </td>". |
|
"\n"."<td bgcolor=#DDFFDD> ".$data1[$n]." </td>". |
|
"\n"."<td bgcolor=#FFDDDD> ".$data2[$n]." </td>". |
|
"\n"."</tr>"; |
|
} |
|
$Str.='<td></td><td><b>From:['.localtime($ConceptData{'Int.'.$k}). |
|
'] To: ['.localtime($ConceptData{'Int.'.($k+1)}-1). |
|
"]</b></td><td>$Correct</td><td>$Wrong</td>"; |
|
|
sub DrawGraph { |
$Str .= "\n".'</table>'; |
my $data=shift; |
|
my($data1,$data2,$Max,$P_No,$Src,$k)=split(/\+/,$data); |
|
|
|
my $Str="\n".'<table border=1>'. |
|
"\n".'<tr>'. |
|
"\n".'<th> Correct Answers </th>'. |
|
"\n".'<th> Wrong Answers </th>'. |
|
"\n".'<th> From </th>'. |
|
"\n".'<th> To </th>'. |
|
"\n".'</tr>'. |
|
"\n"."<tr>". |
|
"\n"."<td> $data1 </td>". |
|
"\n"."<td> $data2 </td>". |
|
"\n"."<td> ".localtime($ConceptData{'Int.'.($k-1)})." </td>". |
|
"\n"."<td> ".localtime($ConceptData{'Int.'.$k}-1)." </td>". |
|
"\n"."</tr></table>"; |
|
$r->print($Str); |
$r->print($Str); |
|
#$Apache::lonxml::debug=1; |
|
#&Apache::lonhomework::showhash(%ConceptData); |
|
#$Apache::lonxml::debug=0; |
|
} |
|
|
# $r->print('<br><b>Correct Answers:</b> '.$data1. |
|
# '<br><b>Wrong Answers: </b>'.$data2); |
sub DrawGraph { |
# $r->print('<br><b>From: </b>'.localtime($ConceptData{'Int.'.($k-1)}). |
my ($k,$Src)=@_; |
# '<br><b>To: </b>'.localtime($ConceptData{"Int.$k"})); |
my $Max=0; |
|
my @data1; |
# if ( $Max > 1 ) { |
my @data2; |
# $Max += (10 - $Max % 10); |
|
# $Max = int($Max); |
# Adjust Data and find the Max |
# } |
for (my $n=0; $n<=$#Concepts; $n++ ) { |
# else { $Max = 1; } |
my $tmp=$Concepts[$n]; |
my $Titr=($ConceptData{'Interval'}>1) ? $Src.'_interval_'.$k : $Src; |
$data1[$n]=$ConceptData{"$tmp.$k.true"}; |
$GData=$Titr.'&'.'Answers'.'&'.$Max.'&'.$P_No.'&'.$data1.'&'.$data2; |
$data2[$n]=$ConceptData{"$tmp.$k.false"}; |
if($ConceptData{'Interval'}>1){ |
my $Sum=$data1[$n]+$data2[$n]; |
$r->print('<br><IMG src="/cgi-bin/graph.gif?'.$GData.'" />'); |
if ( $Max<$Sum ) {$Max=$Sum;} |
return; |
|
} |
} |
$r->print('<br>Move your mouse over a bar to find out the concept'); |
for (my $n=0; $n<=$#Concepts; $n++ ) { |
my $ptr=''; |
if ($data1[$n]+$data2[$n]<$Max) { |
$ptr.="\n".'<form method="post" action="" name="displayform"> <input type=text name="dis" size=80> </form>'; |
$data2[$n]+=$Max-($data1[$n]+$data2[$n]); |
$ptr.="\n".'<p><img src=/cgi-bin/graph.gif?'.$GData. |
} |
' usemap="#Map" border=1>'. |
} |
"\n".'<map name="Map">'; |
my $P_No = $#data1+1; |
my $gap=12; |
|
my $Size=340; |
if ( $Max > 1 ) { |
my $barsize=($P_No) ? int($Size/$P_No) : 1; |
$Max += (10 - $Max % 10); |
for (my $i=0; $i<$P_No; $i++) { |
$Max = int($Max); |
my $x1=80+$gap*$i+($i*$barsize); |
} else { $Max = 1; } |
my $x2=$x1+$barsize; |
|
my $y1=25; |
|
my $y2=350; |
my $Titr=($ConceptData{'Interval'}>1) ? $Src.'_interval_'.($k+1) : $Src; |
my $j=$i+1; |
# $GData=$Titr.'&Concepts'.'&'.'Answers'.'&'.$Max.'&'.$P_No.'&'.$data1.'&'.$data2; |
$ptr.="\n".'<area shape="rect" coords='.$x1.','.$y1.','.$x2.','.$y2.' onMouseOver="display('."'Concept $j: $Concepts[$i]'".'); " href="javascript:alert('."'Concept $j: $Concepts[$i]'".');">'; |
$GData="$Titr&Concepts&Answers&$Max&$P_No&". |
} |
(join(',',@data1)).'&'.(join(',',@data2)); |
$ptr.="\n".'<area shape="default" onMouseOver="cleardisplay(); " href="javascript:alert('.'No Concept in particular'.');">'; |
|
$ptr.="\n".'</map></p>'; |
$r->print('<IMG src="/cgi-bin/graph.gif?'.$GData.'" border=1/>'); |
$r->print('<br>'.$ptr.'<br>'); |
|
} |
} |
|
|
|
|
sub AnalyzeProblem { |
sub AnalyzeProblem { |
# -------------------------------- Selecting the number of intervals |
# selecting the number of intervals |
my $OpSel=''; |
my $OpSel=''; |
my $CurInt = $ENV{'form.interval'}; |
my $CurInt = $ENV{'form.interval'}; |
if ($CurInt eq '') {$CurMap = '1';} |
if ($CurInt eq '') {$CurMap = '1';} |
my $Ptr = '<b>Select number of intervals</b>'."\n". |
my $Ptr = '<br><b>Select number of intervals</b>'."\n". |
'<select name="interval">'."\n"; |
'<select name="interval">'."\n"; |
for (my $n=1;$n<=7;$n++) { |
for (my $n=1;$n<=7;$n++) { |
$Ptr .= '<option'; |
$Ptr .= '<option'; |
Line 308 sub AnalyzeProblem {
|
Line 334 sub AnalyzeProblem {
|
$Ptr .= '</select>'."\n"; |
$Ptr .= '</select>'."\n"; |
$r->print( $Ptr ); |
$r->print( $Ptr ); |
|
|
|
#the table of option response problems |
$r->print('<br><b> Option Response Problems in this course:</b><br><br>'); |
$r->print('<br><b> Option Response Problems in this course:</b><br><br>'); |
my $Str = "\n".'<table border=2>'. |
my $Str = "\n".'<table border=2>'. |
"\n".'<tr>'. |
"\n".'<tr>'. |
"\n".'<th> # </th>'. |
"\n".'<th> # </th>'. |
"\n".'<th> Problem Title </th>'. |
"\n".'<th> Problem Title </th>'. |
"\n".'<th> Resouse </th>'. |
"\n".'<th> Resource </th>'. |
"\n".'<th> Address </th>'. |
"\n".'<th> Address </th>'. |
"\n".'</tr>'; |
"\n".'</tr>'; |
|
|
my $P_No=1; |
my $P_No=1; |
foreach (sort keys %OpResp) { |
foreach (sort keys %OpResp) { |
my $Temp = '<a href="'.$hash{'src_'.$OpResp{$_}}. |
my ($rid,$part)=split(/\:/,$OpResp{$_}); |
'" target="_blank">'.$hash{'title_'.$OpResp{$_}}.'</a>'; |
my $Temp = '<a href="'.$hash{'src_'.$rid}. |
|
'" target="_blank">'.$hash{'title_'.$rid}.'</a>'; |
$Str .= "\n"."<tr>". |
$Str .= "\n"."<tr>". |
"\n"."<td> $P_No </td>". |
"\n"."<td> $P_No </td>". |
"\n"."<td bgcolor=#DDFFDD> ".$Temp." </td>". |
"\n"."<td bgcolor=#DDFFDD> ".$Temp." </td>". |
"\n"."<td bgcolor=#EEFFCC> ".$hash{'src_'.$OpResp{$_}}." </td>". |
"\n"."<td bgcolor=#EEFFCC> ".$hash{'src_'.$rid}." </td>". |
"\n"."<td> ".'<input type="submit" name="sort" value="'.'Analyze_'.$OpResp{$_}.'" />'.'</td>'. |
"\n"."<td> ".'<input type="submit" name="sort" value="'.'Analyze_'.$rid.'" />'.'</td>'. |
"\n"."</tr>"; |
"\n"."</tr>"; |
$P_No++; |
$P_No++; |
} |
} |
Line 337 sub AnalyzeProblem {
|
Line 365 sub AnalyzeProblem {
|
|
|
|
|
sub Decide { |
sub Decide { |
|
#deciding the true or false answer belongs to each interval |
my ($type,$foil,$time)=@_; |
my ($type,$foil,$time)=@_; |
my $k=0; |
my $k=0; |
while ($time>$ConceptData{'Int.'.($k+1)} && |
while ($time>$ConceptData{'Int.'.($k+1)} && |
Line 345 sub Decide {
|
Line 374 sub Decide {
|
} |
} |
|
|
|
|
|
#restore the student submissions and finding the result |
sub OpStatus { |
sub OpStatus { |
my ($rid,$student)=@_; |
my ($rid,$student)=@_; |
my ($uname,$udom)=split(/\:/,$student); |
my ($uname,$udom)=split(/\:/,$student); |
Line 356 sub OpStatus {
|
Line 386 sub OpStatus {
|
my @True = (); |
my @True = (); |
my @False = (); |
my @False = (); |
my $flag=0; |
my $flag=0; |
@shown=(); |
|
if ($reshash{'version'}) { |
if ($reshash{'version'}) { |
|
my $tries=0; |
|
&Apache::lonhomework::showhash(%Answer); |
for (my $version=1;$version<=$reshash{'version'};$version++) { |
for (my $version=1;$version<=$reshash{'version'};$version++) { |
my $time=$reshash{"$version:timestamp"}; |
my $time=$reshash{"$version:timestamp"}; |
foreach (sort(split(/\:/,$reshash{$version.':keys'}))) { |
|
if (($_=~/\.(\w+)\.(\w+)\.submission$/)) { |
foreach my $key (sort(split(/\:/,$reshash{$version.':keys'}))) { |
my $Id1 = $1; |
if (($key=~/\.(\w+)\.(\w+)\.submission$/)) { |
my $Id2 = $2; |
my $Id1 = $1; my $Id2 = $2; |
my $Resp = $reshash{$_}; |
#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); |
my %submission=&Apache::lonnet::str2hash($Resp); |
foreach (keys %submission) { |
foreach (keys %submission) { |
my $Ansr = $Answer{"$Id1.$Id2.foil.value.$_"}; |
my $Ansr = $Answer{"$Id1.$Id2.foil.value.$_"}; |
#$r->print("<br>shown: ".join(',',@shown)." size=$#shown"); |
|
if ($submission{$_}) { |
if ($submission{$_}) { |
#if($#shown==-1){ |
|
#my @str=split(/\&/,$Resp); |
|
#my $garb; |
|
#for(my $j=0;$j<=$#str;$j++){ |
|
# ($shown[$j],$garb)=split(/\=/,$str[$j]); |
|
#} |
|
##$r->print("<br>shown: ".join(',',@shown)." size=$#shown"); |
|
#} |
|
if ($submission{$_} eq $Ansr) { |
if ($submission{$_} eq $Ansr) { |
&Decide("true",$_,$time ); |
&Decide("true",$_,$time ); |
} |
} |
else {&Decide("false",$_,$time );} |
else {&Decide("false",$_,$time );} |
} |
} |
#else { |
|
# if ($#shown==-1 && $flag==0) { |
|
# $flag++; |
|
# &InitAnalysis($rid,$student); |
|
# } |
|
# my @erl=split(/\:/,$_); |
|
# for (my $i=0;$i<=$#shown; $i++){ |
|
# my $Ans=$Answer{"$Id1.$Id2.foil.value.$shown[$i]"}; |
|
# if ($erl[$i] eq $Ans) { |
|
# &Decide("true",$shown[$i],$time); |
|
# } |
|
# else {&Decide("false",$shown[$i],$time);} |
|
# } |
|
#} |
|
} |
} |
} |
} |
} |
} |
Line 508 sub StudentReport {
|
Line 523 sub StudentReport {
|
"\n".'<th> Tries </th>'. |
"\n".'<th> Tries </th>'. |
"\n".'</tr>'; |
"\n".'</tr>'; |
my ($temp)=keys(%result); |
my ($temp)=keys(%result); |
unless ($temp=~/^error\:/) { |
unless ($temp=~/^(con_lost|error|no_such_host)/i) { |
foreach my $CurCol (@cols) { |
foreach my $CurCol (@cols) { |
if (!$CurCol){ |
if (!$CurCol){ |
my $Set=&Apache::lonnet::declutter($hash{'map_id_'.$1}); |
my $Set=&Apache::lonnet::declutter($hash{'map_id_'.$1}); |
Line 600 sub StudentReport {
|
Line 615 sub StudentReport {
|
} |
} |
|
|
sub CreateTable { |
sub CreateTable { |
|
my ($Hd, $Hid)=@_; |
|
if ($ENV{'form.showcsv'}) { |
|
if ( $Hd == 1 ) { |
|
$r->print('<br>"'.$hash{'title_'.$Hid}.'","'.$hash{'src_'.$Hid}.'"'); |
|
} |
|
return; |
|
} |
my $ColNo=0; |
my $ColNo=0; |
foreach (keys(%Header)){ |
foreach (keys(%Header)){ |
$ColNo++; |
$ColNo++; |
} |
} |
my ($Hd, $Hid)=@_; |
|
if ( $Hd == 1 ) { |
if ( $Hd == 1 ) { |
$r->print('<br><a href="'.$hash{'src_'.$Hid}. |
$r->print('<br><a href="'.$hash{'src_'.$Hid}. |
'" target="_blank">'.$hash{'title_'.$Hid}.'</a>'); |
'" target="_blank">'.$hash{'title_'.$Hid}.'</a>'); |
Line 621 sub CreateTable {
|
Line 642 sub CreateTable {
|
} |
} |
|
|
sub CloseTable { |
sub CloseTable { |
|
if ($ENV{'form.showcsv'}) { |
|
return; |
|
} |
$r->print("\n".'</table>'."\n"); |
$r->print("\n".'</table>'."\n"); |
$r->rflush(); |
$r->rflush(); |
} |
} |
|
|
# ------------------------------------------- Prepare Statistics Table |
# ------------------------------------------- Prepare Statistics Table |
sub PreStatTable { |
sub PreStatTable { |
|
|
my $CacheDB = "/home/httpd/perl/tmp/$ENV{'user.name'}". |
my $CacheDB = "/home/httpd/perl/tmp/$ENV{'user.name'}". |
"_$ENV{'user.domain'}_$cid\_statistics.db"; |
"_$ENV{'user.domain'}_$cid\_statistics.db"; |
my $GraphDB = "/home/httpd/perl/tmp/$ENV{'user.name'}". |
my $GraphDB = "/home/httpd/perl/tmp/$ENV{'user.name'}". |
Line 659 sub PreStatTable {
|
Line 684 sub PreStatTable {
|
$Ptr .= '<pre>'. |
$Ptr .= '<pre>'. |
'<b> #Stdnts</b>: Total Number of Students opened the problem.<br>'. |
'<b> #Stdnts</b>: Total Number of Students opened the problem.<br>'. |
'<b> Tries </b>: Total Number of Tries for solving the problem.<br>'. |
'<b> Tries </b>: Total Number of Tries for solving the problem.<br>'. |
'<b> Mod </b> : Maximunm Number of Tries for solving the problem.<br>'. |
'<b> Mod </b>: Maximunm Number of Tries for solving the problem.<br>'. |
'<b> Mean </b>: Average Number of the tries. [ Tries / #Stdnts ]<br>'. |
'<b> Mean </b>: Average Number of the tries. [ Tries / #Stdnts ]<br>'. |
'<b> #YES </b>: Number of students solved the problem correctly.<br>'. |
'<b> #YES </b>: Number of students solved the problem correctly.<br>'. |
'<b> #yes </b>: Number of students solved the problem by override.<br>'. |
'<b> #yes </b>: Number of students solved the problem by override.<br>'. |
Line 683 sub PreStatTable {
|
Line 708 sub PreStatTable {
|
'</pre>'; |
'</pre>'; |
|
|
$r->print($Ptr); |
$r->print($Ptr); |
|
|
|
$r->print('Output CSV format: <input type=checkbox name=showcsv onClick="submit()"'); |
|
if ($ENV{'form.showcsv'}) { $r->print(' checked'); } |
|
$r->print('>'); |
|
|
$r->rflush(); |
$r->rflush(); |
|
|
if ((-e "$CacheDB")&&($ENV{'form.sort'} ne 'Recalculate Statistics')) { |
if ((-e "$CacheDB")&&($ENV{'form.sort'} ne 'Recalculate Statistics')) { |
Line 719 sub usection {
|
Line 749 sub usection {
|
my ($udom,$unam,$courseid,$ActiveFlag)=@_; |
my ($udom,$unam,$courseid,$ActiveFlag)=@_; |
$courseid=~s/\_/\//g; |
$courseid=~s/\_/\//g; |
$courseid=~s/^(\w)/\/$1/; |
$courseid=~s/^(\w)/\/$1/; |
foreach (split(/\&/,&Apache::lonnet::reply('dump:'. |
|
$udom.':'.$unam.':roles', |
my %result=&Apache::lonnet::dump('roles',$udom,$unam); |
&Apache::lonnet::homeserver($unam,$udom)))){ |
my ($checkForResult)=keys(%result); |
my ($key,$value)=split(/\=/,$_); |
if ($checkForResult=~/^(con_lost|error|no_such_host)/i) { |
$key=&Apache::lonnet::unescape($key); |
return -1; |
|
} |
|
foreach my $key (keys (%result)) { |
|
my $value=$result{$key}; |
if ($key=~/^$courseid(?:\/)*(\w+)*\_st$/) { |
if ($key=~/^$courseid(?:\/)*(\w+)*\_st$/) { |
my $section=$1; |
my $section=$1; |
if ($key eq $courseid.'_st') { $section=''; } |
if ($key eq $courseid.'_st') { $section=''; } |
my ($dummy,$end,$start)=split(/\_/,&Apache::lonnet::unescape($value)); |
my ($dummy,$end,$start)=split(/\_/,$value); |
if ( $ActiveFlag ne 'Any' ) { |
if ( $ActiveFlag ne 'Any' ) { |
my $now=time; |
my $now=time; |
my $notactive=0; |
my $notactive=0; |
Line 774 sub ExtractStudentData {
|
Line 807 sub ExtractStudentData {
|
my $SecLimit; |
my $SecLimit; |
my $MapLimit; |
my $MapLimit; |
my ($temp)=keys(%result); |
my ($temp)=keys(%result); |
unless ($temp=~/^error\:/) { |
unless ($temp=~/^(con_lost|error|no_such_host)/i) { |
foreach my $CurCol(@cols) { |
foreach my $CurCol(@cols) { |
($PrOrd,$ResId)=split(/\:/,$CurCol); |
($PrOrd,$ResId)=split(/\:/,$CurCol); |
if ( !$CurCol ) { next; } |
if ( !$CurCol ) { next; } |
Line 897 sub ExtractStudentData {
|
Line 930 sub ExtractStudentData {
|
} |
} |
|
|
|
|
|
|
# ------------------------------------------------------------ Build page table |
# ------------------------------------------------------------ Build page table |
sub tracetable { |
sub tracetable { |
my ($rid,$beenhere)=@_; |
my ($rid,$beenhere)=@_; |
Line 944 sub tracetable {
|
Line 978 sub tracetable {
|
foreach my $K(split(/\,/,&Apache::lonnet::metadata($meta,'packages'))) { |
foreach my $K(split(/\,/,&Apache::lonnet::metadata($meta,'packages'))) { |
if ($K=~/^optionresponse\_($Part)\_(\w+)$/) { |
if ($K=~/^optionresponse\_($Part)\_(\w+)$/) { |
#$r->print('<br>'.$_.'...'.$P_Order.'---'.$Part); |
#$r->print('<br>'.$_.'...'.$P_Order.'---'.$Part); |
$OpResp{$P_Order}=$frid; |
$OpResp{$P_Order}="$frid:$Part"; |
} |
} |
|
|
} |
} |
} |
} |
} |
} |
Line 968 sub tracetable {
|
Line 1001 sub tracetable {
|
foreach (split(/\,/,&Apache::lonnet::metadata($meta,'packages'))) { |
foreach (split(/\,/,&Apache::lonnet::metadata($meta,'packages'))) { |
if ($_=~/^optionresponse\_($Part)\_(\w+)$/) { |
if ($_=~/^optionresponse\_($Part)\_(\w+)$/) { |
#$r->print('<br>'.$_.'...'.$P_Order.'---'.$Part); |
#$r->print('<br>'.$_.'...'.$P_Order.'---'.$Part); |
$OpResp{$P_Order}=$rid; |
$OpResp{$P_Order}="$rid:$Part";; |
} |
} |
|
|
} |
} |
Line 1045 sub Build_Statistics {
|
Line 1078 sub Build_Statistics {
|
|
|
@list = sort (@list); |
@list = sort (@list); |
|
|
|
|
&Discriminant(); |
&Discriminant(); |
|
|
$OpSel2=''; |
$OpSel2=''; |
Line 1185 sub Cache_Statistics {
|
Line 1217 sub Cache_Statistics {
|
my @list = (); |
my @list = (); |
my $Useful; |
my $Useful; |
my $UnUseful; |
my $UnUseful; |
|
# $r->print('<input type="hidden" name="show" value="excel" />'."\n"); |
my %myHeader = reverse( %Header ); |
my %myHeader = reverse( %Header ); |
$Pos = $myHeader{$ENV{'form.sort'}}; |
$Pos = $myHeader{$ENV{'form.sort'}}; |
if ($Pos > 0) {$Pos++;} |
if ($Pos > 0) {$Pos++;} |
Line 1233 sub TableRow {
|
Line 1266 sub TableRow {
|
my ($Str,$Idx,$RealIdx)=@_; |
my ($Str,$Idx,$RealIdx)=@_; |
my($PrOrd,$Temp,$StdNo,$TotalTries,$MxTries,$Avg,$YES,$Override, |
my($PrOrd,$Temp,$StdNo,$TotalTries,$MxTries,$Avg,$YES,$Override, |
$Wrng,$DoD,$SD,$Sk,$_D1,$_D2,$Prob)=split(/\&/,$Str); |
$Wrng,$DoD,$SD,$Sk,$_D1,$_D2,$Prob)=split(/\&/,$Str); |
my $Ptr = "\n".'<tr>'. |
if ($ENV{'form.showcsv'}) { |
|
my ($ResId,$Dummy)=split(/\*/,$Prob); |
|
my $Ptr = "\n".'<br>'. |
|
"\n".'"'.($RealIdx+1).'",'. |
|
"\n".'"'.$hash{'title_'.$ResId}.$Dummy.'",'. |
|
"\n".'"'.$hash{'src_'.$ResId}.'",'. |
|
"\n".'"'.$StdNo.'",'. |
|
"\n".'"'.$TotalTries.'",'. |
|
"\n".'"'.$MxTries.'",'. |
|
"\n".'"'.$Avg.'",'. |
|
"\n".'"'.$YES.'",'. |
|
"\n".'"'.$Override.'",'. |
|
"\n".'"'.$Wrng.'",'. |
|
"\n".'"'.$DoD.'",'. |
|
"\n".'"'.$SD.'",'. |
|
"\n".'"'.$Sk.'",'. |
|
"\n".'"'.$_D1.'",'. |
|
"\n".'"'.$_D2.'"'; |
|
$r->print("\n".$Ptr); |
|
} |
|
else{ |
|
my $Ptr = "\n".'<tr>'. |
"\n".'<td>'.($RealIdx+1).'</td>'. |
"\n".'<td>'.($RealIdx+1).'</td>'. |
# "\n".'<td>'.$PrOrd.$Temp.'</td>'. |
# "\n".'<td>'.$PrOrd.$Temp.'</td>'. |
"\n".'<td>'.$Temp.'</td>'. |
"\n".'<td>'.$Temp.'</td>'. |
Line 1249 sub TableRow {
|
Line 1303 sub TableRow {
|
"\n".'<td bgcolor="#DDFFDD"> '.$Sk.'</td>'. |
"\n".'<td bgcolor="#DDFFDD"> '.$Sk.'</td>'. |
"\n".'<td bgcolor="#FFDDFF"> '.$_D1.'</td>'. |
"\n".'<td bgcolor="#FFDDFF"> '.$_D1.'</td>'. |
"\n".'<td bgcolor="#FFDDFF"> '.$_D2.'</td>'; |
"\n".'<td bgcolor="#FFDDFF"> '.$_D2.'</td>'; |
$r->print("\n".$Ptr.'</tr>' ); |
$r->print("\n".$Ptr.'</tr>' ); |
|
} |
$GraphDat{$RealIdx}=$DoD.':'.$Wrng; |
$GraphDat{$RealIdx}=$DoD.':'.$Wrng; |
} |
} |
|
|
# ------------------------------------------- Prepare data for Graphical chart |
# ------------------------------------------- Prepare data for Graphical chart |
|
|
sub GetGraphData { |
sub GetGraphData { |
my $Tag = shift; |
my $ylab = shift; |
my $Col; |
my $Col; |
my $data=''; |
my $data=''; |
my $count = 0; |
my $count = 0; |
Line 1267 sub GetGraphData {
|
Line 1322 sub GetGraphData {
|
foreach (keys %GraphDat) {delete $GraphDat{$_};} |
foreach (keys %GraphDat) {delete $GraphDat{$_};} |
if (-e "$GraphDB") { |
if (-e "$GraphDB") { |
if (tie(%GraphDat,'GDBM_File',"$GraphDB",&GDBM_READER,0640)) { |
if (tie(%GraphDat,'GDBM_File',"$GraphDB",&GDBM_READER,0640)) { |
if ( $Tag eq 'DoDiff Graph' ) { |
if ( $ylab eq 'DoDiff Graph' ) { |
$Tag = 'Degree-of-Difficulty'; |
$ylab = 'Degree-of-Difficulty'; |
$Col = 0; |
$Col = 0; |
} |
} |
else { |
else { |
$Tag = 'Wrong-Percentage'; |
$ylab = 'Wrong-Percentage'; |
$Col = 1; |
$Col = 1; |
} |
} |
foreach (sort NumericSort keys %GraphDat) { |
foreach (sort NumericSort keys %GraphDat) { |
Line 1290 sub GetGraphData {
|
Line 1345 sub GetGraphData {
|
untie(%GraphDat); |
untie(%GraphDat); |
my $Course = $ENV{'course.'.$cid.'.description'}; |
my $Course = $ENV{'course.'.$cid.'.description'}; |
$Course =~ s/\ /"_"/eg; |
$Course =~ s/\ /"_"/eg; |
$GData=$Course.'&'.$Tag.'&'.$Max.'&'.$count.'&'.$data; |
$GData=$Course.'&'.'Problems'.'&'.$ylab.'&'.$Max.'&'.$count.'&'.$data; |
} |
} |
else { |
else { |
$r->print("Unable to tie hash to db file"); |
$r->print("Unable to tie hash to db file"); |
Line 1323 sub initial {
|
Line 1378 sub initial {
|
$HWN=$P_Order; |
$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 { |
sub ClassList { |
|
|
&GetStatus(); |
&GetStatus(); |
|
|
$cid=$ENV{'request.course.id'}; |
$cid=$ENV{'request.course.id'}; |
my $chome=$ENV{'course.'.$cid.'.home'}; |
|
my ($cdom,$cnum)=split(/\_/,$cid); |
my ($cdom,$cnum)=split(/\_/,$cid); |
# ----------------------- Get first and last resource, see if there is anything |
# ----------------------- Get first and last resource, see if there is anything |
$firstres=$hash{'map_start_/res/'.$ENV{'request.course.uri'}}; |
$firstres=$hash{'map_start_/res/'.$ENV{'request.course.uri'}}; |
$lastres=$hash{'map_finish_/res/'.$ENV{'request.course.uri'}}; |
$lastres=$hash{'map_finish_/res/'.$ENV{'request.course.uri'}}; |
if (($firstres) && ($lastres)) { |
if (($firstres) && ($lastres)) { |
# ----------------------------------------------------------------- Render page |
# my %students = &Apache::lonnet::dump('classlist',$cdom,$cnum); |
my $classlst=&Apache::lonnet::reply |
# $Apache::lonxml::debug=1; |
('dump:'.$cdom.':'.$cnum.':classlist',$chome); |
# &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 $StudNo = 0; |
my $StudNo = 0; |
my $now=time; |
my $now=time; |
unless ($classlst=~/^error\:/) { |
|
foreach (sort split(/\&/,$classlst)) { |
my %classlist=&Apache::lonnet::dump('classlist',$cdom,$cnum); |
my ($name,$value)=split(/\=/,$_); |
|
my ($end,$start)=split(/\:/,&Apache::lonnet::unescape($value)); |
my ($checkForError)=keys(%result); |
$name=&Apache::lonnet::unescape($name); |
if($checkForError=~/^(con_lost|error|no_such_host)/i) { |
my ($sname,$sdom)=split(/\:/,$name); |
$r->print('<h1>Could not access course data</h1>'); |
|
} else { |
|
foreach my $name (keys (%classlist)) { |
|
my $value=$classlist{$name}; |
|
my ($end,$start)=split(/\:/,$value); |
my $active=1; |
my $active=1; |
my $Status=$ENV{'form.status'}; |
my $Status=$ENV{'form.status'}; |
$Status = ($Status) ? $Status : 'Active'; |
$Status = ($Status) ? $Status : 'Active'; |
if ( ( ($end) && $now > $end ) && |
if ( ( ($end) && $now > $end ) && |
( ($Status eq 'Active') ) ) { $active=0; } |
( ($Status eq 'Active') ) ) { $active=0; } |
if ( ($Status eq 'Expired') && |
if ( ($Status eq 'Expired') && |
($end == 0 || $now < $end) ) { $active=0; } |
($end == 0 || $now < $end) ) { $active=0; } |
#//new |
|
# $Status = 'Any'; |
|
#end new |
|
if ($active) { |
if ($active) { |
my $thisindex=$#students+1; |
my $thisindex=$#students+1; |
$name=&Apache::lonnet::unescape($name); |
|
$students[$thisindex]=$name; |
$students[$thisindex]=$name; |
my ($sname,$sdom)=split(/\:/,$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); |
my $ssec=&usection($sdom,$sname,$cid,$Status); |
# if ($ssec==-1 ) {next;} |
|
if ($ssec==-1 || $ssec eq 'adm' ) {next;} |
if ($ssec==-1 || $ssec eq 'adm' ) {next;} |
$ssec=($ssec) ? $ssec : '(none)'; |
$ssec=($ssec) ? $ssec : '(none)'; |
#$ssec=(int($ssec)) ? int($ssec) : $ssec; |
#$ssec=(int($ssec)) ? int($ssec) : $ssec; |
Line 1376 sub ClassList {
|
Line 1453 sub ClassList {
|
$StuBox{$sname}=$sdom; |
$StuBox{$sname}=$sdom; |
} |
} |
$StudNo++; |
$StudNo++; |
} |
} |
} |
} |
} |
} |
else { |
|
$r->print('<h1>Could not access course data</h1>'); |
|
} |
|
$r->print("Total number of students : ".($#students+1)); |
$r->print("Total number of students : ".($#students+1)); |
$r->rflush(); |
$r->rflush(); |
# --------------- Find all assessments and put them into some linear-like order |
# --------------- Find all assessments and put them into some linear-like order |
Line 1419 sub Title {
|
Line 1494 sub Title {
|
$r->rflush(); |
$r->rflush(); |
} |
} |
|
|
|
|
sub CreateForm { |
sub CreateForm { |
$r->print("\n".'<form name=stat method=post action="/adm/statistics" >'); |
$r->print("\n".'<form name=stat method=post action="/adm/statistics" >'); |
my $content = $ENV{'form.sort'}; |
my $content = $ENV{'form.sort'}; |
if ($content eq '' || $content eq 'Return to Menu') { |
if (!($ENV{'form.showcsv'}) && |
|
($content eq '' || $content eq 'Return to Menu')) { |
my $Ptr = '<h3>'; |
my $Ptr = '<h3>'; |
$Ptr .= '<input type=submit name=sort value="Problem Stats"/>'; |
$Ptr .= '<input type=submit name=sort value="Problem Stats"/>'; |
$Ptr .= '<br><br>'; |
$Ptr .= '<br><br>'; |
Line 1430 sub CreateForm {
|
Line 1507 sub CreateForm {
|
$Ptr .= '<br><br>'; |
$Ptr .= '<br><br>'; |
$Ptr .= '<input type=submit name=sort value="Student Assessment"/>'; |
$Ptr .= '<input type=submit name=sort value="Student Assessment"/>'; |
$Ptr .= '</h3>'; |
$Ptr .= '</h3>'; |
|
#$Ptr .= '<input type=submit name=sort value="Activity Log"/>'; |
|
#$Ptr .= '</h3>'; |
$r->print( $Ptr ); |
$r->print( $Ptr ); |
} |
} |
else { |
else { |
|
&ClassList(); |
if ( $content eq 'Student Assessment' || |
if ( $content eq 'Student Assessment' || |
$content eq 'Create Student Report' ) { |
$content eq 'Create Student Report' ) { |
&MapSecOptions(); |
&MapSecOptions(); |
Line 1452 sub CreateForm {
|
Line 1532 sub CreateForm {
|
|
|
sub Menu { |
sub Menu { |
&initial(); |
&initial(); |
|
# $Apache::lonxml::debug=1; |
|
# &Apache::lonhomework::showhash(%ENV); |
|
# $Apache::lonxml::debug=0; |
&Title(); |
&Title(); |
&ClassList(); |
|
my $InpStr = $ENV{'form.sort'}; |
my $InpStr = $ENV{'form.sort'}; |
if ($InpStr=~/^Analyze\_/) { |
if ($InpStr eq 'Activity Log') { |
|
&Activity(); |
|
} |
|
elsif ($InpStr=~/^Analyze\_/) { |
|
&ClassList(); |
&ShowOpGraph($InpStr,$ENV{'form.interval'}); |
&ShowOpGraph($InpStr,$ENV{'form.interval'}); |
} |
} |
#elsif ($InpStr=~/^View\_/) { |
|
# &ShowStG(); |
|
# } |
|
elsif ( $InpStr eq 'DoDiff Graph' || $InpStr eq '%Wrong Graph' ) { |
elsif ( $InpStr eq 'DoDiff Graph' || $InpStr eq '%Wrong Graph' ) { |
&GetGraphData($InpStr); |
&GetGraphData($InpStr); |
$r->print('<IMG src="/cgi-bin/graph.gif?'.$GData.'" />'); |
$r->print('<IMG src="/cgi-bin/graph.gif?'.$GData.'" />'); |
Line 1474 sub Menu {
|
Line 1557 sub Menu {
|
$r->rflush(); |
$r->rflush(); |
} |
} |
|
|
|
|
sub StudentOptions { |
sub StudentOptions { |
my $OpSel5=''; |
my $OpSel5=''; |
$CurStu = $ENV{'form.student'}; |
$CurStu = $ENV{'form.student'}; |
Line 1530 sub GetStatus {
|
Line 1614 sub GetStatus {
|
sub MapSecOptions { |
sub MapSecOptions { |
# ----------------------------------- Loading the Maps Combobox |
# ----------------------------------- Loading the Maps Combobox |
my $Ptr = '<br>'; |
my $Ptr = '<br>'; |
$Ptr .= '<br><input type="submit" name="sort" value="Return to Menu" />'; |
$Ptr .= '<input type="submit" name="sort" value="Return to Menu" />'; |
$Ptr .= '<br><b> Select Map </b>'."\n". |
$Ptr .= '<br><b> Select Map </b>'."\n". |
'<select name="maps">'."\n". |
'<select name="maps">'."\n". |
'<option '.$OpSel3.'>All Maps</option>'; |
'<option '.$OpSel3.'>All Maps</option>'; |