version 1.212, 2006/11/28 16:43:51
|
version 1.213, 2006/12/01 22:53:08
|
Line 1061 DONEBUTTON
|
Line 1061 DONEBUTTON
|
$start_time=&Apache::lonlocal::locallocaltime($start_time); |
$start_time=&Apache::lonlocal::locallocaltime($start_time); |
|
|
my $status = |
my $status = |
"\n<div class='LC_$bt_status LC_criteria'>\n\t"; |
"\n<div class='LC_$bt_status LC_criteria LC_task_overall_status'>\n\t"; |
|
|
|
my $dim = $top; |
|
my %counts = &get_counts($dim,undef,$parstack, |
|
$safeeval); |
|
my $question_status ="\n\t<p>". |
|
&question_status_message(\%counts,-1). |
|
"</p>\n"; |
|
|
if ($bt_status eq 'pass') { |
if ($bt_status eq 'pass') { |
$status.='<h2>You passed the '.$title.' given on '. |
$status.='<h2>You passed the '.$title.' given on '. |
$start_time.'</h2>'; |
$start_time.'</h2>'; |
|
$status.=$question_status; |
} |
} |
if ($bt_status eq 'fail') { |
if ($bt_status eq 'fail') { |
$status.='<h2>You did not pass the '.$title.' given on '. |
$status.='<h2>You did not pass the '.$title.' given on '. |
$start_time.'</h2>'; |
$start_time.'</h2>'; |
|
$status.=$question_status; |
if (!$previous) { |
if (!$previous) { |
$status.=&add_request_another_attempt_button(); |
$status.=&add_request_another_attempt_button(); |
} |
} |
} |
} |
$status.="\n".'</div>'."\n"; |
|
my $dim = $top; |
|
my %counts = &get_counts($dim,undef,$parstack, |
|
$safeeval); |
|
$status.="\n<div class='LC_$bt_status LC_criteria LC_task_overall_status'>\n\t<p>". |
|
&question_status_message(\%counts,-1). |
|
"</p>\n</div>\n"; |
|
|
|
|
$status.="\n".'</div>'."\n"; |
|
|
foreach my $id (@{$dimension{$dim}{'criterias'}}) { |
foreach my $id (@{$dimension{$dim}{'criterias'}}) { |
my $type = $dimension{$dim}{'criteria.'.$id.'.type'}; |
my $type = $dimension{$dim}{'criteria.'.$id.'.type'}; |
Line 2431 sub question_status_message {
|
Line 2434 sub question_status_message {
|
foreach my $type ('cri','dim') { |
foreach my $type ('cri','dim') { |
if ($counts->{$req.'_'.$type}) { |
if ($counts->{$req.'_'.$type}) { |
push(@sections, |
push(@sections, |
$counts->{$req.'_'.$type.'_passed'}.' of '. |
$counts->{$req.'_'.$type.'_passed'}.' of the '. |
$counts->{$req.'_'.$type}.' '. |
$counts->{$req.'_'.$type}.' '. |
$req{$req}.' '.$type{$type}); |
$req{$req}.' '.$type{$type}); |
} |
} |