version 1.9, 2002/08/31 18:31:15
|
version 1.12, 2002/09/22 18:24:45
|
Line 290 sub StudentReport {
|
Line 290 sub StudentReport {
|
|
|
my $Str = ''; |
my $Str = ''; |
if(defined($cache->{$name.':error'})) { |
if(defined($cache->{$name.':error'})) { |
return '<br><br><br>'; |
return $Str; |
# return 'ERROR in student report for '.$name.'<br>'; |
|
} |
} |
if($cache->{$name.':error'} =~ /course/) { |
if($cache->{$name.':error'} =~ /course/) { |
$Str .= '<b><font color="blue">No course data for student </font>'; |
$Str .= '<b><font color="blue">No course data for student </font>'; |
Line 299 sub StudentReport {
|
Line 298 sub StudentReport {
|
return $Str; |
return $Str; |
} |
} |
|
|
|
my $hasVersion = 'false'; |
|
my $hasFinalData = 'false'; |
foreach my $sequence (@$showSequences) { |
foreach my $sequence (@$showSequences) { |
|
my $hasData = 'false'; |
my $characterCount=0; |
my $characterCount=0; |
foreach my $problemID (split(':', $cache->{$sequence.':problems'})) { |
foreach my $problemID (split(':', $cache->{$sequence.':problems'})) { |
my $problem = $cache->{$problemID.':problem'}; |
my $problem = $cache->{$problemID.':problem'}; |
Line 308 sub StudentReport {
|
Line 310 sub StudentReport {
|
# current problem in the correct order and prepare the output links |
# current problem in the correct order and prepare the output links |
foreach(split(/\:/,$cache->{$sequence.':'.$problemID. |
foreach(split(/\:/,$cache->{$sequence.':'.$problemID. |
':parts'})) { |
':parts'})) { |
$characterCount++; |
|
if($cache->{$name.':'.$problemID.':NoVersion'} eq 'true' || |
if($cache->{$name.':'.$problemID.':NoVersion'} eq 'true' || |
$cache->{$name.':'.$problemID.':'.$_.':code'} eq ' ') { |
$cache->{$name.':'.$problemID.':'.$_.':code'} eq ' ' || |
|
$cache->{$name.':'.$problemID.':'.$_.':code'} eq '') { |
$Str .= ' '; |
$Str .= ' '; |
|
$characterCount++; |
next; |
next; |
} |
} |
|
$hasVersion = 'true'; |
|
$hasData = 'true'; |
$Str .= '<a href="/adm/grades?symb='; |
$Str .= '<a href="/adm/grades?symb='; |
$Str .= &Apache::lonnet::escape($problem); |
$Str .= &Apache::lonnet::escape($problem); |
$Str .= '&student='.$username.'&domain='.$domain; |
$Str .= '&student='.$username.'&domain='.$domain; |
Line 324 sub StudentReport {
|
Line 329 sub StudentReport {
|
$code = $tries; |
$code = $tries; |
} |
} |
$Str .= $code; |
$Str .= $code; |
$Str.='</a>'; |
$Str .= '</a>'; |
|
$characterCount++; |
} |
} |
} |
} |
|
|
Line 337 sub StudentReport {
|
Line 343 sub StudentReport {
|
|
|
my $outputProblemsCorrect = sprintf("%3d", $cache->{$name.':'.$sequence. |
my $outputProblemsCorrect = sprintf("%3d", $cache->{$name.':'.$sequence. |
':problemsCorrect'}); |
':problemsCorrect'}); |
$Str .= '<font color="#007700">'.$outputProblemsCorrect.'</font>'; |
if($hasData eq 'true') { |
|
$Str .= '<font color="#007700">'.$outputProblemsCorrect.'</font>'; |
|
$hasFinalData = 'true'; |
|
} else { |
|
$Str .= '<font color="#007700"> </font>'; |
|
} |
$Str .= $spacing; |
$Str .= $spacing; |
} |
} |
|
|
Line 346 sub StudentReport {
|
Line 357 sub StudentReport {
|
# a way to dynamically determine the space requirements. |
# a way to dynamically determine the space requirements. |
my $outputProblemsSolved = sprintf("%4d", $cache->{$name.':problemsSolved'}); |
my $outputProblemsSolved = sprintf("%4d", $cache->{$name.':problemsSolved'}); |
my $outputTotalProblems = sprintf("%4d", $cache->{$name.':totalProblems'}); |
my $outputTotalProblems = sprintf("%4d", $cache->{$name.':totalProblems'}); |
$Str .= '<font color="#000088">'.$outputProblemsSolved. |
if($hasFinalData eq 'true') { |
|
$Str .= '<font color="#000088">'.$outputProblemsSolved. |
' / '.$outputTotalProblems.'</font>'; |
' / '.$outputTotalProblems.'</font>'; |
|
} else { |
|
$Str .= '<font color="#000088"> </font>'; |
|
} |
|
|
|
if($hasVersion eq 'false') { |
|
$Str = '<b><font color="blue">No course data.</font></b>'; |
|
} |
|
|
return $Str; |
return $Str; |
} |
} |
Line 364 problems.
|
Line 383 problems.
|
|
|
sub CreateLegend { |
sub CreateLegend { |
my $Str = "<p><pre>". |
my $Str = "<p><pre>". |
"1..9: correct by student in 1..9 tries\n". |
"1..9 correct by student in 1..9 tries\n". |
" *: correct by student in more than 9 tries\n". |
" * correct by student in more than 9 tries\n". |
" +: correct by override\n". |
" + correct by override\n". |
" -: incorrect by override\n". |
" - incorrect by override\n". |
" .: incorrect attempted\n". |
" . incorrect attempted\n". |
" #: ungraded attempted\n". |
" # ungraded attempted\n". |
" : not attempted\n". |
" not attempted\n". |
" x: excused". |
" x excused". |
"</pre><p>"; |
"</pre><p>"; |
return $Str; |
return $Str; |
} |
} |