';
+ $result.= ''."\n";
}
return $result;
}
@@ -295,18 +302,19 @@ sub add_request_another_attempt_button {
my $description=&Apache::slotrequest::get_description($slot_name,
$slot);
$result.=(< Will be next available: $description
+
Will be next available: $description
STUFF
}
if ($env{'request.enc'}) { $symb=&Apache::lonenc::encrypted($symb); }
$symb=&escape($symb);
- $result.='';
+ &mt($text).'" />'."\n\t".
+ ''."\n";
return $result;
}
@@ -584,7 +592,7 @@ sub start_Task {
$result.='";
+ $result.=$uri.'">'.&add_grading_button()."\n";
my $symb=&Apache::lonnet::symbread();
if (&Apache::lonnet::allowed('mgq',$env{'request.course.id'})) {
$result.='';
+ }
+
+ $result.='';
+
+ if (!$previous && $status ne 'SHOW_ANSWER' &&
+ &show_task($status,$previous)) {
my $action = &Apache::lonenc::check_encrypt($env{'request.uri'});
$result.=<
@@ -1037,7 +1050,8 @@ DONEBUTTON
}
$start_time=&Apache::lonlocal::locallocaltime($start_time);
- my $status = "\n
\n";
+ my $status =
+ "\n
\n\t";
if ($bt_status eq 'pass') {
$status.='
You passed the '.$title.' given on '.
@@ -1050,15 +1064,13 @@ DONEBUTTON
$status.=&add_request_another_attempt_button();
}
}
- $status.='
';
+ $status.="\n".'
'."\n";
my $dim = $top;
my %counts = &get_counts($dim,undef,$parstack,
$safeeval);
- $status.="\n
".
- &mt('You needed to pass all of the [_1] mandatory components and [_2] of the [_3] optional components, of which you passed [_4].',
- $counts{'man'},$counts{'opt_req'},
- $counts{'opt'},$counts{'opt_passed'}).
- "
\n";
+ $status.="\n
\n\t
".
+ &question_status_message(\%counts,-1).
+ "
\n
\n";
foreach my $id (@{$dimension{$dim}{'criterias'}}) {
@@ -2181,6 +2193,7 @@ sub end_Dimension {
my $instance=&get_instance($dim);
my $version=&get_version();
if ($target eq 'web') {
+ $result .= "\n".'
'."\n";
$result .= &nested_parse(\$dimension{$dim}{'intro'},[@_]);
my @instances = $instance;
if (&Apache::response::showallfoils()) {
@@ -2212,22 +2225,23 @@ sub end_Dimension {
if (&Apache::lonxml::get_param('Mandatory',$parstack,$safeeval) eq 'N') {
$mandatory='Optional';
}
- my $dim_info="
\n";
+ my $dim_info=
+ "\n
\n\t";
my $question = ('sub' x $dimension{$dim}{'depth'}).'question';
$question =~ s/^(.)/uc($1)/e;
if ($dim_status eq 'pass') {
- $dim_info.='
'.$question.' : you passed this '.$mandatory.' question
';
+ $dim_info.='
'.$question.' : you passed the above '.$mandatory.' question
';
}
if ($dim_status eq 'fail') {
- $dim_info.='
'.$question.' : you did not pass this '.$mandatory.' question
';
+ $dim_info.='
'.$question.' : you did not pass the above '.$mandatory.' question
';
}
my %counts = &get_counts($dim,$instance,$parstack,
$safeeval);
- $dim_info.="\n
\n";
foreach my $id (@{$dimension{$dim}{$instance.'.criterias'}},
@{$dimension{$dim}{'criterias'}}) {
@@ -2241,11 +2255,15 @@ sub end_Dimension {
[@_]);
$dim_info .= &layout_web_Criteria($dim,$id,$criteria);
}
+ # puts the results at the end of the dimension
+ $result .= $dim_info;
- my $internal_location=&internal_location($dim);
- $result=~s/\Q$internal_location\E/$dim_info/;
+ # puts the results at the beginning of the dimension
+ # my $internal_location=&internal_location($dim);
+ # $result=~s/\Q$internal_location\E/$dim_info/;
}
}
+ $result .= "\n
\n";
} elsif ($target eq 'webgrade') {
# in case of any side effects that we need
&nested_parse(\$dimension{$dim}{'intro'},[@_]);
@@ -2351,7 +2369,7 @@ sub end_Dimension {
return $result;
}
-sub status_message {
+sub question_status_message {
my ($counts,$depth) = @_;
my %req = ('man' => 'mandatory',
'opt' => 'optional',);
@@ -2501,11 +2519,12 @@ sub grading_history {
$entry.=' comment: "'.$Apache::lonhomework::history{"$t:$scope.comment"}.'"';
}
if ($entry) {
- $result.= "
$grader : $entry
";
+ $result.= "\n\t\t
\n\t\t\t$grader :\n\t\t\t $entry \n\t\t
";
}
}
if ($result) {
- return '
'.$result.'
';
+ return "\n\t".'
'.$result.
+ "\n\t".'
'."\n";
}
return '';
}
@@ -2618,15 +2637,21 @@ sub layout_web_Criteria {
my $status_display=$status;
$status_display=~s/^([a-z])/uc($1)/e;
my $criteria_info.=
- '